Move from Evas_Object_List to Eina_Inlist and completly remove Evas_Object_List.

SVN revision: 36750
This commit is contained in:
Cedric BAIL 2008-10-17 11:23:18 +00:00
parent c74f8c820b
commit c99824328f
50 changed files with 545 additions and 697 deletions

View File

@ -37,7 +37,6 @@
typedef unsigned char Evas_Bool; typedef unsigned char Evas_Bool;
#define Evas_List Eina_List #define Evas_List Eina_List
#define Evas_Object_List Eina_Inlist
typedef struct _Evas_Array_Hash Evas_Array_Hash; typedef struct _Evas_Array_Hash Evas_Array_Hash;
typedef struct _Evas_Hash Evas_Hash; /**< A Hash table handle */ typedef struct _Evas_Hash Evas_Hash; /**< A Hash table handle */
@ -45,7 +44,7 @@ typedef struct _Evas_Hash Evas_Hash; /**< A Hash table handl
struct _Evas_Hash struct _Evas_Hash
{ {
int population; int population;
Evas_Object_List *buckets[256]; Eina_Inlist *buckets[256];
}; };
#ifdef __cplusplus #ifdef __cplusplus
@ -110,16 +109,6 @@ extern "C" {
#define evas_list_sort eina_list_sort #define evas_list_sort eina_list_sort
#define evas_list_alloc_error eina_error_get #define evas_list_alloc_error eina_error_get
/*
* Evas Object List functions
*/
#define evas_object_list_append eina_inlist_append
#define evas_object_list_prepend eina_inlist_prepend
#define evas_object_list_append_relative eina_inlist_append_relative
#define evas_object_list_prepend_relative eina_inlist_prepend_relative
#define evas_object_list_remove eina_inlist_remove
#define evas_object_list_find eina_inlist_find
/* /*
* Evas Stringshare functions * Evas Stringshare functions
*/ */

View File

@ -46,10 +46,10 @@ struct _Evas_Cache_Image
{ {
Evas_Cache_Image_Func func; Evas_Cache_Image_Func func;
Evas_Object_List *dirty; Eina_Inlist *dirty;
Evas_Object_List *lru; Eina_Inlist *lru;
Evas_Object_List *lru_nodata; Eina_Inlist *lru_nodata;
Evas_Hash *inactiv; Evas_Hash *inactiv;
Evas_Hash *activ; Evas_Hash *activ;
void *data; void *data;
@ -87,11 +87,11 @@ struct _Evas_Cache_Engine_Image
{ {
Evas_Cache_Engine_Image_Func func; Evas_Cache_Engine_Image_Func func;
Evas_Object_List* dirty; Eina_Inlist* dirty;
Evas_Hash* activ; Evas_Hash* activ;
Evas_Hash* inactiv; Evas_Hash* inactiv;
Evas_Object_List* lru; Eina_Inlist* lru;
Evas_Cache_Image* parent; Evas_Cache_Image* parent;
Evas_Cache_Engine_Image* brother; Evas_Cache_Engine_Image* brother;

View File

@ -15,7 +15,7 @@ _evas_cache_engine_image_make_dirty(Evas_Cache_Engine_Image *cache,
eim->flags.dirty = 1; eim->flags.dirty = 1;
eim->flags.loaded = 1; eim->flags.loaded = 1;
eim->flags.activ = 0; eim->flags.activ = 0;
cache->dirty = evas_object_list_prepend(cache->dirty, eim); cache->dirty = eina_inlist_prepend(cache->dirty, EINA_INLIST_GET(eim));
} }
static void static void
@ -38,7 +38,7 @@ _evas_cache_engine_image_make_inactive(Evas_Cache_Engine_Image *cache,
eim->flags.dirty = 0; eim->flags.dirty = 0;
eim->flags.activ = 0; eim->flags.activ = 0;
cache->inactiv = evas_hash_add(cache->inactiv, key, eim); cache->inactiv = evas_hash_add(cache->inactiv, key, eim);
cache->lru = evas_object_list_prepend(cache->lru, eim); cache->lru = eina_inlist_prepend(cache->lru, EINA_INLIST_GET(eim));
cache->usage += cache->func.mem_size_get(eim); cache->usage += cache->func.mem_size_get(eim);
} }
@ -50,7 +50,7 @@ _evas_cache_engine_image_remove_activ(Evas_Cache_Engine_Image *cache,
{ {
if (eim->flags.dirty) if (eim->flags.dirty)
{ {
cache->dirty = evas_object_list_remove(cache->dirty, eim); cache->dirty = eina_inlist_remove(cache->dirty, EINA_INLIST_GET(eim));
} }
else else
if (eim->flags.activ) if (eim->flags.activ)
@ -61,7 +61,7 @@ _evas_cache_engine_image_remove_activ(Evas_Cache_Engine_Image *cache,
{ {
cache->usage -= cache->func.mem_size_get(eim); cache->usage -= cache->func.mem_size_get(eim);
cache->inactiv = evas_hash_del(cache->inactiv, eim->cache_key, eim); cache->inactiv = evas_hash_del(cache->inactiv, eim->cache_key, eim);
cache->lru = evas_object_list_remove(cache->lru, eim); cache->lru = eina_inlist_remove(cache->lru, EINA_INLIST_GET(eim));
} }
eim->flags.cached = 0; eim->flags.cached = 0;
eim->flags.dirty = 0; eim->flags.dirty = 0;

View File

@ -41,7 +41,7 @@ _evas_cache_image_make_dirty(Evas_Cache_Image *cache,
im->flags.dirty = 1; im->flags.dirty = 1;
im->flags.activ = 0; im->flags.activ = 0;
im->flags.lru_nodata = 0; im->flags.lru_nodata = 0;
cache->dirty = evas_object_list_prepend(cache->dirty, im); cache->dirty = eina_inlist_prepend(cache->dirty, EINA_INLIST_GET(im));
if (im->cache_key) if (im->cache_key)
{ {
@ -81,7 +81,7 @@ _evas_cache_image_make_inactiv(Evas_Cache_Image *cache,
im->flags.dirty = 0; im->flags.dirty = 0;
im->flags.cached = 1; im->flags.cached = 1;
cache->inactiv = evas_hash_direct_add(cache->inactiv, key, im); cache->inactiv = evas_hash_direct_add(cache->inactiv, key, im);
cache->lru = evas_object_list_prepend(cache->lru, im); cache->lru = eina_inlist_prepend(cache->lru, EINA_INLIST_GET(im));
cache->usage += cache->func.mem_size_get(im); cache->usage += cache->func.mem_size_get(im);
} }
else else
@ -97,7 +97,7 @@ _evas_cache_image_remove_lru_nodata(Evas_Cache_Image *cache,
if (im->flags.lru_nodata) if (im->flags.lru_nodata)
{ {
im->flags.lru_nodata = 0; im->flags.lru_nodata = 0;
cache->lru_nodata = evas_object_list_remove(cache->lru_nodata, im); cache->lru_nodata = eina_inlist_remove(cache->lru_nodata, EINA_INLIST_GET(im));
cache->usage -= cache->func.mem_size_get(im); cache->usage -= cache->func.mem_size_get(im);
} }
} }
@ -108,7 +108,7 @@ _evas_cache_image_activ_lru_nodata(Evas_Cache_Image *cache,
{ {
im->flags.need_data = 0; im->flags.need_data = 0;
im->flags.lru_nodata = 1; im->flags.lru_nodata = 1;
cache->lru_nodata = evas_object_list_prepend(cache->lru_nodata, im); cache->lru_nodata = eina_inlist_prepend(cache->lru_nodata, EINA_INLIST_GET(im));
cache->usage += cache->func.mem_size_get(im); cache->usage += cache->func.mem_size_get(im);
} }
@ -127,12 +127,12 @@ _evas_cache_image_remove_activ(Evas_Cache_Image *cache,
{ {
if (ie->flags.dirty) if (ie->flags.dirty)
{ {
cache->dirty = evas_object_list_remove(cache->dirty, ie); cache->dirty = eina_inlist_remove(cache->dirty, EINA_INLIST_GET(ie));
} }
else else
{ {
cache->inactiv = evas_hash_del(cache->inactiv, ie->cache_key, ie); cache->inactiv = evas_hash_del(cache->inactiv, ie->cache_key, ie);
cache->lru = evas_object_list_remove(cache->lru, ie); cache->lru = eina_inlist_remove(cache->lru, EINA_INLIST_GET(ie));
cache->usage -= cache->func.mem_size_get(ie); cache->usage -= cache->func.mem_size_get(ie);
} }
} }

View File

@ -1,13 +1,13 @@
#include "evas_common.h" #include "evas_common.h"
#include "evas_private.h" #include "evas_private.h"
static void evas_object_event_callback_list_post_free(Evas_Object_List **list); static void evas_object_event_callback_list_post_free(Eina_Inlist **list);
static void evas_object_event_callback_clear(Evas_Object *obj); static void evas_object_event_callback_clear(Evas_Object *obj);
static void static void
evas_object_event_callback_list_post_free(Evas_Object_List **list) evas_object_event_callback_list_post_free(Eina_Inlist **list)
{ {
Evas_Object_List *l; Eina_Inlist *l;
/* MEM OK */ /* MEM OK */
for (l = *list; l;) for (l = *list; l;)
@ -18,7 +18,7 @@ evas_object_event_callback_list_post_free(Evas_Object_List **list)
l = l->next; l = l->next;
if (fn->delete_me) if (fn->delete_me)
{ {
*list = evas_object_list_remove(*list, fn); *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn));
free(fn); free(fn);
} }
} }
@ -41,7 +41,7 @@ evas_object_event_callback_clear(Evas_Object *obj)
void void
evas_object_event_callback_all_del(Evas_Object *obj) evas_object_event_callback_all_del(Evas_Object *obj)
{ {
Evas_Object_List *l; Eina_Inlist *l;
if (!obj->callbacks) return; if (!obj->callbacks) return;
for (l = obj->callbacks->callbacks; l; l = l->next) for (l = obj->callbacks->callbacks; l; l = l->next)
@ -67,7 +67,7 @@ void
evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info) evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info)
{ {
/* MEM OK */ /* MEM OK */
Evas_Object_List **l_mod = NULL, *l; Eina_Inlist **l_mod = NULL, *l;
Evas_Button_Flags flags = EVAS_BUTTON_NONE; Evas_Button_Flags flags = EVAS_BUTTON_NONE;
Evas *e; Evas *e;
@ -346,7 +346,7 @@ evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, void (
return; return;
} }
obj->callbacks->callbacks = obj->callbacks->callbacks =
evas_object_list_append(obj->callbacks->callbacks, fn); eina_inlist_append(obj->callbacks->callbacks, EINA_INLIST_GET(fn));
} }
/** /**
@ -377,7 +377,7 @@ EAPI void *
evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info)) evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info))
{ {
/* MEM OK */ /* MEM OK */
Evas_Object_List *l; Eina_Inlist *l;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL; return NULL;
@ -437,7 +437,7 @@ EAPI void *
evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data) evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info), const void *data)
{ {
/* MEM OK */ /* MEM OK */
Evas_Object_List *l; Eina_Inlist *l;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL; return NULL;

View File

@ -2,16 +2,13 @@
#include "evas_private.h" #include "evas_private.h"
static Evas_List * static Evas_List *
_evas_event_object_list_in_get(Evas *e, Evas_List *in, const Evas_Object_List *list, Evas_Object *stop, int x, int y, int *no_rep) _evas_event_object_list_in_get(Evas *e, Evas_List *in, const Eina_Inlist *list, Evas_Object *stop, int x, int y, int *no_rep)
{ {
const Evas_Object_List *l; Evas_Object *obj;
if (!list) return in; if (!list) return in;
for (l = list->last; l; l = l->prev) EINA_INLIST_ITER_LAST(list, obj)
{ {
Evas_Object *obj;
obj = (Evas_Object *)l;
if (obj == stop) if (obj == stop)
{ {
*no_rep = 1; *no_rep = 1;
@ -61,18 +58,16 @@ _evas_event_object_list_in_get(Evas *e, Evas_List *in, const Evas_Object_List *l
Evas_List * Evas_List *
evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y) evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
{ {
Evas_Object_List *l; Evas_Layer *lay;
Evas_List *in = NULL; Evas_List *in = NULL;
if (!e->layers) return NULL; if (!e->layers) return NULL;
for (l = ((Evas_Object_List *)(e->layers))->last; l; l = l->prev) EINA_INLIST_ITER_LAST((EINA_INLIST_GET(e->layers)), lay)
{ {
Evas_Layer *lay;
int norep; int norep;
lay = (Evas_Layer *)l;
norep = 0; norep = 0;
in = _evas_event_object_list_in_get(e, in, (Evas_Object_List *)lay->objects, stop, in = _evas_event_object_list_in_get(e, in, EINA_INLIST_GET(lay->objects), stop,
x, y, &norep); x, y, &norep);
if (norep) return in; if (norep) return in;
} }
@ -148,19 +143,14 @@ evas_event_thaw(Evas *e)
e->events_frozen--; e->events_frozen--;
if (e->events_frozen == 0) if (e->events_frozen == 0)
{ {
Evas_Object_List *l; Evas_Layer *lay;
for (l = (Evas_Object_List *)e->layers; l; l = l->next) EINA_INLIST_ITER_NEXT((EINA_INLIST_GET(e->layers)), lay)
{ {
Evas_Object_List *l2; Evas_Object *obj;
Evas_Layer *lay;
lay = (Evas_Layer *)l; EINA_INLIST_ITER_NEXT(lay->objects, obj)
for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
{ {
Evas_Object *obj;
obj = (Evas_Object *)l2;
evas_object_clip_recalc(obj); evas_object_clip_recalc(obj);
evas_object_recalc_clippees(obj); evas_object_recalc_clippees(obj);
} }

View File

@ -14,7 +14,7 @@ evas_object_inject(Evas_Object *obj, Evas *e)
lay->layer = obj->cur.layer; lay->layer = obj->cur.layer;
evas_layer_add(lay); evas_layer_add(lay);
} }
lay->objects = evas_object_list_append(lay->objects, obj); lay->objects = (Evas_Object *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj));
lay->usage++; lay->usage++;
obj->layer = lay; obj->layer = lay;
obj->in_layer = 1; obj->in_layer = 1;
@ -24,7 +24,7 @@ void
evas_object_release(Evas_Object *obj, int clean_layer) evas_object_release(Evas_Object *obj, int clean_layer)
{ {
if (!obj->in_layer) return; if (!obj->in_layer) return;
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj); obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj));
obj->layer->usage--; obj->layer->usage--;
if (clean_layer) if (clean_layer)
{ {
@ -52,13 +52,10 @@ evas_layer_new(Evas *e)
void void
evas_layer_pre_free(Evas_Layer *lay) evas_layer_pre_free(Evas_Layer *lay)
{ {
Evas_Object_List *l; Evas_Object *obj;
for (l = (Evas_Object_List *)lay->objects; l; l = l->next) EINA_INLIST_ITER_NEXT(lay->objects, obj)
{ {
Evas_Object *obj;
obj = (Evas_Object *)l;
if ((!obj->smart.parent) && (!obj->delete_me)) if ((!obj->smart.parent) && (!obj->delete_me))
evas_object_del(obj); evas_object_del(obj);
} }
@ -80,13 +77,10 @@ evas_layer_free(Evas_Layer *lay)
Evas_Layer * Evas_Layer *
evas_layer_find(Evas *e, short layer_num) evas_layer_find(Evas *e, short layer_num)
{ {
Evas_Object_List *list; Evas_Layer *layer;
for (list = (Evas_Object_List *)e->layers; list; list = list->next) EINA_INLIST_ITER_NEXT(e->layers, layer)
{ {
Evas_Layer *layer;
layer = (Evas_Layer *)list;
if (layer->layer == layer_num) return layer; if (layer->layer == layer_num) return layer;
} }
return NULL; return NULL;
@ -95,31 +89,28 @@ evas_layer_find(Evas *e, short layer_num)
void void
evas_layer_add(Evas_Layer *lay) evas_layer_add(Evas_Layer *lay)
{ {
Evas_Object_List *list; Evas_Layer *layer;
for (list = (Evas_Object_List *)lay->evas->layers; list; list = list->next) EINA_INLIST_ITER_NEXT(lay->evas->layers, layer)
{ {
Evas_Layer *layer;
layer = (Evas_Layer *)list;
if (layer->layer > lay->layer) if (layer->layer > lay->layer)
{ {
lay->evas->layers = evas_object_list_prepend_relative(lay->evas->layers, lay, layer); lay->evas->layers = (Evas_Layer *)eina_inlist_prepend_relative(EINA_INLIST_GET(lay->evas->layers),
EINA_INLIST_GET(lay),
EINA_INLIST_GET(layer));
return; return;
} }
} }
lay->evas->layers = evas_object_list_append(lay->evas->layers, lay); lay->evas->layers = (Evas_Layer *)eina_inlist_append(EINA_INLIST_GET(lay->evas->layers), EINA_INLIST_GET(lay));
} }
void void
evas_layer_del(Evas_Layer *lay) evas_layer_del(Evas_Layer *lay)
{ {
Evas_Object_List *ol;
Evas *e; Evas *e;
ol = (Evas_Object_List *)lay;
e = lay->evas; e = lay->evas;
e->layers = evas_object_list_remove(e->layers, lay); e->layers = (Evas_Layer *)eina_inlist_remove(EINA_INLIST_GET(e->layers), EINA_INLIST_GET(lay));
} }
/* public functions */ /* public functions */

View File

@ -93,7 +93,7 @@ evas_new(void)
EAPI void EAPI void
evas_free(Evas *e) evas_free(Evas *e)
{ {
Evas_Object_List *l; Evas_Layer *lay;
int i; int i;
int del; int del;
@ -110,18 +110,14 @@ evas_free(Evas *e)
while (del) while (del)
{ {
del = 0; del = 0;
for (l = (Evas_Object_List *)(e->layers); l; l = l->next) EINA_INLIST_ITER_NEXT(e->layers, lay)
{ {
Evas_Layer *lay; Evas_Object *o;
Evas_Object_List *ll;
lay = (Evas_Layer *)l;
evas_layer_pre_free(lay); evas_layer_pre_free(lay);
for (ll = (Evas_Object_List *)lay->objects; ll; ll = ll->next)
{
Evas_Object *o;
o = (Evas_Object *)ll; EINA_INLIST_ITER_NEXT(lay->objects, o)
{
if ((o->callbacks) && (o->callbacks->walking_list)) if ((o->callbacks) && (o->callbacks->walking_list))
{ {
/* Defer free */ /* Defer free */
@ -136,14 +132,12 @@ evas_free(Evas *e)
} }
while (e->layers) while (e->layers)
{ {
Evas_Layer *lay;
lay = e->layers; lay = e->layers;
evas_layer_del(lay); evas_layer_del(lay);
evas_layer_free(lay); evas_layer_free(lay);
} }
e->walking_list--; e->walking_list--;
evas_font_path_clear(e); evas_font_path_clear(e);
e->pointer.object.in = evas_list_free(e->pointer.object.in); e->pointer.object.in = evas_list_free(e->pointer.object.in);

View File

@ -1786,25 +1786,21 @@ evas_image_cache_flush(Evas *e)
EAPI void EAPI void
evas_image_cache_reload(Evas *e) evas_image_cache_reload(Evas *e)
{ {
Evas_Object_List *l; Evas_Layer *layer;
MAGIC_CHECK(e, Evas, MAGIC_EVAS); MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
evas_image_cache_flush(e); evas_image_cache_flush(e);
for (l = (Evas_Object_List *)e->layers; l; l = l->next) EINA_INLIST_ITER_NEXT(e->layers, layer)
{ {
Evas_Layer *layer; Evas_Object *obj;
Evas_Object_List *l2;
layer = (Evas_Layer *)l; EINA_INLIST_ITER_NEXT(layer->objects, obj)
for (l2 = (Evas_Object_List *)layer->objects; l2; l2 = l2->next)
{ {
Evas_Object *obj;
Evas_Object_Image *o; Evas_Object_Image *o;
obj = (Evas_Object *)l2;
o = (Evas_Object_Image *)(obj->object_data); o = (Evas_Object_Image *)(obj->object_data);
if (o->magic == MAGIC_OBJ_IMAGE) if (o->magic == MAGIC_OBJ_IMAGE)
{ {
@ -1813,18 +1809,14 @@ evas_image_cache_reload(Evas *e)
} }
} }
evas_image_cache_flush(e); evas_image_cache_flush(e);
for (l = (Evas_Object_List *)e->layers; l; l = l->next) EINA_INLIST_ITER_NEXT(e->layers, layer)
{ {
Evas_Layer *layer; Evas_Object *obj;
Evas_Object_List *l2;
layer = (Evas_Layer *)l; EINA_INLIST_ITER_NEXT(layer->objects, obj)
for (l2 = (Evas_Object_List *)layer->objects; l2; l2 = l2->next)
{ {
Evas_Object *obj;
Evas_Object_Image *o; Evas_Object_Image *o;
obj = (Evas_Object *)l2;
o = (Evas_Object_Image *)(obj->object_data); o = (Evas_Object_Image *)(obj->object_data);
if (o->magic == MAGIC_OBJ_IMAGE) if (o->magic == MAGIC_OBJ_IMAGE)
{ {

View File

@ -13,12 +13,12 @@
*/ */
//#define FORWARD_NOOP_RESIZES_TO_SMART_OBJS //#define FORWARD_NOOP_RESIZES_TO_SMART_OBJS
static Evas_Object_List * static Eina_Inlist *
get_layer_objects_last(Evas_Layer *l) get_layer_objects_last(Evas_Layer *l)
{ {
if( !l || !l->objects ) return NULL; if( !l || !l->objects ) return NULL;
return ((Evas_Object_List *)(l->objects))->last; return (EINA_INLIST_GET(l->objects))->last;
} }
/* evas internal stuff */ /* evas internal stuff */
@ -1403,7 +1403,7 @@ evas_object_evas_get(const Evas_Object *obj)
EAPI Evas_Object * EAPI Evas_Object *
evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects) evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects)
{ {
Evas_Object_List *l; Evas_Layer *lay;
int xx, yy; int xx, yy;
MAGIC_CHECK(e, Evas, MAGIC_EVAS); MAGIC_CHECK(e, Evas, MAGIC_EVAS);
@ -1413,17 +1413,12 @@ evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool i
yy = y; yy = y;
//// xx = evas_coord_world_x_to_screen(e, x); //// xx = evas_coord_world_x_to_screen(e, x);
//// yy = evas_coord_world_y_to_screen(e, y); //// yy = evas_coord_world_y_to_screen(e, y);
for (l = ((Evas_Object_List *)(e->layers))->last; l; l = l->prev) EINA_INLIST_ITER_LAST((EINA_INLIST_GET(e->layers)), lay)
{ {
Evas_Object_List *l2; Evas_Object *obj;
Evas_Layer *lay;
lay = (Evas_Layer *)l; EINA_INLIST_ITER_LAST(get_layer_objects_last(lay), obj)
for (l2 = get_layer_objects_last(lay); l2; l2 = l2->prev)
{ {
Evas_Object *obj;
obj = (Evas_Object *)l2;
if (obj->delete_me) continue; if (obj->delete_me) continue;
if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue; if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
if ((!include_hidden_objects) && (!obj->cur.visible)) continue; if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
@ -1458,7 +1453,7 @@ evas_object_top_at_pointer_get(const Evas *e)
EAPI Evas_Object * EAPI Evas_Object *
evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects) evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects)
{ {
Evas_Object_List *l; Evas_Layer *lay;
int xx, yy, ww, hh; int xx, yy, ww, hh;
MAGIC_CHECK(e, Evas, MAGIC_EVAS); MAGIC_CHECK(e, Evas, MAGIC_EVAS);
@ -1474,17 +1469,12 @@ evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas
//// hh = evas_coord_world_y_to_screen(e, h); //// hh = evas_coord_world_y_to_screen(e, h);
if (ww < 1) ww = 1; if (ww < 1) ww = 1;
if (hh < 1) hh = 1; if (hh < 1) hh = 1;
for (l = ((Evas_Object_List *)(e->layers))->last; l; l = l->prev) EINA_INLIST_ITER_LAST((EINA_INLIST_GET(e->layers)), lay)
{ {
Evas_Object_List *l2; Evas_Object *obj;
Evas_Layer *lay;
lay = (Evas_Layer *)l; EINA_INLIST_ITER_LAST(get_layer_objects_last(lay), obj)
for (l2 = get_layer_objects_last(lay); l2; l2 = l2->prev)
{ {
Evas_Object *obj;
obj = (Evas_Object *)l2;
if (obj->delete_me) continue; if (obj->delete_me) continue;
if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue; if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
if ((!include_hidden_objects) && (!obj->cur.visible)) continue; if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
@ -1507,7 +1497,7 @@ EAPI Evas_List *
evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects) evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects)
{ {
Evas_List *in = NULL; Evas_List *in = NULL;
Evas_Object_List *l; Evas_Layer *lay;
int xx, yy; int xx, yy;
MAGIC_CHECK(e, Evas, MAGIC_EVAS); MAGIC_CHECK(e, Evas, MAGIC_EVAS);
@ -1517,17 +1507,12 @@ evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool incl
yy = y; yy = y;
//// xx = evas_coord_world_x_to_screen(e, x); //// xx = evas_coord_world_x_to_screen(e, x);
//// yy = evas_coord_world_y_to_screen(e, y); //// yy = evas_coord_world_y_to_screen(e, y);
for (l = ((Evas_Object_List *)(e->layers))->last; l; l = l->prev) EINA_INLIST_ITER_LAST((EINA_INLIST_GET(e->layers)), lay)
{ {
Evas_Object_List *l2; Evas_Object *obj;
Evas_Layer *lay;
lay = (Evas_Layer *)l; EINA_INLIST_ITER_LAST(get_layer_objects_last(lay), obj)
for (l2 = get_layer_objects_last(lay); l2; l2 = l2->prev)
{ {
Evas_Object *obj;
obj = (Evas_Object *)l2;
if (obj->delete_me) continue; if (obj->delete_me) continue;
if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue; if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
if ((!include_hidden_objects) && (!obj->cur.visible)) continue; if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
@ -1550,7 +1535,7 @@ EAPI Evas_List *
evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects) evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects)
{ {
Evas_List *in = NULL; Evas_List *in = NULL;
Evas_Object_List *l; Evas_Layer *lay;
int xx, yy, ww, hh; int xx, yy, ww, hh;
MAGIC_CHECK(e, Evas, MAGIC_EVAS); MAGIC_CHECK(e, Evas, MAGIC_EVAS);
@ -1558,7 +1543,7 @@ evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Co
MAGIC_CHECK_END(); MAGIC_CHECK_END();
xx = x; xx = x;
yy = y; yy = y;
ww = w; ww = w;
hh = h; hh = h;
//// xx = evas_coord_world_x_to_screen(e, x); //// xx = evas_coord_world_x_to_screen(e, x);
//// yy = evas_coord_world_y_to_screen(e, y); //// yy = evas_coord_world_y_to_screen(e, y);
@ -1566,17 +1551,12 @@ evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Co
//// hh = evas_coord_world_y_to_screen(e, h); //// hh = evas_coord_world_y_to_screen(e, h);
if (ww < 1) ww = 1; if (ww < 1) ww = 1;
if (hh < 1) hh = 1; if (hh < 1) hh = 1;
for (l = ((Evas_Object_List *)(e->layers))->last; l; l = l->prev) EINA_INLIST_ITER_LAST((EINA_INLIST_GET(e->layers)), lay)
{ {
Evas_Object_List *l2; Evas_Object *obj;
Evas_Layer *lay;
lay = (Evas_Layer *)l; EINA_INLIST_ITER_LAST(get_layer_objects_last(lay), obj)
for (l2 = get_layer_objects_last(lay); l2; l2 = l2->prev)
{ {
Evas_Object *obj;
obj = (Evas_Object *)l2;
if (obj->delete_me) continue; if (obj->delete_me) continue;
if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue; if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
if ((!include_hidden_objects) && (!obj->cur.visible)) continue; if ((!include_hidden_objects) && (!obj->cur.visible)) continue;

View File

@ -10,7 +10,7 @@ struct _Evas_Object_Smart
void *engine_data; void *engine_data;
void *data; void *data;
Evas_List *callbacks; Evas_List *callbacks;
Evas_Object_List *contained; Eina_Inlist *contained;
int walking_list; int walking_list;
Evas_Bool deletions_waiting : 1; Evas_Bool deletions_waiting : 1;
Evas_Bool need_recalculate : 1; Evas_Bool need_recalculate : 1;
@ -190,7 +190,7 @@ evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj)
obj->cur.layer = obj->layer->layer; obj->cur.layer = obj->layer->layer;
obj->layer->usage++; obj->layer->usage++;
obj->smart.parent = smart_obj; obj->smart.parent = smart_obj;
o->contained = evas_object_list_append(o->contained, obj); o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj));
evas_object_smart_member_cache_invalidate(obj); evas_object_smart_member_cache_invalidate(obj);
obj->restack = 1; obj->restack = 1;
evas_object_change(obj); evas_object_change(obj);
@ -219,7 +219,7 @@ evas_object_smart_member_del(Evas_Object *obj)
if (!obj->smart.parent) return; if (!obj->smart.parent) return;
o = (Evas_Object_Smart *)(obj->smart.parent->object_data); o = (Evas_Object_Smart *)(obj->smart.parent->object_data);
o->contained = evas_object_list_remove(o->contained, obj); o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj));
obj->smart.parent = NULL; obj->smart.parent = NULL;
evas_object_smart_member_cache_invalidate(obj); evas_object_smart_member_cache_invalidate(obj);
obj->layer->usage--; obj->layer->usage--;
@ -256,7 +256,7 @@ evas_object_smart_members_get(const Evas_Object *obj)
{ {
Evas_Object_Smart *o; Evas_Object_Smart *o;
Evas_List *members; Evas_List *members;
Evas_Object_List *member; Eina_Inlist *member;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL; return NULL;
@ -273,7 +273,7 @@ evas_object_smart_members_get(const Evas_Object *obj)
return members; return members;
} }
const Evas_Object_List * const Eina_Inlist *
evas_object_smart_members_get_direct(const Evas_Object *obj) evas_object_smart_members_get_direct(const Evas_Object *obj)
{ {
Evas_Object_Smart *o; Evas_Object_Smart *o;
@ -507,11 +507,11 @@ evas_object_smart_need_recalculate_get(Evas_Object *obj)
{ {
Evas_Object_Smart *o; Evas_Object_Smart *o;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return; return 0;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
o = obj->object_data; o = obj->object_data;
MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
return; return 0;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
return o->need_recalculate; return o->need_recalculate;
@ -530,11 +530,11 @@ evas_object_smart_calculate(Evas_Object *obj)
{ {
Evas_Object_Smart *o; Evas_Object_Smart *o;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return; return 0;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
o = obj->object_data; o = obj->object_data;
MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
return; return 0;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (obj->smart.smart->smart_class->calculate) if (obj->smart.smart->smart_class->calculate)
@ -667,7 +667,7 @@ void
evas_object_smart_member_cache_invalidate(Evas_Object *obj) evas_object_smart_member_cache_invalidate(Evas_Object *obj)
{ {
Evas_Object_Smart *o; Evas_Object_Smart *o;
Evas_Object_List *l; Eina_Inlist *l;
o = (Evas_Object_Smart *)(obj->object_data); o = (Evas_Object_Smart *)(obj->object_data);
if (o->magic != MAGIC_OBJ_SMART) if (o->magic != MAGIC_OBJ_SMART)
@ -689,8 +689,7 @@ evas_object_smart_member_raise(Evas_Object *member)
Evas_Object_Smart *o; Evas_Object_Smart *o;
o = (Evas_Object_Smart *)(member->smart.parent->object_data); o = (Evas_Object_Smart *)(member->smart.parent->object_data);
o->contained = evas_object_list_remove(o->contained, member); o->contained = eina_inlist_demote(o->contained, EINA_INLIST_GET(member));
o->contained = evas_object_list_append(o->contained, member);
} }
void void
@ -699,8 +698,7 @@ evas_object_smart_member_lower(Evas_Object *member)
Evas_Object_Smart *o; Evas_Object_Smart *o;
o = (Evas_Object_Smart *)(member->smart.parent->object_data); o = (Evas_Object_Smart *)(member->smart.parent->object_data);
o->contained = evas_object_list_remove(o->contained, member); o->contained = eina_inlist_promote(o->contained, EINA_INLIST_GET(member));
o->contained = evas_object_list_prepend(o->contained, member);
} }
void void
@ -709,8 +707,8 @@ evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other)
Evas_Object_Smart *o; Evas_Object_Smart *o;
o = (Evas_Object_Smart *)(member->smart.parent->object_data); o = (Evas_Object_Smart *)(member->smart.parent->object_data);
o->contained = evas_object_list_remove(o->contained, member); o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member));
o->contained = evas_object_list_append_relative(o->contained, member, other); o->contained = eina_inlist_append_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other));
} }
void void
@ -719,8 +717,8 @@ evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other)
Evas_Object_Smart *o; Evas_Object_Smart *o;
o = (Evas_Object_Smart *)(member->smart.parent->object_data); o = (Evas_Object_Smart *)(member->smart.parent->object_data);
o->contained = evas_object_list_remove(o->contained, member); o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member));
o->contained = evas_object_list_prepend_relative(o->contained, member, other); o->contained = eina_inlist_prepend_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other));
} }
/* all nice and private */ /* all nice and private */

View File

@ -1018,13 +1018,8 @@ evas_font_object_rehint(Evas_Object *obj)
{ {
if (obj->smart.smart) if (obj->smart.smart)
{ {
const Evas_Object_List *l3; EINA_INLIST_ITER_NEXT(evas_object_smart_members_get_direct(obj), obj)
evas_font_object_rehint(obj);
for (l3 = evas_object_smart_members_get_direct(obj); l3; l3 = l3->next)
{
obj = (Evas_Object *)l3;
evas_font_object_rehint(obj);
}
} }
else else
{ {
@ -1038,26 +1033,19 @@ evas_font_object_rehint(Evas_Object *obj)
EAPI void EAPI void
evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting) evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting)
{ {
Evas_Object_List *l; Evas_Layer *lay;
MAGIC_CHECK(e, Evas, MAGIC_EVAS); MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (e->hinting == hinting) return; if (e->hinting == hinting) return;
e->hinting = hinting; e->hinting = hinting;
for (l = (Evas_Object_List *)e->layers; l; l = l->next) EINA_INLIST_ITER_NEXT(e->layers, lay)
{ {
Evas_Object_List *l2; Evas_Object *obj;
Evas_Layer *lay;
EINA_INLIST_ITER_NEXT(lay->objects, obj)
lay = (Evas_Layer *)l; evas_font_object_rehint(obj);
for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
{
Evas_Object *obj;
obj = (Evas_Object *)l2;
evas_font_object_rehint(obj);
}
} }
} }

View File

@ -27,20 +27,20 @@ typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format;
#define NODE_FORMAT 1 #define NODE_FORMAT 1
struct _Evas_Object_Style_Tag struct _Evas_Object_Style_Tag
{ Evas_Object_List _list_data; { EINA_INLIST;
char *tag; char *tag;
char *replace; char *replace;
}; };
struct _Evas_Object_Textblock_Node struct _Evas_Object_Textblock_Node
{ Evas_Object_List _list_data; { EINA_INLIST;
char *text; char *text;
int type; int type;
int len, alloc; int len, alloc;
}; };
struct _Evas_Object_Textblock_Line struct _Evas_Object_Textblock_Line
{ Evas_Object_List _list_data; { EINA_INLIST;
Evas_Object_Textblock_Item *items; Evas_Object_Textblock_Item *items;
Evas_Object_Textblock_Format_Item *format_items; Evas_Object_Textblock_Format_Item *format_items;
int x, y, w, h; int x, y, w, h;
@ -49,7 +49,7 @@ struct _Evas_Object_Textblock_Line
}; };
struct _Evas_Object_Textblock_Item struct _Evas_Object_Textblock_Item
{ Evas_Object_List _list_data; { EINA_INLIST;
char *text; char *text;
Evas_Object_Textblock_Format *format; Evas_Object_Textblock_Format *format;
Evas_Object_Textblock_Node *source_node; Evas_Object_Textblock_Node *source_node;
@ -60,7 +60,7 @@ struct _Evas_Object_Textblock_Item
}; };
struct _Evas_Object_Textblock_Format_Item struct _Evas_Object_Textblock_Format_Item
{ Evas_Object_List _list_data; { EINA_INLIST;
const char *item; const char *item;
Evas_Object_Textblock_Node *source_node; Evas_Object_Textblock_Node *source_node;
int x, w; int x, w;
@ -209,7 +209,7 @@ _style_clear(Evas_Textblock_Style *ts)
Evas_Object_Style_Tag *tag; Evas_Object_Style_Tag *tag;
tag = (Evas_Object_Style_Tag *)ts->tags; tag = (Evas_Object_Style_Tag *)ts->tags;
ts->tags = evas_object_list_remove(ts->tags, tag); ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag));
free(tag->tag); free(tag->tag);
free(tag->replace); free(tag->replace);
free(tag); free(tag);
@ -222,13 +222,10 @@ _style_clear(Evas_Textblock_Style *ts)
static char * static char *
_style_match_replace(Evas_Textblock_Style *ts, char *s) _style_match_replace(Evas_Textblock_Style *ts, char *s)
{ {
Evas_Object_List *l; Evas_Object_Style_Tag *tag;
for (l = (Evas_Object_List *)ts->tags; l; l = l->next) EINA_INLIST_ITER_NEXT(ts->tags, tag)
{ {
Evas_Object_Style_Tag *tag;
tag = (Evas_Object_Style_Tag *)l;
if (!strcmp(tag->replace, s)) return tag->tag; if (!strcmp(tag->replace, s)) return tag->tag;
} }
return NULL; return NULL;
@ -237,13 +234,10 @@ _style_match_replace(Evas_Textblock_Style *ts, char *s)
static char * static char *
_style_match_tag(Evas_Textblock_Style *ts, char *s) _style_match_tag(Evas_Textblock_Style *ts, char *s)
{ {
Evas_Object_List *l; Evas_Object_Style_Tag *tag;
for (l = (Evas_Object_List *)ts->tags; l; l = l->next) EINA_INLIST_ITER_NEXT(ts->tags, tag)
{ {
Evas_Object_Style_Tag *tag;
tag = (Evas_Object_Style_Tag *)l;
if (!strcmp(tag->tag, s)) return tag->replace; if (!strcmp(tag->tag, s)) return tag->replace;
} }
return NULL; return NULL;
@ -402,7 +396,7 @@ _nodes_clear(const Evas_Object *obj)
Evas_Object_Textblock_Node *n; Evas_Object_Textblock_Node *n;
n = (Evas_Object_Textblock_Node *)o->nodes; n = (Evas_Object_Textblock_Node *)o->nodes;
o->nodes = evas_object_list_remove(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n));
if (n->text) free(n->text); if (n->text) free(n->text);
free(n); free(n);
} }
@ -428,7 +422,7 @@ _line_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln)
Evas_Object_Textblock_Item *it; Evas_Object_Textblock_Item *it;
it = (Evas_Object_Textblock_Item *)ln->items; it = (Evas_Object_Textblock_Item *)ln->items;
ln->items = evas_object_list_remove(ln->items, ln->items); ln->items = (Evas_Object_Textblock_Item *)eina_inlist_remove(EINA_INLIST_GET(ln->items), EINA_INLIST_GET(ln->items));
if (it->text) free(it->text); if (it->text) free(it->text);
_format_free(obj, it->format); _format_free(obj, it->format);
free(it); free(it);
@ -438,7 +432,8 @@ _line_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln)
Evas_Object_Textblock_Format_Item *fi; Evas_Object_Textblock_Format_Item *fi;
fi = (Evas_Object_Textblock_Format_Item *)ln->format_items; fi = (Evas_Object_Textblock_Format_Item *)ln->format_items;
ln->format_items = evas_object_list_remove(ln->format_items, ln->format_items); ln->format_items = (Evas_Object_Textblock_Format_Item *)eina_inlist_remove(EINA_INLIST_GET(ln->format_items),
EINA_INLIST_GET(ln->format_items));
if (fi->item) eina_stringshare_del(fi->item); if (fi->item) eina_stringshare_del(fi->item);
free(fi); free(fi);
} }
@ -456,7 +451,7 @@ _lines_clear(const Evas_Object *obj, Evas_Object_Textblock_Line *lines)
Evas_Object_Textblock_Line *ln; Evas_Object_Textblock_Line *ln;
ln = (Evas_Object_Textblock_Line *)lines; ln = (Evas_Object_Textblock_Line *)lines;
lines = evas_object_list_remove(lines, ln); lines = (Evas_Object_Textblock_Line *)eina_inlist_remove(EINA_INLIST_GET(lines), EINA_INLIST_GET(ln));
_line_free(obj, ln); _line_free(obj, ln);
} }
} }
@ -471,14 +466,14 @@ _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1)
if (n1->type != NODE_TEXT) return; if (n1->type != NODE_TEXT) return;
o = (Evas_Object_Textblock *)(obj->object_data); o = (Evas_Object_Textblock *)(obj->object_data);
n0 = (Evas_Object_Textblock_Node *)((Evas_Object_List *)n1)->prev; n0 = (Evas_Object_Textblock_Node *)(EINA_INLIST_GET(n1))->prev;
n2 = (Evas_Object_Textblock_Node *)((Evas_Object_List *)n1)->next; n2 = (Evas_Object_Textblock_Node *)(EINA_INLIST_GET(n1))->next;
if ((n0) && (n0->type == NODE_TEXT)) if ((n0) && (n0->type == NODE_TEXT))
{ {
plen = n0->len; plen = n0->len;
n0->text = _strbuf_append(n0->text, n1->text, &(n0->len), &(n0->alloc)); n0->text = _strbuf_append(n0->text, n1->text, &(n0->len), &(n0->alloc));
((Evas_Object_List *)n0)->next = (Evas_Object_List *)n2; (EINA_INLIST_GET(n0))->next = EINA_INLIST_GET(n2);
if (n2) ((Evas_Object_List *)n2)->prev = (Evas_Object_List *)n0; if (n2) (EINA_INLIST_GET(n2))->prev = EINA_INLIST_GET(n0);
// fix any cursors in n1 // fix any cursors in n1
if (n1 == o->cursor->node) if (n1 == o->cursor->node)
{ {
@ -501,11 +496,11 @@ _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1)
{ {
n0 = n1; n0 = n1;
n1 = n2; n1 = n2;
n2 = (Evas_Object_Textblock_Node *)((Evas_Object_List *)n1)->next; n2 = (Evas_Object_Textblock_Node *)(EINA_INLIST_GET(n1))->next;
plen = n0->len; plen = n0->len;
n0->text = _strbuf_append(n0->text, n1->text, &(n0->len), &(n0->alloc)); n0->text = _strbuf_append(n0->text, n1->text, &(n0->len), &(n0->alloc));
((Evas_Object_List *)n0)->next = (Evas_Object_List *)n2; (EINA_INLIST_GET(n0))->next = EINA_INLIST_GET(n2);
if (n2) ((Evas_Object_List *)n2)->prev = (Evas_Object_List *)n0; if (n2) (EINA_INLIST_GET(n2))->prev = EINA_INLIST_GET(n0);
// fix any cursors in n1 // fix any cursors in n1
if (n1 == o->cursor->node) if (n1 == o->cursor->node)
{ {
@ -1433,7 +1428,7 @@ _layout_line_new(Ctxt *c, Evas_Object_Textblock_Format *fmt)
c->align = fmt->halign; c->align = fmt->halign;
c->marginl = fmt->margin.l; c->marginl = fmt->margin.l;
c->marginr = fmt->margin.r; c->marginr = fmt->margin.r;
c->lines = evas_object_list_append(c->lines, c->ln); c->lines = (Evas_Object_Textblock_Line *)eina_inlist_append(EINA_INLIST_GET(c->lines), EINA_INLIST_GET(c->ln));
c->x = 0; c->x = 0;
c->maxascent = c->maxdescent = 0; c->maxascent = c->maxdescent = 0;
c->ln->line_no = -1; c->ln->line_no = -1;
@ -1491,16 +1486,14 @@ static void
_layout_line_advance(Ctxt *c, Evas_Object_Textblock_Format *fmt) _layout_line_advance(Ctxt *c, Evas_Object_Textblock_Format *fmt)
{ {
Evas_Object_Textblock_Item *it; Evas_Object_Textblock_Item *it;
Evas_Object_List *l;
c->maxascent = c->maxdescent = 0; c->maxascent = c->maxdescent = 0;
if (!c->ln->items) if (!c->ln->items)
_layout_format_ascent_descent_adjust(c, fmt); _layout_format_ascent_descent_adjust(c, fmt);
for (l = (Evas_Object_List *)c->ln->items; l; l = l->next) EINA_INLIST_ITER_NEXT(c->ln->items, it)
{ {
int endx; int endx;
it = (Evas_Object_Textblock_Item *)l;
if (it->format->font.font) if (it->format->font.font)
it->baseline = c->ENFN->font_max_ascent_get(c->ENDT, it->format->font.font); it->baseline = c->ENFN->font_max_ascent_get(c->ENDT, it->format->font.font);
_layout_format_ascent_descent_adjust(c, it->format); _layout_format_ascent_descent_adjust(c, it->format);
@ -1658,7 +1651,7 @@ _layout_item_abort(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Textb
free(it); free(it);
if (c->ln->items) if (c->ln->items)
{ {
it = (Evas_Object_Textblock_Item *)((Evas_Object_List *)c->ln->items)->last; it = (Evas_Object_Textblock_Item *)(EINA_INLIST_GET(c->ln->items))->last;
return _layout_strip_trailing_whitespace(c, fmt, it); return _layout_strip_trailing_whitespace(c, fmt, it);
} }
return 0; return 0;
@ -1689,7 +1682,7 @@ _layout_last_item_ends_in_whitespace(Ctxt *c)
Evas_Object_Textblock_Item *it; Evas_Object_Textblock_Item *it;
if (!c->ln->items) return 1; if (!c->ln->items) return 1;
it = (Evas_Object_Textblock_Item *)((Evas_Object_List *)c->ln->items)->last; it = (Evas_Object_Textblock_Item *)(EINA_INLIST_GET(c->ln->items))->last;
return _layout_ends_with_space(it->text); return _layout_ends_with_space(it->text);
} }
@ -1737,11 +1730,9 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
Evas_Object_Textblock_Item *pit, *new_it = NULL; Evas_Object_Textblock_Item *pit, *new_it = NULL;
Evas_List *remove_items = NULL, *l; Evas_List *remove_items = NULL, *l;
int index, tw, th, inset, adv; int index, tw, th, inset, adv;
/* it is not appended yet */ /* it is not appended yet */
for (pit = (Evas_Object_Textblock_Item *)((Evas_Object_List *)c->ln->items)->last; EINA_INLIST_ITER_LAST((EINA_INLIST_GET(c->ln->items)), pit)
pit;
pit = (Evas_Object_Textblock_Item *)((Evas_Object_List *)pit)->prev)
{ {
if (_layout_ends_with_space(pit->text)) if (_layout_ends_with_space(pit->text))
{ {
@ -1763,7 +1754,7 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
} }
for (l = remove_items; l; l = l->next) for (l = remove_items; l; l = l->next)
{ {
c->ln->items = evas_object_list_remove(c->ln->items, l->data); c->ln->items = (Evas_Object_Textblock_Item *)eina_inlist_remove(EINA_INLIST_GET(c->ln->items), l->data);
} }
/* new line now */ /* new line now */
if (remove_items) if (remove_items)
@ -1792,7 +1783,7 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
if (new_it->format->font.font) if (new_it->format->font.font)
adv = c->ENFN->font_h_advance_get(c->ENDT, new_it->format->font.font, new_it->text); adv = c->ENFN->font_h_advance_get(c->ENDT, new_it->format->font.font, new_it->text);
c->x += adv; c->x += adv;
c->ln->items = evas_object_list_append(c->ln->items, new_it); c->ln->items = (Evas_Object_Textblock_Item *)eina_inlist_append(EINA_INLIST_GET(c->ln->items), EINA_INLIST_GET(new_it));
} }
while (remove_items) while (remove_items)
{ {
@ -1802,7 +1793,7 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
pit->x = c->x; pit->x = c->x;
adv = c->ENFN->font_h_advance_get(c->ENDT, pit->format->font.font, pit->text); adv = c->ENFN->font_h_advance_get(c->ENDT, pit->format->font.font, pit->text);
c->x += adv; c->x += adv;
c->ln->items = evas_object_list_append(c->ln->items, pit); c->ln->items = (Evas_Object_Textblock_Item *)eina_inlist_append(EINA_INLIST_GET(c->ln->items), EINA_INLIST_GET(pit));
} }
if (it) if (it)
{ {
@ -1812,7 +1803,7 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
if (it->format->font.font) if (it->format->font.font)
adv = c->ENFN->font_h_advance_get(c->ENDT, it->format->font.font, it->text); adv = c->ENFN->font_h_advance_get(c->ENDT, it->format->font.font, it->text);
c->x += adv; c->x += adv;
c->ln->items = evas_object_list_append(c->ln->items, it); c->ln->items = (Evas_Object_Textblock_Item *)eina_inlist_append(EINA_INLIST_GET(c->ln->items), EINA_INLIST_GET(it));
} }
} }
@ -1896,7 +1887,7 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text
if (it->text) free(it->text); if (it->text) free(it->text);
_format_free(c->obj, it->format); _format_free(c->obj, it->format);
free(it); free(it);
it = (Evas_Object_Textblock_Item *)((Evas_Object_List *)c->ln->items)->last; it = (Evas_Object_Textblock_Item *)(EINA_INLIST_GET(c->ln->items))->last;
_layout_strip_trailing_whitespace(c, fmt, it); _layout_strip_trailing_whitespace(c, fmt, it);
twrap = _layout_word_end(str, wrap); twrap = _layout_word_end(str, wrap);
ch = evas_common_font_utf8_get_next((unsigned char *)str, &twrap); ch = evas_common_font_utf8_get_next((unsigned char *)str, &twrap);
@ -2010,7 +2001,7 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text
if (fmt->font.font) if (fmt->font.font)
adv = c->ENFN->font_h_advance_get(c->ENDT, fmt->font.font, it->text); adv = c->ENFN->font_h_advance_get(c->ENDT, fmt->font.font, it->text);
c->x += adv; c->x += adv;
c->ln->items = evas_object_list_append(c->ln->items, it); c->ln->items = (Evas_Object_Textblock_Item *)eina_inlist_append(EINA_INLIST_GET(c->ln->items), EINA_INLIST_GET(it));
} }
if (new_line) if (new_line)
{ {
@ -2037,7 +2028,8 @@ _layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node *n, char *item)
fi = calloc(1, sizeof(Evas_Object_Textblock_Format_Item)); fi = calloc(1, sizeof(Evas_Object_Textblock_Format_Item));
fi->item = eina_stringshare_add(item); fi->item = eina_stringshare_add(item);
fi->source_node = n; fi->source_node = n;
c->ln->format_items = evas_object_list_append(c->ln->format_items, fi); c->ln->format_items = (Evas_Object_Textblock_Format_Item *)eina_inlist_append(EINA_INLIST_GET(c->ln->format_items),
EINA_INLIST_GET(fi));
return fi; return fi;
} }
@ -2046,7 +2038,8 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
{ {
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
Ctxt ctxt, *c; Ctxt ctxt, *c;
Evas_Object_List *l; Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock_Node *n;
Evas_List *removes = NULL; Evas_List *removes = NULL;
Evas_Object_Textblock_Format *fmt = NULL; Evas_Object_Textblock_Format *fmt = NULL;
int style_pad_l = 0, style_pad_r = 0, style_pad_t = 0, style_pad_b = 0; int style_pad_l = 0, style_pad_r = 0, style_pad_t = 0, style_pad_b = 0;
@ -2085,11 +2078,8 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
return; return;
} }
/* run through all text and format nodes generating lines */ /* run through all text and format nodes generating lines */
for (l = (Evas_Object_List *)c->o->nodes; l; l = l->next) EINA_INLIST_ITER_NEXT(c->o->nodes, n)
{ {
Evas_Object_Textblock_Node *n;
n = (Evas_Object_Textblock_Node *)l;
if (!c->ln) _layout_line_new(c, fmt); if (!c->ln) _layout_line_new(c, fmt);
if ((n->type == NODE_FORMAT) && (n->text)) if ((n->type == NODE_FORMAT) && (n->text))
{ {
@ -2143,7 +2133,7 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
{ {
Evas_Object_Textblock_Item *it; Evas_Object_Textblock_Item *it;
it = (Evas_Object_Textblock_Item *)((Evas_Object_List *)c->ln->items)->last; it = (Evas_Object_Textblock_Item *)(EINA_INLIST_GET(c->ln->items))->last;
_layout_strip_trailing_whitespace(c, fmt, it); _layout_strip_trailing_whitespace(c, fmt, it);
} }
fi = _layout_format_item_add(c, n, item); fi = _layout_format_item_add(c, n, item);
@ -2183,11 +2173,8 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
c->format_stack = evas_list_remove_list(c->format_stack, c->format_stack); c->format_stack = evas_list_remove_list(c->format_stack, c->format_stack);
_format_free(c->obj, fmt); _format_free(c->obj, fmt);
} }
for (l = (Evas_Object_List *)c->lines; l; l = l->next) EINA_INLIST_ITER_NEXT(c->lines, ln)
{ {
Evas_Object_Textblock_Line *ln;
ln = (Evas_Object_Textblock_Line *)l;
if (ln->line_no == -1) if (ln->line_no == -1)
{ {
removes = evas_list_append(removes, ln); removes = evas_list_append(removes, ln);
@ -2199,10 +2186,8 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
} }
while (removes) while (removes)
{ {
Evas_Object_Textblock_Line *ln;
ln = removes->data; ln = removes->data;
c->lines = evas_object_list_remove(c->lines, ln); c->lines = (Evas_Object_Textblock_Line *)eina_inlist_remove(EINA_INLIST_GET(c->lines), EINA_INLIST_GET(ln));
removes = evas_list_remove_list(removes, removes); removes = evas_list_remove_list(removes, removes);
_line_free(obj, ln); _line_free(obj, ln);
} }
@ -2260,26 +2245,20 @@ _relayout(const Evas_Object *obj)
static void static void
_find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node *n, int pos, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr) _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node *n, int pos, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr)
{ {
Evas_Object_List *l, *ll; Evas_Object_Textblock_Line *ln;
/* Evas_Object_Textblock_Node *nn; */
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
o = (Evas_Object_Textblock *)(obj->object_data); o = (Evas_Object_Textblock *)(obj->object_data);
for (l = (Evas_Object_List *)o->nodes; l; l = l->next) /* EINA_INLIST_ITER_NEXT(o->nodes, nn) */
/* ; */
EINA_INLIST_ITER_NEXT(o->lines, ln)
{ {
Evas_Object_Textblock_Node *nn; Evas_Object_Textblock_Format_Item *fit;
Evas_Object_Textblock_Item *it;
nn = l;
}
for (l = (Evas_Object_List *)o->lines; l; l = l->next)
{
Evas_Object_Textblock_Line *ln;
ln = (Evas_Object_Textblock_Line *)l; EINA_INLIST_ITER_NEXT(ln->items, it)
for (ll = (Evas_Object_List *)ln->items; ll; ll = ll->next)
{ {
Evas_Object_Textblock_Item *it;
it = (Evas_Object_Textblock_Item *)ll;
if (it->source_node == n) if (it->source_node == n)
{ {
if ((int)(it->source_pos + strlen(it->text)) >= pos) if ((int)(it->source_pos + strlen(it->text)) >= pos)
@ -2290,15 +2269,13 @@ _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node *n, in
} }
} }
} }
for (ll = (Evas_Object_List *)ln->format_items; ll; ll = ll->next) EINA_INLIST_ITER_NEXT(ln->format_items, fit)
{ {
Evas_Object_Textblock_Format_Item *it; if (fit->source_node == n)
it = (Evas_Object_Textblock_Format_Item *)ll;
if (it->source_node == n)
{ {
*lnr = ln; *lnr = ln;
*itr = it; /* FIXME: Is that really what we want ? */
*itr = fit;
return; return;
} }
} }
@ -2308,20 +2285,16 @@ _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node *n, in
static void static void
_find_layout_format_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node *n, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Format_Item **fir) _find_layout_format_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node *n, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Format_Item **fir)
{ {
Evas_Object_List *l, *ll; Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
o = (Evas_Object_Textblock *)(obj->object_data); o = (Evas_Object_Textblock *)(obj->object_data);
for (l = (Evas_Object_List *)o->lines; l; l = l->next) EINA_INLIST_ITER_NEXT(o->lines, ln)
{ {
Evas_Object_Textblock_Line *ln; Evas_Object_Textblock_Format_Item *fi;
ln = (Evas_Object_Textblock_Line *)l; EINA_INLIST_ITER_NEXT(ln->format_items, fi)
for (ll = (Evas_Object_List *)ln->format_items; ll; ll = ll->next)
{ {
Evas_Object_Textblock_Format_Item *fi;
fi = (Evas_Object_Textblock_Format_Item *)ll;
if (fi->source_node == n) if (fi->source_node == n)
{ {
*lnr = ln; *lnr = ln;
@ -2335,15 +2308,12 @@ _find_layout_format_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node
static Evas_Object_Textblock_Line * static Evas_Object_Textblock_Line *
_find_layout_line_num(const Evas_Object *obj, int line) _find_layout_line_num(const Evas_Object *obj, int line)
{ {
Evas_Object_List *l; Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
o = (Evas_Object_Textblock *)(obj->object_data); o = (Evas_Object_Textblock *)(obj->object_data);
for (l = (Evas_Object_List *)o->lines; l; l = l->next) EINA_INLIST_ITER_NEXT(o->lines, ln)
{ {
Evas_Object_Textblock_Line *ln;
ln = (Evas_Object_Textblock_Line *)l;
if (ln->line_no == line) return ln; if (ln->line_no == line) return ln;
} }
return NULL; return NULL;
@ -2495,7 +2465,7 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
{ {
tag->tag = tags; tag->tag = tags;
tag->replace = replaces; tag->replace = replaces;
ts->tags = evas_object_list_append(ts->tags, tag); ts->tags = (Evas_Object_Style_Tag *)eina_inlist_append(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag));
} }
else else
{ {
@ -2941,17 +2911,14 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
EAPI const char * EAPI const char *
evas_object_textblock_text_markup_get(const Evas_Object *obj) evas_object_textblock_text_markup_get(const Evas_Object *obj)
{ {
Evas_Object_List *l; Evas_Object_Textblock_Node *n;
char *txt = NULL; char *txt = NULL;
int txt_len = 0, txt_alloc = 0; int txt_len = 0, txt_alloc = 0;
TB_HEAD_RETURN(NULL); TB_HEAD_RETURN(NULL);
if (o->markup_text) return(o->markup_text); if (o->markup_text) return(o->markup_text);
for (l = (Evas_Object_List *)o->nodes; l; l = l->next) EINA_INLIST_ITER_NEXT(o->nodes, n)
{ {
Evas_Object_Textblock_Node *n;
n = (Evas_Object_Textblock_Node *)l;
if ((n->type == NODE_FORMAT) && (n->text)) if ((n->type == NODE_FORMAT) && (n->text))
{ {
char *tag = _style_match_replace(o->style, n->text); char *tag = _style_match_replace(o->style, n->text);
@ -3090,7 +3057,7 @@ evas_textblock_cursor_node_last(Evas_Textblock_Cursor *cur)
o = (Evas_Object_Textblock *)(cur->obj->object_data); o = (Evas_Object_Textblock *)(cur->obj->object_data);
if (o->nodes) if (o->nodes)
{ {
cur->node = (Evas_Object_Textblock_Node *)(((Evas_Object_List *)(o->nodes))->last); cur->node = (Evas_Object_Textblock_Node *)((EINA_INLIST_GET(o->nodes))->last);
cur->pos = 0; cur->pos = 0;
evas_textblock_cursor_char_last(cur); evas_textblock_cursor_char_last(cur);
} }
@ -3114,9 +3081,9 @@ evas_textblock_cursor_node_next(Evas_Textblock_Cursor *cur)
if (!cur) return 0; if (!cur) return 0;
o = (Evas_Object_Textblock *)(cur->obj->object_data); o = (Evas_Object_Textblock *)(cur->obj->object_data);
if (!cur->node) return 0; if (!cur->node) return 0;
if (((Evas_Object_List *)(cur->node))->next) if ((EINA_INLIST_GET(cur->node))->next)
{ {
cur->node = (Evas_Object_Textblock_Node *)(((Evas_Object_List *)(cur->node))->next); cur->node = (Evas_Object_Textblock_Node *)((EINA_INLIST_GET(cur->node))->next);
cur->pos = 0; cur->pos = 0;
return 1; return 1;
} }
@ -3136,9 +3103,9 @@ evas_textblock_cursor_node_prev(Evas_Textblock_Cursor *cur)
if (!cur) return 0; if (!cur) return 0;
o = (Evas_Object_Textblock *)(cur->obj->object_data); o = (Evas_Object_Textblock *)(cur->obj->object_data);
if (!cur->node) return 0; if (!cur->node) return 0;
if (((Evas_Object_List *)(cur->node))->prev) if ((EINA_INLIST_GET(cur->node))->prev)
{ {
cur->node = (Evas_Object_Textblock_Node *)(((Evas_Object_List *)(cur->node))->prev); cur->node = (Evas_Object_Textblock_Node *)((EINA_INLIST_GET(cur->node))->prev);
evas_textblock_cursor_char_last(cur); evas_textblock_cursor_char_last(cur);
return 1; return 1;
} }
@ -3292,11 +3259,11 @@ evas_textblock_cursor_line_last(Evas_Textblock_Cursor *cur)
_find_layout_item_line_match(cur->obj, cur->node, cur->pos, &ln, &it); _find_layout_item_line_match(cur->obj, cur->node, cur->pos, &ln, &it);
if (!ln) return; if (!ln) return;
if (ln->items) if (ln->items)
it = (Evas_Object_Textblock_Item *)(((Evas_Object_List *)ln->items)->last); it = (Evas_Object_Textblock_Item *)((EINA_INLIST_GET(ln->items))->last);
else else
it = NULL; it = NULL;
if (ln->format_items) if (ln->format_items)
fi = (Evas_Object_Textblock_Format_Item *)(((Evas_Object_List *)ln->format_items)->last); fi = (Evas_Object_Textblock_Format_Item *)((EINA_INLIST_GET(ln->format_items))->last);
else else
fi = NULL; fi = NULL;
if ((it) && (fi)) if ((it) && (fi))
@ -3398,7 +3365,7 @@ evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
EAPI int EAPI int
evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2)
{ {
Evas_Object_List *l1, *l2; Eina_Inlist *l1, *l2;
if (!cur1) return 0; if (!cur1) return 0;
if (!cur2) return 0; if (!cur2) return 0;
@ -3410,11 +3377,11 @@ evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Text
else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */ else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */
return 0; /* cur1 == cur2 */ return 0; /* cur1 == cur2 */
} }
for (l1 = (Evas_Object_List *)cur1->node, for (l1 = EINA_INLIST_GET(cur1->node),
l2 = (Evas_Object_List *)cur1->node; (l1) || (l2);) l2 = EINA_INLIST_GET(cur1->node); (l1) || (l2);)
{ {
if (l1 == (Evas_Object_List *)cur2->node) return 1; /* cur2 < cur 1 */ if (l1 == EINA_INLIST_GET(cur2->node)) return 1; /* cur2 < cur 1 */
else if (l2 == (Evas_Object_List *)cur2->node) return -1; /* cur1 < cur 2 */ else if (l2 == EINA_INLIST_GET(cur2->node)) return -1; /* cur1 < cur 2 */
else if (!l1) return -1; /* cur1 < cur 2 */ else if (!l1) return -1; /* cur1 < cur 2 */
else if (!l2) return 1; /* cur2 < cur 1 */ else if (!l2) return 1; /* cur2 < cur 1 */
if (l1) l1 = l1->prev; if (l1) l1 = l1->prev;
@ -3486,9 +3453,11 @@ evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text)
n = calloc(1, sizeof(Evas_Object_Textblock_Node)); n = calloc(1, sizeof(Evas_Object_Textblock_Node));
n->type = NODE_TEXT; n->type = NODE_TEXT;
if (nrel) if (nrel)
o->nodes = evas_object_list_append_relative(o->nodes, n, nrel); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_append_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n),
EINA_INLIST_GET(nrel));
else else
o->nodes = evas_object_list_append(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_append(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n));
} }
cur->node = n; cur->node = n;
index = cur->pos; index = cur->pos;
@ -3563,9 +3532,11 @@ evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text)
n = calloc(1, sizeof(Evas_Object_Textblock_Node)); n = calloc(1, sizeof(Evas_Object_Textblock_Node));
n->type = NODE_TEXT; n->type = NODE_TEXT;
if (nrel) if (nrel)
o->nodes = evas_object_list_prepend_relative(o->nodes, n, nrel); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_prepend_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n),
EINA_INLIST_GET(nrel));
else else
o->nodes = evas_object_list_prepend(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_prepend(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n));
} }
cur->node = n; cur->node = n;
index = cur->pos; index = cur->pos;
@ -3607,11 +3578,13 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
n->alloc = n->len + 1; n->alloc = n->len + 1;
if (!nc) if (!nc)
{ {
o->nodes = evas_object_list_append(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_append(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n));
} }
else if (nc->type == NODE_FORMAT) else if (nc->type == NODE_FORMAT)
{ {
o->nodes = evas_object_list_append_relative(o->nodes, n, nc); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_append_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n),
EINA_INLIST_GET(nc));
} }
else if (nc->type == NODE_TEXT) else if (nc->type == NODE_TEXT)
{ {
@ -3625,13 +3598,17 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
if (ch != 0) if (ch != 0)
cur->pos = index; cur->pos = index;
} }
o->nodes = evas_object_list_append_relative(o->nodes, n, nc); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_append_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n),
EINA_INLIST_GET(nc));
if ((ch != 0) && (cur->pos < nc->len)) if ((ch != 0) && (cur->pos < nc->len))
{ {
n2 = calloc(1, sizeof(Evas_Object_Textblock_Node)); n2 = calloc(1, sizeof(Evas_Object_Textblock_Node));
n2->type = NODE_TEXT; n2->type = NODE_TEXT;
n2->text = _strbuf_append(n2->text, (char *)(nc->text + cur->pos), &(n2->len), &(n2->alloc)); n2->text = _strbuf_append(n2->text, (char *)(nc->text + cur->pos), &(n2->len), &(n2->alloc));
o->nodes = evas_object_list_append_relative(o->nodes, n2, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_append_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n2),
EINA_INLIST_GET(n));
*(nc->text + cur->pos) = 0; *(nc->text + cur->pos) = 0;
nc->len = cur->pos; nc->len = cur->pos;
@ -3678,13 +3655,15 @@ evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *for
n->alloc = n->len + 1; n->alloc = n->len + 1;
if (!nc) if (!nc)
{ {
o->nodes = evas_object_list_prepend(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_prepend(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n));
cur->node = n; cur->node = n;
cur->pos = 0; cur->pos = 0;
} }
else if (nc->type == NODE_FORMAT) else if (nc->type == NODE_FORMAT)
{ {
o->nodes = evas_object_list_prepend_relative(o->nodes, n, nc); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_prepend_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n),
EINA_INLIST_GET(nc));
cur->node = nc; cur->node = nc;
cur->pos = 0; cur->pos = 0;
} }
@ -3693,15 +3672,21 @@ evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *for
char *ts; char *ts;
if (cur->pos == 0) if (cur->pos == 0)
o->nodes = evas_object_list_prepend_relative(o->nodes, n, nc); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_prepend_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n),
EINA_INLIST_GET(nc));
else else
o->nodes = evas_object_list_append_relative(o->nodes, n, nc); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_append_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n),
EINA_INLIST_GET(nc));
if ((cur->pos <= nc->len) && (cur->pos != 0)) if ((cur->pos <= nc->len) && (cur->pos != 0))
{ {
n2 = calloc(1, sizeof(Evas_Object_Textblock_Node)); n2 = calloc(1, sizeof(Evas_Object_Textblock_Node));
n2->type = NODE_TEXT; n2->type = NODE_TEXT;
n2->text = _strbuf_append(n2->text, (char *)(nc->text + cur->pos), &(n2->len), &(n2->alloc)); n2->text = _strbuf_append(n2->text, (char *)(nc->text + cur->pos), &(n2->len), &(n2->alloc));
o->nodes = evas_object_list_append_relative(o->nodes, n2, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_append_relative(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n2),
EINA_INLIST_GET(n));
*(nc->text + cur->pos) = 0; *(nc->text + cur->pos) = 0;
nc->len = cur->pos; nc->len = cur->pos;
@ -3746,8 +3731,8 @@ evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur)
o = (Evas_Object_Textblock *)(cur->obj->object_data); o = (Evas_Object_Textblock *)(cur->obj->object_data);
n = cur->node; n = cur->node;
if ((n->text) && (!strcmp(n->text, "\n")) && if ((n->text) && (!strcmp(n->text, "\n")) &&
(!((Evas_Object_List *)n)->next)) return; (!(EINA_INLIST_GET(n))->next)) return;
n2 = (Evas_Object_Textblock_Node *)(((Evas_Object_List *)n)->next); n2 = (Evas_Object_Textblock_Node *)((EINA_INLIST_GET(n))->next);
if (n2) if (n2)
{ {
cur->node = n2; cur->node = n2;
@ -3755,7 +3740,7 @@ evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur)
} }
else else
{ {
n2 = (Evas_Object_Textblock_Node *)(((Evas_Object_List *)n)->prev); n2 = (Evas_Object_Textblock_Node *)((EINA_INLIST_GET(n))->prev);
cur->node = n2; cur->node = n2;
cur->pos = 0; cur->pos = 0;
evas_textblock_cursor_char_last(cur); evas_textblock_cursor_char_last(cur);
@ -3785,7 +3770,7 @@ evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur)
} }
} }
o->nodes = evas_object_list_remove(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n));
if (n->text) free(n->text); if (n->text) free(n->text);
free(n); free(n);
@ -3834,7 +3819,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
} }
if (cur->pos == n->len) if (cur->pos == n->len)
{ {
n2 = (Evas_Object_Textblock_Node *)(((Evas_Object_List *)n)->next); n2 = (Evas_Object_Textblock_Node *)((EINA_INLIST_GET(n))->next);
if (n2) if (n2)
{ {
cur->node = n2; cur->node = n2;
@ -3893,7 +3878,6 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
{ {
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
Evas_Object_Textblock_Node *n1, *n2, *n, *tn; Evas_Object_Textblock_Node *n1, *n2, *n, *tn;
Evas_Object_List *l;
int chr, index; int chr, index;
if (!cur1) return; if (!cur1) return;
@ -3932,7 +3916,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
} }
if (cur1->pos >= n1->len) if (cur1->pos >= n1->len)
{ {
n2 = (Evas_Object_Textblock_Node *)(((Evas_Object_List *)n1)->next); n2 = (Evas_Object_Textblock_Node *)((EINA_INLIST_GET(n1))->next);
if (n2) if (n2)
{ {
cur1->node = n2; cur1->node = n2;
@ -3953,14 +3937,15 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
{ {
Evas_List *removes, *format_hump = NULL; Evas_List *removes, *format_hump = NULL;
Evas_Textblock_Cursor tcur; Evas_Textblock_Cursor tcur;
Eina_Inlist *l;
tcur.node = n2; tcur.node = n2;
tcur.pos = 0; tcur.pos = 0;
index = cur2->pos; index = cur2->pos;
chr = evas_common_font_utf8_get_next((unsigned char *)n2->text, &index); chr = evas_common_font_utf8_get_next((unsigned char *)n2->text, &index);
if ((chr == 0) || (index >= n2->len)) if ((chr == 0) || (index >= n2->len))
{ {
tcur.node = (Evas_Object_Textblock_Node *)((Evas_Object_List *)n2)->next; tcur.node = (Evas_Object_Textblock_Node *)(EINA_INLIST_GET(n2))->next;
tcur.pos = 0; tcur.pos = 0;
if (!tcur.node) if (!tcur.node)
{ {
@ -3973,7 +3958,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
} }
else else
{ {
tcur.node = (Evas_Object_Textblock_Node *)((Evas_Object_List *)n1)->prev; tcur.node = (Evas_Object_Textblock_Node *)(EINA_INLIST_GET(n1))->prev;
if ((tcur.node) && (tcur.node->type == NODE_TEXT)) if ((tcur.node) && (tcur.node->type == NODE_TEXT))
tcur.pos = evas_common_font_utf8_get_last((unsigned char *)tcur.node->text, tcur.node->len); tcur.pos = evas_common_font_utf8_get_last((unsigned char *)tcur.node->text, tcur.node->len);
else else
@ -3983,7 +3968,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
} }
n1->text = _strbuf_remove(n1->text, cur1->pos, n1->len, &(n1->len), &(n1->alloc)); n1->text = _strbuf_remove(n1->text, cur1->pos, n1->len, &(n1->len), &(n1->alloc));
removes = NULL; removes = NULL;
for (l = ((Evas_Object_List *)n1)->next; l != (Evas_Object_List *)n2; l = l->next) for (l = (EINA_INLIST_GET(n1))->next; l != EINA_INLIST_GET(n2); l = l->next)
removes = evas_list_append(removes, l); removes = evas_list_append(removes, l);
if (n1->type == NODE_TEXT) if (n1->type == NODE_TEXT)
{ {
@ -3996,7 +3981,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
format_hump = evas_list_append(format_hump, n1); format_hump = evas_list_append(format_hump, n1);
else else
{ {
o->nodes = evas_object_list_remove(o->nodes, n1); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n1));
if (n1->text) free(n1->text); if (n1->text) free(n1->text);
free(n1); free(n1);
} }
@ -4007,7 +3992,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
n = removes->data; n = removes->data;
if (n->type == NODE_TEXT) if (n->type == NODE_TEXT)
{ {
o->nodes = evas_object_list_remove(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n));
if (n->text) free(n->text); if (n->text) free(n->text);
free(n); free(n);
} }
@ -4023,17 +4008,20 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
if (tn) if (tn)
{ {
format_hump = evas_list_remove_list(format_hump, evas_list_last(format_hump)); format_hump = evas_list_remove_list(format_hump, evas_list_last(format_hump));
o->nodes = evas_object_list_remove(o->nodes, tn); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(tn));
if (tn->text) free(tn->text); if (tn->text) free(tn->text);
free(tn); free(tn);
o->nodes = evas_object_list_remove(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n));
if (n->text) free(n->text); if (n->text) free(n->text);
free(n); free(n);
} }
} }
else else
{ {
o->nodes = evas_object_list_remove(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n));
if (n->text) free(n->text); if (n->text) free(n->text);
free(n); free(n);
} }
@ -4050,14 +4038,14 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
{ {
if (tcur.node == n2) if (tcur.node == n2)
{ {
if (((Evas_Object_List *)n2)->next) if ((EINA_INLIST_GET(n2))->next)
{ {
tcur.node = ((Evas_Object_List *)n2)->next; tcur.node = (Evas_Object_Textblock_Node *) (EINA_INLIST_GET(n2))->next;
tcur.pos = 0; tcur.pos = 0;
} }
else else
{ {
tcur.node = ((Evas_Object_List *)n2)->next; tcur.node = (Evas_Object_Textblock_Node *) (EINA_INLIST_GET(n2))->next;
if (tcur.node) if (tcur.node)
{ {
if (tcur.node->type == NODE_TEXT) if (tcur.node->type == NODE_TEXT)
@ -4069,7 +4057,8 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
} }
if (n2->text[0] == '-') if (n2->text[0] == '-')
{ {
o->nodes = evas_object_list_remove(o->nodes, n2); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n2));
if (n2->text) free(n2->text); if (n2->text) free(n2->text);
free(n2); free(n2);
n = evas_list_data(evas_list_last(format_hump)); n = evas_list_data(evas_list_last(format_hump));
@ -4077,14 +4066,14 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
{ {
if (tcur.node == n) if (tcur.node == n)
{ {
if (((Evas_Object_List *)n)->next) if ((EINA_INLIST_GET(n))->next)
{ {
tcur.node = ((Evas_Object_List *)n)->next; tcur.node = (Evas_Object_Textblock_Node *) (EINA_INLIST_GET(n))->next;
tcur.pos = 0; tcur.pos = 0;
} }
else else
{ {
tcur.node = ((Evas_Object_List *)n)->next; tcur.node = (Evas_Object_Textblock_Node *) (EINA_INLIST_GET(n))->next;
if (tcur.node) if (tcur.node)
{ {
if (tcur.node->type == NODE_TEXT) if (tcur.node->type == NODE_TEXT)
@ -4094,14 +4083,16 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
} }
} }
} }
o->nodes = evas_object_list_remove(o->nodes, n); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n));
if (n->text) free(n->text); if (n->text) free(n->text);
free(n); free(n);
} }
} }
else else
{ {
o->nodes = evas_object_list_remove(o->nodes, n2); o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(n2));
if (n2->text) free(n2->text); if (n2->text) free(n2->text);
free(n2); free(n2);
} }
@ -4257,7 +4248,6 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
{ {
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
Evas_Object_Textblock_Node *n1, *n2, *n; Evas_Object_Textblock_Node *n1, *n2, *n;
Evas_Object_List *l;
char *str = NULL, *s; char *str = NULL, *s;
int len = 0, alloc = 0, chr, index; int len = 0, alloc = 0, chr, index;
@ -4277,9 +4267,8 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
n2 = cur2->node; n2 = cur2->node;
index = cur2->pos; index = cur2->pos;
chr = evas_common_font_utf8_get_next((unsigned char *)n2->text, &index); chr = evas_common_font_utf8_get_next((unsigned char *)n2->text, &index);
for (l = (Evas_Object_List *)n1; ;l = l->next) EINA_INLIST_ITER_NEXT(n1, n)
{ {
n = (Evas_Object_Textblock_Node *)l;
if (n->type == NODE_TEXT) if (n->type == NODE_TEXT)
{ {
s = n->text; s = n->text;
@ -4411,7 +4400,7 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
str = _strbuf_append(str, ">", &len, &alloc); str = _strbuf_append(str, ">", &len, &alloc);
} }
} }
if (l == (Evas_Object_List *)n2) break; if (n == n2) break;
} }
return str; return str;
} }
@ -4548,7 +4537,7 @@ EAPI Evas_Bool
evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y)
{ {
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
Evas_Object_List *l, *ll; Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock_Item *it = NULL, *it_break = NULL; Evas_Object_Textblock_Item *it = NULL, *it_break = NULL;
Evas_Object_Textblock_Format_Item *fi = NULL; Evas_Object_Textblock_Format_Item *fi = NULL;
@ -4557,17 +4546,13 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
if (!o->formatted.valid) _relayout(cur->obj); if (!o->formatted.valid) _relayout(cur->obj);
x += o->style_pad.l; x += o->style_pad.l;
y += o->style_pad.t; y += o->style_pad.t;
for (l = (Evas_Object_List *)o->lines; l; l = l->next) EINA_INLIST_ITER_NEXT(o->lines, ln)
{ {
Evas_Object_Textblock_Line *ln;
ln = (Evas_Object_Textblock_Line *)l;
if (ln->y > y) break; if (ln->y > y) break;
if ((ln->y <= y) && ((ln->y + ln->h) > y)) if ((ln->y <= y) && ((ln->y + ln->h) > y))
{ {
for (ll = (Evas_Object_List *)ln->items; ll; ll = ll->next) EINA_INLIST_ITER_NEXT(ln->items, it)
{ {
it = (Evas_Object_Textblock_Item *)ll;
if ((it->x + ln->x) > x) if ((it->x + ln->x) > x)
{ {
it_break = it; it_break = it;
@ -4577,7 +4562,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
{ {
int pos; int pos;
int cx, cy, cw, ch; int cx, cy, cw, ch;
pos = -1; pos = -1;
if (it->format->font.font) if (it->format->font.font)
pos = cur->ENFN->font_char_at_coords_get(cur->ENDT, pos = cur->ENFN->font_char_at_coords_get(cur->ENDT,
@ -4592,9 +4577,8 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
return 1; return 1;
} }
} }
for (ll = (Evas_Object_List *)ln->format_items; ll; ll = ll->next) EINA_INLIST_ITER_NEXT(ln->format_items, fi)
{ {
fi = (Evas_Object_Textblock_Format_Item *)ll;
if ((fi->x + ln->x) > x) break; if ((fi->x + ln->x) > x) break;
if (((fi->x + ln->x) <= x) && (((fi->x + ln->x) + fi->w) > x)) if (((fi->x + ln->x) <= x) && (((fi->x + ln->x) + fi->w) > x))
{ {
@ -4625,17 +4609,14 @@ EAPI int
evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
{ {
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
Evas_Object_List *l; Evas_Object_Textblock_Line *ln;
if (!cur) return -1; if (!cur) return -1;
o = (Evas_Object_Textblock *)(cur->obj->object_data); o = (Evas_Object_Textblock *)(cur->obj->object_data);
if (!o->formatted.valid) _relayout(cur->obj); if (!o->formatted.valid) _relayout(cur->obj);
y += o->style_pad.t; y += o->style_pad.t;
for (l = (Evas_Object_List *)o->lines; l; l = l->next) EINA_INLIST_ITER_NEXT(o->lines, ln)
{ {
Evas_Object_Textblock_Line *ln;
ln = (Evas_Object_Textblock_Line *)l;
if (ln->y > y) break; if (ln->y > y) break;
if ((ln->y <= y) && ((ln->y + ln->h) > y)) if ((ln->y <= y) && ((ln->y + ln->h) > y))
{ {
@ -4934,8 +4915,8 @@ evas_object_textblock_free(Evas_Object *obj)
static void static void
evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
{ {
Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
Evas_Object_List *l, *ll;
int i, j; int i, j;
int pback = 0, backx = 0; int pback = 0, backx = 0;
int pline = 0, linex = 0; int pline = 0, linex = 0;
@ -4975,21 +4956,18 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
//// obj->cur.cache.geometry.h); //// obj->cur.cache.geometry.h);
#endif #endif
#define ITEM_WALK() \ #define ITEM_WALK() \
for (l = (Evas_Object_List *)o->lines; l; l = l->next) \ EINA_INLIST_ITER_NEXT(o->lines, ln) \
{ \ { \
Evas_Object_Textblock_Line *ln; \ Evas_Object_Textblock_Item *it; \
\ \
ln = (Evas_Object_Textblock_Line *)l; \
pback = 0; \ pback = 0; \
pline = 0; \ pline = 0; \
pline2 = 0; \ pline2 = 0; \
pstrike = 0; \ pstrike = 0; \
for (ll = (Evas_Object_List *)ln->items; ll; ll = ll->next) \ EINA_INLIST_ITER_NEXT(ln->items, it) \
{ \ { \
Evas_Object_Textblock_Item *it; \
int yoff; \ int yoff; \
\ \
it = (Evas_Object_Textblock_Item *)ll; \
yoff = ln->baseline; \ yoff = ln->baseline; \
if (it->format->valign != -1.0) \ if (it->format->valign != -1.0) \
yoff = (it->format->valign * (double)(ln->h - it->h)) + it->baseline; yoff = (it->format->valign * (double)(ln->h - it->h)) + it->baseline;
@ -5026,7 +5004,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
pback = 0; pback = 0;
/* backing */ /* backing */
ITEM_WALK(); ITEM_WALK();
if ((it->format->backing) && (!pback) && (ll->next)) if ((it->format->backing) && (!pback) && ((EINA_INLIST_GET(it))->next))
{ {
pback = 1; pback = 1;
backx = it->x; backx = it->x;
@ -5036,7 +5014,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
a = it->format->color.backing.a; a = it->format->color.backing.a;
} }
else if (((pback) && (!it->format->backing)) || else if (((pback) && (!it->format->backing)) ||
(!ll->next) || (!(EINA_INLIST_GET(it))->next) ||
(it->format->color.backing.r != r) || (it->format->color.backing.r != r) ||
(it->format->color.backing.g != g) || (it->format->color.backing.g != g) ||
(it->format->color.backing.b != b) || (it->format->color.backing.b != b) ||
@ -5182,7 +5160,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
ITEM_WALK(); ITEM_WALK();
COLOR_SET(normal); COLOR_SET(normal);
DRAW_TEXT(0, 0); DRAW_TEXT(0, 0);
if ((it->format->strikethrough) && (!pstrike) && (ll->next)) if ((it->format->strikethrough) && (!pstrike) && ((EINA_INLIST_GET(it))->next))
{ {
pstrike = 1; pstrike = 1;
strikex = it->x; strikex = it->x;
@ -5192,7 +5170,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
a3 = it->format->color.strikethrough.a; a3 = it->format->color.strikethrough.a;
} }
else if (((pstrike) && (!it->format->strikethrough)) || else if (((pstrike) && (!it->format->strikethrough)) ||
(!ll->next) || (!(EINA_INLIST_GET(it))->next) ||
(it->format->color.strikethrough.r != r3) || (it->format->color.strikethrough.r != r3) ||
(it->format->color.strikethrough.g != g3) || (it->format->color.strikethrough.g != g3) ||
(it->format->color.strikethrough.b != b3) || (it->format->color.strikethrough.b != b3) ||
@ -5237,7 +5215,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
b3 = it->format->color.strikethrough.b; b3 = it->format->color.strikethrough.b;
a3 = it->format->color.strikethrough.a; a3 = it->format->color.strikethrough.a;
} }
if ((it->format->underline) && (!pline) && (ll->next)) if ((it->format->underline) && (!pline) && ((EINA_INLIST_GET(it))->next))
{ {
pline = 1; pline = 1;
linex = it->x; linex = it->x;
@ -5247,7 +5225,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
a = it->format->color.underline.a; a = it->format->color.underline.a;
} }
else if (((pline) && (!it->format->underline)) || else if (((pline) && (!it->format->underline)) ||
(!ll->next) || (!(EINA_INLIST_GET(it))->next) ||
(it->format->color.underline.r != r) || (it->format->color.underline.r != r) ||
(it->format->color.underline.g != g) || (it->format->color.underline.g != g) ||
(it->format->color.underline.b != b) || (it->format->color.underline.b != b) ||
@ -5292,7 +5270,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
b = it->format->color.underline.b; b = it->format->color.underline.b;
a = it->format->color.underline.a; a = it->format->color.underline.a;
} }
if ((it->format->underline2) && (!pline2) && (ll->next)) if ((it->format->underline2) && (!pline2) && ((EINA_INLIST_GET(it))->next))
{ {
pline2 = 1; pline2 = 1;
line2x = it->x; line2x = it->x;
@ -5302,7 +5280,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
a2 = it->format->color.underline2.a; a2 = it->format->color.underline2.a;
} }
else if (((pline2) && (!it->format->underline2)) || else if (((pline2) && (!it->format->underline2)) ||
(!ll->next) || (!(EINA_INLIST_GET(it))->next) ||
(it->format->color.underline2.r != r2) || (it->format->color.underline2.r != r2) ||
(it->format->color.underline2.g != g2) || (it->format->color.underline2.g != g2) ||
(it->format->color.underline2.b != b2) || (it->format->color.underline2.b != b2) ||
@ -5553,19 +5531,15 @@ void
_evas_object_textblock_rehint(Evas_Object *obj) _evas_object_textblock_rehint(Evas_Object *obj)
{ {
Evas_Object_Textblock *o; Evas_Object_Textblock *o;
Evas_Object_List *l, *ll; Evas_Object_Textblock_Line *ln;
o = (Evas_Object_Textblock *)(obj->object_data); o = (Evas_Object_Textblock *)(obj->object_data);
for (l = (Evas_Object_List *)o->lines; l; l = l->next) EINA_INLIST_ITER_NEXT(o->lines, ln)
{ {
Evas_Object_Textblock_Line *ln; Evas_Object_Textblock_Item *it;
ln = (Evas_Object_Textblock_Line *)l; EINA_INLIST_ITER_NEXT(ln->items, it)
for (ll = (Evas_Object_List *)ln->items; ll; ll = ll->next)
{ {
Evas_Object_Textblock_Item *it;
it = (Evas_Object_Textblock_Item *)ll;
if (it->format->font.font) if (it->format->font.font)
evas_font_load_hinting_set(obj->layer->evas, evas_font_load_hinting_set(obj->layer->evas,
it->format->font.font, it->format->font.font,

View File

@ -132,15 +132,12 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj, Eina_Array *active
{ {
if (obj->smart.smart) if (obj->smart.smart)
{ {
const Evas_Object_List *l; Evas_Object *obj2;
eina_array_push(render_objects, obj); eina_array_push(render_objects, obj);
obj->render_pre = 1; obj->render_pre = 1;
for (l = evas_object_smart_members_get_direct(obj); l; l = l->next) EINA_INLIST_ITER_NEXT(evas_object_smart_members_get_direct(obj), obj2)
{ {
Evas_Object *obj2;
obj2 = (Evas_Object *)l;
_evas_render_phase1_object_process(e, obj2, _evas_render_phase1_object_process(e, obj2,
active_objects, active_objects,
restack_objects, restack_objects,
@ -172,15 +169,12 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj, Eina_Array *active
{ {
if (obj->smart.smart) if (obj->smart.smart)
{ {
const Evas_Object_List *l; Evas_Object *obj2;
eina_array_push(render_objects, obj); eina_array_push(render_objects, obj);
obj->render_pre = 1; obj->render_pre = 1;
for (l = evas_object_smart_members_get_direct(obj); l; l = l->next) EINA_INLIST_ITER_NEXT(evas_object_smart_members_get_direct(obj), obj2)
{ {
Evas_Object *obj2;
obj2 = (Evas_Object *)l;
_evas_render_phase1_object_process(e, obj2, _evas_render_phase1_object_process(e, obj2,
active_objects, active_objects,
restack_objects, restack_objects,
@ -207,20 +201,15 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj, Eina_Array *active
static Evas_Bool static Evas_Bool
_evas_render_phase1_process(Evas *e, Eina_Array *active_objects, Eina_Array *restack_objects, Eina_Array *delete_objects, Eina_Array *render_objects) _evas_render_phase1_process(Evas *e, Eina_Array *active_objects, Eina_Array *restack_objects, Eina_Array *delete_objects, Eina_Array *render_objects)
{ {
Evas_Object_List *l; Evas_Layer *lay;
int clean_them = 0; int clean_them = 0;
for (l = (Evas_Object_List *)e->layers; l; l = l->next) EINA_INLIST_ITER_NEXT(e->layers, lay)
{ {
Evas_Object_List *l2; Evas_Object *obj;
Evas_Layer *lay;
lay = (Evas_Layer *)l; EINA_INLIST_ITER_NEXT(lay->objects, obj)
for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
{ {
Evas_Object *obj;
obj = (Evas_Object *)l2;
clean_them |= _evas_render_phase1_object_process(e, obj, clean_them |= _evas_render_phase1_object_process(e, obj,
active_objects, restack_objects, active_objects, restack_objects,
delete_objects, render_objects, delete_objects, render_objects,
@ -315,7 +304,7 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *e)
} }
} }
Eina_Bool pending_change(void *data, void *gdata) Eina_Bool pending_change(void *data, __UNUSED__ void *gdata)
{ {
Evas_Object *obj; Evas_Object *obj;

View File

@ -4,15 +4,15 @@
static Evas_Object * static Evas_Object *
evas_object_above_get_internal(const Evas_Object *obj) evas_object_above_get_internal(const Evas_Object *obj)
{ {
if (((Evas_Object_List *)obj)->next) if ((EINA_INLIST_GET(obj))->next)
return (Evas_Object *)(((Evas_Object_List *)obj)->next); return (Evas_Object *)((EINA_INLIST_GET(obj))->next);
else else
{ {
if (((Evas_Object_List *)(((Evas_Object *)obj)->layer))->next) if ((EINA_INLIST_GET(((Evas_Object*)(obj))->layer))->next)
{ {
Evas_Layer *l; Evas_Layer *l;
l = (Evas_Layer *)(((Evas_Object_List *)(((Evas_Object *)obj)->layer))->next); l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->next);
return l->objects; return l->objects;
} }
} }
@ -22,16 +22,16 @@ evas_object_above_get_internal(const Evas_Object *obj)
static Evas_Object * static Evas_Object *
evas_object_below_get_internal(const Evas_Object *obj) evas_object_below_get_internal(const Evas_Object *obj)
{ {
if (((Evas_Object_List *)obj)->prev) if ((EINA_INLIST_GET(obj))->prev)
return (Evas_Object *)(((Evas_Object_List *)obj)->prev); return (Evas_Object *)((EINA_INLIST_GET(obj))->prev);
else else
{ {
if (((Evas_Object_List *)(((Evas_Object *)obj)->layer))->prev) if ((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev)
{ {
Evas_Layer *l; Evas_Layer *l;
l = (Evas_Layer *)(((Evas_Object_List *)(((Evas_Object *)obj)->layer))->prev); l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev);
return (Evas_Object *)(((Evas_Object_List *)(l->objects))->last); return (Evas_Object *)((EINA_INLIST_GET((l->objects)))->last);
} }
} }
return NULL; return NULL;
@ -50,7 +50,7 @@ evas_object_raise(Evas_Object *obj)
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (evas_object_intercept_call_raise(obj)) return; if (evas_object_intercept_call_raise(obj)) return;
if (!(((Evas_Object_List *)obj)->next)) if (!((EINA_INLIST_GET(obj))->next))
{ {
evas_object_inform_call_restack(obj); evas_object_inform_call_restack(obj);
return; return;
@ -60,10 +60,8 @@ evas_object_raise(Evas_Object *obj)
else else
{ {
if (obj->in_layer) if (obj->in_layer)
{ obj->layer->objects = (Evas_Object *)eina_inlist_demote(EINA_INLIST_GET(obj->layer->objects),
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj); EINA_INLIST_GET(obj));
obj->layer->objects = evas_object_list_append(obj->layer->objects, obj);
}
} }
if (obj->clip.clipees) if (obj->clip.clipees)
{ {
@ -107,7 +105,7 @@ evas_object_lower(Evas_Object *obj)
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (evas_object_intercept_call_lower(obj)) return; if (evas_object_intercept_call_lower(obj)) return;
if (!(((Evas_Object_List *)obj)->prev)) if (!((EINA_INLIST_GET(obj))->prev))
{ {
evas_object_inform_call_restack(obj); evas_object_inform_call_restack(obj);
return; return;
@ -117,10 +115,8 @@ evas_object_lower(Evas_Object *obj)
else else
{ {
if (obj->in_layer) if (obj->in_layer)
{ obj->layer->objects = (Evas_Object *)eina_inlist_promote(EINA_INLIST_GET(obj->layer->objects),
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj); EINA_INLIST_GET(obj));
obj->layer->objects = evas_object_list_prepend(obj->layer->objects, obj);
}
} }
if (obj->clip.clipees) if (obj->clip.clipees)
{ {
@ -179,7 +175,7 @@ evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
evas_object_raise(obj); evas_object_raise(obj);
return; return;
} }
if (((Evas_Object_List *)obj)->prev == (Evas_Object_List *)above) if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above))
{ {
evas_object_inform_call_restack(obj); evas_object_inform_call_restack(obj);
return; return;
@ -202,8 +198,11 @@ evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
} }
if (obj->in_layer) if (obj->in_layer)
{ {
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj); obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
obj->layer->objects = evas_object_list_append_relative(obj->layer->objects, obj, above); EINA_INLIST_GET(obj));
obj->layer->objects = (Evas_Object *)eina_inlist_append_relative(EINA_INLIST_GET(obj->layer->objects),
EINA_INLIST_GET(obj),
EINA_INLIST_GET(above));
} }
} }
if (obj->clip.clipees) if (obj->clip.clipees)
@ -263,7 +262,7 @@ evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
evas_object_lower(obj); evas_object_lower(obj);
return; return;
} }
if (((Evas_Object_List *)obj)->next == (Evas_Object_List *)below) if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below))
{ {
evas_object_inform_call_restack(obj); evas_object_inform_call_restack(obj);
return; return;
@ -286,8 +285,11 @@ evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
} }
if (obj->in_layer) if (obj->in_layer)
{ {
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj); obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
obj->layer->objects = evas_object_list_prepend_relative(obj->layer->objects, obj, below); EINA_INLIST_GET(obj));
obj->layer->objects = (Evas_Object *)eina_inlist_prepend_relative(EINA_INLIST_GET(obj->layer->objects),
EINA_INLIST_GET(obj),
EINA_INLIST_GET(below));
} }
} }
if (obj->clip.clipees) if (obj->clip.clipees)
@ -336,7 +338,7 @@ evas_object_above_get(const Evas_Object *obj)
{ {
do do
{ {
obj = (Evas_Object *)(((Evas_Object_List *)(obj))->next); obj = (Evas_Object *)((EINA_INLIST_GET(obj))->next);
if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj; if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj;
} }
while (obj); while (obj);
@ -368,7 +370,7 @@ evas_object_below_get(const Evas_Object *obj)
{ {
do do
{ {
obj = (Evas_Object *)(((Evas_Object_List *)(obj))->prev); obj = (Evas_Object *)((EINA_INLIST_GET(obj))->prev);
if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj; if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj;
} }
while (obj); while (obj);
@ -421,20 +423,20 @@ EAPI Evas_Object *
evas_object_top_get(const Evas *e) evas_object_top_get(const Evas *e)
{ {
Evas_Object *obj = NULL; Evas_Object *obj = NULL;
Evas_Object_List *list; Eina_Inlist *list;
Evas_Layer *layer; Evas_Layer *layer;
MAGIC_CHECK(e, Evas, MAGIC_EVAS); MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL; return NULL;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
list = (Evas_Object_List *) e->layers; list = EINA_INLIST_GET(e->layers);
if (!list) return NULL; if (!list) return NULL;
layer = (Evas_Layer *) list->last; layer = (Evas_Layer *) list->last;
if (!layer) return NULL; if (!layer) return NULL;
list = (Evas_Object_List *) layer->objects; list = EINA_INLIST_GET(layer->objects);
if (!list) return NULL; if (!list) return NULL;
obj = (Evas_Object *) list->last; obj = (Evas_Object *) list->last;

View File

@ -15,7 +15,7 @@ typedef struct _Evas_Hash_El Evas_Hash_El;
struct _Evas_Hash_El struct _Evas_Hash_El
{ {
Evas_Object_List _list_data; EINA_INLIST;
const char *key; const char *key;
void *data; void *data;
}; };
@ -131,7 +131,7 @@ evas_hash_add(Evas_Hash *hash, const char *key, const void *data)
strcpy((char *) el->key, key); strcpy((char *) el->key, key);
el->data = (void *)data; el->data = (void *)data;
hash_num = _evas_hash_gen(key); hash_num = _evas_hash_gen(key);
hash->buckets[hash_num] = evas_object_list_prepend(hash->buckets[hash_num], el); hash->buckets[hash_num] = eina_inlist_prepend(hash->buckets[hash_num], EINA_INLIST_GET(el));
hash->population++; hash->population++;
return hash; return hash;
} }
@ -189,7 +189,7 @@ evas_hash_direct_add(Evas_Hash *hash, const char *key, const void *data)
el->key = key; el->key = key;
el->data = (void *)data; el->data = (void *)data;
hash_num = _evas_hash_gen(key); hash_num = _evas_hash_gen(key);
hash->buckets[hash_num] = evas_object_list_prepend(hash->buckets[hash_num], el); hash->buckets[hash_num] = eina_inlist_prepend(hash->buckets[hash_num], EINA_INLIST_GET(el));
hash->population++; hash->population++;
return hash; return hash;
} }
@ -214,55 +214,48 @@ evas_hash_del(Evas_Hash *hash, const char *key, const void *data)
{ {
int hash_num; int hash_num;
Evas_Hash_El *el; Evas_Hash_El *el;
Evas_Object_List *l;
if (!hash) return NULL; if (!hash) return NULL;
if (!key) if (!key)
{ {
int hash_num; int hash_num;
for (hash_num = 0; hash_num < 256; hash_num++) for (hash_num = 0; hash_num < 256; hash_num++)
{ {
for (l = hash->buckets[hash_num]; l; l = l->next) EINA_INLIST_ITER_NEXT(hash->buckets[hash_num], el)
{ if (el->data == data)
el = (Evas_Hash_El *)l; {
if (el->data == data) hash->buckets[hash_num] = eina_inlist_remove(hash->buckets[hash_num], EINA_INLIST_GET(el));
{ free(el);
hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el); hash->population--;
free(el); if (hash->population <= 0)
hash->population--; {
if (hash->population <= 0) free(hash);
{ hash = NULL;
free(hash); }
hash = NULL; return hash;
} }
return hash;
}
}
} }
} }
else else
{ {
hash_num = _evas_hash_gen(key); hash_num = _evas_hash_gen(key);
for (l = hash->buckets[hash_num]; l; l = l->next) EINA_INLIST_ITER_NEXT(hash->buckets[hash_num], el)
{ if (!strcmp(el->key, key))
el = (Evas_Hash_El *)l; {
if (!strcmp(el->key, key)) if ((!data) || (el->data == data))
{ {
if ((!data) || (el->data == data)) hash->buckets[hash_num] = eina_inlist_remove(hash->buckets[hash_num], EINA_INLIST_GET(el));
{ free(el);
hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el); hash->population--;
free(el); if (hash->population <= 0)
hash->population--; {
if (hash->population <= 0) free(hash);
{ hash = NULL;
free(hash); }
hash = NULL; return hash;
} }
return hash; }
}
}
}
} }
return hash; return hash;
} }
@ -280,28 +273,16 @@ evas_hash_find(const Evas_Hash *hash, const char *key)
{ {
int hash_num; int hash_num;
Evas_Hash_El *el; Evas_Hash_El *el;
Evas_Object_List *l;
_evas_hash_alloc_error = 0; _evas_hash_alloc_error = 0;
if ((!hash) || (!key)) return NULL; if ((!hash) || (!key)) return NULL;
hash_num = _evas_hash_gen(key); hash_num = _evas_hash_gen(key);
for (l = hash->buckets[hash_num]; l; l = l->next) EINA_INLIST_ITER_NEXT(hash->buckets[hash_num], el)
{ if (!strcmp(el->key, key))
el = (Evas_Hash_El *)l; {
if (!strcmp(el->key, key)) ((Evas_Hash *)hash)->buckets[hash_num] = eina_inlist_promote(((Evas_Hash *)hash)->buckets[hash_num], EINA_INLIST_GET(el));
{ return el->data;
if (l != hash->buckets[hash_num]) }
{
Evas_Object_List *bucket;
bucket = hash->buckets[hash_num];
bucket = evas_object_list_remove(bucket, el);
bucket = evas_object_list_prepend(bucket, el);
((Evas_Hash *)hash)->buckets[hash_num] = bucket;
}
return el->data;
}
}
return NULL; return NULL;
} }
@ -320,28 +301,21 @@ evas_hash_modify(Evas_Hash *hash, const char *key, const void *data)
{ {
int hash_num; int hash_num;
Evas_Hash_El *el; Evas_Hash_El *el;
Evas_Object_List *l;
_evas_hash_alloc_error = 0; _evas_hash_alloc_error = 0;
if (!hash) return NULL; if (!hash) return NULL;
hash_num = _evas_hash_gen(key); hash_num = _evas_hash_gen(key);
for (l = hash->buckets[hash_num]; l; l = l->next) EINA_INLIST_ITER_NEXT(hash->buckets[hash_num], el)
{ if ((key) && (!strcmp(el->key, key)))
el = (Evas_Hash_El *)l; {
if ((key) && (!strcmp(el->key, key))) void *old_data;
{
void *old_data; hash->buckets[hash_num] = eina_inlist_promote(hash->buckets[hash_num], EINA_INLIST_GET(el));
if (l != hash->buckets[hash_num]) old_data = el->data;
{ el->data = (void *) data;
hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el); return old_data;
hash->buckets[hash_num] = evas_object_list_prepend(hash->buckets[hash_num], el); }
}
old_data = el->data;
el->data = (void *) data;
return old_data;
}
}
return NULL; return NULL;
} }
@ -402,7 +376,7 @@ evas_hash_free(Evas_Hash *hash)
Evas_Hash_El *el; Evas_Hash_El *el;
el = (Evas_Hash_El *)hash->buckets[i]; el = (Evas_Hash_El *)hash->buckets[i];
hash->buckets[i] = evas_object_list_remove(hash->buckets[i], el); hash->buckets[i] = eina_inlist_remove(hash->buckets[i], EINA_INLIST_GET(el));
free(el); free(el);
} }
} }
@ -451,7 +425,7 @@ evas_hash_foreach(const Evas_Hash *hash, Evas_Bool (*func) (const Evas_Hash *has
size = evas_hash_size(hash); size = evas_hash_size(hash);
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
{ {
Evas_Object_List *l, *next_l; Eina_Inlist *l, *next_l;
for (l = hash->buckets[i]; l;) for (l = hash->buckets[i]; l;)
{ {

View File

@ -9,8 +9,8 @@ extern FT_Library evas_ft_lib;
static int font_cache_usage = 0; static int font_cache_usage = 0;
static int font_cache = 0; static int font_cache = 0;
static Evas_Object_List * fonts_src = NULL; static Eina_Inlist * fonts_src = NULL;
static Evas_Object_List * fonts = NULL; static Eina_Inlist * fonts = NULL;
static Evas_Bool font_modify_cache_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata); static Evas_Bool font_modify_cache_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata);
static Evas_Bool font_flush_free_glyph_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata); static Evas_Bool font_flush_free_glyph_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata);
@ -38,7 +38,7 @@ evas_common_font_source_memory_load(const char *name, const void *data, int data
error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode);
fs->ft.orig_upem = fs->ft.face->units_per_EM; fs->ft.orig_upem = fs->ft.face->units_per_EM;
fs->references = 1; fs->references = 1;
fonts_src = evas_object_list_prepend(fonts_src, fs); fonts_src = eina_inlist_prepend(fonts_src, EINA_INLIST_GET(fs));
return fs; return fs;
} }
@ -60,7 +60,7 @@ evas_common_font_source_load(const char *name)
fs->ft.orig_upem = 0; fs->ft.orig_upem = 0;
fs->references = 1; fs->references = 1;
fonts_src = evas_object_list_prepend(fonts_src, fs); fonts_src = eina_inlist_prepend(fonts_src, EINA_INLIST_GET(fs));
return fs; return fs;
} }
@ -91,7 +91,7 @@ evas_common_font_source_load_complete(RGBA_Font_Source *fs)
EAPI RGBA_Font_Source * EAPI RGBA_Font_Source *
evas_common_font_source_find(const char *name) evas_common_font_source_find(const char *name)
{ {
Evas_Object_List *l; Eina_Inlist *l;
if (!name) return NULL; if (!name) return NULL;
for (l = fonts_src; l; l = l->next) for (l = fonts_src; l; l = l->next)
@ -102,8 +102,7 @@ evas_common_font_source_find(const char *name)
if ((fs->name) && (!strcmp(name, fs->name))) if ((fs->name) && (!strcmp(name, fs->name)))
{ {
fs->references++; fs->references++;
fonts_src = evas_object_list_remove(fonts_src, fs); fonts_src = eina_inlist_demote(fonts_src, EINA_INLIST_GET(fs));
fonts_src = evas_object_list_prepend(fonts_src, fs);
return fs; return fs;
} }
} }
@ -116,7 +115,7 @@ evas_common_font_source_free(RGBA_Font_Source *fs)
fs->references--; fs->references--;
if (fs->references > 0) return; if (fs->references > 0) return;
fonts_src = evas_object_list_remove(fonts_src, fs); fonts_src = eina_inlist_remove(fonts_src, EINA_INLIST_GET(fs));
FT_Done_Face(fs->ft.face); FT_Done_Face(fs->ft.face);
if (fs->charmap) evas_array_hash_free(fs->charmap); if (fs->charmap) evas_array_hash_free(fs->charmap);
if (fs->name) eina_stringshare_del(fs->name); if (fs->name) eina_stringshare_del(fs->name);
@ -204,7 +203,7 @@ evas_common_font_int_load_init(RGBA_Font_Int *fi)
fi->glyphs = NULL; fi->glyphs = NULL;
fi->usage = 0; fi->usage = 0;
fi->references = 1; fi->references = 1;
fonts = evas_object_list_prepend(fonts, fi); fonts = eina_inlist_prepend(fonts, EINA_INLIST_GET(fi));
return fi; return fi;
} }
@ -550,7 +549,7 @@ font_flush_free_glyph_cb(const Evas_Hash *hash, const char *key, void *data, voi
EAPI void EAPI void
evas_common_font_flush_last(void) evas_common_font_flush_last(void)
{ {
Evas_Object_List *l; Eina_Inlist *l;
RGBA_Font_Int *fi = NULL; RGBA_Font_Int *fi = NULL;
for (l = fonts; l; l = l->next) for (l = fonts; l; l = l->next)
@ -564,7 +563,7 @@ evas_common_font_flush_last(void)
FT_Done_Size(fi->ft.size); FT_Done_Size(fi->ft.size);
fonts = evas_object_list_remove(fonts, fi); fonts = eina_inlist_remove(fonts, EINA_INLIST_GET(fi));
evas_common_font_int_modify_cache_by(fi, -1); evas_common_font_int_modify_cache_by(fi, -1);
evas_hash_foreach(fi->glyphs, font_flush_free_glyph_cb, NULL); evas_hash_foreach(fi->glyphs, font_flush_free_glyph_cb, NULL);
@ -578,7 +577,7 @@ evas_common_font_flush_last(void)
EAPI RGBA_Font_Int * EAPI RGBA_Font_Int *
evas_common_font_int_find(const char *name, int size) evas_common_font_int_find(const char *name, int size)
{ {
Evas_Object_List *l; Eina_Inlist *l;
for (l = fonts; l; l = l->next) for (l = fonts; l; l = l->next)
{ {
@ -589,8 +588,7 @@ evas_common_font_int_find(const char *name, int size)
{ {
if (fi->references == 0) evas_common_font_int_modify_cache_by(fi, -1); if (fi->references == 0) evas_common_font_int_modify_cache_by(fi, -1);
fi->references++; fi->references++;
fonts = evas_object_list_remove(fonts, fi); fonts = eina_inlist_promote(fonts, EINA_INLIST_GET(fi));
fonts = evas_object_list_prepend(fonts, fi);
return fi; return fi;
} }
} }

View File

@ -49,12 +49,12 @@ _evas_common_gradient2_stops_free(RGBA_Gradient2 *gr)
if (!gr) return; if (!gr) return;
if (gr->stops.stops) if (gr->stops.stops)
{ {
Evas_Object_List *l; Eina_Inlist *l;
while (gr->stops.stops) while (gr->stops.stops)
{ {
l = gr->stops.stops; l = gr->stops.stops;
gr->stops.stops = evas_object_list_remove(gr->stops.stops, gr->stops.stops); gr->stops.stops = eina_inlist_remove(gr->stops.stops, gr->stops.stops);
free(l); free(l);
} }
gr->stops.stops = NULL; gr->stops.stops = NULL;
@ -90,7 +90,7 @@ EAPI void
evas_common_gradient2_color_np_stop_insert(RGBA_Gradient2 *gr, int r, int g, int b, int a, float pos) evas_common_gradient2_color_np_stop_insert(RGBA_Gradient2 *gr, int r, int g, int b, int a, float pos)
{ {
RGBA_Gradient2_Color_Np_Stop *gc; RGBA_Gradient2_Color_Np_Stop *gc;
Evas_Object_List *l; Eina_Inlist *l;
if (!gr) return; if (!gr) return;
if (!gr->stops.stops) if (!gr->stops.stops)
@ -104,8 +104,8 @@ evas_common_gradient2_color_np_stop_insert(RGBA_Gradient2 *gr, int r, int g, int
gc->r = gc->g = gc->b = gc->a = 255; gc->pos = 0.0; gc->dist = 0; gc->r = gc->g = gc->b = gc->a = 255; gc->pos = 0.0; gc->dist = 0;
gc1->r = gc1->g = gc1->b = gc1->a = 255; gc1->pos = 1.0; gc1->dist = 0; gc1->r = gc1->g = gc1->b = gc1->a = 255; gc1->pos = 1.0; gc1->dist = 0;
gr->stops.stops = evas_object_list_append(gr->stops.stops, gc); gr->stops.stops = eina_inlist_append(gr->stops.stops, EINA_INLIST_GET(gc));
gr->stops.stops = evas_object_list_append(gr->stops.stops, gc1); gr->stops.stops = eina_inlist_append(gr->stops.stops, EINA_INLIST_GET(gc1));
gr->stops.nstops = 2; gr->stops.nstops = 2;
gr->stops.len = 0; gr->stops.len = 0;
} }
@ -158,7 +158,7 @@ evas_common_gradient2_color_np_stop_insert(RGBA_Gradient2 *gr, int r, int g, int
gc->pos = pos; gc->pos = pos;
gc->dist = 0; gc->dist = 0;
gr->stops.stops = evas_object_list_prepend_relative(gr->stops.stops, gc, l); gr->stops.stops = eina_inlist_prepend_relative(gr->stops.stops, EINA_INLIST_GET(gc), l);
gr->stops.nstops++; gr->stops.nstops++;
if (a < 255) if (a < 255)
gr->has_alpha = 1; gr->has_alpha = 1;
@ -314,7 +314,7 @@ evas_common_gradient2_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
static void static void
_evas_common_gradient2_stops_scale(RGBA_Gradient2 *gr) _evas_common_gradient2_stops_scale(RGBA_Gradient2 *gr)
{ {
Evas_Object_List *l; Eina_Inlist *l;
RGBA_Gradient2_Color_Np_Stop *gc, *gc_next; RGBA_Gradient2_Color_Np_Stop *gc, *gc_next;
double scale; double scale;
int len; int len;
@ -384,7 +384,7 @@ _evas_common_gradient2_map_argb(RGBA_Draw_Context *dc, RGBA_Gradient2 *gr, int l
_evas_common_gradient2_stops_scale(gr); _evas_common_gradient2_stops_scale(gr);
{ {
Evas_Object_List *lc; Eina_Inlist *lc;
RGBA_Gradient2_Color_Np_Stop *gc, *gc_next; RGBA_Gradient2_Color_Np_Stop *gc, *gc_next;
DATA32 *pmap, *map_end; DATA32 *pmap, *map_end;
DATA8 *pamap = NULL; DATA8 *pamap = NULL;
@ -484,7 +484,7 @@ _evas_common_gradient2_map_ahsv(RGBA_Draw_Context *dc, RGBA_Gradient2 *gr, int l
_evas_common_gradient2_stops_scale(gr); _evas_common_gradient2_stops_scale(gr);
{ {
Evas_Object_List *lc; Eina_Inlist *lc;
RGBA_Gradient2_Color_Np_Stop *gc, *gc_next; RGBA_Gradient2_Color_Np_Stop *gc, *gc_next;
DATA32 *pmap, *map_end; DATA32 *pmap, *map_end;
DATA8 *pamap = NULL; DATA8 *pamap = NULL;

View File

@ -44,12 +44,12 @@ _evas_common_gradient_stops_free(RGBA_Gradient *gr)
if (!gr) return; if (!gr) return;
if (gr->color.stops) if (gr->color.stops)
{ {
Evas_Object_List *l; Eina_Inlist *l;
while (gr->color.stops) while (gr->color.stops)
{ {
l = gr->color.stops; l = gr->color.stops;
gr->color.stops = evas_object_list_remove(gr->color.stops, gr->color.stops); gr->color.stops = eina_inlist_remove(gr->color.stops, gr->color.stops);
free(l); free(l);
} }
gr->color.stops = NULL; gr->color.stops = NULL;
@ -57,12 +57,12 @@ _evas_common_gradient_stops_free(RGBA_Gradient *gr)
} }
if (gr->alpha.stops) if (gr->alpha.stops)
{ {
Evas_Object_List *l; Eina_Inlist *l;
while (gr->alpha.stops) while (gr->alpha.stops)
{ {
l = gr->alpha.stops; l = gr->alpha.stops;
gr->alpha.stops = evas_object_list_remove(gr->alpha.stops, gr->alpha.stops); gr->alpha.stops = eina_inlist_remove(gr->alpha.stops, gr->alpha.stops);
free(l); free(l);
} }
gr->alpha.stops = NULL; gr->alpha.stops = NULL;
@ -220,7 +220,7 @@ evas_common_gradient_color_stop_add(RGBA_Gradient *gr, int r, int g, int b, int
if (!gr->color.stops) if (!gr->color.stops)
{ {
gr->color.stops = evas_object_list_append(gr->color.stops, gc); gr->color.stops = eina_inlist_append(gr->color.stops, EINA_INLIST_GET(gc));
gr->color.nstops = 1; gr->color.nstops = 1;
gr->color.len = 1; gr->color.len = 1;
if (a < 255) if (a < 255)
@ -237,9 +237,9 @@ evas_common_gradient_color_stop_add(RGBA_Gradient *gr, int r, int g, int b, int
gcm->b = (gc_last->b + b) / 2; gcm->b = (gc_last->b + b) / 2;
gcm->a = (gc_last->a + a) / 2; gcm->a = (gc_last->a + a) / 2;
gcm->dist = dist; gcm->dist = dist;
gr->color.stops = evas_object_list_append(gr->color.stops, gcm); gr->color.stops = eina_inlist_append(gr->color.stops, EINA_INLIST_GET(gcm));
gr->color.len += gc_last->dist; gr->color.len += gc_last->dist;
gr->color.stops = evas_object_list_append(gr->color.stops, gc); gr->color.stops = eina_inlist_append(gr->color.stops, EINA_INLIST_GET(gc));
gr->color.len += dist; gr->color.len += dist;
gr->color.nstops += 2; gr->color.nstops += 2;
if (a < 255) if (a < 255)
@ -271,7 +271,7 @@ evas_common_gradient_alpha_stop_add(RGBA_Gradient *gr, int a, int dist)
if (!gr->alpha.stops) if (!gr->alpha.stops)
{ {
gr->alpha.stops = evas_object_list_append(gr->alpha.stops, ga); gr->alpha.stops = eina_inlist_append(gr->alpha.stops, EINA_INLIST_GET(ga));
gr->alpha.nstops = 1; gr->alpha.nstops = 1;
gr->alpha.len = 1; gr->alpha.len = 1;
if (a < 255) if (a < 255)
@ -285,9 +285,9 @@ evas_common_gradient_alpha_stop_add(RGBA_Gradient *gr, int a, int dist)
{ free(ga); free(gam); return; } { free(ga); free(gam); return; }
gam->a = (ga_last->a + a) / 2; gam->a = (ga_last->a + a) / 2;
gam->dist = dist; gam->dist = dist;
gr->alpha.stops = evas_object_list_append(gr->alpha.stops, gam); gr->alpha.stops = eina_inlist_append(gr->alpha.stops, EINA_INLIST_GET(gam));
gr->alpha.len += ga_last->dist; gr->alpha.len += ga_last->dist;
gr->alpha.stops = evas_object_list_append(gr->alpha.stops, ga); gr->alpha.stops = eina_inlist_append(gr->alpha.stops, EINA_INLIST_GET(ga));
gr->alpha.len += dist; gr->alpha.len += dist;
gr->alpha.nstops += 2; gr->alpha.nstops += 2;
if (a < 255) if (a < 255)
@ -617,7 +617,7 @@ evas_common_gradient_map_argb(RGBA_Draw_Context *dc, RGBA_Gradient *gr, int len)
if (gr->color.stops) if (gr->color.stops)
{ {
Evas_Object_List *lc; Eina_Inlist *lc;
RGBA_Gradient_Color_Stop *gc, *gc_next; RGBA_Gradient_Color_Stop *gc, *gc_next;
DATA32 *pmap, *map_end; DATA32 *pmap, *map_end;
int i, dii; int i, dii;
@ -681,7 +681,7 @@ evas_common_gradient_map_argb(RGBA_Draw_Context *dc, RGBA_Gradient *gr, int len)
if (gr->alpha.stops) if (gr->alpha.stops)
{ {
Evas_Object_List *lc; Eina_Inlist *lc;
RGBA_Gradient_Alpha_Stop *ga, *ga_next; RGBA_Gradient_Alpha_Stop *ga, *ga_next;
DATA8 *pamap, *amap_end; DATA8 *pamap, *amap_end;
int i, dii; int i, dii;
@ -789,7 +789,7 @@ evas_common_gradient_map_ahsv(RGBA_Draw_Context *dc, RGBA_Gradient *gr, int len)
if (gr->color.stops) if (gr->color.stops)
{ {
Evas_Object_List *lc; Eina_Inlist *lc;
RGBA_Gradient_Color_Stop *gc, *gc_next; RGBA_Gradient_Color_Stop *gc, *gc_next;
DATA32 *pmap, *map_end; DATA32 *pmap, *map_end;
int i, dii; int i, dii;
@ -846,7 +846,7 @@ evas_common_gradient_map_ahsv(RGBA_Draw_Context *dc, RGBA_Gradient *gr, int len)
if (gr->alpha.stops) if (gr->alpha.stops)
{ {
Evas_Object_List *lc; Eina_Inlist *lc;
RGBA_Gradient_Alpha_Stop *ga, *ga_next; RGBA_Gradient_Alpha_Stop *ga, *ga_next;
DATA8 *pamap, *amap_end; DATA8 *pamap, *amap_end;
int i, dii; int i, dii;

View File

@ -283,7 +283,7 @@ evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
{ {
if (a == 0) if (a == 0)
{ {
is->spans[y] = evas_object_list_append(is->spans[y], sp); is->spans[y] = eina_inlist_append(is->spans[y], sp);
sp = NULL; sp = NULL;
} }
else else
@ -313,7 +313,7 @@ evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
} }
if (sp) if (sp)
{ {
is->spans[y] = evas_object_list_append(is->spans[y], sp); is->spans[y] = eina_inlist_append(is->spans[y], sp);
sp = NULL; sp = NULL;
} }
} }

View File

@ -20,14 +20,14 @@ evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op)
first_pipe = 1; first_pipe = 1;
p = calloc(1, sizeof(RGBA_Pipe)); p = calloc(1, sizeof(RGBA_Pipe));
if (!p) return NULL; if (!p) return NULL;
pipe = evas_object_list_append(pipe, p); pipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(pipe), EINA_INLIST_GET(p));
} }
p = (RGBA_Pipe *)((Evas_Object_List *)pipe)->last; p = (RGBA_Pipe *)(EINA_INLIST_GET(pipe))->last;
if (p->op_num == PIPE_LEN) if (p->op_num == PIPE_LEN)
{ {
p = calloc(1, sizeof(RGBA_Pipe)); p = calloc(1, sizeof(RGBA_Pipe));
if (!p) return NULL; if (!p) return NULL;
pipe = evas_object_list_append(pipe, p); pipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(pipe), EINA_INLIST_GET(p));
} }
p->op_num++; p->op_num++;
*op = &(p->op[p->op_num - 1]); *op = &(p->op[p->op_num - 1]);
@ -87,7 +87,7 @@ evas_common_pipe_thread(void *data)
// { // {
// thinfo->info = NULL; // thinfo->info = NULL;
// printf(" TH %i GO\n", thinfo->thread_num); // printf(" TH %i GO\n", thinfo->thread_num);
for (p = info->im->pipe; p; p = (RGBA_Pipe *)((Evas_Object_List *)p)->next) EINA_INLIST_ITER_NEXT(EINA_INLIST_GET(info->im->pipe), p)
{ {
int i; int i;
@ -198,7 +198,7 @@ evas_common_pipe_flush(RGBA_Image *im)
#endif #endif
{ {
/* process pipe - 1 thead */ /* process pipe - 1 thead */
for (p = im->pipe; p; p = (RGBA_Pipe *)((Evas_Object_List *)p)->next) for (p = im->pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next)
{ {
for (i = 0; i < p->op_num; i++) for (i = 0; i < p->op_num; i++)
{ {
@ -230,7 +230,7 @@ evas_common_pipe_free(RGBA_Image *im)
if (p->op[i].free_func) if (p->op[i].free_func)
p->op[i].free_func(&(p->op[i])); p->op[i].free_func(&(p->op[i]));
} }
im->pipe = evas_object_list_remove(im->pipe, p); im->pipe = (RGBA_Pipe *)eina_inlist_remove(EINA_INLIST_GET(im->pipe), EINA_INLIST_GET(p));
free(p); free(p);
} }
} }
@ -330,7 +330,8 @@ evas_common_pipe_op_poly_free(RGBA_Pipe_Op *op)
while (op->op.poly.points) while (op->op.poly.points)
{ {
p = op->op.poly.points; p = op->op.poly.points;
op->op.poly.points = evas_object_list_remove(op->op.poly.points, p); op->op.poly.points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(op->op.poly.points),
EINA_INLIST_GET(p));
free(p); free(p);
} }
evas_common_pipe_op_free(op); evas_common_pipe_op_free(op);
@ -368,14 +369,14 @@ evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
dst->pipe = evas_common_pipe_add(dst->pipe, &op); dst->pipe = evas_common_pipe_add(dst->pipe, &op);
if (!dst->pipe) return; if (!dst->pipe) return;
/* FIXME: copy points - maybe we should refcount? */ /* FIXME: copy points - maybe we should refcount? */
for (p = points; p; p = (RGBA_Polygon_Point *)((Evas_Object_List *)p)->next) for (p = points; p; p = (RGBA_Polygon_Point *)(EINA_INLIST_GET(p))->next)
{ {
pp = calloc(1, sizeof(RGBA_Polygon_Point)); pp = calloc(1, sizeof(RGBA_Polygon_Point));
if (pp) if (pp)
{ {
pp->x = p->x; pp->x = p->x;
pp->y = p->y; pp->y = p->y;
pts = evas_object_list_append(pts, pp); pts = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(pts), EINA_INLIST_GET(pp));
} }
} }
op->op.poly.points = pts; op->op.poly.points = pts;

View File

@ -13,7 +13,7 @@ typedef struct _RGBA_Vertex RGBA_Vertex;
struct _RGBA_Span struct _RGBA_Span
{ {
Evas_Object_List _list_data; EINA_INLIST;
int x, y, w; int x, y, w;
}; };
@ -79,7 +79,7 @@ evas_common_polygon_point_add(RGBA_Polygon_Point *points, int x, int y)
if (!pt) return points; if (!pt) return points;
pt->x = x; pt->x = x;
pt->y = y; pt->y = y;
points = evas_object_list_append(points, pt); points = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(points), EINA_INLIST_GET(pt));
return points; return points;
} }
@ -93,7 +93,7 @@ evas_common_polygon_points_clear(RGBA_Polygon_Point *points)
RGBA_Polygon_Point *old_p; RGBA_Polygon_Point *old_p;
old_p = points; old_p = points;
points = evas_object_list_remove(points, points); points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(points), EINA_INLIST_GET(points));
free(old_p); free(old_p);
} }
} }
@ -129,7 +129,7 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
RGBA_Polygon_Point *pt; RGBA_Polygon_Point *pt;
RGBA_Vertex *point; RGBA_Vertex *point;
RGBA_Edge *edges; RGBA_Edge *edges;
Evas_Object_List *spans, *l; Eina_Inlist *spans;
int num_active_edges; int num_active_edges;
int n; int n;
int i, j, k; int i, j, k;
@ -166,7 +166,7 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
evas_common_cpu_end_opt(); evas_common_cpu_end_opt();
n = 0; for (l = (Evas_Object_List *)points; l; l = l->next) n++; n = 0; EINA_INLIST_ITER_NEXT(points, pt) n++;
if (n < 3) return; if (n < 3) return;
edges = malloc(sizeof(RGBA_Edge) * n); edges = malloc(sizeof(RGBA_Edge) * n);
if (!edges) return; if (!edges) return;
@ -185,9 +185,8 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
} }
k = 0; k = 0;
for (l = (Evas_Object_List *)points; l; l = l->next) EINA_INLIST_ITER_NEXT(points, pt)
{ {
pt = (RGBA_Polygon_Point *)l;
point[k].x = pt->x; point[k].x = pt->x;
point[k].y = pt->y; point[k].y = pt->y;
point[k].i = k; point[k].i = k;
@ -196,9 +195,8 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
for (k = 0; k < n; k++) sorted_index[k] = point[k].i; for (k = 0; k < n; k++) sorted_index[k] = point[k].i;
k = 0; k = 0;
for (l = (Evas_Object_List *)points; l; l = l->next) EINA_INLIST_ITER_NEXT(points, pt)
{ {
pt = (RGBA_Polygon_Point *)l;
point[k].x = pt->x; point[k].x = pt->x;
point[k].y = pt->y; point[k].y = pt->y;
point[k].i = k; point[k].i = k;
@ -258,7 +256,7 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
if (x0 < ext_x) x0 = ext_x; if (x0 < ext_x) x0 = ext_x;
if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1; if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1;
span = malloc(sizeof(RGBA_Span)); span = malloc(sizeof(RGBA_Span));
spans = evas_object_list_append(spans, span); spans = eina_inlist_append(spans, EINA_INLIST_GET(span));
span->y = y; span->y = y;
span->x = x0; span->x = x0;
span->w = (x1 - x0) + 1; span->w = (x1 - x0) + 1;
@ -275,12 +273,12 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, 1, dc->render_op); func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, 1, dc->render_op);
if (spans) if (spans)
{ {
for (l = spans; l; l = l->next) RGBA_Span *span;
EINA_INLIST_ITER_NEXT(spans, span)
{ {
RGBA_Span *span;
DATA32 *ptr; DATA32 *ptr;
span = (RGBA_Span *)l;
#ifdef EVAS_SLI #ifdef EVAS_SLI
if (((span->y) % dc->sli.h) == dc->sli.y) if (((span->y) % dc->sli.h) == dc->sli.y)
#endif #endif
@ -291,10 +289,8 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
} }
while (spans) while (spans)
{ {
RGBA_Span *span;
span = (RGBA_Span *)spans; span = (RGBA_Span *)spans;
spans = evas_object_list_remove(spans, spans); spans = eina_inlist_remove(spans, spans);
free(span); free(span);
} }
} }

View File

@ -33,7 +33,7 @@ evas_common_regionbuf_clear(Regionbuf *rb)
Regionspan *span; Regionspan *span;
span = rb->spans[y]; span = rb->spans[y];
rb->spans[y] = evas_object_list_remove(rb->spans[y], rb->spans[y]); rb->spans[y] = eina_inlist_remove(rb->spans[y], rb->spans[y]);
free(span); free(span);
} }
} }
@ -42,7 +42,6 @@ evas_common_regionbuf_clear(Regionbuf *rb)
void void
evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y) evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y)
{ {
Evas_Object_List *l;
Regionspan *span, *span2, *nspan, *sp_start, *sp_stop; Regionspan *span, *span2, *nspan, *sp_start, *sp_stop;
/* abort if outside */ /* abort if outside */
@ -55,10 +54,9 @@ evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y)
if (x2 < (rb->w - 1)) x2 = rb->w - 1; if (x2 < (rb->w - 1)) x2 = rb->w - 1;
sp_start = NULL; sp_start = NULL;
sp_stop = NULL; sp_stop = NULL;
for (l = (Evas_Object_List *)rb->spans[y]; l; l = l->next) EINA_INLIST_ITER_NEXT(rb->spans[y], span)
{ {
span = (Regionspan *)l; nspan = (Regionspan *)(EINA_INLIST_GET(span))->next;
nspan = (Regionspan *)l->next;
/* we dont know what t do with the span yet */ /* we dont know what t do with the span yet */
if (!sp_start) if (!sp_start)
{ {
@ -110,7 +108,7 @@ evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y)
span2 = calloc(1, sizeof(Regionspan)); span2 = calloc(1, sizeof(Regionspan));
span2->x1 = x1; span2->x1 = x1;
span2->x2 = x2; span2->x2 = x2;
rb->spans[y] = evas_object_list_prepend_relative(rb->spans[y], span2, sp_start); rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start);
return; return;
} }
if (x1 < sp_start->x1) if (x1 < sp_start->x1)
@ -121,17 +119,19 @@ evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y)
} }
else else
{ {
Eina_Inlist *l;
/* remove all nodes after sp_start and before_sp_stop because /* remove all nodes after sp_start and before_sp_stop because
* the new */ * the new */
for (l = ((Evas_Object_List *)sp_start)->next; l != (Evas_Object_List *)sp_stop;) for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);)
{ {
span = (Regionspan *)l; span = (Regionspan *)l;
l = l->next; l = l->next;
rb->spans[y] = evas_object_list_remove(rb->spans[y], span); rb->spans[y] = eina_inlist_remove(rb->spans[y], span);
free(span); free(span);
} }
/* remove the end span */ /* remove the end span */
rb->spans[y] = evas_object_list_remove(rb->spans[y], sp_stop); rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop);
/* if the new span is before the start span - extend */ /* if the new span is before the start span - extend */
if (x1 < sp_start->x1) if (x1 < sp_start->x1)
sp_start->x1 = x1; sp_start->x1 = x1;
@ -149,14 +149,13 @@ evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y)
span2 = calloc(1, sizeof(Regionspan)); span2 = calloc(1, sizeof(Regionspan));
span2->x1 = x1; span2->x1 = x1;
span2->x2 = x2; span2->x2 = x2;
rb->spans[y] = evas_object_list_append(rb->spans[y], span2); rb->spans[y] = eina_inlist_append(rb->spans[y], span2);
} }
void void
evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y) evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
{ {
/* FIXME: del span */ /* FIXME: del span */
Evas_Object_List *l;
Regionspan *span, *span2, *nspan, *sp_start, *sp_stop; Regionspan *span, *span2, *nspan, *sp_start, *sp_stop;
/* abort if outside */ /* abort if outside */
@ -169,10 +168,9 @@ evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
if (x2 < (rb->w - 1)) x2 = rb->w - 1; if (x2 < (rb->w - 1)) x2 = rb->w - 1;
sp_start = NULL; sp_start = NULL;
sp_stop = NULL; sp_stop = NULL;
for (l = (Evas_Object_List *)rb->spans[y]; l; l = l->next) EINA_INLIST_ITER_NEXT(rb->spans[y], span)
{ {
span = (Regionspan *)l; nspan = (Regionspan *)(EINA_INLIST_GET(l))->next;
nspan = (Regionspan *)l->next;
/* we dont know what t do with the span yet */ /* we dont know what t do with the span yet */
if (!sp_start) if (!sp_start)
{ {
@ -233,7 +231,7 @@ evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
} }
else else
{ {
rb->spans[y] = evas_object_list_remove(rb->spans[y], sp_start); rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
return; return;
} }
} }
@ -249,7 +247,7 @@ evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
/* remove it all */ /* remove it all */
else else
{ {
rb->spans[y] = evas_object_list_remove(rb->spans[y], sp_start); rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
return; return;
} }
return; return;
@ -260,26 +258,28 @@ evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
span2 = calloc(1, sizeof(Regionspan)); span2 = calloc(1, sizeof(Regionspan));
span2->x1 = sp_start->x1; span2->x1 = sp_start->x1;
span2->x2 = x1 - 1; span2->x2 = x1 - 1;
rb->spans[y] = evas_object_list_prepend_relative(rb->spans[y], span2, sp_start); rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start);
sp_start->x1 = x2 + 1; sp_start->x1 = x2 + 1;
return; return;
} }
} }
else else
{ {
Eina_Inlist *l;
/* remove all nodes after sp_start and before_sp_stop because /* remove all nodes after sp_start and before_sp_stop because
* the new */ * the new */
for (l = ((Evas_Object_List *)sp_start)->next; l != (Evas_Object_List *)sp_stop;) for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);)
{ {
span = (Regionspan *)l; span = (Regionspan *)l;
l = l->next; l = l->next;
rb->spans[y] = evas_object_list_remove(rb->spans[y], span); rb->spans[y] = eina_inlist_remove(rb->spans[y], span);
free(span); free(span);
} }
/* all of the start span is cut out */ /* all of the start span is cut out */
if (x1 <= sp_start->x1) if (x1 <= sp_start->x1)
{ {
rb->spans[y] = evas_object_list_remove(rb->spans[y], sp_start); rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
free(sp_start); free(sp_start);
} }
/* chup it off at the new span start */ /* chup it off at the new span start */
@ -288,7 +288,7 @@ evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
/* all of the end span is cut out */ /* all of the end span is cut out */
if (x2 >= sp_stop->x2) if (x2 >= sp_stop->x2)
{ {
rb->spans[y] = evas_object_list_remove(rb->spans[y], sp_stop); rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop);
free(sp_stop); free(sp_stop);
} }
/* chop it up at the end */ /* chop it up at the end */
@ -308,22 +308,22 @@ evas_common_regionbuf_rects_get(Regionbuf *rb)
/* FIXME: take spans, make rects */ /* FIXME: take spans, make rects */
for (y = 0; y < rb->h; y++) for (y = 0; y < rb->h; y++)
{ {
Evas_Object_List *l, *ll; Regionspan *sp_start;
Eina_Inlist *l, *ll;
for (l = (Evas_Object_List *)rb->spans[y]; l;) for (l = EINA_INLIST_GET(rb->spans[y]); l;)
{ {
Regionspan *span; Regionspan *span;
Regionspan *sp_start;
int yy; int yy;
sp_start = (Regionspan *)l; sp_start = (Regionspan *)l;
l = l->next; l = l->next;
rb->spans[y] = evas_object_list_remove(rb->spans[y], sp_start); rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
for (yy = y + 1; yy < rb->h; yy++) for (yy = y + 1; yy < rb->h; yy++)
{ {
int match = 0; int match = 0;
for (ll = (Evas_Object_List *)rb->spans[yy]; ll;) for (ll = EINA_INLIST_GET(rb->spans[yy]); ll;)
{ {
span = (Regionspan *)ll; span = (Regionspan *)ll;
ll = ll->next; ll = ll->next;
@ -335,7 +335,7 @@ evas_common_regionbuf_rects_get(Regionbuf *rb)
goto coallate; goto coallate;
} }
match = 1; match = 1;
rb->spans[yy] = evas_object_list_remove(rb->spans[yy], span); rb->spans[yy] = eina_inlist_remove(rb->spans[yy], span);
free(span); free(span);
} }
} }
@ -347,7 +347,7 @@ evas_common_regionbuf_rects_get(Regionbuf *rb)
r->y = y; r->y = y;
r->w = sp_start->x2 - sp_start->x1 + 1; r->w = sp_start->x2 - sp_start->x1 + 1;
r->h = yy - y; r->h = yy - y;
rects = evas_object_list_append(rects, r); rects = eina_inlist_append(rects, r);
free(sp_start); free(sp_start);
} }
} }

View File

@ -5,7 +5,6 @@
static const list_node_t list_node_zeroed = { NULL }; static const list_node_t list_node_zeroed = { NULL };
static const list_t list_zeroed = { NULL, NULL }; static const list_t list_zeroed = { NULL, NULL };
typedef struct list_node_pool typedef struct list_node_pool
{ {
list_node_t *node; list_node_t *node;
@ -1128,15 +1127,12 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
Tilebuf_Rect *r; Tilebuf_Rect *r;
r = malloc(sizeof(Tilebuf_Rect)); r = malloc(sizeof(Tilebuf_Rect));
r->_list_data.next = NULL;
r->_list_data.prev = NULL;
r->_list_data.last = NULL;
r->x = cur.left; r->x = cur.left;
r->y = cur.top; r->y = cur.top;
r->w = cur.width; r->w = cur.width;
r->h = cur.height; r->h = cur.height;
rects = evas_object_list_append(rects, r); rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r));
} }
} }
return rects; return rects;
@ -1217,7 +1213,7 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
r->y = y * tb->tile_size.h; r->y = y * tb->tile_size.h;
r->w = (xx) * tb->tile_size.w; r->w = (xx) * tb->tile_size.w;
r->h = (yy) * tb->tile_size.h; r->h = (yy) * tb->tile_size.h;
rects = evas_object_list_append(rects, r); rects = eina_inlist_append(rects, r);
x = x + (xx - 1); x = x + (xx - 1);
tbt += xx - 1; tbt += xx - 1;
} }
@ -1235,7 +1231,7 @@ evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects)
Tilebuf_Rect *r; Tilebuf_Rect *r;
r = rects; r = rects;
rects = evas_object_list_remove(rects, r); rects = (Tilebuf_Rect *)eina_inlist_remove(EINA_INLIST_GET(rects), EINA_INLIST_GET(r));
free(r); free(r);
} }
} }

View File

@ -81,7 +81,6 @@ soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point
RGBA_Polygon_Point *pt; RGBA_Polygon_Point *pt;
RGBA_Vertex *point; RGBA_Vertex *point;
RGBA_Edge *edges; RGBA_Edge *edges;
Evas_Object_List *l;
int num_active_edges; int num_active_edges;
int n; int n;
int i, j, k; int i, j, k;
@ -114,8 +113,7 @@ soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point
return; return;
n = 0; n = 0;
for (l = (Evas_Object_List *)points; l; l = l->next) EINA_INLIST_ITER_NEXT(points, pt) n++;
n++;
if (n < 3) if (n < 3)
return; return;
@ -139,24 +137,26 @@ soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point
return; return;
} }
for (k = 0, l = (Evas_Object_List *)points; l; k++, l = l->next) k = 0;
EINA_INLIST_ITER_NEXT(points, pt)
{ {
pt = (RGBA_Polygon_Point *)l;
point[k].x = pt->x; point[k].x = pt->x;
point[k].y = pt->y; point[k].y = pt->y;
point[k].i = k; point[k].i = k;
k++;
} }
qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
for (k = 0; k < n; k++) for (k = 0; k < n; k++)
sorted_index[k] = point[k].i; sorted_index[k] = point[k].i;
for (k = 0, l = (Evas_Object_List *)points; l; k++, l = l->next) k = 0;
EINA_INLIST_ITER_NEXT(points, pt)
{ {
pt = (RGBA_Polygon_Point *)l;
point[k].x = pt->x; point[k].x = pt->x;
point[k].y = pt->y; point[k].y = pt->y;
point[k].i = k; point[k].i = k;
k++;
} }
y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5));

View File

@ -9,6 +9,7 @@
# include "config.h" /* so that EAPI in Evas.h is correctly defined */ # include "config.h" /* so that EAPI in Evas.h is correctly defined */
#endif #endif
#include <Eina.h>
#include "Evas.h" #include "Evas.h"
/*****************************************************************************/ /*****************************************************************************/
@ -271,7 +272,7 @@ struct _Image_Entry_Flags
struct _Image_Entry struct _Image_Entry
{ {
Evas_Object_List _list_data; EINA_INLIST;
Evas_Cache_Image *cache; Evas_Cache_Image *cache;
@ -311,7 +312,7 @@ struct _Image_Entry
struct _Engine_Image_Entry struct _Engine_Image_Entry
{ {
Evas_Object_List _list_data; EINA_INLIST;
/* Upper Engine data. */ /* Upper Engine data. */
Image_Entry *src; Image_Entry *src;
@ -427,7 +428,7 @@ struct _RGBA_Pipe_Op
struct _RGBA_Pipe struct _RGBA_Pipe
{ {
Evas_Object_List _list_data; EINA_INLIST;
int op_num; int op_num;
RGBA_Pipe_Op op[PIPE_LEN]; RGBA_Pipe_Op op[PIPE_LEN];
}; };
@ -475,14 +476,14 @@ struct _RGBA_Image
struct _RGBA_Gradient_Color_Stop struct _RGBA_Gradient_Color_Stop
{ {
Evas_Object_List _list_data; EINA_INLIST;
int r, g, b, a; int r, g, b, a;
int dist; int dist;
}; };
struct _RGBA_Gradient_Alpha_Stop struct _RGBA_Gradient_Alpha_Stop
{ {
Evas_Object_List _list_data; EINA_INLIST;
int a; int a;
int dist; int dist;
}; };
@ -500,13 +501,13 @@ struct _RGBA_Gradient
} map; } map;
struct { struct {
Evas_Object_List *stops; Eina_Inlist *stops;
DATA32 *data; DATA32 *data;
int nstops; int nstops;
int len; int len;
} color; } color;
struct { struct {
Evas_Object_List *stops; Eina_Inlist *stops;
DATA8 *data; DATA8 *data;
int nstops; int nstops;
int len; int len;
@ -548,7 +549,7 @@ struct _RGBA_Gradient_Type
struct _RGBA_Gradient2_Color_Np_Stop struct _RGBA_Gradient2_Color_Np_Stop
{ {
Evas_Object_List _list_data; EINA_INLIST;
int r, g, b, a; int r, g, b, a;
float pos; float pos;
int dist; int dist;
@ -564,7 +565,7 @@ struct _RGBA_Gradient2
} map; } map;
struct { struct {
Evas_Object_List *stops; Eina_Inlist *stops;
int nstops; int nstops;
DATA32 *cdata; DATA32 *cdata;
DATA8 *adata; DATA8 *adata;
@ -605,7 +606,7 @@ struct _RGBA_Gradient2_Type
struct _RGBA_Polygon_Point struct _RGBA_Polygon_Point
{ {
Evas_Object_List _list_data; EINA_INLIST;
int x, y; int x, y;
}; };
@ -619,7 +620,7 @@ struct _RGBA_Font
struct _RGBA_Font_Int struct _RGBA_Font_Int
{ {
Evas_Object_List _list_data; EINA_INLIST;
RGBA_Font_Source *src; RGBA_Font_Source *src;
@ -640,7 +641,7 @@ struct _RGBA_Font_Int
struct _RGBA_Font_Source struct _RGBA_Font_Source
{ {
Evas_Object_List _list_data; EINA_INLIST;
const char *name; const char *name;
const char *file; const char *file;
@ -783,7 +784,7 @@ struct _Tilebuf_Tile
struct _Tilebuf_Rect struct _Tilebuf_Rect
{ {
Evas_Object_List _list_data; EINA_INLIST;
int x, y, w, h; int x, y, w, h;
}; };
/* /*
@ -795,7 +796,7 @@ struct _Regionbuf
struct _Regionspan struct _Regionspan
{ {
Evas_Object_List _list_data; EINA_INLIST;
int x1, x2; int x1, x2;
}; };
*/ */

View File

@ -211,32 +211,32 @@ struct _Evas_Lock
struct _Evas_Callbacks struct _Evas_Callbacks
{ {
Evas_Object_List *callbacks; Eina_Inlist *callbacks;
int walking_list; int walking_list;
unsigned char deletions_waiting : 1; unsigned char deletions_waiting : 1;
/* /*
Evas_Object_List *down; Eina_Inlist *down;
Evas_Object_List *up; Eina_Inlist *up;
Evas_Object_List *move; Eina_Inlist *move;
Evas_Object_List *in; Eina_Inlist *in;
Evas_Object_List *out; Eina_Inlist *out;
Evas_Object_List *wheel; Eina_Inlist *wheel;
Evas_Object_List *key_down; Eina_Inlist *key_down;
Evas_Object_List *key_up; Eina_Inlist *key_up;
Evas_Object_List *free; Eina_Inlist *free;
Evas_Object_List *obj_focus_in; Eina_Inlist *obj_focus_in;
Evas_Object_List *obj_focus_out; Eina_Inlist *obj_focus_out;
Evas_Object_List *obj_show; Eina_Inlist *obj_show;
Evas_Object_List *obj_hide; Eina_Inlist *obj_hide;
Evas_Object_List *obj_move; Eina_Inlist *obj_move;
Evas_Object_List *obj_resize; Eina_Inlist *obj_resize;
Evas_Object_List *obj_restack; Eina_Inlist *obj_restack;
*/ */
}; };
struct _Evas struct _Evas
{ {
Evas_Object_List _list_data; EINA_INLIST;
DATA32 magic; DATA32 magic;
@ -321,7 +321,7 @@ struct _Evas
struct _Evas_Layer struct _Evas_Layer
{ {
Evas_Object_List _list_data; EINA_INLIST;
short layer; short layer;
Evas_Object *objects; Evas_Object *objects;
@ -371,7 +371,7 @@ struct _Evas_Size_Hints
struct _Evas_Object struct _Evas_Object
{ {
Evas_Object_List _list_data; EINA_INLIST;
DATA32 magic; DATA32 magic;
@ -464,7 +464,7 @@ struct _Evas_Object
struct _Evas_Func_Node struct _Evas_Func_Node
{ {
Evas_Object_List _list_data; EINA_INLIST;
void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info); void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info);
void *data; void *data;
Evas_Callback_Type type; Evas_Callback_Type type;
@ -737,7 +737,7 @@ void evas_object_smart_member_raise(Evas_Object *member);
void evas_object_smart_member_lower(Evas_Object *member); void evas_object_smart_member_lower(Evas_Object *member);
void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other); void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other);
void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other); void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other);
const Evas_Object_List *evas_object_smart_members_get_direct(const Evas_Object *obj); const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj);
void evas_call_smarts_calculate(Evas *e); void evas_call_smarts_calculate(Evas *e);
void *evas_mem_calloc(int size); void *evas_mem_calloc(int size);
void evas_object_event_callback_all_del(Evas_Object *obj); void evas_object_event_callback_all_del(Evas_Object *obj);

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Outbuf *ob; Outbuf *ob;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
}; };
@ -265,7 +265,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -10,7 +10,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Outbuf *ob; Outbuf *ob;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
}; };
@ -268,7 +268,7 @@ eng_output_redraws_next_update_get(void *data,
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -930,7 +930,7 @@ evas_engine_dfb_output_redraws_next_update_get(void *data, int *x, int *y, int *
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *) re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) if (!re->cur_rect)
return NULL; return NULL;

View File

@ -29,7 +29,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
DFBRegion *update_regions; DFBRegion *update_regions;
unsigned int update_regions_count; unsigned int update_regions_count;
@ -39,6 +39,6 @@ struct _Render_Engine
}; };
int _dfb_surface_set_color_from_context(IDirectFBSurface *surface, RGBA_Draw_Context *dc); int _dfb_surface_set_color_from_context(IDirectFBSurface *surface, RGBA_Draw_Context *dc);
void _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Evas_Object_List *points); void _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Eina_Inlist *points);
#endif #endif

View File

@ -116,12 +116,11 @@ polygon_spans_fill(IDirectFBSurface *surface, int y, const span_t *spans, int n_
void void
_dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Evas_Object_List *points) _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Eina_Inlist *points)
{ {
RGBA_Polygon_Point *pt; RGBA_Polygon_Point *pt;
RGBA_Vertex *point; RGBA_Vertex *point;
RGBA_Edge *edges; RGBA_Edge *edges;
Evas_Object_List *l;
int num_active_edges; int num_active_edges;
int n; int n;
int i, j, k; int i, j, k;
@ -160,7 +159,7 @@ _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Evas_Object_
if (!_dfb_surface_set_color_from_context(surface, dc)) if (!_dfb_surface_set_color_from_context(surface, dc))
return; return;
n = 0; for (l = (Evas_Object_List *)points; l; l = l->next) n++; n = 0; EINA_INLIST_ITER_NEXT(points, pt) n++;
if (n < 3) return; if (n < 3) return;
edges = malloc(sizeof(RGBA_Edge) * n); edges = malloc(sizeof(RGBA_Edge) * n);
if (!edges) return; if (!edges) return;
@ -179,9 +178,8 @@ _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Evas_Object_
} }
k = 0; k = 0;
for (l = (Evas_Object_List *)points; l; l = l->next) EINA_INLIST_ITER_NEXT(points, pt)
{ {
pt = (RGBA_Polygon_Point *)l;
point[k].x = pt->x; point[k].x = pt->x;
point[k].y = pt->y; point[k].y = pt->y;
point[k].i = k; point[k].i = k;
@ -190,9 +188,8 @@ _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Evas_Object_
qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
for (k = 0; k < n; k++) sorted_index[k] = point[k].i; for (k = 0; k < n; k++) sorted_index[k] = point[k].i;
k = 0; k = 0;
for (l = (Evas_Object_List *)points; l; l = l->next) EINA_INLIST_ITER_NEXT(points, pt)
{ {
pt = (RGBA_Polygon_Point *)l;
point[k].x = pt->x; point[k].x = pt->x;
point[k].y = pt->y; point[k].y = pt->y;
point[k].i = k; point[k].i = k;

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Outbuf *ob; Outbuf *ob;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
}; };
@ -192,7 +192,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -26,7 +26,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
Evas_List *updates; Evas_List *updates;
@ -256,7 +256,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -80,7 +80,7 @@ _tmp_out_alloc(Render_Engine *re)
Tilebuf_Rect *r; Tilebuf_Rect *r;
int w = 0, h = 0; int w = 0, h = 0;
for (r = re->rects; r; r = (Tilebuf_Rect *)(r->_list_data.next)) EINA_INLIST_ITER_NEXT(re->rects, r)
{ {
if (r->w > w) w = r->w; if (r->w > w) w = r->w;
if (r->h > h) h = r->h; if (r->h > h) h = r->h;
@ -342,7 +342,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
} }
rect = re->cur_rect; rect = re->cur_rect;
ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h;
re->cur_rect = (Tilebuf_Rect *)(re->cur_rect->_list_data.next); re->cur_rect = (Tilebuf_Rect *)((EINA_INLIST_GET(re->cur_rect))->next);
if (!re->cur_rect) if (!re->cur_rect)
{ {
evas_common_tilebuf_free_render_rects(re->rects); evas_common_tilebuf_free_render_rects(re->rects);

View File

@ -88,7 +88,7 @@ _tmp_out_alloc(Render_Engine *re)
Tilebuf_Rect *r; Tilebuf_Rect *r;
int w = 0, h = 0; int w = 0, h = 0;
for (r = re->rects; r; r = (Tilebuf_Rect *)(r->_list_data.next)) EINA_INLIST_ITER_NEXT(re->rects, r)
{ {
if (r->w > w) w = r->w; if (r->w > w) w = r->w;
if (r->h > h) h = r->h; if (r->h > h) h = r->h;
@ -340,7 +340,7 @@ evas_engine_sdl16_output_redraws_next_update_get(void *data,
*cy = *y = tb_rect->y; *cy = *y = tb_rect->y;
*cw = *w = tb_rect->w; *cw = *w = tb_rect->w;
*ch = *h = tb_rect->h; *ch = *h = tb_rect->h;
re->cur_rect = (Tilebuf_Rect *)(re->cur_rect->_list_data.next); re->cur_rect = (Tilebuf_Rect *)((EINA_INLIST_GET(re->cur_rect))->next);
if (!re->cur_rect) if (!re->cur_rect)
{ {
evas_common_tilebuf_free_render_rects(re->rects); evas_common_tilebuf_free_render_rects(re->rects);

View File

@ -113,7 +113,7 @@ _tmp_out_alloc(Render_Engine *re)
Tilebuf_Rect *r; Tilebuf_Rect *r;
int w = 0, h = 0; int w = 0, h = 0;
for (r = re->rects; r; r = (Tilebuf_Rect *)(r->_list_data.next)) EINA_INLIST_ITER_NEXT(re->rects, r)
{ {
if (r->w > w) w = r->w; if (r->w > w) w = r->w;
if (r->h > h) h = r->h; if (r->h > h) h = r->h;
@ -447,7 +447,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
} }
rect = re->cur_rect; rect = re->cur_rect;
ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h;
re->cur_rect = (Tilebuf_Rect *)(re->cur_rect->_list_data.next); re->cur_rect = (Tilebuf_Rect *)((EINA_INLIST_GET(re->cur_rect))->next);
if (!re->cur_rect) if (!re->cur_rect)
{ {
evas_common_tilebuf_free_render_rects(re->rects); evas_common_tilebuf_free_render_rects(re->rects);

View File

@ -70,7 +70,7 @@ _tmp_out_alloc(Render_Engine *re)
Tilebuf_Rect *r; Tilebuf_Rect *r;
int w = 0, h = 0; int w = 0, h = 0;
for (r = re->rects; r; r = (Tilebuf_Rect *)(r->_list_data.next)) EINA_INLIST_ITER_NEXT(re->rects, r)
{ {
if (r->w > w) w = r->w; if (r->w > w) w = r->w;
if (r->h > h) h = r->h; if (r->h > h) h = r->h;
@ -321,7 +321,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
} }
rect = re->cur_rect; rect = re->cur_rect;
ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h; ux = rect->x; uy = rect->y; uw = rect->w; uh = rect->h;
re->cur_rect = (Tilebuf_Rect *)(re->cur_rect->_list_data.next); re->cur_rect = (Tilebuf_Rect *)((EINA_INLIST_GET(re->cur_rect))->next);
if (!re->cur_rect) if (!re->cur_rect)
{ {
evas_common_tilebuf_free_render_rects(re->rects); evas_common_tilebuf_free_render_rects(re->rects);

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Outbuf *ob; Outbuf *ob;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
}; };
@ -237,7 +237,7 @@ eng_output_redraws_next_update_get(void *data,
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Outbuf *ob; Outbuf *ob;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
}; };
@ -206,7 +206,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -229,7 +229,7 @@ evas_engine_sdl_output_redraws_next_update_get (void *data,
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *) re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) if (!re->cur_rect)
return NULL; return NULL;

View File

@ -25,7 +25,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
Evas_Cache_Engine_Image *cache; Evas_Cache_Engine_Image *cache;

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Outbuf *ob; Outbuf *ob;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
}; };
@ -288,7 +288,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -15,7 +15,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Outbuf *ob; Outbuf *ob;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
}; };
@ -334,7 +334,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -30,7 +30,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
Evas_List *updates; Evas_List *updates;
@ -228,7 +228,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -597,7 +597,7 @@ _xre_image_surface_gen(XR_Image *im)
rects = evas_common_tilebuf_get_render_rects(im->updates); rects = evas_common_tilebuf_get_render_rects(im->updates);
if (rects) if (rects)
{ {
for (r = rects; r; r = (Tilebuf_Rect *)((Evas_Object_List *)r)->next) EINA_INLIST_ITER_NEXT(rects, r)
{ {
int rx, ry, rw, rh; int rx, ry, rw, rh;

View File

@ -686,8 +686,7 @@ _xre_poly_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, RGBA_Polygon_Point *p
int op; int op;
if ((!rs) || (!dc)) return; if ((!rs) || (!dc)) return;
num = 0; num = 0; EINA_INLIST_ITER_NEXT(points, pt) num++;
for (pt = points; pt; pt = (RGBA_Polygon_Point *)(((Evas_Object_List *)pt)->next)) num++;
if (num < 3) return; if (num < 3) return;
op = PictOpOver; op = PictOpOver;
if (dc->render_op == _EVAS_RENDER_BLEND) if (dc->render_op == _EVAS_RENDER_BLEND)
@ -726,7 +725,7 @@ _xre_poly_draw(Xrender_Surface *rs, RGBA_Draw_Context *dc, RGBA_Polygon_Point *p
pts = malloc(num * sizeof(XPointDouble)); pts = malloc(num * sizeof(XPointDouble));
if (!pts) return; if (!pts) return;
i = 0; i = 0;
for (pt = points; pt; pt = (RGBA_Polygon_Point *)(((Evas_Object_List *)pt)->next)) EINA_INLIST_ITER_NEXT(points, pt)
{ {
if (i < num) if (i < num)
{ {

View File

@ -33,7 +33,7 @@ struct _Render_Engine
Tilebuf *tb; Tilebuf *tb;
Tilebuf_Rect *rects; Tilebuf_Rect *rects;
Evas_Object_List *cur_rect; Eina_Inlist *cur_rect;
int end : 1; int end : 1;
Evas_List *updates; Evas_List *updates;
@ -238,7 +238,7 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
if (!re->rects) if (!re->rects)
{ {
re->rects = evas_common_tilebuf_get_render_rects(re->tb); re->rects = evas_common_tilebuf_get_render_rects(re->tb);
re->cur_rect = (Evas_Object_List *)re->rects; re->cur_rect = EINA_INLIST_GET(re->rects);
} }
if (!re->cur_rect) return NULL; if (!re->cur_rect) return NULL;
rect = (Tilebuf_Rect *)re->cur_rect; rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -536,7 +536,7 @@ _xre_image_surface_gen(XR_Image *im)
rects = evas_common_tilebuf_get_render_rects(im->updates); rects = evas_common_tilebuf_get_render_rects(im->updates);
if (rects) if (rects)
{ {
for (r = rects; r; r = (Tilebuf_Rect *)((Evas_Object_List *)r)->next) EINA_INLIST_ITER_NEXT(rects, r)
{ {
int rx, ry, rw, rh; int rx, ry, rw, rh;

View File

@ -820,8 +820,7 @@ _xre_poly_draw(Xcb_Render_Surface *rs, RGBA_Draw_Context *dc, RGBA_Polygon_Point
/* int op; */ /* int op; */
/* if ((!rs) || (!dc)) return; */ /* if ((!rs) || (!dc)) return; */
/* num = 0; */ /* num = 0; EINA_INLIST_ITER_NEXT(points, pt) num++; */
/* for (pt = points; pt; pt = (RGBA_Polygon_Point *)(((Evas_Object_List *)pt)->next)) num++; */
/* if (num < 3) return; */ /* if (num < 3) return; */
/* a = (dc->col.col >> 24) & 0xff; */ /* a = (dc->col.col >> 24) & 0xff; */
/* if (a == 0) return; */ /* if (a == 0) return; */
@ -841,7 +840,7 @@ _xre_poly_draw(Xcb_Render_Surface *rs, RGBA_Draw_Context *dc, RGBA_Polygon_Point
/* pts = malloc(num * sizeof(XPointDouble)); */ /* pts = malloc(num * sizeof(XPointDouble)); */
/* if (!pts) return; */ /* if (!pts) return; */
/* i = 0; */ /* i = 0; */
/* for (pt = points; pt; pt = (RGBA_Polygon_Point *)(((Evas_Object_List *)pt)->next)) */ /* EINA_INLIST_ITER_NEXT(points, pt) */
/* { */ /* { */
/* if (i < num) */ /* if (i < num) */
/* { */ /* { */