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;
#define Evas_List Eina_List
#define Evas_Object_List Eina_Inlist
typedef struct _Evas_Array_Hash Evas_Array_Hash;
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
{
int population;
Evas_Object_List *buckets[256];
Eina_Inlist *buckets[256];
};
#ifdef __cplusplus
@ -110,16 +109,6 @@ extern "C" {
#define evas_list_sort eina_list_sort
#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
*/

View File

@ -46,10 +46,10 @@ struct _Evas_Cache_Image
{
Evas_Cache_Image_Func func;
Evas_Object_List *dirty;
Eina_Inlist *dirty;
Evas_Object_List *lru;
Evas_Object_List *lru_nodata;
Eina_Inlist *lru;
Eina_Inlist *lru_nodata;
Evas_Hash *inactiv;
Evas_Hash *activ;
void *data;
@ -87,11 +87,11 @@ struct _Evas_Cache_Engine_Image
{
Evas_Cache_Engine_Image_Func func;
Evas_Object_List* dirty;
Eina_Inlist* dirty;
Evas_Hash* activ;
Evas_Hash* inactiv;
Evas_Object_List* lru;
Eina_Inlist* lru;
Evas_Cache_Image* parent;
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.loaded = 1;
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
@ -38,7 +38,7 @@ _evas_cache_engine_image_make_inactive(Evas_Cache_Engine_Image *cache,
eim->flags.dirty = 0;
eim->flags.activ = 0;
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);
}
@ -50,7 +50,7 @@ _evas_cache_engine_image_remove_activ(Evas_Cache_Engine_Image *cache,
{
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
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->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.dirty = 0;

View File

@ -41,7 +41,7 @@ _evas_cache_image_make_dirty(Evas_Cache_Image *cache,
im->flags.dirty = 1;
im->flags.activ = 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)
{
@ -81,7 +81,7 @@ _evas_cache_image_make_inactiv(Evas_Cache_Image *cache,
im->flags.dirty = 0;
im->flags.cached = 1;
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);
}
else
@ -97,7 +97,7 @@ _evas_cache_image_remove_lru_nodata(Evas_Cache_Image *cache,
if (im->flags.lru_nodata)
{
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);
}
}
@ -108,7 +108,7 @@ _evas_cache_image_activ_lru_nodata(Evas_Cache_Image *cache,
{
im->flags.need_data = 0;
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);
}
@ -127,12 +127,12 @@ _evas_cache_image_remove_activ(Evas_Cache_Image *cache,
{
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
{
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);
}
}

View File

@ -1,13 +1,13 @@
#include "evas_common.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_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 */
for (l = *list; l;)
@ -18,7 +18,7 @@ evas_object_event_callback_list_post_free(Evas_Object_List **list)
l = l->next;
if (fn->delete_me)
{
*list = evas_object_list_remove(*list, fn);
*list = eina_inlist_remove(*list, EINA_INLIST_GET(fn));
free(fn);
}
}
@ -41,7 +41,7 @@ evas_object_event_callback_clear(Evas_Object *obj)
void
evas_object_event_callback_all_del(Evas_Object *obj)
{
Evas_Object_List *l;
Eina_Inlist *l;
if (!obj->callbacks) return;
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)
{
/* MEM OK */
Evas_Object_List **l_mod = NULL, *l;
Eina_Inlist **l_mod = NULL, *l;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
Evas *e;
@ -346,7 +346,7 @@ evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, void (
return;
}
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))
{
/* MEM OK */
Evas_Object_List *l;
Eina_Inlist *l;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
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)
{
/* MEM OK */
Evas_Object_List *l;
Eina_Inlist *l;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;

View File

@ -2,16 +2,13 @@
#include "evas_private.h"
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;
for (l = list->last; l; l = l->prev)
EINA_INLIST_ITER_LAST(list, obj)
{
Evas_Object *obj;
obj = (Evas_Object *)l;
if (obj == stop)
{
*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_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
{
Evas_Object_List *l;
Evas_Layer *lay;
Evas_List *in = 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;
lay = (Evas_Layer *)l;
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);
if (norep) return in;
}
@ -148,19 +143,14 @@ evas_event_thaw(Evas *e)
e->events_frozen--;
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_Layer *lay;
Evas_Object *obj;
lay = (Evas_Layer *)l;
for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
EINA_INLIST_ITER_NEXT(lay->objects, obj)
{
Evas_Object *obj;
obj = (Evas_Object *)l2;
evas_object_clip_recalc(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;
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++;
obj->layer = lay;
obj->in_layer = 1;
@ -24,7 +24,7 @@ void
evas_object_release(Evas_Object *obj, int clean_layer)
{
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--;
if (clean_layer)
{
@ -52,13 +52,10 @@ evas_layer_new(Evas *e)
void
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))
evas_object_del(obj);
}
@ -80,13 +77,10 @@ evas_layer_free(Evas_Layer *lay)
Evas_Layer *
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;
}
return NULL;
@ -95,31 +89,28 @@ evas_layer_find(Evas *e, short layer_num)
void
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)
{
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;
}
}
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
evas_layer_del(Evas_Layer *lay)
{
Evas_Object_List *ol;
Evas *e;
ol = (Evas_Object_List *)lay;
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 */

View File

@ -93,7 +93,7 @@ evas_new(void)
EAPI void
evas_free(Evas *e)
{
Evas_Object_List *l;
Evas_Layer *lay;
int i;
int del;
@ -110,18 +110,14 @@ evas_free(Evas *e)
while (del)
{
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_List *ll;
Evas_Object *o;
lay = (Evas_Layer *)l;
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))
{
/* Defer free */
@ -136,14 +132,12 @@ evas_free(Evas *e)
}
while (e->layers)
{
Evas_Layer *lay;
lay = e->layers;
evas_layer_del(lay);
evas_layer_free(lay);
}
e->walking_list--;
evas_font_path_clear(e);
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
evas_image_cache_reload(Evas *e)
{
Evas_Object_List *l;
Evas_Layer *layer;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
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_List *l2;
Evas_Object *obj;
layer = (Evas_Layer *)l;
for (l2 = (Evas_Object_List *)layer->objects; l2; l2 = l2->next)
EINA_INLIST_ITER_NEXT(layer->objects, obj)
{
Evas_Object *obj;
Evas_Object_Image *o;
obj = (Evas_Object *)l2;
o = (Evas_Object_Image *)(obj->object_data);
if (o->magic == MAGIC_OBJ_IMAGE)
{
@ -1813,18 +1809,14 @@ evas_image_cache_reload(Evas *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_List *l2;
Evas_Object *obj;
layer = (Evas_Layer *)l;
for (l2 = (Evas_Object_List *)layer->objects; l2; l2 = l2->next)
EINA_INLIST_ITER_NEXT(layer->objects, obj)
{
Evas_Object *obj;
Evas_Object_Image *o;
obj = (Evas_Object *)l2;
o = (Evas_Object_Image *)(obj->object_data);
if (o->magic == MAGIC_OBJ_IMAGE)
{

View File

@ -13,12 +13,12 @@
*/
//#define FORWARD_NOOP_RESIZES_TO_SMART_OBJS
static Evas_Object_List *
static Eina_Inlist *
get_layer_objects_last(Evas_Layer *l)
{
if( !l || !l->objects ) return NULL;
return ((Evas_Object_List *)(l->objects))->last;
return (EINA_INLIST_GET(l->objects))->last;
}
/* evas internal stuff */
@ -1403,7 +1403,7 @@ evas_object_evas_get(const Evas_Object *obj)
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_List *l;
Evas_Layer *lay;
int xx, yy;
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;
//// xx = evas_coord_world_x_to_screen(e, x);
//// 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_Layer *lay;
Evas_Object *obj;
lay = (Evas_Layer *)l;
for (l2 = get_layer_objects_last(lay); l2; l2 = l2->prev)
EINA_INLIST_ITER_LAST(get_layer_objects_last(lay), obj)
{
Evas_Object *obj;
obj = (Evas_Object *)l2;
if (obj->delete_me) continue;
if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) 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 *
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;
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);
if (ww < 1) ww = 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_Layer *lay;
Evas_Object *obj;
lay = (Evas_Layer *)l;
for (l2 = get_layer_objects_last(lay); l2; l2 = l2->prev)
EINA_INLIST_ITER_LAST(get_layer_objects_last(lay), obj)
{
Evas_Object *obj;
obj = (Evas_Object *)l2;
if (obj->delete_me) continue;
if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) 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_List *in = NULL;
Evas_Object_List *l;
Evas_Layer *lay;
int xx, yy;
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;
//// xx = evas_coord_world_x_to_screen(e, x);
//// 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_Layer *lay;
Evas_Object *obj;
lay = (Evas_Layer *)l;
for (l2 = get_layer_objects_last(lay); l2; l2 = l2->prev)
EINA_INLIST_ITER_LAST(get_layer_objects_last(lay), obj)
{
Evas_Object *obj;
obj = (Evas_Object *)l2;
if (obj->delete_me) continue;
if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) 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_List *in = NULL;
Evas_Object_List *l;
Evas_Layer *lay;
int xx, yy, ww, hh;
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();
xx = x;
yy = y;
ww = w;
ww = w;
hh = h;
//// xx = evas_coord_world_x_to_screen(e, x);
//// 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);
if (ww < 1) ww = 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_Layer *lay;
Evas_Object *obj;
lay = (Evas_Layer *)l;
for (l2 = get_layer_objects_last(lay); l2; l2 = l2->prev)
EINA_INLIST_ITER_LAST(get_layer_objects_last(lay), obj)
{
Evas_Object *obj;
obj = (Evas_Object *)l2;
if (obj->delete_me) continue;
if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue;
if ((!include_hidden_objects) && (!obj->cur.visible)) continue;

View File

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

View File

@ -1018,13 +1018,8 @@ evas_font_object_rehint(Evas_Object *obj)
{
if (obj->smart.smart)
{
const Evas_Object_List *l3;
for (l3 = evas_object_smart_members_get_direct(obj); l3; l3 = l3->next)
{
obj = (Evas_Object *)l3;
evas_font_object_rehint(obj);
}
EINA_INLIST_ITER_NEXT(evas_object_smart_members_get_direct(obj), obj)
evas_font_object_rehint(obj);
}
else
{
@ -1038,26 +1033,19 @@ evas_font_object_rehint(Evas_Object *obj)
EAPI void
evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting)
{
Evas_Object_List *l;
Evas_Layer *lay;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
if (e->hinting == hinting) return;
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_Layer *lay;
lay = (Evas_Layer *)l;
for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
{
Evas_Object *obj;
obj = (Evas_Object *)l2;
evas_font_object_rehint(obj);
}
Evas_Object *obj;
EINA_INLIST_ITER_NEXT(lay->objects, obj)
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
struct _Evas_Object_Style_Tag
{ Evas_Object_List _list_data;
{ EINA_INLIST;
char *tag;
char *replace;
};
struct _Evas_Object_Textblock_Node
{ Evas_Object_List _list_data;
{ EINA_INLIST;
char *text;
int type;
int len, alloc;
};
struct _Evas_Object_Textblock_Line
{ Evas_Object_List _list_data;
{ EINA_INLIST;
Evas_Object_Textblock_Item *items;
Evas_Object_Textblock_Format_Item *format_items;
int x, y, w, h;
@ -49,7 +49,7 @@ struct _Evas_Object_Textblock_Line
};
struct _Evas_Object_Textblock_Item
{ Evas_Object_List _list_data;
{ EINA_INLIST;
char *text;
Evas_Object_Textblock_Format *format;
Evas_Object_Textblock_Node *source_node;
@ -60,7 +60,7 @@ struct _Evas_Object_Textblock_Item
};
struct _Evas_Object_Textblock_Format_Item
{ Evas_Object_List _list_data;
{ EINA_INLIST;
const char *item;
Evas_Object_Textblock_Node *source_node;
int x, w;
@ -209,7 +209,7 @@ _style_clear(Evas_Textblock_Style *ts)
Evas_Object_Style_Tag *tag;
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->replace);
free(tag);
@ -222,13 +222,10 @@ _style_clear(Evas_Textblock_Style *ts)
static char *
_style_match_replace(Evas_Textblock_Style *ts, char *s)
{
Evas_Object_List *l;
for (l = (Evas_Object_List *)ts->tags; l; l = l->next)
Evas_Object_Style_Tag *tag;
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;
}
return NULL;
@ -237,13 +234,10 @@ _style_match_replace(Evas_Textblock_Style *ts, char *s)
static char *
_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;
}
return NULL;
@ -402,7 +396,7 @@ _nodes_clear(const Evas_Object *obj)
Evas_Object_Textblock_Node *n;
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);
free(n);
}
@ -428,7 +422,7 @@ _line_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln)
Evas_Object_Textblock_Item *it;
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);
_format_free(obj, it->format);
free(it);
@ -438,7 +432,8 @@ _line_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln)
Evas_Object_Textblock_Format_Item *fi;
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);
free(fi);
}
@ -456,7 +451,7 @@ _lines_clear(const Evas_Object *obj, Evas_Object_Textblock_Line *lines)
Evas_Object_Textblock_Line *ln;
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);
}
}
@ -471,14 +466,14 @@ _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1)
if (n1->type != NODE_TEXT) return;
o = (Evas_Object_Textblock *)(obj->object_data);
n0 = (Evas_Object_Textblock_Node *)((Evas_Object_List *)n1)->prev;
n2 = (Evas_Object_Textblock_Node *)((Evas_Object_List *)n1)->next;
n0 = (Evas_Object_Textblock_Node *)(EINA_INLIST_GET(n1))->prev;
n2 = (Evas_Object_Textblock_Node *)(EINA_INLIST_GET(n1))->next;
if ((n0) && (n0->type == NODE_TEXT))
{
plen = n0->len;
n0->text = _strbuf_append(n0->text, n1->text, &(n0->len), &(n0->alloc));
((Evas_Object_List *)n0)->next = (Evas_Object_List *)n2;
if (n2) ((Evas_Object_List *)n2)->prev = (Evas_Object_List *)n0;
(EINA_INLIST_GET(n0))->next = EINA_INLIST_GET(n2);
if (n2) (EINA_INLIST_GET(n2))->prev = EINA_INLIST_GET(n0);
// fix any cursors in n1
if (n1 == o->cursor->node)
{
@ -501,11 +496,11 @@ _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1)
{
n0 = n1;
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;
n0->text = _strbuf_append(n0->text, n1->text, &(n0->len), &(n0->alloc));
((Evas_Object_List *)n0)->next = (Evas_Object_List *)n2;
if (n2) ((Evas_Object_List *)n2)->prev = (Evas_Object_List *)n0;
(EINA_INLIST_GET(n0))->next = EINA_INLIST_GET(n2);
if (n2) (EINA_INLIST_GET(n2))->prev = EINA_INLIST_GET(n0);
// fix any cursors in n1
if (n1 == o->cursor->node)
{
@ -1433,7 +1428,7 @@ _layout_line_new(Ctxt *c, Evas_Object_Textblock_Format *fmt)
c->align = fmt->halign;
c->marginl = fmt->margin.l;
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->maxascent = c->maxdescent = 0;
c->ln->line_no = -1;
@ -1491,16 +1486,14 @@ static void
_layout_line_advance(Ctxt *c, Evas_Object_Textblock_Format *fmt)
{
Evas_Object_Textblock_Item *it;
Evas_Object_List *l;
c->maxascent = c->maxdescent = 0;
if (!c->ln->items)
_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;
it = (Evas_Object_Textblock_Item *)l;
if (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);
@ -1658,7 +1651,7 @@ _layout_item_abort(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Textb
free(it);
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 0;
@ -1689,7 +1682,7 @@ _layout_last_item_ends_in_whitespace(Ctxt *c)
Evas_Object_Textblock_Item *it;
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);
}
@ -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_List *remove_items = NULL, *l;
int index, tw, th, inset, adv;
/* it is not appended yet */
for (pit = (Evas_Object_Textblock_Item *)((Evas_Object_List *)c->ln->items)->last;
pit;
pit = (Evas_Object_Textblock_Item *)((Evas_Object_List *)pit)->prev)
EINA_INLIST_ITER_LAST((EINA_INLIST_GET(c->ln->items)), pit)
{
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)
{
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 */
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)
adv = c->ENFN->font_h_advance_get(c->ENDT, new_it->format->font.font, new_it->text);
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)
{
@ -1802,7 +1793,7 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
pit->x = c->x;
adv = c->ENFN->font_h_advance_get(c->ENDT, pit->format->font.font, pit->text);
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)
{
@ -1812,7 +1803,7 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
if (it->format->font.font)
adv = c->ENFN->font_h_advance_get(c->ENDT, it->format->font.font, it->text);
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);
_format_free(c->obj, it->format);
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);
twrap = _layout_word_end(str, wrap);
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)
adv = c->ENFN->font_h_advance_get(c->ENDT, fmt->font.font, it->text);
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)
{
@ -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->item = eina_stringshare_add(item);
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;
}
@ -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;
Ctxt ctxt, *c;
Evas_Object_List *l;
Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock_Node *n;
Evas_List *removes = NULL;
Evas_Object_Textblock_Format *fmt = NULL;
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;
}
/* 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 ((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;
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);
}
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);
_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)
{
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)
{
Evas_Object_Textblock_Line *ln;
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);
_line_free(obj, ln);
}
@ -2260,26 +2245,20 @@ _relayout(const Evas_Object *obj)
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)
{
Evas_Object_List *l, *ll;
Evas_Object_Textblock_Line *ln;
/* Evas_Object_Textblock_Node *nn; */
Evas_Object_Textblock *o;
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;
nn = l;
}
for (l = (Evas_Object_List *)o->lines; l; l = l->next)
{
Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock_Format_Item *fit;
Evas_Object_Textblock_Item *it;
ln = (Evas_Object_Textblock_Line *)l;
for (ll = (Evas_Object_List *)ln->items; ll; ll = ll->next)
EINA_INLIST_ITER_NEXT(ln->items, it)
{
Evas_Object_Textblock_Item *it;
it = (Evas_Object_Textblock_Item *)ll;
if (it->source_node == n)
{
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;
it = (Evas_Object_Textblock_Format_Item *)ll;
if (it->source_node == n)
if (fit->source_node == n)
{
*lnr = ln;
*itr = it;
/* FIXME: Is that really what we want ? */
*itr = fit;
return;
}
}
@ -2308,20 +2285,16 @@ _find_layout_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node *n, in
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)
{
Evas_Object_List *l, *ll;
Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock *o;
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;
for (ll = (Evas_Object_List *)ln->format_items; ll; ll = ll->next)
EINA_INLIST_ITER_NEXT(ln->format_items, fi)
{
Evas_Object_Textblock_Format_Item *fi;
fi = (Evas_Object_Textblock_Format_Item *)ll;
if (fi->source_node == n)
{
*lnr = ln;
@ -2335,15 +2308,12 @@ _find_layout_format_item_line_match(Evas_Object *obj, Evas_Object_Textblock_Node
static Evas_Object_Textblock_Line *
_find_layout_line_num(const Evas_Object *obj, int line)
{
Evas_Object_List *l;
Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock *o;
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;
}
return NULL;
@ -2495,7 +2465,7 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
{
tag->tag = tags;
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
{
@ -2941,17 +2911,14 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char
EAPI const char *
evas_object_textblock_text_markup_get(const Evas_Object *obj)
{
Evas_Object_List *l;
Evas_Object_Textblock_Node *n;
char *txt = NULL;
int txt_len = 0, txt_alloc = 0;
TB_HEAD_RETURN(NULL);
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))
{
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);
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;
evas_textblock_cursor_char_last(cur);
}
@ -3114,9 +3081,9 @@ evas_textblock_cursor_node_next(Evas_Textblock_Cursor *cur)
if (!cur) return 0;
o = (Evas_Object_Textblock *)(cur->obj->object_data);
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;
return 1;
}
@ -3136,9 +3103,9 @@ evas_textblock_cursor_node_prev(Evas_Textblock_Cursor *cur)
if (!cur) return 0;
o = (Evas_Object_Textblock *)(cur->obj->object_data);
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);
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);
if (!ln) return;
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
it = NULL;
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
fi = NULL;
if ((it) && (fi))
@ -3398,7 +3365,7 @@ evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
EAPI int
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 (!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 */
return 0; /* cur1 == cur2 */
}
for (l1 = (Evas_Object_List *)cur1->node,
l2 = (Evas_Object_List *)cur1->node; (l1) || (l2);)
for (l1 = EINA_INLIST_GET(cur1->node),
l2 = EINA_INLIST_GET(cur1->node); (l1) || (l2);)
{
if (l1 == (Evas_Object_List *)cur2->node) return 1; /* cur2 < cur 1 */
else if (l2 == (Evas_Object_List *)cur2->node) return -1; /* cur1 < cur 2 */
if (l1 == EINA_INLIST_GET(cur2->node)) return 1; /* cur2 < cur 1 */
else if (l2 == EINA_INLIST_GET(cur2->node)) return -1; /* cur1 < cur 2 */
else if (!l1) return -1; /* cur1 < cur 2 */
else if (!l2) return 1; /* cur2 < cur 1 */
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->type = NODE_TEXT;
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
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;
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->type = NODE_TEXT;
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
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;
index = cur->pos;
@ -3607,11 +3578,13 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
n->alloc = n->len + 1;
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)
{
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)
{
@ -3625,13 +3598,17 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form
if (ch != 0)
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))
{
n2 = calloc(1, sizeof(Evas_Object_Textblock_Node));
n2->type = NODE_TEXT;
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->len = cur->pos;
@ -3678,13 +3655,15 @@ evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *for
n->alloc = n->len + 1;
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->pos = 0;
}
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->pos = 0;
}
@ -3693,15 +3672,21 @@ evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *for
char *ts;
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
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))
{
n2 = calloc(1, sizeof(Evas_Object_Textblock_Node));
n2->type = NODE_TEXT;
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->len = cur->pos;
@ -3746,8 +3731,8 @@ evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur)
o = (Evas_Object_Textblock *)(cur->obj->object_data);
n = cur->node;
if ((n->text) && (!strcmp(n->text, "\n")) &&
(!((Evas_Object_List *)n)->next)) return;
n2 = (Evas_Object_Textblock_Node *)(((Evas_Object_List *)n)->next);
(!(EINA_INLIST_GET(n))->next)) return;
n2 = (Evas_Object_Textblock_Node *)((EINA_INLIST_GET(n))->next);
if (n2)
{
cur->node = n2;
@ -3755,7 +3740,7 @@ evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur)
}
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->pos = 0;
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);
free(n);
@ -3834,7 +3819,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
}
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)
{
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_Node *n1, *n2, *n, *tn;
Evas_Object_List *l;
int chr, index;
if (!cur1) return;
@ -3932,7 +3916,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
}
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)
{
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_Textblock_Cursor tcur;
Eina_Inlist *l;
tcur.node = n2;
tcur.pos = 0;
index = cur2->pos;
chr = evas_common_font_utf8_get_next((unsigned char *)n2->text, &index);
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;
if (!tcur.node)
{
@ -3973,7 +3958,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
}
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))
tcur.pos = evas_common_font_utf8_get_last((unsigned char *)tcur.node->text, tcur.node->len);
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));
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);
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);
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);
free(n1);
}
@ -4007,7 +3992,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
n = removes->data;
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);
free(n);
}
@ -4023,17 +4008,20 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
if (tn)
{
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);
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);
free(n);
}
}
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);
free(n);
}
@ -4050,14 +4038,14 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
{
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;
}
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->type == NODE_TEXT)
@ -4069,7 +4057,8 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
}
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);
free(n2);
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 (((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;
}
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->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);
free(n);
}
}
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);
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_Node *n1, *n2, *n;
Evas_Object_List *l;
char *str = NULL, *s;
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;
index = cur2->pos;
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)
{
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);
}
}
if (l == (Evas_Object_List *)n2) break;
if (n == n2) break;
}
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_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_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);
x += o->style_pad.l;
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) && ((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)
{
it_break = it;
@ -4577,7 +4562,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E
{
int pos;
int cx, cy, cw, ch;
pos = -1;
if (it->format->font.font)
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;
}
}
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) && (((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_Object_Textblock *o;
Evas_Object_List *l;
Evas_Object_Textblock_Line *ln;
if (!cur) return -1;
o = (Evas_Object_Textblock *)(cur->obj->object_data);
if (!o->formatted.valid) _relayout(cur->obj);
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) && ((ln->y + ln->h) > y))
{
@ -4934,8 +4915,8 @@ evas_object_textblock_free(Evas_Object *obj)
static void
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_List *l, *ll;
int i, j;
int pback = 0, backx = 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);
#endif
#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; \
pline = 0; \
pline2 = 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; \
\
it = (Evas_Object_Textblock_Item *)ll; \
yoff = ln->baseline; \
if (it->format->valign != -1.0) \
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;
/* backing */
ITEM_WALK();
if ((it->format->backing) && (!pback) && (ll->next))
if ((it->format->backing) && (!pback) && ((EINA_INLIST_GET(it))->next))
{
pback = 1;
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;
}
else if (((pback) && (!it->format->backing)) ||
(!ll->next) ||
(!(EINA_INLIST_GET(it))->next) ||
(it->format->color.backing.r != r) ||
(it->format->color.backing.g != g) ||
(it->format->color.backing.b != b) ||
@ -5182,7 +5160,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
ITEM_WALK();
COLOR_SET(normal);
DRAW_TEXT(0, 0);
if ((it->format->strikethrough) && (!pstrike) && (ll->next))
if ((it->format->strikethrough) && (!pstrike) && ((EINA_INLIST_GET(it))->next))
{
pstrike = 1;
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;
}
else if (((pstrike) && (!it->format->strikethrough)) ||
(!ll->next) ||
(!(EINA_INLIST_GET(it))->next) ||
(it->format->color.strikethrough.r != r3) ||
(it->format->color.strikethrough.g != g3) ||
(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;
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;
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;
}
else if (((pline) && (!it->format->underline)) ||
(!ll->next) ||
(!(EINA_INLIST_GET(it))->next) ||
(it->format->color.underline.r != r) ||
(it->format->color.underline.g != g) ||
(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;
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;
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;
}
else if (((pline2) && (!it->format->underline2)) ||
(!ll->next) ||
(!(EINA_INLIST_GET(it))->next) ||
(it->format->color.underline2.r != r2) ||
(it->format->color.underline2.g != g2) ||
(it->format->color.underline2.b != b2) ||
@ -5553,19 +5531,15 @@ void
_evas_object_textblock_rehint(Evas_Object *obj)
{
Evas_Object_Textblock *o;
Evas_Object_List *l, *ll;
Evas_Object_Textblock_Line *ln;
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;
for (ll = (Evas_Object_List *)ln->items; ll; ll = ll->next)
Evas_Object_Textblock_Item *it;
EINA_INLIST_ITER_NEXT(ln->items, it)
{
Evas_Object_Textblock_Item *it;
it = (Evas_Object_Textblock_Item *)ll;
if (it->format->font.font)
evas_font_load_hinting_set(obj->layer->evas,
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)
{
const Evas_Object_List *l;
Evas_Object *obj2;
eina_array_push(render_objects, obj);
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,
active_objects,
restack_objects,
@ -172,15 +169,12 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj, Eina_Array *active
{
if (obj->smart.smart)
{
const Evas_Object_List *l;
Evas_Object *obj2;
eina_array_push(render_objects, obj);
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,
active_objects,
restack_objects,
@ -207,20 +201,15 @@ _evas_render_phase1_object_process(Evas *e, Evas_Object *obj, Eina_Array *active
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_Object_List *l;
Evas_Layer *lay;
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_Layer *lay;
Evas_Object *obj;
lay = (Evas_Layer *)l;
for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
EINA_INLIST_ITER_NEXT(lay->objects, obj)
{
Evas_Object *obj;
obj = (Evas_Object *)l2;
clean_them |= _evas_render_phase1_object_process(e, obj,
active_objects, restack_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;

View File

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

View File

@ -15,7 +15,7 @@ typedef struct _Evas_Hash_El Evas_Hash_El;
struct _Evas_Hash_El
{
Evas_Object_List _list_data;
EINA_INLIST;
const char *key;
void *data;
};
@ -131,7 +131,7 @@ evas_hash_add(Evas_Hash *hash, const char *key, const void *data)
strcpy((char *) el->key, key);
el->data = (void *)data;
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++;
return hash;
}
@ -189,7 +189,7 @@ evas_hash_direct_add(Evas_Hash *hash, const char *key, const void *data)
el->key = key;
el->data = (void *)data;
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++;
return hash;
}
@ -214,55 +214,48 @@ evas_hash_del(Evas_Hash *hash, const char *key, const void *data)
{
int hash_num;
Evas_Hash_El *el;
Evas_Object_List *l;
if (!hash) return NULL;
if (!key)
{
int hash_num;
for (hash_num = 0; hash_num < 256; hash_num++)
{
for (l = hash->buckets[hash_num]; l; l = l->next)
{
el = (Evas_Hash_El *)l;
if (el->data == data)
{
hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el);
free(el);
hash->population--;
if (hash->population <= 0)
{
free(hash);
hash = NULL;
}
return hash;
}
}
EINA_INLIST_ITER_NEXT(hash->buckets[hash_num], el)
if (el->data == data)
{
hash->buckets[hash_num] = eina_inlist_remove(hash->buckets[hash_num], EINA_INLIST_GET(el));
free(el);
hash->population--;
if (hash->population <= 0)
{
free(hash);
hash = NULL;
}
return hash;
}
}
}
else
{
hash_num = _evas_hash_gen(key);
for (l = hash->buckets[hash_num]; l; l = l->next)
{
el = (Evas_Hash_El *)l;
if (!strcmp(el->key, key))
{
if ((!data) || (el->data == data))
{
hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el);
free(el);
hash->population--;
if (hash->population <= 0)
{
free(hash);
hash = NULL;
}
return hash;
}
}
}
EINA_INLIST_ITER_NEXT(hash->buckets[hash_num], el)
if (!strcmp(el->key, key))
{
if ((!data) || (el->data == data))
{
hash->buckets[hash_num] = eina_inlist_remove(hash->buckets[hash_num], EINA_INLIST_GET(el));
free(el);
hash->population--;
if (hash->population <= 0)
{
free(hash);
hash = NULL;
}
return hash;
}
}
}
return hash;
}
@ -280,28 +273,16 @@ evas_hash_find(const Evas_Hash *hash, const char *key)
{
int hash_num;
Evas_Hash_El *el;
Evas_Object_List *l;
_evas_hash_alloc_error = 0;
if ((!hash) || (!key)) return NULL;
hash_num = _evas_hash_gen(key);
for (l = hash->buckets[hash_num]; l; l = l->next)
{
el = (Evas_Hash_El *)l;
if (!strcmp(el->key, key))
{
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;
}
}
EINA_INLIST_ITER_NEXT(hash->buckets[hash_num], el)
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;
}
return NULL;
}
@ -320,28 +301,21 @@ evas_hash_modify(Evas_Hash *hash, const char *key, const void *data)
{
int hash_num;
Evas_Hash_El *el;
Evas_Object_List *l;
_evas_hash_alloc_error = 0;
if (!hash) return NULL;
hash_num = _evas_hash_gen(key);
for (l = hash->buckets[hash_num]; l; l = l->next)
{
el = (Evas_Hash_El *)l;
if ((key) && (!strcmp(el->key, key)))
{
void *old_data;
if (l != hash->buckets[hash_num])
{
hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el);
hash->buckets[hash_num] = evas_object_list_prepend(hash->buckets[hash_num], el);
}
old_data = el->data;
el->data = (void *) data;
return old_data;
}
}
EINA_INLIST_ITER_NEXT(hash->buckets[hash_num], el)
if ((key) && (!strcmp(el->key, key)))
{
void *old_data;
hash->buckets[hash_num] = eina_inlist_promote(hash->buckets[hash_num], EINA_INLIST_GET(el));
old_data = el->data;
el->data = (void *) data;
return old_data;
}
return NULL;
}
@ -402,7 +376,7 @@ evas_hash_free(Evas_Hash *hash)
Evas_Hash_El *el;
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);
}
}
@ -451,7 +425,7 @@ evas_hash_foreach(const Evas_Hash *hash, Evas_Bool (*func) (const Evas_Hash *has
size = evas_hash_size(hash);
for (i = 0; i < size; i++)
{
Evas_Object_List *l, *next_l;
Eina_Inlist *l, *next_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 = 0;
static Evas_Object_List * fonts_src = NULL;
static Evas_Object_List * fonts = NULL;
static Eina_Inlist * fonts_src = 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_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);
fs->ft.orig_upem = fs->ft.face->units_per_EM;
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;
}
@ -60,7 +60,7 @@ evas_common_font_source_load(const char *name)
fs->ft.orig_upem = 0;
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;
}
@ -91,7 +91,7 @@ evas_common_font_source_load_complete(RGBA_Font_Source *fs)
EAPI RGBA_Font_Source *
evas_common_font_source_find(const char *name)
{
Evas_Object_List *l;
Eina_Inlist *l;
if (!name) return NULL;
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)))
{
fs->references++;
fonts_src = evas_object_list_remove(fonts_src, fs);
fonts_src = evas_object_list_prepend(fonts_src, fs);
fonts_src = eina_inlist_demote(fonts_src, EINA_INLIST_GET(fs));
return fs;
}
}
@ -116,7 +115,7 @@ evas_common_font_source_free(RGBA_Font_Source *fs)
fs->references--;
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);
if (fs->charmap) evas_array_hash_free(fs->charmap);
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->usage = 0;
fi->references = 1;
fonts = evas_object_list_prepend(fonts, fi);
fonts = eina_inlist_prepend(fonts, EINA_INLIST_GET(fi));
return fi;
}
@ -550,7 +549,7 @@ font_flush_free_glyph_cb(const Evas_Hash *hash, const char *key, void *data, voi
EAPI void
evas_common_font_flush_last(void)
{
Evas_Object_List *l;
Eina_Inlist *l;
RGBA_Font_Int *fi = NULL;
for (l = fonts; l; l = l->next)
@ -564,7 +563,7 @@ evas_common_font_flush_last(void)
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_hash_foreach(fi->glyphs, font_flush_free_glyph_cb, NULL);
@ -578,7 +577,7 @@ evas_common_font_flush_last(void)
EAPI RGBA_Font_Int *
evas_common_font_int_find(const char *name, int size)
{
Evas_Object_List *l;
Eina_Inlist *l;
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);
fi->references++;
fonts = evas_object_list_remove(fonts, fi);
fonts = evas_object_list_prepend(fonts, fi);
fonts = eina_inlist_promote(fonts, EINA_INLIST_GET(fi));
return fi;
}
}

View File

@ -49,12 +49,12 @@ _evas_common_gradient2_stops_free(RGBA_Gradient2 *gr)
if (!gr) return;
if (gr->stops.stops)
{
Evas_Object_List *l;
Eina_Inlist *l;
while (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);
}
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)
{
RGBA_Gradient2_Color_Np_Stop *gc;
Evas_Object_List *l;
Eina_Inlist *l;
if (!gr) return;
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;
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 = evas_object_list_append(gr->stops.stops, gc1);
gr->stops.stops = eina_inlist_append(gr->stops.stops, EINA_INLIST_GET(gc));
gr->stops.stops = eina_inlist_append(gr->stops.stops, EINA_INLIST_GET(gc1));
gr->stops.nstops = 2;
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->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++;
if (a < 255)
gr->has_alpha = 1;
@ -314,7 +314,7 @@ evas_common_gradient2_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
static void
_evas_common_gradient2_stops_scale(RGBA_Gradient2 *gr)
{
Evas_Object_List *l;
Eina_Inlist *l;
RGBA_Gradient2_Color_Np_Stop *gc, *gc_next;
double scale;
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_Object_List *lc;
Eina_Inlist *lc;
RGBA_Gradient2_Color_Np_Stop *gc, *gc_next;
DATA32 *pmap, *map_end;
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_Object_List *lc;
Eina_Inlist *lc;
RGBA_Gradient2_Color_Np_Stop *gc, *gc_next;
DATA32 *pmap, *map_end;
DATA8 *pamap = NULL;

View File

@ -44,12 +44,12 @@ _evas_common_gradient_stops_free(RGBA_Gradient *gr)
if (!gr) return;
if (gr->color.stops)
{
Evas_Object_List *l;
Eina_Inlist *l;
while (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);
}
gr->color.stops = NULL;
@ -57,12 +57,12 @@ _evas_common_gradient_stops_free(RGBA_Gradient *gr)
}
if (gr->alpha.stops)
{
Evas_Object_List *l;
Eina_Inlist *l;
while (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);
}
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)
{
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.len = 1;
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->a = (gc_last->a + a) / 2;
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.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.nstops += 2;
if (a < 255)
@ -271,7 +271,7 @@ evas_common_gradient_alpha_stop_add(RGBA_Gradient *gr, int a, int dist)
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.len = 1;
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; }
gam->a = (ga_last->a + a) / 2;
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.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.nstops += 2;
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)
{
Evas_Object_List *lc;
Eina_Inlist *lc;
RGBA_Gradient_Color_Stop *gc, *gc_next;
DATA32 *pmap, *map_end;
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)
{
Evas_Object_List *lc;
Eina_Inlist *lc;
RGBA_Gradient_Alpha_Stop *ga, *ga_next;
DATA8 *pamap, *amap_end;
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)
{
Evas_Object_List *lc;
Eina_Inlist *lc;
RGBA_Gradient_Color_Stop *gc, *gc_next;
DATA32 *pmap, *map_end;
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)
{
Evas_Object_List *lc;
Eina_Inlist *lc;
RGBA_Gradient_Alpha_Stop *ga, *ga_next;
DATA8 *pamap, *amap_end;
int i, dii;

View File

@ -283,7 +283,7 @@ evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
{
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;
}
else
@ -313,7 +313,7 @@ evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
}
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;
}
}

View File

@ -20,14 +20,14 @@ evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op)
first_pipe = 1;
p = calloc(1, sizeof(RGBA_Pipe));
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)
{
p = calloc(1, sizeof(RGBA_Pipe));
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++;
*op = &(p->op[p->op_num - 1]);
@ -87,7 +87,7 @@ evas_common_pipe_thread(void *data)
// {
// thinfo->info = NULL;
// 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;
@ -198,7 +198,7 @@ evas_common_pipe_flush(RGBA_Image *im)
#endif
{
/* 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++)
{
@ -230,7 +230,7 @@ evas_common_pipe_free(RGBA_Image *im)
if (p->op[i].free_func)
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);
}
}
@ -330,7 +330,8 @@ evas_common_pipe_op_poly_free(RGBA_Pipe_Op *op)
while (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);
}
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);
if (!dst->pipe) return;
/* 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));
if (pp)
{
pp->x = p->x;
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;

View File

@ -13,7 +13,7 @@ typedef struct _RGBA_Vertex RGBA_Vertex;
struct _RGBA_Span
{
Evas_Object_List _list_data;
EINA_INLIST;
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;
pt->x = x;
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;
}
@ -93,7 +93,7 @@ evas_common_polygon_points_clear(RGBA_Polygon_Point *points)
RGBA_Polygon_Point *old_p;
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);
}
}
@ -129,7 +129,7 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
RGBA_Polygon_Point *pt;
RGBA_Vertex *point;
RGBA_Edge *edges;
Evas_Object_List *spans, *l;
Eina_Inlist *spans;
int num_active_edges;
int n;
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();
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;
edges = malloc(sizeof(RGBA_Edge) * n);
if (!edges) return;
@ -185,9 +185,8 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
}
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].y = pt->y;
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);
for (k = 0; k < n; k++) sorted_index[k] = point[k].i;
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].y = pt->y;
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 (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1;
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->x = x0;
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);
if (spans)
{
for (l = spans; l; l = l->next)
RGBA_Span *span;
EINA_INLIST_ITER_NEXT(spans, span)
{
RGBA_Span *span;
DATA32 *ptr;
span = (RGBA_Span *)l;
#ifdef EVAS_SLI
if (((span->y) % dc->sli.h) == dc->sli.y)
#endif
@ -291,10 +289,8 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
}
while (spans)
{
RGBA_Span *span;
span = (RGBA_Span *)spans;
spans = evas_object_list_remove(spans, spans);
spans = eina_inlist_remove(spans, spans);
free(span);
}
}

View File

@ -33,7 +33,7 @@ evas_common_regionbuf_clear(Regionbuf *rb)
Regionspan *span;
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);
}
}
@ -42,7 +42,6 @@ evas_common_regionbuf_clear(Regionbuf *rb)
void
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;
/* 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;
sp_start = 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 *)l->next;
nspan = (Regionspan *)(EINA_INLIST_GET(span))->next;
/* we dont know what t do with the span yet */
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->x1 = x1;
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;
}
if (x1 < sp_start->x1)
@ -121,17 +119,19 @@ evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y)
}
else
{
Eina_Inlist *l;
/* remove all nodes after sp_start and before_sp_stop because
* 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;
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);
}
/* 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 (x1 < sp_start->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->x1 = x1;
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
evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
{
/* FIXME: del span */
Evas_Object_List *l;
Regionspan *span, *span2, *nspan, *sp_start, *sp_stop;
/* 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;
sp_start = 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 *)l->next;
nspan = (Regionspan *)(EINA_INLIST_GET(l))->next;
/* we dont know what t do with the span yet */
if (!sp_start)
{
@ -233,7 +231,7 @@ evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
}
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;
}
}
@ -249,7 +247,7 @@ evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
/* remove it all */
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;
@ -260,26 +258,28 @@ evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
span2 = calloc(1, sizeof(Regionspan));
span2->x1 = sp_start->x1;
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;
return;
}
}
else
{
Eina_Inlist *l;
/* remove all nodes after sp_start and before_sp_stop because
* 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;
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);
}
/* all of the start span is cut out */
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);
}
/* 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 */
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);
}
/* chop it up at the end */
@ -308,22 +308,22 @@ evas_common_regionbuf_rects_get(Regionbuf *rb)
/* FIXME: take spans, make rects */
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 *sp_start;
int yy;
sp_start = (Regionspan *)l;
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++)
{
int match = 0;
for (ll = (Evas_Object_List *)rb->spans[yy]; ll;)
for (ll = EINA_INLIST_GET(rb->spans[yy]); ll;)
{
span = (Regionspan *)ll;
ll = ll->next;
@ -335,7 +335,7 @@ evas_common_regionbuf_rects_get(Regionbuf *rb)
goto coallate;
}
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);
}
}
@ -347,7 +347,7 @@ evas_common_regionbuf_rects_get(Regionbuf *rb)
r->y = y;
r->w = sp_start->x2 - sp_start->x1 + 1;
r->h = yy - y;
rects = evas_object_list_append(rects, r);
rects = eina_inlist_append(rects, r);
free(sp_start);
}
}

View File

@ -5,7 +5,6 @@
static const list_node_t list_node_zeroed = { NULL };
static const list_t list_zeroed = { NULL, NULL };
typedef struct list_node_pool
{
list_node_t *node;
@ -1128,15 +1127,12 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
Tilebuf_Rect *r;
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->y = cur.top;
r->w = cur.width;
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;
@ -1217,7 +1213,7 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
r->y = y * tb->tile_size.h;
r->w = (xx) * tb->tile_size.w;
r->h = (yy) * tb->tile_size.h;
rects = evas_object_list_append(rects, r);
rects = eina_inlist_append(rects, r);
x = x + (xx - 1);
tbt += xx - 1;
}
@ -1235,7 +1231,7 @@ evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects)
Tilebuf_Rect *r;
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);
}
}

View File

@ -81,7 +81,6 @@ soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point
RGBA_Polygon_Point *pt;
RGBA_Vertex *point;
RGBA_Edge *edges;
Evas_Object_List *l;
int num_active_edges;
int n;
int i, j, k;
@ -114,8 +113,7 @@ soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point
return;
n = 0;
for (l = (Evas_Object_List *)points; l; l = l->next)
n++;
EINA_INLIST_ITER_NEXT(points, pt) n++;
if (n < 3)
return;
@ -139,24 +137,26 @@ soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point
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].y = pt->y;
point[k].i = k;
k++;
}
qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
for (k = 0; k < n; k++)
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].y = pt->y;
point[k].i = k;
k++;
}
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 */
#endif
#include <Eina.h>
#include "Evas.h"
/*****************************************************************************/
@ -271,7 +272,7 @@ struct _Image_Entry_Flags
struct _Image_Entry
{
Evas_Object_List _list_data;
EINA_INLIST;
Evas_Cache_Image *cache;
@ -311,7 +312,7 @@ struct _Image_Entry
struct _Engine_Image_Entry
{
Evas_Object_List _list_data;
EINA_INLIST;
/* Upper Engine data. */
Image_Entry *src;
@ -427,7 +428,7 @@ struct _RGBA_Pipe_Op
struct _RGBA_Pipe
{
Evas_Object_List _list_data;
EINA_INLIST;
int op_num;
RGBA_Pipe_Op op[PIPE_LEN];
};
@ -475,14 +476,14 @@ struct _RGBA_Image
struct _RGBA_Gradient_Color_Stop
{
Evas_Object_List _list_data;
EINA_INLIST;
int r, g, b, a;
int dist;
};
struct _RGBA_Gradient_Alpha_Stop
{
Evas_Object_List _list_data;
EINA_INLIST;
int a;
int dist;
};
@ -500,13 +501,13 @@ struct _RGBA_Gradient
} map;
struct {
Evas_Object_List *stops;
Eina_Inlist *stops;
DATA32 *data;
int nstops;
int len;
} color;
struct {
Evas_Object_List *stops;
Eina_Inlist *stops;
DATA8 *data;
int nstops;
int len;
@ -548,7 +549,7 @@ struct _RGBA_Gradient_Type
struct _RGBA_Gradient2_Color_Np_Stop
{
Evas_Object_List _list_data;
EINA_INLIST;
int r, g, b, a;
float pos;
int dist;
@ -564,7 +565,7 @@ struct _RGBA_Gradient2
} map;
struct {
Evas_Object_List *stops;
Eina_Inlist *stops;
int nstops;
DATA32 *cdata;
DATA8 *adata;
@ -605,7 +606,7 @@ struct _RGBA_Gradient2_Type
struct _RGBA_Polygon_Point
{
Evas_Object_List _list_data;
EINA_INLIST;
int x, y;
};
@ -619,7 +620,7 @@ struct _RGBA_Font
struct _RGBA_Font_Int
{
Evas_Object_List _list_data;
EINA_INLIST;
RGBA_Font_Source *src;
@ -640,7 +641,7 @@ struct _RGBA_Font_Int
struct _RGBA_Font_Source
{
Evas_Object_List _list_data;
EINA_INLIST;
const char *name;
const char *file;
@ -783,7 +784,7 @@ struct _Tilebuf_Tile
struct _Tilebuf_Rect
{
Evas_Object_List _list_data;
EINA_INLIST;
int x, y, w, h;
};
/*
@ -795,7 +796,7 @@ struct _Regionbuf
struct _Regionspan
{
Evas_Object_List _list_data;
EINA_INLIST;
int x1, x2;
};
*/

View File

@ -211,32 +211,32 @@ struct _Evas_Lock
struct _Evas_Callbacks
{
Evas_Object_List *callbacks;
Eina_Inlist *callbacks;
int walking_list;
unsigned char deletions_waiting : 1;
/*
Evas_Object_List *down;
Evas_Object_List *up;
Evas_Object_List *move;
Evas_Object_List *in;
Evas_Object_List *out;
Evas_Object_List *wheel;
Evas_Object_List *key_down;
Evas_Object_List *key_up;
Evas_Object_List *free;
Evas_Object_List *obj_focus_in;
Evas_Object_List *obj_focus_out;
Evas_Object_List *obj_show;
Evas_Object_List *obj_hide;
Evas_Object_List *obj_move;
Evas_Object_List *obj_resize;
Evas_Object_List *obj_restack;
Eina_Inlist *down;
Eina_Inlist *up;
Eina_Inlist *move;
Eina_Inlist *in;
Eina_Inlist *out;
Eina_Inlist *wheel;
Eina_Inlist *key_down;
Eina_Inlist *key_up;
Eina_Inlist *free;
Eina_Inlist *obj_focus_in;
Eina_Inlist *obj_focus_out;
Eina_Inlist *obj_show;
Eina_Inlist *obj_hide;
Eina_Inlist *obj_move;
Eina_Inlist *obj_resize;
Eina_Inlist *obj_restack;
*/
};
struct _Evas
{
Evas_Object_List _list_data;
EINA_INLIST;
DATA32 magic;
@ -321,7 +321,7 @@ struct _Evas
struct _Evas_Layer
{
Evas_Object_List _list_data;
EINA_INLIST;
short layer;
Evas_Object *objects;
@ -371,7 +371,7 @@ struct _Evas_Size_Hints
struct _Evas_Object
{
Evas_Object_List _list_data;
EINA_INLIST;
DATA32 magic;
@ -464,7 +464,7 @@ struct _Evas_Object
struct _Evas_Func_Node
{
Evas_Object_List _list_data;
EINA_INLIST;
void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info);
void *data;
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_stack_above(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_mem_calloc(int size);
void evas_object_event_callback_all_del(Evas_Object *obj);

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb;
Outbuf *ob;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
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)
{
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;
rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -10,7 +10,7 @@ struct _Render_Engine
Tilebuf *tb;
Outbuf *ob;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
int end : 1;
};
@ -268,7 +268,7 @@ eng_output_redraws_next_update_get(void *data,
if (!re->rects)
{
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;
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)
{
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;

View File

@ -29,7 +29,7 @@ struct _Render_Engine
Tilebuf *tb;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
DFBRegion *update_regions;
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);
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

View File

@ -116,12 +116,11 @@ polygon_spans_fill(IDirectFBSurface *surface, int y, const span_t *spans, int n_
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_Vertex *point;
RGBA_Edge *edges;
Evas_Object_List *l;
int num_active_edges;
int n;
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))
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;
edges = malloc(sizeof(RGBA_Edge) * n);
if (!edges) return;
@ -179,9 +178,8 @@ _dfb_polygon_draw(IDirectFBSurface *surface, RGBA_Draw_Context *dc, Evas_Object_
}
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].y = pt->y;
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);
for (k = 0; k < n; k++) sorted_index[k] = point[k].i;
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].y = pt->y;
point[k].i = k;

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb;
Outbuf *ob;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
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)
{
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;
rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -26,7 +26,7 @@ struct _Render_Engine
Tilebuf *tb;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
int end : 1;
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)
{
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;
rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -80,7 +80,7 @@ _tmp_out_alloc(Render_Engine *re)
Tilebuf_Rect *r;
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->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;
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)
{
evas_common_tilebuf_free_render_rects(re->rects);

View File

@ -88,7 +88,7 @@ _tmp_out_alloc(Render_Engine *re)
Tilebuf_Rect *r;
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->h > h) h = r->h;
@ -340,7 +340,7 @@ evas_engine_sdl16_output_redraws_next_update_get(void *data,
*cy = *y = tb_rect->y;
*cw = *w = tb_rect->w;
*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)
{
evas_common_tilebuf_free_render_rects(re->rects);

View File

@ -113,7 +113,7 @@ _tmp_out_alloc(Render_Engine *re)
Tilebuf_Rect *r;
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->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;
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)
{
evas_common_tilebuf_free_render_rects(re->rects);

View File

@ -70,7 +70,7 @@ _tmp_out_alloc(Render_Engine *re)
Tilebuf_Rect *r;
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->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;
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)
{
evas_common_tilebuf_free_render_rects(re->rects);

View File

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

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb;
Outbuf *ob;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
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)
{
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;
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)
{
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;

View File

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

View File

@ -14,7 +14,7 @@ struct _Render_Engine
Tilebuf *tb;
Outbuf *ob;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
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)
{
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;
rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -15,7 +15,7 @@ struct _Render_Engine
Tilebuf *tb;
Outbuf *ob;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
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)
{
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;
rect = (Tilebuf_Rect *)re->cur_rect;

View File

@ -30,7 +30,7 @@ struct _Render_Engine
Tilebuf *tb;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
int end : 1;
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)
{
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;
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);
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;

View File

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

View File

@ -33,7 +33,7 @@ struct _Render_Engine
Tilebuf *tb;
Tilebuf_Rect *rects;
Evas_Object_List *cur_rect;
Eina_Inlist *cur_rect;
int end : 1;
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)
{
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;
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);
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;

View File

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