Remove Evas_List from Evas.

SVN revision: 36942
This commit is contained in:
Cedric BAIL 2008-10-21 16:31:05 +00:00
parent 0780128787
commit 465b76a017
59 changed files with 715 additions and 868 deletions

View File

@ -404,8 +404,8 @@ extern "C" {
EAPI void evas_free (Evas *e);
EAPI int evas_render_method_lookup (const char *name);
EAPI Evas_List *evas_render_method_list (void);
EAPI void evas_render_method_list_free (Evas_List *list);
EAPI Eina_List *evas_render_method_list (void);
EAPI void evas_render_method_list_free (Eina_List *list);
EAPI void evas_output_method_set (Evas *e, int render_method);
EAPI int evas_output_method_get (const Evas *e);
@ -434,8 +434,8 @@ extern "C" {
EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h);
EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h);
EAPI void evas_obscured_clear (Evas *e);
EAPI Evas_List *evas_render_updates (Evas *e);
EAPI void evas_render_updates_free (Evas_List *updates);
EAPI Eina_List *evas_render_updates (Evas *e);
EAPI void evas_render_updates_free (Eina_List *updates);
EAPI void evas_render (Evas *e);
EAPI void evas_norender (Evas *e);
EAPI void evas_render_idle_flush (Evas *e);
@ -593,7 +593,7 @@ extern "C" {
EAPI void evas_font_path_clear (Evas *e);
EAPI void evas_font_path_append (Evas *e, const char *path);
EAPI void evas_font_path_prepend (Evas *e, const char *path);
EAPI const Evas_List *evas_font_path_list (const Evas *e);
EAPI const Eina_List *evas_font_path_list (const Evas *e);
EAPI void evas_font_hinting_set (Evas *e, Evas_Font_Hinting_Flags hinting);
EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e);
@ -603,8 +603,8 @@ extern "C" {
EAPI void evas_font_cache_set (Evas *e, int size);
EAPI int evas_font_cache_get (const Evas *e);
EAPI Evas_List *evas_font_available_list (const Evas *e);
EAPI void evas_font_available_list_free (Evas *e, Evas_List *available);
EAPI Eina_List *evas_font_available_list (const Evas *e);
EAPI void evas_font_available_list_free (Evas *e, Eina_List *available);
/* textblock objects */
typedef struct _Evas_Textblock_Style Evas_Textblock_Style;
@ -677,7 +677,7 @@ extern "C" {
EAPI int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
EAPI Evas_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y);
EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y);
EAPI Evas_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2);
EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2);
EAPI Evas_Bool evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
EAPI void evas_object_textblock_clear(Evas_Object *obj);
@ -744,7 +744,7 @@ extern "C" {
EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip);
EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj);
EAPI void evas_object_clip_unset (Evas_Object *obj);
EAPI const Evas_List *evas_object_clipees_get (const Evas_Object *obj);
EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj);
EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data);
EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key);
@ -760,8 +760,8 @@ extern "C" {
EAPI Evas_Object *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);
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);
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);
EAPI Eina_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);
EAPI Eina_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);
/* smart objects */
EAPI Evas_Smart *evas_smart_new (const char *name, void (*func_add) (Evas_Object *obj), void (*func_del) (Evas_Object *obj), void (*func_layer_set) (Evas_Object *obj, int l), void (*func_raise) (Evas_Object *obj), void (*func_lower) (Evas_Object *obj), void (*func_stack_above) (Evas_Object *obj, Evas_Object *above), void (*func_stack_below) (Evas_Object *obj, Evas_Object *below), void (*func_move) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*func_resize) (Evas_Object *obj, Evas_Coord w, Evas_Coord h), void (*func_show) (Evas_Object *obj), void (*func_hide) (Evas_Object *obj), void (*func_color_set) (Evas_Object *obj, int r, int g, int b, int a), void (*func_clip_set) (Evas_Object *obj, Evas_Object *clip), void (*func_clip_unset) (Evas_Object *obj), const void *data);
@ -775,7 +775,7 @@ extern "C" {
EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj);
EAPI void evas_object_smart_member_del (Evas_Object *obj);
EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj);
EAPI Evas_List *evas_object_smart_members_get (const Evas_Object *obj);
EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj);
EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj);
EAPI void *evas_object_smart_data_get (const Evas_Object *obj);
EAPI void evas_object_smart_data_set (Evas_Object *obj, void *data);

View File

@ -11,7 +11,7 @@
#ifdef BUILD_ASYNC_PRELOAD
#include <pthread.h>
static Evas_List *preload = NULL;
static Eina_List *preload = NULL;
static Image_Entry *current = NULL;
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
@ -275,7 +275,7 @@ _evas_cache_image_entry_preload_add(Evas_Cache_Image *cache,
if (!ie->flags.preload)
{
preload = evas_list_append(preload, ie);
preload = eina_list_append(preload, ie);
ie->flags.preload = 1;
ie->target = target;
@ -312,7 +312,7 @@ _evas_cache_image_entry_preload_remove(Evas_Cache_Image *cache,
}
else
{
preload = evas_list_remove(preload, ie);
preload = eina_list_remove(preload, ie);
ie->flags.preload = 0;
ret = 1;
}
@ -1029,8 +1029,8 @@ _evas_cache_background_load(void *data)
{
pthread_mutex_lock(&mutex);
current = evas_list_data(preload);
preload = evas_list_remove(preload, current);
current = eina_list_data_get(preload);
preload = eina_list_remove(preload, current);
pthread_mutex_unlock(&mutex);

View File

@ -4,23 +4,25 @@
void
evas_object_clip_dirty(Evas_Object *obj)
{
Evas_List *l;
Eina_List *l;
Evas_Object *data;
obj->cur.cache.clip.dirty = 1;
for (l = obj->clip.clipees; l; l = l->next)
evas_object_clip_dirty(l->data);
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
evas_object_clip_dirty(data);
}
void
evas_object_recalc_clippees(Evas_Object *obj)
{
Evas_List *l;
Eina_List *l;
Evas_Object *data;
if (obj->cur.cache.clip.dirty)
{
evas_object_clip_recalc(obj);
for (l = obj->clip.clipees; l; l = l->next)
evas_object_recalc_clippees(l->data);
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
evas_object_recalc_clippees(data);
}
}
@ -117,7 +119,7 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
if (obj->cur.clipper)
{
/* unclip */
obj->cur.clipper->clip.clipees = evas_list_remove(obj->cur.clipper->clip.clipees, obj);
obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj);
if (!obj->cur.clipper->clip.clipees) obj->cur.clipper->cur.have_clipees = 0;
evas_object_change(obj->cur.clipper);
evas_object_change(obj);
@ -134,7 +136,7 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
clip->cur.geometry.w, clip->cur.geometry.h);
}
obj->cur.clipper = clip;
clip->clip.clipees = evas_list_append(clip->clip.clipees, obj);
clip->clip.clipees = eina_list_append(clip->clip.clipees, obj);
if (clip->clip.clipees) clip->cur.have_clipees = 1;
evas_object_change(clip);
evas_object_change(obj);
@ -226,7 +228,7 @@ evas_object_clip_unset(Evas_Object *obj)
}
if (obj->cur.clipper)
{
obj->cur.clipper->clip.clipees = evas_list_remove(obj->cur.clipper->clip.clipees, obj);
obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj);
if (!obj->cur.clipper->clip.clipees)
obj->cur.clipper->cur.have_clipees = 0;
evas_object_change(obj->cur.clipper);
@ -275,22 +277,18 @@ evas_object_clip_unset(Evas_Object *obj)
* clipper = evas_object_clip_get(obj);
* if (clipper)
* {
* Evas_List *clippees, *l;
* Eina_List *clippees, *l;
* Evas_Object *obj_tmp;
*
* clippees = evas_object_clipees_get(clipper);
* printf("Clipper clips %i objects\n", evas_list_count(clippees));
* for (l = clippees; l; l = l->next)
* {
* Evas_Object *obj_tmp;
*
* obj_tmp = l->data;
* printf("Clipper clips %i objects\n", eina_list_count(clippees));
* EINA_LIST_FOREACH(clippees, l, obj_tmp)
* evas_object_show(obj_tmp);
* }
* }
* @endcode
* @ingroup Evas_Clip_Group
*/
EAPI const Evas_List *
EAPI const Eina_List *
evas_object_clipees_get(const Evas_Object *obj)
{
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);

View File

@ -56,7 +56,7 @@ evas_object_data_set(Evas_Object *obj, const char *key, const void *data)
node->key = (char *)node + sizeof(Evas_Data_Node);
strcpy(node->key, key);
node->data = (void *)data;
obj->data.elements = evas_list_prepend(obj->data.elements, node);
obj->data.elements = eina_list_prepend(obj->data.elements, node);
}
/**
@ -89,23 +89,21 @@ evas_object_data_set(Evas_Object *obj, const char *key, const void *data)
EAPI void *
evas_object_data_get(const Evas_Object *obj, const char *key)
{
Evas_List *l;
Eina_List *l;
Evas_Data_Node *node;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
if (!key) return NULL;
for (l = obj->data.elements; l; l = l->next)
EINA_LIST_FOREACH(obj->data.elements, l, node)
{
Evas_Data_Node *node;
node = l->data;
if (!strcmp(node->key, key))
{
Evas_List *lst;
Eina_List *lst;
lst = obj->data.elements;
lst = evas_list_promote_list(lst, l);
lst = eina_list_promote_list(lst, l);
((Evas_Object *)obj)->data.elements = lst;
return node->data;
}
@ -136,23 +134,21 @@ evas_object_data_get(const Evas_Object *obj, const char *key)
EAPI void *
evas_object_data_del(Evas_Object *obj, const char *key)
{
Evas_List *l;
Eina_List *l;
Evas_Data_Node *node;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
if (!key) return NULL;
for (l = obj->data.elements; l; l = l->next)
EINA_LIST_FOREACH(obj->data.elements, l, node)
{
Evas_Data_Node *node;
node = l->data;
if (!strcmp(node->key, key))
{
void *data;
data = node->data;
obj->data.elements = evas_list_remove_list(obj->data.elements, l);
obj->data.elements = eina_list_remove_list(obj->data.elements, l);
free(node);
return data;
}

View File

@ -1,8 +1,8 @@
#include "evas_common.h"
#include "evas_private.h"
static Evas_List *
_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)
static Eina_List *
_evas_event_object_list_in_get(Evas *e, Eina_List *in, const Eina_Inlist *list, Evas_Object *stop, int x, int y, int *no_rep)
{
Evas_Object *obj;
@ -40,7 +40,7 @@ _evas_event_object_list_in_get(Evas *e, Evas_List *in, const Eina_Inlist *list,
((!obj->precise_is_inside) ||
(evas_object_is_inside(obj, x, y))))
{
in = evas_list_append(in, obj);
in = eina_list_append(in, obj);
if (!obj->repeat_events)
{
*no_rep = 1;
@ -55,11 +55,11 @@ _evas_event_object_list_in_get(Evas *e, Evas_List *in, const Eina_Inlist *list,
return in;
}
Evas_List *
Eina_List *
evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
{
Evas_Layer *lay;
Evas_List *in = NULL;
Eina_List *in = NULL;
if (!e->layers) return NULL;
EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
@ -74,14 +74,15 @@ evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
return in;
}
static Evas_List *evas_event_list_copy(Evas_List *list);
static Evas_List *
evas_event_list_copy(Evas_List *list)
static Eina_List *evas_event_list_copy(Eina_List *list);
static Eina_List *
evas_event_list_copy(Eina_List *list)
{
Evas_List *l, *new_l = NULL;
Eina_List *l, *new_l = NULL;
const void *data;
for (l = list; l; l = l->next)
new_l = evas_list_append(new_l, l->data);
EINA_LIST_FOREACH(list, l, data)
new_l = eina_list_append(new_l, data);
return new_l;
}
/* public functions */
@ -196,8 +197,9 @@ evas_event_freeze_get(const Evas *e)
EAPI void
evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
Evas_List *l, *copy;
Eina_List *l, *copy;
Evas_Event_Mouse_Down ev;
Evas_Object *obj;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
@ -224,11 +226,8 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
_evas_walk(e);
copy = evas_event_list_copy(e->pointer.object.in);
for (l = copy; l; l = l->next)
EINA_LIST_FOREACH(copy, l, obj)
{
Evas_Object *obj;
obj = l->data;
if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
{
obj->mouse_grabbed++;
@ -239,7 +238,7 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev);
if (e->delete_me) break;
}
if (copy) copy = evas_list_free(copy);
if (copy) copy = eina_list_free(copy);
e->last_mouse_down_counter++;
_evas_unwalk(e);
}
@ -253,7 +252,7 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int
EAPI void
evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
Evas_List *l, *copy;
Eina_List *l, *copy;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
@ -268,6 +267,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
{
Evas_Event_Mouse_Up ev;
Evas_Object *obj;
ev.button = b;
ev.output.x = e->pointer.x;
@ -283,11 +283,8 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
_evas_walk(e);
copy = evas_event_list_copy(e->pointer.object.in);
for (l = copy; l; l = l->next)
EINA_LIST_FOREACH(copy, l, obj)
{
Evas_Object *obj;
obj = l->data;
if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
(obj->mouse_in) && (obj->mouse_grabbed > 0))
{
@ -298,17 +295,17 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev);
if (e->delete_me) break;
}
if (copy) copy = evas_list_free(copy);
if (copy) copy = eina_list_free(copy);
e->last_mouse_up_counter++;
}
if (!e->pointer.button)
{
Evas_List *ins;
Evas_List *l;
Eina_List *ins;
Eina_List *l;
{
Evas_Event_Mouse_Out ev;
Evas_Object *obj;
ev.buttons = e->pointer.button;
ev.output.x = e->pointer.x;
@ -325,12 +322,9 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
/* go thru old list of in objects */
copy = evas_event_list_copy(e->pointer.object.in);
for (l = copy; l; l = l->next)
EINA_LIST_FOREACH(copy, l, obj)
{
Evas_Object *obj;
obj = l->data;
if ((!evas_list_find(ins, obj)) ||
if ((!eina_list_data_find(ins, obj)) ||
(!e->pointer.inside))
{
@ -341,10 +335,11 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
if (e->delete_me) break;
}
}
if (copy) copy = evas_list_free(copy);
if (copy) copy = eina_list_free(copy);
if (e->pointer.inside)
{
Evas_Event_Mouse_In ev;
Evas_Object *obj;
ev.buttons = e->pointer.button;
ev.output.x = e->pointer.x;
@ -357,13 +352,9 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
ev.timestamp = timestamp;
ev.event_flags = EVAS_EVENT_FLAG_NONE;
for (l = ins; l; l = l->next)
EINA_LIST_FOREACH(ins, l, obj)
{
Evas_Object *obj;
obj = l->data;
if (!evas_list_find(e->pointer.object.in, obj))
if (!eina_list_data_find(e->pointer.object.in, obj))
{
obj->mouse_in = 1;
@ -375,10 +366,10 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t
}
else
{
ins = evas_list_free(ins);
ins = eina_list_free(ins);
}
/* free our old list of ins */
e->pointer.object.in = evas_list_free(e->pointer.object.in);
e->pointer.object.in = eina_list_free(e->pointer.object.in);
/* and set up the new one */
e->pointer.object.in = ins;
if (e->pointer.inside)
@ -431,8 +422,9 @@ evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data)
EAPI void
evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestamp, const void *data)
{
Evas_List *l, *copy;
Eina_List *l, *copy;
Evas_Event_Mouse_Wheel ev;
Evas_Object *obj;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
@ -456,15 +448,13 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam
_evas_walk(e);
copy = evas_event_list_copy(e->pointer.object.in);
for (l = copy; l; l = l->next)
EINA_LIST_FOREACH(copy, l, obj)
{
Evas_Object *obj = l->data;
if (e->events_frozen <= 0)
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev);
if (e->delete_me) break;
}
if (copy) copy = evas_list_free(copy);
if (copy) copy = eina_list_free(copy);
_evas_unwalk(e);
}
@ -505,11 +495,12 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
if (e->pointer.mouse_grabbed > 0)
{
/* go thru old list of in objects */
Evas_List *outs = NULL;
Evas_List *l, *copy;
Eina_List *outs = NULL;
Eina_List *l, *copy;
{
Evas_Event_Mouse_Move ev;
Evas_Object *obj;
ev.buttons = e->pointer.button;
ev.cur.output.x = e->pointer.x;
@ -526,11 +517,8 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
ev.timestamp = timestamp;
ev.event_flags = EVAS_EVENT_FLAG_NONE;
copy = evas_event_list_copy(e->pointer.object.in);
for (l = copy; l; l = l->next)
EINA_LIST_FOREACH(copy, l, obj)
{
Evas_Object *obj;
obj = l->data;
if ((obj->cur.visible) &&
(evas_object_clippers_is_visible(obj)) &&
(!evas_event_passes_through(obj)) &&
@ -543,7 +531,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
}
}
else
outs = evas_list_append(outs, obj);
outs = eina_list_append(outs, obj);
if (e->delete_me) break;
}
}
@ -561,16 +549,16 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
ev.timestamp = timestamp;
ev.event_flags = EVAS_EVENT_FLAG_NONE;
if (copy) copy = evas_list_free(copy);
if (copy) copy = eina_list_free(copy);
while (outs)
{
Evas_Object *obj;
obj = outs->data;
outs = evas_list_remove(outs, obj);
outs = eina_list_remove(outs, obj);
if ((!obj->mouse_grabbed) && (!e->delete_me))
{
e->pointer.object.in = evas_list_remove(e->pointer.object.in, obj);
e->pointer.object.in = eina_list_remove(e->pointer.object.in, obj);
{
obj->mouse_in = 0;
if (e->events_frozen <= 0)
@ -582,11 +570,12 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
}
else
{
Evas_List *ins;
Evas_List *l, *copy;
Eina_List *ins;
Eina_List *l, *copy;
Evas_Event_Mouse_Move ev;
Evas_Event_Mouse_Out ev2;
Evas_Event_Mouse_In ev3;
Evas_Object *obj;
ev.buttons = e->pointer.button;
ev.cur.output.x = e->pointer.x;
@ -629,11 +618,8 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
ins = evas_event_objects_event_list(e, NULL, x, y);
/* go thru old list of in objects */
copy = evas_event_list_copy(e->pointer.object.in);
for (l = copy; l; l = l->next)
EINA_LIST_FOREACH(copy, l, obj)
{
Evas_Object *obj;
obj = l->data;
/* if its under the pointer and its visible and its in the new */
/* in list */
// FIXME: i don't think we need this
@ -641,7 +627,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
if (evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
(obj->cur.visible) &&
(evas_object_clippers_is_visible(obj)) &&
(evas_list_find(ins, obj)) &&
(eina_list_data_find(ins, obj)) &&
(!evas_event_passes_through(obj)) &&
(!obj->clip.clipees) &&
((!obj->precise_is_inside) ||
@ -662,15 +648,12 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
}
if (e->delete_me) break;
}
if (copy) copy = evas_list_free(copy);
if (copy) copy = eina_list_free(copy);
/* go thru our current list of ins */
for (l = ins; l; l = l->next)
EINA_LIST_FOREACH(ins, l, obj)
{
Evas_Object *obj;
obj = l->data;
/* if its not in the old list of ins send an enter event */
if (!evas_list_find(e->pointer.object.in, obj))
if (!eina_list_data_find(e->pointer.object.in, obj))
{
obj->mouse_in = 1;
@ -680,7 +663,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
if (e->delete_me) break;
}
/* free our old list of ins */
evas_list_free(e->pointer.object.in);
eina_list_free(e->pointer.object.in);
/* and set up the new one */
e->pointer.object.in = ins;
}
@ -696,9 +679,10 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const
EAPI void
evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
{
Evas_List *ins;
Evas_List *l;
Eina_List *ins;
Eina_List *l;
Evas_Event_Mouse_In ev;
Evas_Object *obj;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
@ -724,13 +708,9 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
_evas_walk(e);
/* get new list of ins */
ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
for (l = ins; l; l = l->next)
EINA_LIST_FOREACH(ins, l, obj)
{
Evas_Object *obj;
obj = l->data;
if (!evas_list_find(e->pointer.object.in, obj))
if (!eina_list_data_find(e->pointer.object.in, obj))
{
obj->mouse_in = 1;
@ -740,7 +720,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
if (e->delete_me) break;
}
/* free our old list of ins */
e->pointer.object.in = evas_list_free(e->pointer.object.in);
e->pointer.object.in = eina_list_free(e->pointer.object.in);
/* and set up the new one */
e->pointer.object.in = ins;
evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data);
@ -782,25 +762,21 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
if (e->pointer.mouse_grabbed == 0)
{
/* go thru old list of in objects */
Evas_List *l, *copy;
Eina_List *l, *copy;
Evas_Object *obj;
copy = evas_event_list_copy(e->pointer.object.in);
for (l = copy; l; l = l->next)
EINA_LIST_FOREACH(copy, l, obj)
{
Evas_Object *obj;
obj->mouse_in = 0;
if (e->events_frozen <= 0)
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
obj = l->data;
{
obj->mouse_in = 0;
if (e->events_frozen <= 0)
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
}
if (e->delete_me) break;
if (e->delete_me) break;
}
if (copy) copy = evas_list_free(copy);
if (copy) copy = eina_list_free(copy);
/* free our old list of ins */
e->pointer.object.in = evas_list_free(e->pointer.object.in);
e->pointer.object.in = eina_list_free(e->pointer.object.in);
}
_evas_unwalk(e);
}
@ -837,14 +813,12 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch
ev.event_flags = EVAS_EVENT_FLAG_NONE;
if (e->grabs)
{
Evas_List *l;
Eina_List *l;
Evas_Key_Grab *g;
e->walking_grabs++;
for (l = e->grabs; l; l= l->next)
EINA_LIST_FOREACH(e->grabs, l, g)
{
Evas_Key_Grab *g;
g = l->data;
if (g->just_added)
{
g->just_added = 0;
@ -869,15 +843,11 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch
{
while (e->delete_grabs > 0)
{
Evas_List *l;
e->delete_grabs--;
for (l = e->grabs; l;)
{
Evas_Key_Grab *g;
g = l->data;
l = l->next;
g = eina_list_data_get(l);
l = eina_list_next(l);
if (g->delete_me)
evas_key_grab_free(g->object, g->keyname, g->modifiers, g->not_modifiers);
}
@ -925,14 +895,12 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
ev.event_flags = EVAS_EVENT_FLAG_NONE;
if (e->grabs)
{
Evas_List *l;
Eina_List *l;
Evas_Key_Grab *g;
e->walking_grabs++;
for (l = e->grabs; l; l= l->next)
EINA_LIST_FOREACH(e->grabs, l, g)
{
Evas_Key_Grab *g;
g = l->data;
if (g->just_added)
{
g->just_added = 0;
@ -963,8 +931,8 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
{
Evas_Key_Grab *g;
g = l->data;
l = l->next;
g = eina_list_data_get(data);
l = eina_list_next(next);
if (g->delete_me)
evas_key_grab_free(g->object, g->keyname, g->modifiers, g->not_modifiers);
}
@ -989,8 +957,9 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char
EAPI void
evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data)
{
Evas_List *l, *copy;
Eina_List *l, *copy;
Evas_Event_Hold ev;
Evas_Object *obj;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
@ -1006,16 +975,13 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data
_evas_walk(e);
copy = evas_event_list_copy(e->pointer.object.in);
for (l = copy; l; l = l->next)
EINA_LIST_FOREACH(copy, l, obj)
{
Evas_Object *obj;
obj = l->data;
if (e->events_frozen <= 0)
evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev);
if (e->delete_me) break;
}
if (copy) copy = evas_list_free(copy);
if (copy) copy = eina_list_free(copy);
_evas_unwalk(e);
}

View File

@ -9,8 +9,8 @@
/* font dir cache */
static Evas_Hash *font_dirs = NULL;
static Evas_List *fonts_cache = NULL;
static Evas_List *fonts_zero = NULL;
static Eina_List *fonts_cache = NULL;
static Eina_List *fonts_zero = NULL;
typedef struct _Fndat Fndat;
@ -64,16 +64,16 @@ evas_font_dir_cache_find(char *dir, char *font)
return NULL;
}
static Evas_List *
static Eina_List *
evas_font_set_get(const char *name)
{
Evas_List *fonts = NULL;
Eina_List *fonts = NULL;
char *p;
p = strchr(name, ',');
if (!p)
{
fonts = evas_list_append(fonts, eina_stringshare_add(name));
fonts = eina_list_append(fonts, eina_stringshare_add(name));
}
else
{
@ -86,10 +86,10 @@ evas_font_set_get(const char *name)
nm = alloca(p - pp + 1);
strncpy(nm, pp, p - pp);
nm[p - pp] = 0;
fonts = evas_list_append(fonts, eina_stringshare_add(nm));
fonts = eina_list_append(fonts, eina_stringshare_add(nm));
pp = p + 1;
p = strchr(pp, ',');
if (!p) fonts = evas_list_append(fonts, eina_stringshare_add(pp));
if (!p) fonts = eina_list_append(fonts, eina_stringshare_add(pp));
}
}
return fonts;
@ -98,32 +98,30 @@ evas_font_set_get(const char *name)
void
evas_font_free(Evas *evas, void *font)
{
Evas_List *l;
Eina_List *l;
Fndat *fd;
for (l = fonts_cache; l; l = l->next)
EINA_LIST_FOREACH(fonts_cache, l, fd)
{
Fndat *fd;
fd = l->data;
if (fd->font == font)
{
fd->ref--;
if (fd->ref == 0)
{
fonts_cache = evas_list_remove_list(fonts_cache, l);
fonts_zero = evas_list_append(fonts_zero, fd);
fonts_cache = eina_list_remove_list(fonts_cache, l);
fonts_zero = eina_list_append(fonts_zero, fd);
}
break;
}
}
while ((fonts_zero) &&
(evas_list_count(fonts_zero) > 4)) /* 4 is arbitrary */
(eina_list_count(fonts_zero) > 4)) /* 4 is arbitrary */
{
Fndat *fd;
fd = evas_list_data(fonts_zero);
fd = eina_list_data_get(fonts_zero);
if (fd->ref != 0) break;
fonts_zero = evas_list_remove_list(fonts_zero, fonts_zero);
fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
if (fd->name) eina_stringshare_del(fd->name);
if (fd->source) eina_stringshare_del(fd->source);
evas->engine.func->font_free(evas->engine.data.output, fd->font);
@ -135,15 +133,15 @@ void *
evas_font_load(Evas *evas, const char *name, const char *source, int size)
{
void *font = NULL;
Evas_List *fonts, *l;
Eina_List *fonts, *l;
Fndat *fd;
char *nm;
if (!name) return NULL;
if (name[0] == 0) return NULL;
for (l = fonts_cache; l; l = l->next)
EINA_LIST_FOREACH(fonts_cache, l, fd)
{
fd = l->data;
if (!strcmp(name, fd->name))
{
if (((!source) && (!fd->source)) ||
@ -151,7 +149,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
{
if (size == fd->size)
{
fonts_cache = evas_list_promote_list(fonts_cache, l);
fonts_cache = eina_list_promote_list(fonts_cache, l);
fd->ref++;
return fd->font;
}
@ -159,9 +157,8 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
}
}
for (l = fonts_zero; l; l = l->next)
EINA_LIST_FOREACH(fonts_zero, l, fd)
{
fd = l->data;
if (!strcmp(name, fd->name))
{
if (((!source) && (!fd->source)) ||
@ -169,8 +166,8 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
{
if (size == fd->size)
{
fonts_zero = evas_list_remove_list(fonts_zero, l);
fonts_cache = evas_list_prepend(fonts_cache, fd);
fonts_zero = eina_list_remove_list(fonts_zero, l);
fonts_cache = eina_list_prepend(fonts_cache, fd);
fd->ref++;
return fd->font;
}
@ -178,11 +175,8 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
}
}
fonts = evas_font_set_get(name);
for (l = fonts; l; l = l->next) /* Load each font in append */
EINA_LIST_FOREACH(fonts, l, nm) /* Load each font in append */
{
char *nm;
nm = l->data;
if ((l == fonts) || (!font)) /* First iteration OR no font */
{
#ifdef BUILD_FONT_LOADER_EET
@ -223,13 +217,14 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
font = evas->engine.func->font_load(evas->engine.data.output, (char *)nm, size);
else /* search font path */
{
Evas_List *l;
Eina_List *l;
char *dir;
for (l = evas->font_path; l; l = l->next)
EINA_LIST_FOREACH(evas->font_path, l, dir)
{
const char *f_file;
f_file = evas_font_dir_cache_find(l->data, (char *)nm);
f_file = evas_font_dir_cache_find(dir, (char *)nm);
if (f_file)
{
font = evas->engine.func->font_load(evas->engine.data.output, f_file, size);
@ -285,13 +280,14 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size);
else
{
Evas_List *l;
Eina_List *l;
char *dir;
for (l = evas->font_path; l; l = l->next)
EINA_LIST_FOREACH(evas->font_path, l, dir)
{
const char *f_file;
f_file = evas_font_dir_cache_find(l->data, (char *)nm);
f_file = evas_font_dir_cache_find(dir, (char *)nm);
if (f_file)
{
if (evas->engine.func->font_add(evas->engine.data.output, font, f_file, size))
@ -305,7 +301,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
}
eina_stringshare_del(nm);
}
evas_list_free(fonts);
eina_list_free(fonts);
#ifdef HAVE_FONTCONFIG
@ -355,7 +351,7 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
fd->size = size;
fd->font = font;
fd->ref = 1;
fonts_cache = evas_list_prepend(fonts_cache, fd);
fonts_cache = eina_list_prepend(fonts_cache, fd);
}
if (font)
@ -371,12 +367,12 @@ evas_font_load_hinting_set(Evas *evas, void *font, int hinting)
hinting);
}
Evas_List *
Eina_List *
evas_font_dir_available_list(const Evas *evas)
{
Evas_List *l;
Evas_List *ll;
Evas_List *available = NULL;
Eina_List *l;
Eina_List *ll;
Eina_List *available = NULL;
#ifdef HAVE_FONTCONFIG
/* Add font config fonts */
@ -384,6 +380,7 @@ evas_font_dir_available_list(const Evas *evas)
FcFontSet *set = NULL;
FcObjectSet *os;
int i;
char *dir;
p = FcPatternCreate();
os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL);
@ -400,7 +397,7 @@ evas_font_dir_available_list(const Evas *evas)
char *font;
font = (char *)FcNameUnparse(set->fonts[i]);
available = evas_list_append(available, eina_stringshare_add(font));
available = eina_list_append(available, eina_stringshare_add(font));
free(font);
}
@ -412,21 +409,18 @@ evas_font_dir_available_list(const Evas *evas)
if (!evas->font_path)
return available;
for (l = evas->font_path; l; l = l->next)
EINA_LIST_FOREACH(evas->font_path, l, dir)
{
Evas_Font_Dir *fd;
fd = evas_hash_find(font_dirs, (char *)l->data);
fd = object_text_font_cache_dir_update((char *)l->data, fd);
fd = evas_hash_find(font_dirs, dir);
fd = object_text_font_cache_dir_update(dir, fd);
if (fd && fd->aliases)
{
for (ll = fd->aliases; ll; ll = ll->next)
{
Evas_Font_Alias *fa;
Evas_Font_Alias *fa;
fa = ll->data;
available = evas_list_append(available, eina_stringshare_add((char *)fa->alias));
}
EINA_LIST_FOREACH(fd->aliases, ll, fa)
available = eina_list_append(available, eina_stringshare_add((char *)fa->alias));
}
}
@ -434,12 +428,12 @@ evas_font_dir_available_list(const Evas *evas)
}
void
evas_font_dir_available_list_free(Evas_List *available)
evas_font_dir_available_list_free(Eina_List *available)
{
while (available)
{
eina_stringshare_del(available->data);
available = evas_list_remove(available, available->data);
available = eina_list_remove(available, available->data);
}
}
@ -502,17 +496,15 @@ object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd)
static Evas_Font *
object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font)
{
Evas_List *l;
Eina_List *l;
char font_prop[14][256];
int num;
Evas_Font *fn;
num = evas_object_text_font_string_parse(font, font_prop);
if (num != 14) return NULL;
for (l = fd->fonts; l; l = l->next)
EINA_LIST_FOREACH(fd->fonts, l, fn)
{
Evas_Font *fn;
fn = l->data;
if (fn->type == 1)
{
int i;
@ -537,13 +529,11 @@ object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font)
static Evas_Font *
object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font)
{
Evas_List *l;
Eina_List *l;
Evas_Font *fn;
for (l = fd->fonts; l; l = l->next)
EINA_LIST_FOREACH(fd->fonts, l, fn)
{
Evas_Font *fn;
fn = l->data;
if (fn->type == 0)
{
if (!strcasecmp(font, fn->simple.name)) return fn;
@ -555,15 +545,11 @@ object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font)
static Evas_Font *
object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font)
{
Evas_List *l;
Eina_List *l;
Evas_Font_Alias *fa;
for (l = fd->aliases; l; l = l->next)
{
Evas_Font_Alias *fa;
fa = l->data;
if (!strcasecmp(fa->alias, font)) return fa->fn;
}
EINA_LIST_FOREACH(fd->aliases, l, fa)
if (!strcasecmp(fa->alias, font)) return fa->fn;
return NULL;
}
@ -587,7 +573,7 @@ object_text_font_cache_dir_add(char *dir)
{
Evas_Font_Dir *fd;
char *tmp, *tmp2;
Evas_List *fdir;
Eina_List *fdir;
fd = calloc(1, sizeof(Evas_Font_Dir));
if (!fd) return NULL;
@ -634,7 +620,7 @@ object_text_font_cache_dir_add(char *dir)
fn->path = eina_stringshare_add(tmp2);
free(tmp2);
}
fd->fonts = evas_list_append(fd->fonts, fn);
fd->fonts = eina_list_append(fd->fonts, fn);
}
}
}
@ -670,12 +656,12 @@ object_text_font_cache_dir_add(char *dir)
fn->path = eina_stringshare_add(tmp2);
free(tmp2);
}
fd->fonts = evas_list_append(fd->fonts, fn);
fd->fonts = eina_list_append(fd->fonts, fn);
}
free(tmp);
}
free(fdir->data);
fdir = evas_list_remove(fdir, fdir->data);
fdir = eina_list_remove(fdir, fdir->data);
}
/* fonts.alias */
@ -707,7 +693,7 @@ object_text_font_cache_dir_add(char *dir)
free(fa);
}
else
fd->aliases = evas_list_append(fd->aliases, fa);
fd->aliases = eina_list_append(fd->aliases, fa);
}
}
fclose(f);
@ -742,7 +728,7 @@ object_text_font_cache_dir_del(char *dir, Evas_Font_Dir *fd)
int i;
fn = fd->fonts->data;
fd->fonts = evas_list_remove(fd->fonts, fn);
fd->fonts = eina_list_remove(fd->fonts, fn);
for (i = 0; i < 14; i++)
{
if (fn->x.prop[i]) eina_stringshare_del(fn->x.prop[i]);
@ -756,7 +742,7 @@ object_text_font_cache_dir_del(char *dir, Evas_Font_Dir *fd)
Evas_Font_Alias *fa;
fa = fd->aliases->data;
fd->aliases = evas_list_remove(fd->aliases, fa);
fd->aliases = eina_list_remove(fd->aliases, fa);
if (fa->alias) eina_stringshare_del(fa->alias);
free(fa);
}

View File

@ -39,13 +39,13 @@ evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modi
return NULL;
}
}
g->object->grabs = evas_list_append(g->object->grabs, g);
if (evas_list_alloc_error())
g->object->grabs = eina_list_append(g->object->grabs, g);
if (eina_error_get())
{
MERR_BAD();
evas_mem_free(sizeof(Evas_List));
g->object->grabs = evas_list_append(g->object->grabs, g);
if (evas_list_alloc_error())
evas_mem_free(sizeof(Eina_List));
g->object->grabs = eina_list_append(g->object->grabs, g);
if (eina_error_get())
{
MERR_FATAL();
free(g);
@ -53,16 +53,16 @@ evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modi
return NULL;
}
}
obj->layer->evas->grabs = evas_list_append(obj->layer->evas->grabs, g);
if (evas_list_alloc_error())
obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g);
if (eina_error_get())
{
MERR_BAD();
evas_mem_free(sizeof(Evas_List));
obj->layer->evas->grabs = evas_list_append(obj->layer->evas->grabs, g);
if (evas_list_alloc_error())
evas_mem_free(sizeof(Eina_List));
obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g);
if (eina_error_get())
{
MERR_FATAL();
g->object->grabs = evas_list_remove(g->object->grabs, g);
g->object->grabs = eina_list_remove(g->object->grabs, g);
free(g);
free(g->keyname);
return NULL;
@ -75,13 +75,11 @@ static Evas_Key_Grab *
evas_key_grab_find(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, int exclusive)
{
/* MEM OK */
Evas_List *l;
Eina_List *l;
Evas_Key_Grab *g;
for (l = obj->layer->evas->grabs; l; l = l->next)
EINA_LIST_FOREACH(obj->layer->evas->grabs, l, g)
{
Evas_Key_Grab *g;
g = l->data;
if ((g->modifiers == modifiers) &&
(g->not_modifiers == not_modifiers) &&
(!strcmp(g->keyname, keyname)))
@ -99,15 +97,11 @@ evas_object_grabs_cleanup(Evas_Object *obj)
{
if (obj->layer->evas->walking_grabs)
{
Evas_List *l;
Eina_List *l;
Evas_Key_Grab *g;
for (l = obj->grabs; l; l = l->next)
{
Evas_Key_Grab *g;
g = l->data;
g->delete_me = 1;
}
EINA_LIST_FOREACH(obj->grabs, l, g)
g->delete_me = 1;
}
else
{
@ -118,8 +112,8 @@ evas_object_grabs_cleanup(Evas_Object *obj)
g = obj->grabs->data;
if (g->keyname) free(g->keyname);
free(g);
obj->layer->evas->grabs = evas_list_remove(obj->layer->evas->grabs, g);
obj->grabs = evas_list_remove(obj->grabs, g);
obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g);
obj->grabs = eina_list_remove(obj->grabs, g);
}
}
}
@ -132,8 +126,8 @@ evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask mod
g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0);
if (!g) return;
g->object->grabs = evas_list_remove(g->object->grabs, g);
obj->layer->evas->grabs = evas_list_remove(obj->layer->evas->grabs, g);
g->object->grabs = eina_list_remove(g->object->grabs, g);
obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g);
if (g->keyname) free(g->keyname);
free(g);
}

View File

@ -162,7 +162,7 @@ evas_object_layer_set(Evas_Object *obj, short l)
obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1) &&
obj->cur.visible)
if (evas_list_find(obj->layer->evas->pointer.object.in, obj))
if (eina_list_data_find(obj->layer->evas->pointer.object.in, obj))
evas_event_feed_mouse_move(obj->layer->evas,
obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y,

View File

@ -1,7 +1,7 @@
#include "evas_common.h"
#include "evas_private.h"
extern Evas_List *evas_modules;
extern Eina_List *evas_modules;
static int initcount = 0;
EAPI int
@ -139,19 +139,19 @@ evas_free(Evas *e)
e->walking_list--;
evas_font_path_clear(e);
e->pointer.object.in = evas_list_free(e->pointer.object.in);
e->pointer.object.in = eina_list_free(e->pointer.object.in);
if (e->name_hash) evas_hash_free(e->name_hash);
while (e->damages)
{
free(e->damages->data);
e->damages = evas_list_remove(e->damages, e->damages->data);
e->damages = eina_list_remove(e->damages, e->damages->data);
}
while (e->obscures)
{
free(e->obscures->data);
e->obscures = evas_list_remove(e->obscures, e->obscures->data);
e->obscures = eina_list_remove(e->obscures, e->obscures->data);
}
if (e->engine.func)
@ -225,7 +225,9 @@ evas_free(Evas *e)
EAPI void
evas_output_method_set(Evas *e, int render_method)
{
Evas_List *l;
Eina_List *l;
Evas_Module *em;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
@ -235,12 +237,10 @@ evas_output_method_set(Evas *e, int render_method)
/* if the engine is already set up - abort */
if (e->output.render_method != RENDER_METHOD_INVALID) return;
/* iterate trough the list to find the id */
for (l = evas_modules; l; l = l->next)
EINA_LIST_FOREACH(evas_modules, l, em)
{
Evas_Module *em;
Evas_Module_Engine *eme;
em = l->data;
if (em->type != EVAS_MODULE_TYPE_ENGINE) continue;
if (!em->data) continue;
eme = (Evas_Module_Engine *)em->data;
@ -700,7 +700,8 @@ evas_render_method_lookup(const char *name)
*
* Example:
* @code
* Evas_List *engine_list, *l;
* Eina_List *engine_list, *l;
* char *engine_name;
*
* engine_list = evas_render_method_list();
* if (!engine_list)
@ -709,75 +710,70 @@ evas_render_method_lookup(const char *name)
* exit(-1);
* }
* printf("Availible Evas Engines:\n");
* for (l = engine_list; l; l = l->next)
* {
* char *engine_name;
*
* engine_name = l->data;
* EINA_LIST_FOREACH(engine_list, l, engine_name)
* printf("%s\n", engine_name);
* }
* evas_render_method_list_free(engine_list);
* @endcode
*/
EAPI Evas_List *
EAPI Eina_List *
evas_render_method_list(void)
{
Evas_List *methods = NULL;
Eina_List *methods = NULL;
/* FIXME: get from modules - this is currently coded-in */
#ifdef BUILD_ENGINE_SOFTWARE_DDRAW
methods = evas_list_append(methods, strdup("software_ddraw"));
methods = eina_list_append(methods, strdup("software_ddraw"));
#endif
#ifdef BUILD_ENGINE_SOFTWARE_16_DDRAW
methods = evas_list_append(methods, strdup("software_16_ddraw"));
methods = eina_list_append(methods, strdup("software_16_ddraw"));
#endif
#ifdef BUILD_ENGINE_DIRECT3D
methods = evas_list_append(methods, strdup("direct3d"));
methods = eina_list_append(methods, strdup("direct3d"));
#endif
#ifdef BUILD_ENGINE_SOFTWARE_16_WINCE
methods = evas_list_append(methods, strdup("software_16_wince"));
methods = eina_list_append(methods, strdup("software_16_wince"));
#endif
#ifdef BUILD_ENGINE_SOFTWARE_X11
methods = evas_list_append(methods, strdup("software_x11"));
methods = eina_list_append(methods, strdup("software_x11"));
#endif
#ifdef BUILD_ENGINE_XRENDER_X11
methods = evas_list_append(methods, strdup("xrender_x11"));
methods = eina_list_append(methods, strdup("xrender_x11"));
#endif
#ifdef BUILD_ENGINE_SOFTWARE_XCB
methods = evas_list_append(methods, strdup("software_xcb"));
methods = eina_list_append(methods, strdup("software_xcb"));
#endif
#ifdef BUILD_ENGINE_XRENDER_XCB
methods = evas_list_append(methods, strdup("xrender_xcb"));
methods = eina_list_append(methods, strdup("xrender_xcb"));
#endif
#ifdef BUILD_ENGINE_SOFTWARE_16_X11
methods = evas_list_append(methods, strdup("software_16_x11"));
methods = eina_list_append(methods, strdup("software_16_x11"));
#endif
#ifdef BUILD_ENGINE_GL_X11
methods = evas_list_append(methods, strdup("gl_x11"));
methods = eina_list_append(methods, strdup("gl_x11"));
#endif
#ifdef BUILD_ENGINE_GL_GLEW
methods = evas_list_append(methods, strdup("gl_glew"));
methods = eina_list_append(methods, strdup("gl_glew"));
#endif
#ifdef BUILD_ENGINE_CAIRO_X11
methods = evas_list_append(methods, strdup("cairo_x11"));
methods = eina_list_append(methods, strdup("cairo_x11"));
#endif
#ifdef BUILD_ENGINE_DIRECTFB
methods = evas_list_append(methods, strdup("directfb"));
methods = eina_list_append(methods, strdup("directfb"));
#endif
#ifdef BUILD_ENGINE_FB
methods = evas_list_append(methods, strdup("fb"));
methods = eina_list_append(methods, strdup("fb"));
#endif
#ifdef BUILD_ENGINE_BUFFER
methods = evas_list_append(methods, strdup("buffer"));
methods = eina_list_append(methods, strdup("buffer"));
#endif
#ifdef BUILD_ENGINE_SOFTWARE_WIN32_GDI
methods = evas_list_append(methods, strdup("software_win32_gdi"));
methods = eina_list_append(methods, strdup("software_win32_gdi"));
#endif
#ifdef BUILD_ENGINE_SOFTWARE_QTOPIA
methods = evas_list_append(methods, strdup("software_qtopia"));
methods = eina_list_append(methods, strdup("software_qtopia"));
#endif
#ifdef BUILD_ENGINE_SDL
methods = evas_list_append(methods, strdup("software_sdl"));
methods = eina_list_append(methods, strdup("software_sdl"));
#endif
return methods;
@ -786,7 +782,7 @@ evas_render_method_list(void)
/**
* This function should be called to free a list of engine names
*
* @param list The Evas_List base pointer for the engine list to be freed
* @param list The Eina_List base pointer for the engine list to be freed
* @ingroup Evas_Output_Method
*
* When this function is called it will free the engine list passed in as
@ -795,7 +791,8 @@ evas_render_method_list(void)
*
* Example:
* @code
* Evas_List *engine_list, *l;
* Eina_List *engine_list, *l;
* char *engine_name;
*
* engine_list = evas_render_method_list();
* if (!engine_list)
@ -804,23 +801,18 @@ evas_render_method_list(void)
* exit(-1);
* }
* printf("Availible Evas Engines:\n");
* for (l = engine_list; l; l = l->next)
* {
* char *engine_name;
*
* engine_name = l->data;
* EINA_LIST_FOREACH(engine_list, l, engine_name)
* printf("%s\n", engine_name);
* }
* evas_render_method_list_free(engine_list);
* @endcode
*/
EAPI void
evas_render_method_list_free(Evas_List *list)
evas_render_method_list_free(Eina_List *list)
{
while (list)
{
free(list->data);
list = evas_list_remove(list, list->data);
list = eina_list_remove(list, list->data);
}
}

View File

@ -1058,7 +1058,7 @@ evas_object_gradient_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -407,7 +407,7 @@ evas_object_gradient2_linear_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -406,7 +406,7 @@ evas_object_gradient2_radial_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -40,7 +40,7 @@ struct _Evas_Object_Image
int pixels_checked_out;
int load_error;
Evas_List *pixel_updates;
Eina_List *pixel_updates;
struct {
unsigned char scale_down_by;
@ -1116,7 +1116,7 @@ evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h)
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur.image.w, o->cur.image.h);
if ((w <= 0) || (h <= 0)) return;
NEW_RECT(r, x, y, w, h);
if (r) o->pixel_updates = evas_list_append(o->pixel_updates, r);
if (r) o->pixel_updates = eina_list_append(o->pixel_updates, r);
o->changed = 1;
evas_object_change(obj);
}
@ -2044,7 +2044,7 @@ evas_object_image_free(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)o->pixel_updates->data;
o->pixel_updates = evas_list_remove(o->pixel_updates, r);
o->pixel_updates = eina_list_remove(o->pixel_updates, r);
free(r);
}
free(o);
@ -2395,7 +2395,7 @@ evas_object_image_render_pre(Evas_Object *obj)
int x, y, w, h;
rr = o->pixel_updates->data;
o->pixel_updates = evas_list_remove(o->pixel_updates, rr);
o->pixel_updates = eina_list_remove(o->pixel_updates, rr);
obj->layer->evas->engine.func->image_dirty_region(obj->layer->evas->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h);
idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw);
@ -2444,7 +2444,7 @@ evas_object_image_render_pre(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)o->pixel_updates->data;
o->pixel_updates = evas_list_remove(o->pixel_updates, r);
o->pixel_updates = eina_list_remove(o->pixel_updates, r);
free(r);
}
obj->layer->evas->engine.func->image_dirty_region(obj->layer->evas->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h);
@ -2482,7 +2482,7 @@ evas_object_image_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
while (o->pixel_updates)
@ -2490,7 +2490,7 @@ evas_object_image_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)o->pixel_updates->data;
o->pixel_updates = evas_list_remove(o->pixel_updates, r);
o->pixel_updates = eina_list_remove(o->pixel_updates, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -401,7 +401,7 @@ evas_object_line_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -49,13 +49,13 @@ evas_object_free(Evas_Object *obj, int clean_layer)
obj->func->free(obj);
if (!was_smart_child) evas_object_release(obj, clean_layer);
if (obj->clip.clipees)
evas_list_free(obj->clip.clipees);
eina_list_free(obj->clip.clipees);
while (obj->clip.changes)
{
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
evas_object_event_callback_all_del(obj);
@ -65,7 +65,7 @@ evas_object_free(Evas_Object *obj, int clean_layer)
Evas_Data_Node *node;
node = obj->data.elements->data;
obj->data.elements = evas_list_remove(obj->data.elements, node);
obj->data.elements = eina_list_remove(obj->data.elements, node);
free(node);
}
obj->magic = 0;
@ -76,14 +76,15 @@ evas_object_free(Evas_Object *obj, int clean_layer)
void
evas_object_change(Evas_Object *obj)
{
Evas_List *l;
Eina_List *l;
Evas_Object *data;
obj->layer->evas->changed = 1;
if (obj->changed) return;
evas_render_object_recalc(obj);
/* set changed flag on all objects this one clips too */
for (l = obj->clip.clipees; l; l = l->next)
evas_object_change((Evas_Object *)l->data);
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
evas_object_change(data);
if (obj->smart.parent) evas_object_change(obj->smart.parent);
}
@ -190,7 +191,7 @@ evas_object_render_pre_effect_updates(Evas_Rectangles *rects, Evas_Object *obj,
{
Evas_Rectangle *r;
Evas_Object *clipper;
Evas_List *l;
Eina_List *l;
unsigned int i;
int x, y, w, h;
@ -234,9 +235,8 @@ evas_object_render_pre_effect_updates(Evas_Rectangles *rects, Evas_Object *obj,
clipper = obj->cur.clipper;
while (clipper)
{
for (l = clipper->clip.changes; l; l = l->next)
EINA_LIST_FOREACH(clipper->clip.changes, l, r)
{
r = (Evas_Rectangle *)(l->data);
/* get updates and clip to current clip */
x = r->x; y = r->y; w = r->w; h = r->h;
RECTS_CLIP_TO_RECT(x, y, w, h,
@ -267,7 +267,7 @@ evas_object_render_pre_effect_updates(Evas_Rectangles *rects, Evas_Object *obj,
while (obj->clip.changes)
{
free(obj->clip.changes->data);
obj->clip.changes = evas_list_remove(obj->clip.changes, obj->clip.changes->data);
obj->clip.changes = eina_list_remove(obj->clip.changes, obj->clip.changes->data);
}
for (i = 0; i < rects->count; ++i)
{
@ -275,7 +275,7 @@ evas_object_render_pre_effect_updates(Evas_Rectangles *rects, Evas_Object *obj,
if (!r) goto end;
*r = rects->array[i];
obj->clip.changes = evas_list_append(obj->clip.changes, r);
obj->clip.changes = eina_list_append(obj->clip.changes, r);
}
}
@ -1101,7 +1101,7 @@ evas_object_hide(Evas_Object *obj)
{
if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
{
obj->layer->evas->pointer.object.in = evas_list_remove(obj->layer->evas->pointer.object.in, obj);
obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
}
obj->mouse_grabbed = 0;
if (obj->layer->evas->events_frozen > 0)
@ -1131,7 +1131,7 @@ evas_object_hide(Evas_Object *obj)
else
{
if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
obj->layer->evas->pointer.object.in = evas_list_remove(obj->layer->evas->pointer.object.in, obj);
obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
obj->mouse_grabbed = 0;
obj->mouse_in = 0;
}
@ -1493,10 +1493,10 @@ evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas
* FIXME: To be fixed.
* @ingroup Evas_Object_Finders
*/
EAPI Evas_List *
EAPI Eina_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;
Eina_List *in = NULL;
Evas_Layer *lay;
int xx, yy;
@ -1519,7 +1519,7 @@ evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool incl
evas_object_clip_recalc(obj);
if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
(!obj->clip.clipees))
in = evas_list_prepend(in, obj);
in = eina_list_prepend(in, obj);
}
}
return in;
@ -1531,10 +1531,10 @@ evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool incl
* FIXME: To be fixed.
* @ingroup Evas_Object_Finders
*/
EAPI Evas_List *
EAPI Eina_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;
Eina_List *in = NULL;
Evas_Layer *lay;
int xx, yy, ww, hh;
@ -1563,7 +1563,7 @@ evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Co
evas_object_clip_recalc(obj);
if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
(!obj->clip.clipees))
in = evas_list_prepend(in, obj);
in = eina_list_prepend(in, obj);
}
}
return in;

View File

@ -11,7 +11,7 @@ typedef struct _Evas_Polygon_Point Evas_Polygon_Point;
struct _Evas_Object_Polygon
{
DATA32 magic;
Evas_List *points;
Eina_List *points;
void *engine_data;
@ -147,7 +147,7 @@ evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
obj->cur.geometry.w = max_x - min_x + 2.0;
obj->cur.geometry.h = max_y - min_y + 2.0;
}
o->points = evas_list_append(o->points, p);
o->points = eina_list_append(o->points, p);
//// obj->cur.cache.geometry.validity = 0;
o->changed = 1;
@ -196,7 +196,7 @@ evas_object_polygon_points_clear(Evas_Object *obj)
while (o->points)
{
free(o->points->data);
o->points = evas_list_remove(o->points, o->points->data);
o->points = eina_list_remove(o->points, o->points->data);
}
obj->cur.geometry.w = 0;
obj->cur.geometry.h = 0;
@ -269,7 +269,7 @@ evas_object_polygon_free(Evas_Object *obj)
while (o->points)
{
free(o->points->data);
o->points = evas_list_remove(o->points, o->points->data);
o->points = eina_list_remove(o->points, o->points->data);
}
o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
obj->layer->evas->engine.data.context,
@ -282,7 +282,8 @@ static void
evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
{
Evas_Object_Polygon *o;
Evas_List *l;
Eina_List *l;
Evas_Polygon_Point *p;
/* render object to surface with context, and offxet by x,y */
o = (Evas_Object_Polygon *)(obj->object_data);
@ -299,13 +300,9 @@ evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *
o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
obj->layer->evas->engine.data.context,
o->engine_data);
for (l = o->points; l; l = l->next)
EINA_LIST_FOREACH(o->points, l, p)
{
Evas_Polygon_Point *p;
//int px, py;
p = l->data;
//px = evas_coord_world_x_to_screen(obj->layer->evas, p->x);
//py = evas_coord_world_y_to_screen(obj->layer->evas, p->y);
o->engine_data = obj->layer->evas->engine.func->polygon_point_add(obj->layer->evas->engine.data.output,
@ -408,7 +405,7 @@ evas_object_polygon_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -283,7 +283,7 @@ evas_object_rectangle_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -9,7 +9,7 @@ struct _Evas_Object_Smart
DATA32 magic;
void *engine_data;
void *data;
Evas_List *callbacks;
Eina_List *callbacks;
Eina_Inlist *contained;
int walking_list;
Evas_Bool deletions_waiting : 1;
@ -249,13 +249,13 @@ evas_object_smart_parent_get(const Evas_Object *obj)
* Gets the list of the member objects of an Evas_Object
* @param obj the Evas_Object you want to get the list of member objects
* @return Returns the list of the member objects of @a obj.
* The returned list should be freed with evas_list_free() when you no longer need it
* The returned list should be freed with eina_list_free() when you no longer need it
*/
EAPI Evas_List *
EAPI Eina_List *
evas_object_smart_members_get(const Evas_Object *obj)
{
Evas_Object_Smart *o;
Evas_List *members;
Eina_List *members;
Eina_Inlist *member;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
@ -268,7 +268,7 @@ evas_object_smart_members_get(const Evas_Object *obj)
members = NULL;
for (member = o->contained; member; member = member->next)
members = evas_list_append(members, member);
members = eina_list_append(members, member);
return members;
}
@ -344,7 +344,7 @@ evas_object_smart_callback_add(Evas_Object *obj, const char *event, void (*func)
cb->event = eina_stringshare_add(event);
cb->func = func;
cb->func_data = (void *)data;
o->callbacks = evas_list_prepend(o->callbacks, cb);
o->callbacks = eina_list_prepend(o->callbacks, cb);
}
/**
@ -362,7 +362,8 @@ EAPI void *
evas_object_smart_callback_del(Evas_Object *obj, const char *event, void (*func) (void *data, Evas_Object *obj, void *event_info))
{
Evas_Object_Smart *o;
Evas_List *l;
Eina_List *l;
Evas_Smart_Callback *cb;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
@ -372,11 +373,8 @@ evas_object_smart_callback_del(Evas_Object *obj, const char *event, void (*func)
return NULL;
MAGIC_CHECK_END();
if (!event) return NULL;
for (l = o->callbacks; l; l = l->next)
EINA_LIST_FOREACH(o->callbacks, l, cb)
{
Evas_Smart_Callback *cb;
cb = l->data;
if ((!strcmp(cb->event, event)) && (cb->func == func))
{
void *data;
@ -408,7 +406,8 @@ EAPI void
evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info)
{
Evas_Object_Smart *o;
Evas_List *l;
Eina_List *l;
Evas_Smart_Callback *cb;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return;
@ -420,11 +419,8 @@ evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event
if (!event) return;
if (obj->delete_me) return;
o->walking_list++;
for (l = o->callbacks; l; l = l->next)
EINA_LIST_FOREACH(o->callbacks, l, cb)
{
Evas_Smart_Callback *cb;
cb = l->data;
if (!cb->delete_me)
{
if (!strcmp(cb->event, event))
@ -599,7 +595,8 @@ static void
evas_object_smart_callbacks_clear(Evas_Object *obj)
{
Evas_Object_Smart *o;
Evas_List *l;
Eina_List *l;
Evas_Smart_Callback *cb;
o = (Evas_Object_Smart *)(obj->object_data);
@ -607,13 +604,11 @@ evas_object_smart_callbacks_clear(Evas_Object *obj)
if (!o->deletions_waiting) return;
for (l = o->callbacks; l;)
{
Evas_Smart_Callback *cb;
cb = l->data;
l = l->next;
cb = eina_list_data_get(l);
l = eina_list_next(l);
if (cb->delete_me)
{
o->callbacks = evas_list_remove(o->callbacks, cb);
o->callbacks = eina_list_remove(o->callbacks, cb);
if (cb->event) eina_stringshare_del(cb->event);
free(cb);
}
@ -651,7 +646,7 @@ evas_object_smart_cleanup(Evas_Object *obj)
Evas_Smart_Callback *cb;
cb = o->callbacks->data;
o->callbacks = evas_list_remove(o->callbacks, cb);
o->callbacks = eina_list_remove(o->callbacks, cb);
if (cb->event) eina_stringshare_del(cb->event);
free(cb);
}

View File

@ -20,23 +20,22 @@
EAPI void
evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
{
Evas_List *lst, *itr;
Eina_List *lst, *itr;
Evas_Object *child;
if ((dx == 0) && (dy == 0))
return;
lst = evas_object_smart_members_get(obj);
for (itr = lst; itr != NULL; itr = itr->next)
EINA_LIST_FOREACH(lst, itr, child)
{
Evas_Object *child;
Evas_Coord orig_x, orig_y;
child = itr->data;
evas_object_geometry_get(child, &orig_x, &orig_y, NULL, NULL);
evas_object_move(child, orig_x + dx, orig_y + dy);
}
evas_list_free(lst);
eina_list_free(lst);
}
/**
@ -82,12 +81,13 @@ static void
evas_object_smart_clipped_smart_del(Evas_Object *obj)
{
CSO_DATA_GET_OR_RETURN(obj, cso);
Evas_List *lst, *itr;
Eina_List *lst, *itr;
Evas_Object *data;
lst = evas_object_smart_members_get(obj);
for (itr = lst; itr != NULL; itr = itr->next)
evas_object_del(itr->data);
evas_list_free(lst);
EINA_LIST_FOREACH(lst, itr, data)
evas_object_del(data);
eina_list_free(lst);
free(cso);
evas_object_smart_data_set(obj, NULL);

View File

@ -960,7 +960,7 @@ evas_font_path_clear(Evas *e)
while (e->font_path)
{
eina_stringshare_del(e->font_path->data);
e->font_path = evas_list_remove(e->font_path, e->font_path->data);
e->font_path = eina_list_remove(e->font_path, e->font_path->data);
}
}
@ -978,7 +978,7 @@ evas_font_path_append(Evas *e, const char *path)
MAGIC_CHECK_END();
if (!path) return;
e->font_path = evas_list_append(e->font_path, eina_stringshare_add(path));
e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path));
}
/**
@ -995,7 +995,7 @@ evas_font_path_prepend(Evas *e, const char *path)
MAGIC_CHECK_END();
if (!path) return;
e->font_path = evas_list_prepend(e->font_path, eina_stringshare_add(path));
e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path));
}
/**
@ -1004,7 +1004,7 @@ evas_font_path_prepend(Evas *e, const char *path)
* @return The list of font paths used.
* @ingroup Evas_Font_Path_Group
*/
EAPI const Evas_List *
EAPI const Eina_List *
evas_font_path_list(const Evas *e)
{
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
@ -1129,7 +1129,7 @@ evas_font_cache_get(const Evas *e)
* FIXME: To be fixed.
*
*/
EAPI Evas_List *
EAPI Eina_List *
evas_font_available_list(const Evas *e)
{
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
@ -1146,7 +1146,7 @@ evas_font_available_list(const Evas *e)
*
*/
EAPI void
evas_font_available_list_free(Evas *e, Evas_List *available)
evas_font_available_list_free(Evas *e, Eina_List *available)
{
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
@ -1656,7 +1656,7 @@ evas_object_text_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -102,7 +102,7 @@ struct _Evas_Textblock_Style
char *style_text;
char *default_tag;
Evas_Object_Style_Tag *tags;
Evas_List *objects;
Eina_List *objects;
unsigned char delete_me : 1;
};
@ -118,7 +118,7 @@ struct _Evas_Object_Textblock
DATA32 magic;
Evas_Textblock_Style *style;
Evas_Textblock_Cursor *cursor;
Evas_List *cursors;
Eina_List *cursors;
Evas_Object_Textblock_Node *nodes;
Evas_Object_Textblock_Line *lines;
int last_w;
@ -461,7 +461,8 @@ _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1)
{
Evas_Object_Textblock *o;
Evas_Object_Textblock_Node *n0, *n2;
Evas_List *l;
Eina_List *l;
Evas_Textblock_Cursor *data;
int plen;
if (n1->type != NODE_TEXT) return;
@ -480,12 +481,12 @@ _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1)
o->cursor->node = n0;
o->cursor->pos += plen;
}
for (l = o->cursors; l; l = l->next)
EINA_LIST_FOREACH(o->cursors, l, data)
{
if (n1 == ((Evas_Textblock_Cursor *)l->data)->node)
if (n1 == data->node)
{
((Evas_Textblock_Cursor *)l->data)->node = n0;
((Evas_Textblock_Cursor *)l->data)->pos += plen;
data->node = n0;
data->pos += plen;
}
}
if (n1->text) free(n1->text);
@ -507,12 +508,12 @@ _nodes_adjacent_merge(const Evas_Object *obj, Evas_Object_Textblock_Node *n1)
o->cursor->node = n0;
o->cursor->pos += plen;
}
for (l = o->cursors; l; l = l->next)
EINA_LIST_FOREACH(o->cursors, l, data)
{
if (n1 == ((Evas_Textblock_Cursor *)l->data)->node)
if (n1 == data->node)
{
((Evas_Textblock_Cursor *)l->data)->node = n0;
((Evas_Textblock_Cursor *)l->data)->pos += plen;
data->node = n0;
data->pos += plen;
}
}
if (n1->text) free(n1->text);
@ -1395,7 +1396,7 @@ struct _Ctxt
Evas_Object_Textblock_Line *lines;
Evas_Object_Textblock_Line *ln;
Evas_List *format_stack;
Eina_List *format_stack;
int x, y;
int w, h;
@ -1442,12 +1443,12 @@ _layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt)
if (fmt)
{
fmt = _format_dup(c->obj, fmt);
c->format_stack = evas_list_prepend(c->format_stack, fmt);
c->format_stack = eina_list_prepend(c->format_stack, fmt);
}
else
{
fmt = calloc(1, sizeof(Evas_Object_Textblock_Format));
c->format_stack = evas_list_prepend(c->format_stack, fmt);
c->format_stack = eina_list_prepend(c->format_stack, fmt);
fmt->ref = 1;
fmt->halign = 0.0;
fmt->valign = -1.0;
@ -1463,7 +1464,7 @@ _layout_format_pop(Ctxt *c, Evas_Object_Textblock_Format *fmt)
if ((c->format_stack) && (c->format_stack->next))
{
_format_free(c->obj, fmt);
c->format_stack = evas_list_remove_list(c->format_stack, c->format_stack);
c->format_stack = eina_list_remove_list(c->format_stack, c->format_stack);
fmt = c->format_stack->data;
}
return fmt;
@ -1729,7 +1730,8 @@ static void
_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;
Eina_List *remove_items = NULL, *l;
Eina_Inlist *data;
int index, tw, th, inset, adv;
/* it is not appended yet */
@ -1742,7 +1744,7 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
index = evas_common_font_utf8_get_last((unsigned char *)(pit->text), strlen(pit->text));
index = _layout_word_start(pit->text, index);
if (index == 0)
remove_items = evas_list_prepend(remove_items, pit);
remove_items = eina_list_prepend(remove_items, pit);
else
{
new_it = _layout_item_new(c, pit->format, pit->text + index);
@ -1753,10 +1755,8 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
break;
}
}
for (l = remove_items; l; l = l->next)
{
c->ln->items = (Evas_Object_Textblock_Item *)eina_inlist_remove(EINA_INLIST_GET(c->ln->items), l->data);
}
EINA_LIST_FOREACH(remove_items, l, data)
c->ln->items = (Evas_Object_Textblock_Item *)eina_inlist_remove(EINA_INLIST_GET(c->ln->items), data);
/* new line now */
if (remove_items)
{
@ -1789,7 +1789,7 @@ _layout_walk_back_to_item_word_redo(Ctxt *c, Evas_Object_Textblock_Item *it)
while (remove_items)
{
pit = remove_items->data;
remove_items = evas_list_remove_list(remove_items, remove_items);
remove_items = eina_list_remove_list(remove_items, remove_items);
/* append pit */
pit->x = c->x;
adv = c->ENFN->font_h_advance_get(c->ENDT, pit->format->font.font, pit->text);
@ -2041,7 +2041,7 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
Ctxt ctxt, *c;
Evas_Object_Textblock_Line *ln;
Evas_Object_Textblock_Node *n;
Evas_List *removes = NULL;
Eina_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;
@ -2171,14 +2171,14 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
while (c->format_stack)
{
fmt = c->format_stack->data;
c->format_stack = evas_list_remove_list(c->format_stack, c->format_stack);
c->format_stack = eina_list_remove_list(c->format_stack, c->format_stack);
_format_free(c->obj, fmt);
}
EINA_INLIST_FOREACH(c->lines, ln)
{
if (ln->line_no == -1)
{
removes = evas_list_append(removes, ln);
removes = eina_list_append(removes, ln);
}
else
{
@ -2189,7 +2189,7 @@ _layout(const Evas_Object *obj, int calc_only, int w, int h, int *w_ret, int *h_
{
ln = removes->data;
c->lines = (Evas_Object_Textblock_Line *)eina_inlist_remove(EINA_INLIST_GET(c->lines), EINA_INLIST_GET(ln));
removes = evas_list_remove_list(removes, removes);
removes = eina_list_remove_list(removes, removes);
_line_free(obj, ln);
}
@ -2380,16 +2380,15 @@ evas_textblock_style_free(Evas_Textblock_Style *ts)
EAPI void
evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
{
Evas_List *l;
Eina_List *l;
Evas_Object *obj;
if (!ts) return;
for (l = ts->objects; l; l = l->next)
EINA_LIST_FOREACH(ts->objects, l, obj)
{
Evas_Object *obj;
Evas_Object_Textblock *o;
obj = l->data;
o = (Evas_Object_Textblock *)(obj->object_data);
if (o->markup_text)
{
@ -2486,12 +2485,10 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
}
}
for (l = ts->objects; l; l = l->next)
EINA_LIST_FOREACH(ts->objects, l, obj)
{
Evas_Object *obj;
Evas_Object_Textblock *o;
obj = l->data;
o = (Evas_Object_Textblock *)(obj->object_data);
if (o->markup_text)
{
@ -2543,13 +2540,13 @@ evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts)
Evas_Textblock_Style *old_ts;
old_ts = o->style;
old_ts->objects = evas_list_remove(old_ts->objects, obj);
old_ts->objects = eina_list_remove(old_ts->objects, obj);
if ((old_ts->delete_me) && (!old_ts->objects))
evas_textblock_style_free(old_ts);
}
if (ts)
{
ts->objects = evas_list_append(ts->objects, obj);
ts->objects = eina_list_append(ts->objects, obj);
o->style = ts;
}
else
@ -2809,11 +2806,12 @@ evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text)
}
}
{
Evas_List *l;
Eina_List *l;
Evas_Textblock_Cursor *data;
evas_textblock_cursor_node_first(o->cursor);
for (l = o->cursors; l; l = l->next)
evas_textblock_cursor_node_first(l->data);
EINA_LIST_FOREACH(o->cursors, l, data)
evas_textblock_cursor_node_first(data);
}
}
@ -3048,7 +3046,7 @@ evas_object_textblock_cursor_new(Evas_Object *obj)
cur->obj = obj;
cur->node = o->nodes;
cur->pos = 0;
o->cursors = evas_list_append(o->cursors, cur);
o->cursors = eina_list_append(o->cursors, cur);
return cur;
}
@ -3065,7 +3063,7 @@ evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
if (!cur) return;
o = (Evas_Object_Textblock *)(cur->obj->object_data);
if (cur == o->cursor) return;
o->cursors = evas_list_remove(o->cursors, cur);
o->cursors = eina_list_remove(o->cursors, cur);
free(cur);
}
@ -3466,7 +3464,8 @@ evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text)
if (!cur) return;
o = (Evas_Object_Textblock *)(cur->obj->object_data);
{
Evas_List *l;
Eina_List *l;
Evas_Textblock_Cursor *data;
if (cur != o->cursor)
{
@ -3476,14 +3475,14 @@ evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text)
o->cursor->pos += strlen(text);
}
}
for (l = o->cursors; l; l = l->next)
EINA_LIST_FOREACH(o->cursors, l, data)
{
if (l->data != cur)
if (data != cur)
{
if (cur->node == ((Evas_Textblock_Cursor *)l->data)->node)
if (cur->node == data->node)
{
if (((Evas_Textblock_Cursor *)l->data)->pos > cur->pos)
((Evas_Textblock_Cursor *)l->data)->pos += strlen(text);
if (data->pos > cur->pos)
data->pos += strlen(text);
}
}
}
@ -3541,7 +3540,8 @@ evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text)
if (!cur) return;
o = (Evas_Object_Textblock *)(cur->obj->object_data);
{
Evas_List *l;
Eina_List *l;
Evas_Textblock_Cursor *data;
if (cur != o->cursor)
{
@ -3553,16 +3553,16 @@ evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text)
o->cursor->pos += strlen(text);
}
}
for (l = o->cursors; l; l = l->next)
EINA_LIST_FOREACH(o->cursors, l, data)
{
if (l->data != cur)
if (data != cur)
{
if (cur->node == ((Evas_Textblock_Cursor *)l->data)->node)
if (cur->node == data->node)
{
if ((((Evas_Textblock_Cursor *)l->data)->node) &&
(((Evas_Textblock_Cursor *)l->data)->node->type == NODE_TEXT) &&
(((Evas_Textblock_Cursor *)l->data)->pos >= cur->pos))
((Evas_Textblock_Cursor *)l->data)->pos += strlen(text);
if (data->node &&
(data->node->type == NODE_TEXT) &&
(data->pos >= cur->pos))
data->pos += strlen(text);
}
}
}
@ -3789,7 +3789,8 @@ evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur)
}
{
Evas_List *l;
Eina_List *l;
Evas_Textblock_Cursor *data;
if (cur != o->cursor)
{
@ -3799,14 +3800,14 @@ evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur)
o->cursor->pos = cur->pos;
}
}
for (l = o->cursors; l; l = l->next)
EINA_LIST_FOREACH(o->cursors, l, data)
{
if (l->data != cur)
if (data != cur)
{
if (n == ((Evas_Textblock_Cursor *)l->data)->node)
if (n == data->node)
{
((Evas_Textblock_Cursor *)l->data)->node = cur->node;
((Evas_Textblock_Cursor *)l->data)->pos = cur->pos;
data->node = cur->node;
data->pos = cur->pos;
}
}
}
@ -3875,7 +3876,8 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
}
{
Evas_List *l;
Eina_List *l;
Evas_Textblock_Cursor *data;
if (cur != o->cursor)
{
@ -3885,14 +3887,14 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
o->cursor->pos -= (index - ppos);
}
}
for (l = o->cursors; l; l = l->next)
EINA_LIST_FOREACH(o->cursors, l, data)
{
if (l->data != cur)
if (data != cur)
{
if ((n == ((Evas_Textblock_Cursor *)l->data)->node) &&
(((Evas_Textblock_Cursor *)l->data)->pos > ppos))
if ((n == data->node) &&
(data->pos > ppos))
{
((Evas_Textblock_Cursor *)l->data)->pos -= (index - ppos);
data->pos -= (index - ppos);
}
}
}
@ -3943,7 +3945,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
{
if (n1->type == NODE_TEXT)
{
if (cur1->pos == cur2->pos)
if (cur1->pos == cur2->pos)
{
evas_textblock_cursor_char_delete(cur1);
evas_textblock_cursor_copy(cur1, cur2);
@ -3977,7 +3979,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
}
else
{
Evas_List *removes, *format_hump = NULL;
Eina_List *removes, *format_hump = NULL;
Evas_Textblock_Cursor tcur;
Eina_Inlist *l;
@ -4011,7 +4013,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 = (EINA_INLIST_GET(n1))->next; l != EINA_INLIST_GET(n2); l = l->next)
removes = evas_list_append(removes, l);
removes = eina_list_append(removes, l);
if (n1->type == NODE_TEXT)
{
if (!n1->text)
@ -4020,7 +4022,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
else
{
if ((n1->text) && (n1->text[0] == '+'))
format_hump = evas_list_append(format_hump, n1);
format_hump = eina_list_append(format_hump, n1);
else
{
o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes), EINA_INLIST_GET(n1));
@ -4042,14 +4044,14 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
{
if (n->text[0] == '+')
{
format_hump = evas_list_append(format_hump, n);
format_hump = eina_list_append(format_hump, n);
}
else if (n->text[0] == '-')
{
tn = evas_list_data(evas_list_last(format_hump));
tn = eina_list_data_get(eina_list_last(format_hump));
if (tn)
{
format_hump = evas_list_remove_list(format_hump, evas_list_last(format_hump));
format_hump = eina_list_remove_list(format_hump, eina_list_last(format_hump));
o->nodes = (Evas_Object_Textblock_Node *)eina_inlist_remove(EINA_INLIST_GET(o->nodes),
EINA_INLIST_GET(tn));
if (tn->text) free(tn->text);
@ -4068,7 +4070,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
free(n);
}
}
removes = evas_list_remove_list(removes, removes);
removes = eina_list_remove_list(removes, removes);
}
if (n2->type == NODE_TEXT)
{
@ -4103,7 +4105,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
EINA_INLIST_GET(n2));
if (n2->text) free(n2->text);
free(n2);
n = evas_list_data(evas_list_last(format_hump));
n = eina_list_data_get(eina_list_last(format_hump));
if (n)
{
if (tcur.node == n)
@ -4139,7 +4141,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
free(n2);
}
}
if (format_hump) format_hump = evas_list_free(format_hump);
if (format_hump) format_hump = eina_list_free(format_hump);
cur1->node = tcur.node;
cur1->pos = tcur.pos;
cur2->node = tcur.node;
@ -4151,17 +4153,18 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C
* the same pos as cur1 and cur2
*/
{
Evas_List *l;
Eina_List *l;
Evas_Textblock_Cursor *data;
if ((cur1 != o->cursor) && (cur2 != o->cursor))
{
evas_textblock_cursor_copy(cur1, o->cursor);
}
for (l = o->cursors; l; l = l->next)
EINA_LIST_FOREACH(o->cursors, l, data)
{
if ((l->data != cur1) && (l->data != cur2))
if ((data != cur1) && (data != cur2))
{
evas_textblock_cursor_copy(cur1, l->data);
evas_textblock_cursor_copy(cur1, data);
}
}
}
@ -4656,11 +4659,11 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
* @param cur2 to be documented.
* @return to be documented.
*/
EAPI Evas_List *
EAPI Eina_List *
evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2)
{
Evas_Object_Textblock *o;
Evas_List *rects = NULL;
Eina_List *rects = NULL;
Evas_Coord cx, cy, cw, ch, lx, ly, lw, lh;
Evas_Textblock_Rectangle *tr;
int i, line, line2;
@ -4686,7 +4689,7 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
if (line == line2)
{
tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
rects = evas_list_append(rects, tr);
rects = eina_list_append(rects, tr);
tr->x = cx;
tr->y = ly;
tr->h = lh;
@ -4696,7 +4699,7 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
while (rects)
{
free(rects->data);
rects = evas_list_remove_list(rects, rects);
rects = eina_list_remove_list(rects, rects);
}
return NULL;
}
@ -4705,7 +4708,7 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
else
{
tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
rects = evas_list_append(rects, tr);
rects = eina_list_append(rects, tr);
tr->x = cx;
tr->y = ly;
tr->h = lh;
@ -4714,7 +4717,7 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
{
evas_object_textblock_line_number_geometry_get(cur1->obj, i, &lx, &ly, &lw, &lh);
tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
rects = evas_list_append(rects, tr);
rects = eina_list_append(rects, tr);
tr->x = lx;
tr->y = ly;
tr->h = lh;
@ -4726,7 +4729,7 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
while (rects)
{
free(rects->data);
rects = evas_list_remove_list(rects, rects);
rects = eina_list_remove_list(rects, rects);
}
return NULL;
}
@ -4736,12 +4739,12 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
while (rects)
{
free(rects->data);
rects = evas_list_remove_list(rects, rects);
rects = eina_list_remove_list(rects, rects);
}
return NULL;
}
tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
rects = evas_list_append(rects, tr);
rects = eina_list_append(rects, tr);
tr->x = lx;
tr->y = ly;
tr->h = lh;
@ -4784,17 +4787,15 @@ evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line,
EAPI void
evas_object_textblock_clear(Evas_Object *obj)
{
Evas_List *l;
Eina_List *l;
Evas_Textblock_Cursor *cur;
TB_HEAD();
_nodes_clear(obj);
o->cursor->node = NULL;
o->cursor->pos = 0;
for (l = o->cursors; l; l = l->next)
EINA_LIST_FOREACH(o->cursors, l, cur)
{
Evas_Textblock_Cursor *cur;
cur = (Evas_Textblock_Cursor *)l->data;
cur->node = NULL;
cur->pos = 0;
}
@ -4928,7 +4929,7 @@ evas_object_textblock_free(Evas_Object *obj)
Evas_Textblock_Cursor *cur;
cur = (Evas_Textblock_Cursor *)o->cursors->data;
o->cursors = evas_list_remove_list(o->cursors, o->cursors);
o->cursors = eina_list_remove_list(o->cursors, o->cursors);
free(cur);
}
o->magic = 0;
@ -5446,7 +5447,7 @@ evas_object_textblock_render_pre(Evas_Object *obj)
r->x = 0; r->y = 0;
r->w = obj->cur.geometry.w;
r->h = obj->cur.geometry.h;
updates = evas_list_append(updates, r);
updates = eina_list_append(updates, r);
*/
evas_object_render_pre_prev_cur_add(&rects, obj);
o->changed = 0;
@ -5470,7 +5471,7 @@ evas_object_textblock_render_post(Evas_Object *obj)
Evas_Rectangle *r;
r = (Evas_Rectangle *)obj->clip.changes->data;
obj->clip.changes = evas_list_remove(obj->clip.changes, r);
obj->clip.changes = eina_list_remove(obj->clip.changes, r);
free(r);
}
/* move cur to prev safely for object data */

View File

@ -1,7 +1,7 @@
#include "evas_common.h"
#include "evas_private.h"
static Evas_List *
static Eina_List *
evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw);
/**
@ -21,7 +21,7 @@ evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h)
r = malloc(sizeof(Evas_Rectangle));
if (!r) return;
r->x = x; r->y = y; r->w = w; r->h = h;
e->damages = evas_list_append(e->damages, r);
e->damages = eina_list_append(e->damages, r);
e->changed = 1;
}
@ -42,7 +42,7 @@ evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h)
r = malloc(sizeof(Evas_Rectangle));
if (!r) return;
r->x = x; r->y = y; r->w = w; r->h = h;
e->obscures = evas_list_append(e->obscures, r);
e->obscures = eina_list_append(e->obscures, r);
}
/**
@ -62,7 +62,7 @@ evas_obscured_clear(Evas *e)
Evas_Rectangle *r;
r = (Evas_Rectangle *)e->obscures->data;
e->obscures = evas_list_remove(e->obscures, r);
e->obscures = eina_list_remove(e->obscures, r);
free(r);
}
}
@ -314,13 +314,14 @@ Eina_Bool pending_change(void *data, __UNUSED__ void *gdata)
return obj->changed ? EINA_TRUE : EINA_FALSE;
}
static Evas_List *
static Eina_List *
evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw)
{
Evas_List *updates = NULL;
Evas_List *ll;
Eina_List *updates = NULL;
Eina_List *ll;
void *surface;
Evas_Bool clean_them = 0;
Evas_Rectangle *r;
int ux, uy, uw, uh;
int cx, cy, cw, ch;
unsigned int i, j;
@ -364,10 +365,8 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char
/* phase 3. add exposes */
while (e->damages)
{
Evas_Rectangle *r;
r = e->damages->data;
e->damages = evas_list_remove(e->damages, r);
e->damages = eina_list_remove(e->damages, r);
e->engine.func->output_redraws_rect_add(e->engine.data.output,
r->x, r->y, r->w, r->h);
free(r);
@ -392,14 +391,9 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char
printf("EVAS: error: viewport size != output size!\n");
}
/* phase 5. add obscures */
for (ll = e->obscures; ll; ll = ll->next)
{
Evas_Rectangle *r;
r = ll->data;
e->engine.func->output_redraws_rect_del(e->engine.data.output,
EINA_LIST_FOREACH(e->obscures, ll, r)
e->engine.func->output_redraws_rect_del(e->engine.data.output,
r->x, r->y, r->w, r->h);
}
/* build obscure objects list of active objects that obscure */
for (i = 0; i < e->active_objects.count; ++i)
{
@ -413,7 +407,7 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char
(!obj->delete_me) &&
(obj->cur.cache.clip.visible) &&
(!obj->smart.smart)))
/* obscuring_objects = evas_list_append(obscuring_objects, obj); */
/* obscuring_objects = eina_list_append(obscuring_objects, obj); */
eina_array_push(&e->obscuring_objects, obj);
}
/* save this list */
@ -439,7 +433,7 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char
if (rect)
{
rect->x = ux; rect->y = uy; rect->w = uw; rect->h = uh;
updates = evas_list_append(updates, rect);
updates = eina_list_append(updates, rect);
}
}
off_x = cx - ux;
@ -552,7 +546,7 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char
/* moved to other pre-process phase 1
if (obj->delete_me == 2)
{
delete_objects = evas_list_append(delete_objects, obj);
delete_objects = eina_list_append(delete_objects, obj);
}
else if (obj->delete_me != 0) obj->delete_me++;
*/
@ -600,12 +594,12 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char
*
*/
EAPI void
evas_render_updates_free(Evas_List *updates)
evas_render_updates_free(Eina_List *updates)
{
while (updates)
{
free(updates->data);
updates = evas_list_remove(updates, updates->data);
updates = eina_list_remove(updates, updates->data);
}
}
@ -615,7 +609,7 @@ evas_render_updates_free(Evas_List *updates)
* FIXME: To be fixed.
*
*/
EAPI Evas_List *
EAPI Eina_List *
evas_render_updates(Evas *e)
{
MAGIC_CHECK(e, Evas, MAGIC_EVAS);

View File

@ -61,7 +61,7 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt index)
EAPI int
evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, int gl)
{
Evas_List *l;
Eina_List *l;
for (l = fn->fonts; l; l = l->next)
{

View File

@ -122,7 +122,7 @@ evas_common_font_source_free(RGBA_Font_Source *fs)
EAPI void
evas_common_font_size_use(RGBA_Font *fn)
{
Evas_List *l;
Eina_List *l;
for (l = fn->fonts; l; l = l->next)
{
@ -270,7 +270,7 @@ evas_common_font_memory_load(const char *name, int size, const void *data, int d
free(fi);
return NULL;
}
fn->fonts = evas_list_append(fn->fonts, fi);
fn->fonts = eina_list_append(fn->fonts, fi);
fn->hinting = FONT_BYTECODE_HINT;
fi->hinting = fn->hinting;
fn->references = 1;
@ -317,7 +317,7 @@ evas_common_font_load(const char *name, int size)
}
return NULL;
}
fn->fonts = evas_list_append(fn->fonts, fi);
fn->fonts = eina_list_append(fn->fonts, fi);
fn->hinting = FONT_BYTECODE_HINT;
fi->hinting = fn->hinting;
fn->references = 1;
@ -335,7 +335,7 @@ evas_common_font_add(RGBA_Font *fn, const char *name, int size)
fi = evas_common_font_int_load(name, size);
if (fi)
{
fn->fonts = evas_list_append(fn->fonts, fi);
fn->fonts = eina_list_append(fn->fonts, fi);
fi->hinting = fn->hinting;
return fn;
}
@ -352,7 +352,7 @@ evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const voi
fi = evas_common_font_int_memory_load(name, size, data, data_size);
if (fi)
{
fn->fonts = evas_list_append(fn->fonts, fi);
fn->fonts = eina_list_append(fn->fonts, fi);
fi->hinting = fn->hinting;
return fn;
}
@ -362,7 +362,7 @@ evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const voi
EAPI void
evas_common_font_free(RGBA_Font *fn)
{
Evas_List *l;
Eina_List *l;
if (!fn)
return;
@ -380,7 +380,7 @@ evas_common_font_free(RGBA_Font *fn)
evas_common_font_flush();
}
}
evas_list_free(fn->fonts);
eina_list_free(fn->fonts);
LKD(fn->lock);
free(fn);
}
@ -388,7 +388,7 @@ evas_common_font_free(RGBA_Font *fn)
EAPI void
evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting)
{
Evas_List *l;
Eina_List *l;
if (!fn)
return;
@ -483,7 +483,7 @@ font_modify_cache_cb(const Evas_Hash *hash, const char *key, void *data, void *f
dir = fdata;
font_cache_usage += (*dir) *
((fg->glyph_out->bitmap.width * fg->glyph_out->bitmap.rows) +
sizeof(RGBA_Font_Glyph) + sizeof(Evas_List) + 400); /* fudge values */
sizeof(RGBA_Font_Glyph) + sizeof(Eina_List) + 400); /* fudge values */
return 1;
hash = 0;
key = 0;

View File

@ -5,7 +5,7 @@
#include "evas_common.h"
#include "evas_private.h"
extern Evas_List *evas_modules;
extern Eina_List *evas_modules;
struct ext_loader_s {
const char* extention;
@ -38,7 +38,7 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
{
Evas_Image_Load_Func *evas_image_load_func = NULL;
const char *loader = NULL;
Evas_List *l;
Eina_List *l;
Evas_Module *em;
char *dot;
int i;
@ -71,9 +71,8 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
}
}
for (l = evas_modules; l; l = l->next)
EINA_LIST_FOREACH(evas_modules, l, em)
{
em = l->data;
if (em->type != EVAS_MODULE_TYPE_IMAGE_LOADER) continue;
if (!evas_module_load(em)) continue;
evas_image_load_func = em->functions;
@ -82,7 +81,7 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
{
if (evas_modules != l)
{
evas_modules = evas_list_promote_list(evas_modules, l);
evas_modules = eina_list_promote_list(evas_modules, l);
}
goto ok;
}

View File

@ -12,7 +12,7 @@
#include "evas_private.h"
extern Evas_List *evas_modules;
extern Eina_List *evas_modules;
int
evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress)

View File

@ -8,8 +8,8 @@
#include <evas_common.h>
#include <evas_private.h>
Evas_List *evas_modules = NULL;
static Evas_List *evas_module_paths = NULL;
Eina_List *evas_modules = NULL;
static Eina_List *evas_module_paths = NULL;
static void
_evas_module_path_append(Evas_Module_Type type, char *path, const char *subdir)
@ -24,7 +24,7 @@ _evas_module_path_append(Evas_Module_Type type, char *path, const char *subdir)
mp = malloc(sizeof(Evas_Module_Path));
mp->type = type;
mp->path = buf;
evas_module_paths = evas_list_append(evas_module_paths, mp);
evas_module_paths = eina_list_append(evas_module_paths, mp);
}
else
free(buf);
@ -43,7 +43,7 @@ evas_module_paths_init(void)
char *prefix;
char *path;
Evas_List *paths = NULL;
Eina_List *paths = NULL;
/* 1. ~/.evas/modules/ */
prefix = getenv("HOME");
@ -56,7 +56,7 @@ evas_module_paths_init(void)
strcpy(path, prefix);
strcat(path, "/.evas/modules");
if (evas_file_path_exists(path))
paths = evas_list_append(paths, path);
paths = eina_list_append(paths, path);
else
free(path);
}
@ -73,7 +73,7 @@ evas_module_paths_init(void)
strcpy(path, prefix);
strcat(path, "/evas/modules");
if (evas_file_path_exists(path))
paths = evas_list_append(paths, path);
paths = eina_list_append(paths, path);
else
free(path);
}
@ -99,7 +99,7 @@ evas_module_paths_init(void)
path[strlen(evas_dl.dli_fname) - length] = 0;
strcat(path, "/evas/modules");
if (evas_file_path_exists(path))
paths = evas_list_append(paths, path);
paths = eina_list_append(paths, path);
else
free(path);
}
@ -115,7 +115,7 @@ evas_module_paths_init(void)
strcpy(path, prefix);
strcat(path, "/evas/modules");
if (evas_file_path_exists(path))
paths = evas_list_append(paths, path);
paths = eina_list_append(paths, path);
else
free(path);
}
@ -132,7 +132,7 @@ evas_module_paths_init(void)
_evas_module_path_append(EVAS_MODULE_TYPE_IMAGE_SAVER, paths->data, "savers");
_evas_module_path_append(EVAS_MODULE_TYPE_OBJECT, paths->data, "objects");
free(paths->data);
paths = evas_list_remove_list(paths, paths);
paths = eina_list_remove_list(paths, paths);
}
}
@ -141,19 +141,17 @@ evas_module_paths_init(void)
void
evas_module_init(void)
{
Evas_List *l;
Eina_List *l;
Evas_Module_Path *mp;
int new_id_engine = 1;
/* printf("[init modules]\n"); */
evas_module_paths_init();
for (l = evas_module_paths; l; l = l->next)
EINA_LIST_FOREACH(evas_module_paths, l, mp)
{
Evas_Module_Path *mp;
DIR *dir;
struct dirent *de;
mp = l->data;
if (!(dir = opendir(mp->path))) break;
/* printf("[evas module] searching modules on %s\n", mp->path); */
while ((de = readdir(dir)))
@ -195,7 +193,7 @@ evas_module_init(void)
{
}
/* printf("[evas module] including module path %s/%s of type %d\n",em->path, em->name, em->type); */
evas_modules = evas_list_append(evas_modules, em);
evas_modules = eina_list_append(evas_modules, em);
}
free(buf);
}
@ -206,18 +204,16 @@ evas_module_init(void)
Evas_Module *
evas_module_find_type(Evas_Module_Type type, const char *name)
{
Evas_List *l;
Eina_List *l;
Evas_Module *em;
for (l = evas_modules; l; l = l->next)
EINA_LIST_FOREACH(evas_modules, l, em)
{
Evas_Module *em;
em = (Evas_Module*)l->data;
if ((type == em->type) && (!strcmp(name,em->name)))
{
if (evas_modules != l)
{
evas_modules = evas_list_promote_list(evas_modules, l);
evas_modules = eina_list_promote_list(evas_modules, l);
}
return em;
}
@ -340,7 +336,7 @@ evas_module_clean(void)
static int call_count = 0;
int ago;
int noclean = -1;
Evas_List *l;
Eina_List *l;
Evas_Module *em;
/* only clean modules every 256 calls */
@ -367,9 +363,8 @@ evas_module_clean(void)
/* printf("CLEAN!\n"); */
/* go through all modules */
for (l = evas_modules; l; l = l->next)
EINA_LIST_FOREACH(evas_modules, l, em)
{
em = l->data;
/* printf("M %s %i %i\n", em->name, em->ref, em->loaded); */
/* if the module is refernced - skip */
if ((em->ref > 0) || (!em->loaded)) continue;
@ -409,14 +404,14 @@ evas_module_shutdown(void)
{
}
free(evas_modules->data);
evas_modules = evas_list_remove_list(evas_modules, evas_modules);
evas_modules = eina_list_remove_list(evas_modules, evas_modules);
}
while (evas_module_paths)
{
Evas_Module_Path *mp;
mp = evas_module_paths->data;
evas_module_paths = evas_list_remove_list(evas_module_paths, evas_module_paths);
evas_module_paths = eina_list_remove_list(evas_module_paths, evas_module_paths);
free(mp->path);
free(mp);
}

View File

@ -76,10 +76,10 @@ evas_file_path_is_dir(const char *path)
return 0;
}
Evas_List *
Eina_List *
evas_file_path_list(char *path, const char *match, int match_case)
{
Evas_List *files = NULL;
Eina_List *files = NULL;
DIR *dir;
dir = opendir(path);
@ -102,10 +102,10 @@ evas_file_path_list(char *path, const char *match, int match_case)
if (match)
{
if (fnmatch(match, dp->d_name, flags) == 0)
files = evas_list_append(files, strdup(dp->d_name));
files = eina_list_append(files, strdup(dp->d_name));
}
else
files = evas_list_append(files, strdup(dp->d_name));
files = eina_list_append(files, strdup(dp->d_name));
}
closedir(dir);
}
@ -281,10 +281,10 @@ evas_file_path_is_dir(char *path)
return 0;
}
Evas_List *
Eina_List *
evas_file_path_list(char *path, char *match, int match_case)
{
Evas_List *files = NULL;
Eina_List *files = NULL;
WIN32_FIND_DATAW find;
HANDLE fh;
int fullpathlen;
@ -336,7 +336,7 @@ evas_file_path_list(char *path, char *match, int match_case)
do
{
if (!(find.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
files = evas_list_append(files,convert_unicode_utf(find.cFileName));
files = eina_list_append(files,convert_unicode_utf(find.cFileName));
}
while (FindNextFileW(fh,&find));

View File

@ -7,7 +7,7 @@ char *evas_file_path_join (const char *path, const char *end);
int evas_file_path_exists (const char *path);
int evas_file_path_is_file (const char *path);
int evas_file_path_is_dir (const char *path);
Evas_List *evas_file_path_list (char *path, const char *match, int match_case);
Eina_List *evas_file_path_list (char *path, const char *match, int match_case);
DATA64 evas_file_modified_time (const char *file);
char *evas_file_path_resolve (const char *file);

View File

@ -54,7 +54,7 @@ struct _Evas_Cairo_Image
struct _Evas_Cairo_Polygon
{
Evas_List *points;
Eina_List *points;
};
struct _Evas_Cairo_Polygon_Point
@ -91,7 +91,7 @@ struct _Evas_Cairo_Context
int references;
Evas_List *images;
Eina_List *images;
};
struct _Evas_Cairo_Image
@ -107,7 +107,7 @@ struct _Evas_Cairo_Image
struct _Evas_Cairo_Polygon
{
Evas_List *points;
Eina_List *points;
};
struct _Evas_Cairo_Polygon_Point

View File

@ -612,7 +612,7 @@ struct _RGBA_Polygon_Point
struct _RGBA_Font
{
Evas_List *fonts;
Eina_List *fonts;
Font_Hint_Flags hinting;
int references;
LK(lock);

View File

@ -249,7 +249,7 @@ struct _Evas
//// Evas_Coord canvas_x, canvas_y;
struct {
Evas_List *in;
Eina_List *in;
} object;
} pointer;
@ -265,8 +265,8 @@ struct _Evas
unsigned char changed : 1;
} output;
Evas_List *damages;
Evas_List *obscures;
Eina_List *damages;
Eina_List *obscures;
Evas_Layer *layers;
@ -301,9 +301,9 @@ struct _Evas
int delete_grabs;
int walking_grabs;
Evas_List *grabs;
Eina_List *grabs;
Evas_List *font_path;
Eina_List *font_path;
Evas_Object *focused;
void *attach_data;
@ -412,16 +412,16 @@ struct _Evas_Object
Evas_Intercept_Func *interceptors;
struct {
Evas_List *elements;
Eina_List *elements;
} data;
Evas_List *grabs;
Eina_List *grabs;
Evas_Callbacks *callbacks;
struct {
Evas_List *clipees;
Evas_List *changes;
Eina_List *clipees;
Eina_List *changes;
} clip;
const Evas_Object_Func *func;
@ -480,8 +480,8 @@ struct _Evas_Data_Node
struct _Evas_Font_Dir
{
Evas_Hash *lookup;
Evas_List *fonts;
Evas_List *aliases;
Eina_List *fonts;
Eina_List *aliases;
DATA64 dir_mod_time;
DATA64 fonts_dir_mod_time;
DATA64 fonts_alias_mod_time;
@ -720,7 +720,7 @@ int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
int evas_object_clippers_was_visible(Evas_Object *obj);
void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info);
Evas_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
int evas_mem_free(int mem_required);
int evas_mem_degrade(int mem_required);
void evas_debug_error(void);
@ -765,8 +765,8 @@ void evas_object_grabs_cleanup(Evas_Object *obj);
void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
void evas_font_dir_cache_free(void);
const char *evas_font_dir_cache_find(char *dir, char *font);
Evas_List *evas_font_dir_available_list(const Evas* evas);
void evas_font_dir_available_list_free(Evas_List *available);
Eina_List *evas_font_dir_available_list(const Evas* evas);
void evas_font_dir_available_list_free(Eina_List *available);
void evas_font_free(Evas *evas, void *font);
void *evas_font_load(Evas *evas, const char *name, const char *source, int size);
void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);

View File

@ -48,7 +48,7 @@ struct _Evas_Cairo_Image
struct _Evas_Cairo_Polygon
{
Evas_List *points;
Eina_List *points;
};
struct _Evas_Cairo_Polygon_Point

View File

@ -432,7 +432,7 @@ eng_output_flush(void *data)
{
Render_Engine *re;
Evas_Cairo_Context *ctxt;
Evas_List *l;
Eina_List *l;
re = (Render_Engine *)data;
}
@ -717,7 +717,7 @@ eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
{
pt->x = x;
pt->y = y;
poly->points = evas_list_append(poly->points, pt);
poly->points = eina_list_append(poly->points, pt);
}
return poly;
}
@ -737,7 +737,7 @@ eng_polygon_points_clear(void *data, void *context, void *polygon)
while (poly->points)
{
free(poly->points->data);
poly->points = evas_list_remove_list(poly->points, poly->points);
poly->points = eina_list_remove_list(poly->points, poly->points);
}
free(poly);
@ -760,13 +760,10 @@ eng_polygon_draw(void *data, void *context, void *surface, void *polygon)
pt = poly->points->data;
if (pt)
{
Evas_List *l;
Eina_List *l;
cairo_move_to(ctxt->cairo, pt->x, pt->y);
for (l = poly->points->next; l; l = l->next)
{
pt = l->data;
cairo_line_to(ctxt->cairo, pt->x, pt->y);
}
EINA_LIST_FOREACH(poly->points->next, l, pt)
cairo_line_to(ctxt->cairo, pt->x, pt->y);
}
r = ctxt->col.r;
g = ctxt->col.g;

View File

@ -48,7 +48,7 @@ struct _Outbuf
} mask;
/* a list of pending regions to write to the target */
Evas_List *pending_writes;
Eina_List *pending_writes;
} priv;
};

View File

@ -149,7 +149,7 @@ evas_direct3d_outbuf_new_region_for_update(Outbuf *buf,
im->extended_info = d3dob;
}
buf->priv.pending_writes = evas_list_append(buf->priv.pending_writes, im);
buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im);
return im;
}
@ -164,11 +164,13 @@ evas_direct3d_outbuf_free_region_for_update(Outbuf *buf,
void
evas_direct3d_outbuf_flush(Outbuf *buf)
{
Evas_List *l;
Eina_List *l;
void *d3d_data;
int d3d_width;
int d3d_height;
int d3d_pitch;
RGBA_Image *im;
Direct3D_Output_Buffer *d3dob;
/* lock the texture */
if (!(d3d_data = evas_direct3d_lock(buf,
@ -176,12 +178,8 @@ evas_direct3d_outbuf_flush(Outbuf *buf)
goto free_images;
/* copy safely the images that need to be drawn onto the back surface */
for (l = buf->priv.pending_writes; l; l = l->next)
EINA_LIST_FOREACH(buf->priv.pending_writes, l, im)
{
RGBA_Image *im;
Direct3D_Output_Buffer *d3dob;
im = l->data;
d3dob = im->extended_info;
/* paste now */
evas_direct3d_output_buffer_paste(d3dob,
@ -199,11 +197,8 @@ evas_direct3d_outbuf_flush(Outbuf *buf)
free_images:
while (buf->priv.pending_writes)
{
RGBA_Image *im;
Direct3D_Output_Buffer *d3dob;
im = buf->priv.pending_writes->data;
buf->priv.pending_writes = evas_list_remove_list(buf->priv.pending_writes,
buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes,
buf->priv.pending_writes);
d3dob = im->extended_info;
evas_cache_image_drop(im);

View File

@ -88,8 +88,8 @@ struct _Evas_GL_Context
int references;
Evas_List *images;
Evas_List *tex_pool;
Eina_List *images;
Eina_List *tex_pool;
RGBA_Draw_Context *dc;
@ -137,7 +137,7 @@ struct _Evas_GL_Image
struct _Evas_GL_Polygon
{
Evas_List *points;
Eina_List *points;
GLuint dl;
Evas_Bool changed : 1;
};
@ -173,7 +173,7 @@ struct _Evas_GL_Font_Texture_Pool
GLuint texture;
int references;
unsigned char rectangle : 1;
Evas_List *allocations;
Eina_List *allocations;
};
struct _Evas_GL_Font_Texture_Pool_Allocation

View File

@ -218,18 +218,17 @@ evas_gl_font_texture_draw(Evas_GL_Context *gc, void *surface, RGBA_Draw_Context
static Evas_GL_Font_Texture_Pool_Allocation *
_evas_gl_font_texture_pool_request(Evas_GL_Context *gc, int w, int h)
{
Evas_List *l;
Eina_List *l;
Evas_GL_Font_Texture_Pool_Allocation *fa;
Evas_GL_Font_Texture_Pool *fp;
int minw = 256;
int minh = 256;
int shift;
for (l = gc->tex_pool; l; l = l->next)
EINA_LIST_FOREACH(gc->tex_pool, l, fp)
{
int x, y;
fp = l->data;
if (_evas_gl_font_texture_pool_rect_find(fp, w, h, &x, &y))
{
fa = calloc(1, sizeof(Evas_GL_Font_Texture_Pool_Allocation));
@ -239,8 +238,8 @@ _evas_gl_font_texture_pool_request(Evas_GL_Context *gc, int w, int h)
fa->y = y;
fa->w = w;
fa->h = h;
fp->allocations = evas_list_prepend(fp->allocations, fa);
if (evas_list_alloc_error())
fp->allocations = eina_list_prepend(fp->allocations, fa);
if (eina_error_get())
{
free(fa);
return NULL;
@ -264,8 +263,8 @@ _evas_gl_font_texture_pool_request(Evas_GL_Context *gc, int w, int h)
fp = calloc(1, sizeof(Evas_GL_Font_Texture_Pool));
if (!fp) return NULL;
gc->tex_pool = evas_list_append(gc->tex_pool, fp);
if (evas_list_alloc_error())
gc->tex_pool = eina_list_append(gc->tex_pool, fp);
if (eina_error_get())
{
free(fp);
return NULL;
@ -316,7 +315,7 @@ _evas_gl_font_texture_pool_request(Evas_GL_Context *gc, int w, int h)
fa = calloc(1, sizeof(Evas_GL_Font_Texture_Pool_Allocation));
if (!fa)
{
gc->tex_pool = evas_list_remove(gc->tex_pool, fp);
gc->tex_pool = eina_list_remove(gc->tex_pool, fp);
glDeleteTextures(1, &(fp->texture));
free(fp);
return NULL;
@ -326,11 +325,11 @@ _evas_gl_font_texture_pool_request(Evas_GL_Context *gc, int w, int h)
fa->y = 0;
fa->w = w;
fa->h = h;
fp->allocations = evas_list_prepend(fp->allocations, fa);
if (evas_list_alloc_error())
fp->allocations = eina_list_prepend(fp->allocations, fa);
if (eina_error_get())
{
printf("alloc prob\n");
gc->tex_pool = evas_list_remove(gc->tex_pool, fp);
gc->tex_pool = eina_list_remove(gc->tex_pool, fp);
glDeleteTextures(1, &(fp->texture));
free(fa);
free(fp);
@ -343,12 +342,12 @@ _evas_gl_font_texture_pool_request(Evas_GL_Context *gc, int w, int h)
static void
_evas_gl_font_texture_pool_relinquish(Evas_GL_Font_Texture_Pool_Allocation *fa)
{
fa->pool->allocations = evas_list_remove(fa->pool->allocations, fa);
fa->pool->allocations = eina_list_remove(fa->pool->allocations, fa);
fa->pool->references--;
if (fa->pool->references <= 0)
{
fa->pool->gc->tex_pool =
evas_list_remove(fa->pool->gc->tex_pool, fa->pool);
eina_list_remove(fa->pool->gc->tex_pool, fa->pool);
glDeleteTextures(1, &(fa->pool->texture));
free(fa->pool);
}
@ -360,18 +359,18 @@ _evas_gl_font_texture_pool_rect_find(Evas_GL_Font_Texture_Pool *fp,
int w, int h,
int *x, int *y)
{
Evas_List *l;
Eina_List *l;
Evas_GL_Font_Texture_Pool_Allocation *fa;
if ((w > fp->w) || (h > fp->h)) return 0;
for (l = fp->allocations; l; l = l->next)
EINA_LIST_FOREACH(fp->allocations, l, fa)
{
Evas_GL_Font_Texture_Pool_Allocation *fa;
Evas_List *l2;
Eina_List *l2;
Evas_GL_Font_Texture_Pool_Allocation *fa2;
int tx, ty, tw, th;
int t1, t2;
int intersects;
fa = l->data;
t1 = t2 = 1;
if ((fa->x + fa->w + w) > fp->w) t1 = 0;
if ((fa->y + h) > fp->h) t1 = 0;
@ -391,14 +390,12 @@ _evas_gl_font_texture_pool_rect_find(Evas_GL_Font_Texture_Pool *fp,
ty = fa->y;
tw = w;
th = h;
for (l2 = fp->allocations; l2; l2 = l2->next)
EINA_LIST_FOREACH(fp->allocations, l2, fa2)
{
Evas_GL_Font_Texture_Pool_Allocation *fa2;
int rx, ry, rw, rh;
/* dont do the rect we are just using as our offset */
if (l2 == l) continue;
fa2 = l2->data;
rx = fa2->x;
ry = fa2->y;
rw = fa2->w;
@ -433,9 +430,8 @@ _evas_gl_font_texture_pool_rect_find(Evas_GL_Font_Texture_Pool *fp,
ty = fa->y + fa->h;
tw = w;
th = h;
for (l2 = fp->allocations; l2; l2 = l2->next)
EINA_LIST_FOREACH(fp->allocations, l2, fa2)
{
Evas_GL_Font_Texture_Pool_Allocation *fa2;
int rx, ry, rw, rh;
/* dont do the rect we are just using as our offset */
@ -444,7 +440,6 @@ _evas_gl_font_texture_pool_rect_find(Evas_GL_Font_Texture_Pool *fp,
/* so far it looks like memory corruption, but i can't */
/* use valgrind to inspect any further due to the dri */
/* hardware stuff :( */
fa2 = l2->data;
rx = fa2->x;
ry = fa2->y;

View File

@ -5,19 +5,18 @@ evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key
{
Evas_GL_Image *im;
RGBA_Image *im_im;
Evas_List *l;
Eina_List *l;
im_im = evas_common_load_image_from_file(file, key, lo);
if (!im_im) return NULL;
for (l = gc->images; l; l = l->next)
EINA_LIST_FOREACH(gc->images, l, im)
{
im = l->data;
if (im->im == im_im)
{
evas_cache_image_drop(&im_im->cache_entry);
gc->images = evas_list_remove_list(gc->images, l);
gc->images = evas_list_prepend(gc->images, im);
gc->images = eina_list_remove_list(gc->images, l);
gc->images = eina_list_prepend(gc->images, im);
im->references++;
return im;
}
@ -37,7 +36,7 @@ evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key
im->cached = 1;
im->cs.space = EVAS_COLORSPACE_ARGB8888;
if (lo) im->load_opts = *lo;
gc->images = evas_list_prepend(gc->images, im);
gc->images = eina_list_prepend(gc->images, im);
return im;
}
@ -45,17 +44,16 @@ Evas_GL_Image *
evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, DATA32 *data, int alpha, int cspace)
{
Evas_GL_Image *im;
Evas_List *l;
Eina_List *l;
for (l = gc->images; l; l = l->next)
EINA_LIST_FOREACH(gc->images, l, im)
{
im = l->data;
if (((void *)(im->im->image.data) == (void *)data) &&
(im->im->cache_entry.w == w) &&
(im->im->cache_entry.h == h))
{
gc->images = evas_list_remove_list(gc->images, l);
gc->images = evas_list_prepend(gc->images, im);
gc->images = eina_list_remove_list(gc->images, l);
gc->images = eina_list_prepend(gc->images, im);
im->references++;
return im;
}
@ -89,7 +87,7 @@ evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, DATA32 *da
}
/*
im->cached = 1;
gc->images = evas_list_prepend(gc->images, im);
gc->images = eina_list_prepend(gc->images, im);
*/
printf("new im cs = %i\n", im->cs.space);
return im;
@ -179,7 +177,7 @@ evas_gl_common_image_free(Evas_GL_Image *im)
{
if (!im->cs.no_free) free(im->cs.data);
}
if (im->cached) im->gc->images = evas_list_remove(im->gc->images, im);
if (im->cached) im->gc->images = eina_list_remove(im->gc->images, im);
if (im->im) evas_cache_image_drop(&im->im->cache_entry);
if (im->tex) evas_gl_common_texture_free(im->tex);
free(im);

View File

@ -13,7 +13,7 @@ evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y)
if (!pt) return NULL;
pt->x = x;
pt->y = y;
poly->points = evas_list_append(poly->points, pt);
poly->points = eina_list_append(poly->points, pt);
poly->changed = 1;
return poly;
}
@ -27,7 +27,7 @@ evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly)
Evas_GL_Polygon_Point *pt;
pt = poly->points->data;
poly->points = evas_list_remove(poly->points, pt);
poly->points = eina_list_remove(poly->points, pt);
free(pt);
}
if (poly->dl > 0) glDeleteLists(poly->dl, 1);
@ -84,11 +84,12 @@ void
evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly)
{
int r, g, b, a;
Evas_List *l;
Eina_List *l;
static void *tess = NULL;
GLdouble *glp = NULL;
int i, num;
RGBA_Draw_Context *dc = gc->dc;
Evas_GL_Polygon_Point *p;
a = (dc->col.col >> 24) & 0xff;
r = (dc->col.col >> 16) & 0xff;
@ -126,18 +127,15 @@ evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly)
gluTessCallback(tess, GLU_TESS_COMBINE, _evas_gl_tess_combine_cb);
}
num = 0;
num = evas_list_count(poly->points);
num = eina_list_count(poly->points);
i = 0;
glp = malloc(num * 6 * sizeof(GLdouble));
gluTessNormal(tess, 0, 0, 1);
gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD);
gluTessBeginPolygon(tess, NULL);
gluTessBeginContour(tess);
for (l = poly->points; l; l = l->next)
EINA_LIST_FOREACH(poly->points, l, p)
{
Evas_GL_Polygon_Point *p;
p = l->data;
glp[i++] = p->x;
glp[i++] = p->y;
glp[i++] = 0;
@ -149,13 +147,8 @@ evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly)
free(glp);
#else
glBegin(GL_POLYGON);
for (l = poly->points; l; l = l->next)
{
Evas_GL_Polygon_Point *p;
p = l->data;
glVertex2i(p->x, p->y);
}
EINA_LIST_FOREACH(poly->points, l, p)
glVertex2i(p->x, p->y);
glEnd();
#endif
glEndList();

View File

@ -29,7 +29,7 @@ struct _Render_Engine
Eina_Inlist *cur_rect;
int end : 1;
Evas_List *updates;
Eina_List *updates;
};
/* prototypes we will use here */
@ -184,7 +184,7 @@ eng_output_free(void *data)
Render_Engine_Update *reu;
reu = re->updates->data;
re->updates = evas_list_remove_list(re->updates, re->updates);
re->updates = eina_list_remove_list(re->updates, re->updates);
// surface_free(reu->surface);
free(reu);
}
@ -297,7 +297,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
reu->w = w;
reu->h = h;
// reu->surface = surface;
re->updates = evas_list_append(re->updates, reu);
re->updates = eina_list_append(re->updates, reu);
}
static void
@ -311,7 +311,7 @@ eng_output_flush(void *data)
Render_Engine_Update *reu;
reu = re->updates->data;
re->updates = evas_list_remove_list(re->updates, re->updates);
re->updates = eina_list_remove_list(re->updates, re->updates);
// if (re->mask_output)
// {
// Xrender_Surface *tsurf;

View File

@ -435,7 +435,7 @@ eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
{
pt->x = x;
pt->y = y;
poly->points = evas_list_append(poly->points, pt);
poly->points = eina_list_append(poly->points, pt);
}
return poly;
}
@ -451,7 +451,7 @@ eng_polygon_points_clear(void *data, void *context, void *polygon)
while (poly->points)
{
free(poly->points->data);
poly->points = evas_list_remove_list(poly->points, poly->points);
poly->points = eina_list_remove_list(poly->points, poly->points);
}
free(poly);
@ -473,13 +473,10 @@ eng_polygon_draw(void *data, void *context, void *surface, void *polygon)
pt = poly->points->data;
if (pt)
{
Evas_List *l;
Eina_List *l;
CGContextMoveToPoint(re->ctx, pt->x, pt->y);
for (l = poly->points->next; l; l = l->next)
{
pt = l->data;
CGContextAddLineToPoint(re->ctx, pt->x, pt->y);
}
EINA_LIST_FOREACH(poly->points->next, l, pt)
CGContextAddLineToPoint(re->ctx, pt->x, pt->y);
}
r = ctxt->col.r;

View File

@ -27,7 +27,7 @@ typedef struct _Evas_Quartz_Polygon Evas_Quartz_Polygon;
struct _Evas_Quartz_Polygon
{
Evas_List *points;
Eina_List *points;
};
typedef struct _Evas_Quartz_Polygon_Point Evas_Quartz_Polygon_Point;

View File

@ -51,12 +51,12 @@ struct _Outbuf
/* 1 big buffer for updates - flush on idle_flush */
RGBA_Image *onebuf;
Evas_List *onebuf_regions;
Eina_List *onebuf_regions;
/* a list of pending regions to write to the target */
Evas_List *pending_writes;
Eina_List *pending_writes;
/* a list of previous frame pending regions to write to the target */
Evas_List *prev_pending_writes;
Eina_List *prev_pending_writes;
unsigned char mask_dither : 1;
unsigned char destination_alpha : 1;

View File

@ -2,7 +2,7 @@
#include "evas_engine.h"
static Evas_List *ddpool = NULL;
static Eina_List *ddpool = NULL;
static int ddsize = 0;
static int ddmemlimit = 10 * 1024 * 1024;
static int ddcountlimit = 32;
@ -10,9 +10,10 @@ static int ddcountlimit = 32;
static DD_Output_Buffer *
_find_ddob(int depth, int w, int h, void *data)
{
Evas_List *l;
Evas_List *ddl;
Eina_List *l;
Eina_List *ddl;
DD_Output_Buffer *ddob = NULL;
DD_Output_Buffer *ddob2;
int sz;
int lbytes;
int bpp;
@ -21,11 +22,8 @@ _find_ddob(int depth, int w, int h, void *data)
if (bpp == 3) bpp = 4;
lbytes = (((w * bpp) + 3) / 4) * 4;
sz = lbytes * h;
for (l = ddpool; l; l = l->next)
EINA_LIST_FOREACH(ddpool, l, ddob2)
{
DD_Output_Buffer *ddob2;
ddob2 = l->data;
if (ddob2->depth != depth)
continue;
if (ddob2->psize == sz)
@ -39,7 +37,7 @@ _find_ddob(int depth, int w, int h, void *data)
return evas_software_ddraw_output_buffer_new(depth, w, h, data);
have_ddob:
ddpool = evas_list_remove_list(ddpool, ddl);
ddpool = eina_list_remove_list(ddpool, ddl);
ddob->width = w;
ddob->height = h;
ddob->pitch = lbytes;
@ -51,21 +49,21 @@ _find_ddob(int depth, int w, int h, void *data)
static void
_unfind_ddob(DD_Output_Buffer *ddob)
{
ddpool = evas_list_prepend(ddpool, ddob);
ddpool = eina_list_prepend(ddpool, ddob);
ddsize += ddob->psize * ddob->depth / 8;
while ((ddsize > (ddmemlimit)) ||
(evas_list_count(ddpool) > ddcountlimit))
(eina_list_count(ddpool) > ddcountlimit))
{
Evas_List *xl;
Eina_List *xl;
xl = evas_list_last(ddpool);
xl = eina_list_last(ddpool);
if (!xl)
{
ddsize = 0;
break;
}
ddob = xl->data;
ddpool = evas_list_remove_list(ddpool, xl);
ddpool = eina_list_remove_list(ddpool, xl);
evas_software_ddraw_output_buffer_free(ddob);
}
}
@ -78,7 +76,7 @@ _clear_ddob(int sync)
DD_Output_Buffer *ddob;
ddob = ddpool->data;
ddpool = evas_list_remove_list(ddpool, ddpool);
ddpool = eina_list_remove_list(ddpool, ddpool);
evas_software_ddraw_output_buffer_free(ddob);
}
ddsize = 0;
@ -266,7 +264,7 @@ evas_software_ddraw_outbuf_new_region_for_update(Outbuf *buf,
*/
}
buf->priv.pending_writes = evas_list_append(buf->priv.pending_writes, im);
buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im);
return im;
}
@ -358,7 +356,9 @@ evas_software_ddraw_outbuf_free_region_for_update(Outbuf *buf,
void
evas_software_ddraw_outbuf_flush(Outbuf *buf)
{
Evas_List *l;
Eina_List *l;
RGBA_Image *im;
Outbuf_Region *obr;
void *ddraw_data;
int ddraw_width;
int ddraw_height;
@ -374,13 +374,10 @@ evas_software_ddraw_outbuf_flush(Outbuf *buf)
goto free_images;
/* copy safely the images that need to be drawn onto the back surface */
for (l = buf->priv.pending_writes; l; l = l->next)
EINA_LIST_FOREACH(buf->priv.pending_writes, l, im)
{
RGBA_Image *im;
Outbuf_Region *obr;
DD_Output_Buffer *ddob;
im = l->data;
obr = im->extended_info;
ddob = obr->ddob;
evas_software_ddraw_output_buffer_paste(ddob,
@ -399,12 +396,9 @@ evas_software_ddraw_outbuf_flush(Outbuf *buf)
free_images:
while (buf->priv.prev_pending_writes)
{
RGBA_Image *im;
Outbuf_Region *obr;
im = buf->priv.prev_pending_writes->data;
buf->priv.prev_pending_writes =
evas_list_remove_list(buf->priv.prev_pending_writes,
eina_list_remove_list(buf->priv.prev_pending_writes,
buf->priv.prev_pending_writes);
obr = im->extended_info;
evas_cache_image_drop((Image_Entry *)im);
@ -430,7 +424,7 @@ evas_software_ddraw_outbuf_idle_flush(Outbuf *buf)
im = buf->priv.prev_pending_writes->data;
buf->priv.prev_pending_writes =
evas_list_remove_list(buf->priv.prev_pending_writes,
eina_list_remove_list(buf->priv.prev_pending_writes,
buf->priv.prev_pending_writes);
obr = im->extended_info;
evas_cache_image_drop((Image_Entry *)im);

View File

@ -54,12 +54,12 @@ struct _Outbuf
/* 1 big buffer for updates - flush on idle_flush */
RGBA_Image *onebuf;
Evas_List *onebuf_regions;
Eina_List *onebuf_regions;
/* a list of pending regions to write to the target */
Evas_List *pending_writes;
Eina_List *pending_writes;
/* a list of previous frame pending regions to write to the target */
Evas_List *prev_pending_writes;
Eina_List *prev_pending_writes;
unsigned char mask_dither : 1;
unsigned char destination_alpha : 1;

View File

@ -4,15 +4,16 @@
#include <sys/time.h>
#include <sys/utsname.h>
static Evas_List *shmpool = NULL;
static Eina_List *shmpool = NULL;
static int shmsize = 0;
static int shmmemlimit = 10 * 1024 * 1024;
static int shmcountlimit = 32;
static X_Output_Buffer *
_find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data)
{
Evas_List *l, *xl;
Eina_List *l, *xl;
X_Output_Buffer *xob = NULL;
X_Output_Buffer *xob2;
int fitness = 0x7fffffff;
int sz, lbytes, bpp;
@ -28,12 +29,10 @@ _find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data)
else
lbytes = ((w + 31) / 32) * 4;
sz = lbytes * h;
for (l = shmpool; l; l = l->next)
EINA_LIST_FOREACH(shmpool, l, xob2)
{
X_Output_Buffer *xob2;
int szdif;
xob2 = l->data;
if ((xob2->xim->depth != depth) || (xob2->visual != v) ||
(xob2->display != d))
continue;
@ -56,7 +55,7 @@ _find_xob(Display *d, Visual *v, int depth, int w, int h, int shm, void *data)
return evas_software_x11_x_output_buffer_new(d, v, depth, w, h, shm, data);
have_xob:
shmpool = evas_list_remove_list(shmpool, xl);
shmpool = eina_list_remove_list(shmpool, xl);
xob->w = w;
xob->h = h;
xob->bpl = lbytes;
@ -73,21 +72,21 @@ _unfind_xob(X_Output_Buffer *xob, int sync)
// evas_software_x11_x_output_buffer_free(xob, sync); return;
if (xob->shm_info)
{
shmpool = evas_list_prepend(shmpool, xob);
shmpool = eina_list_prepend(shmpool, xob);
shmsize += xob->psize * xob->xim->depth / 8;
while ((shmsize > (shmmemlimit)) ||
(evas_list_count(shmpool) > shmcountlimit))
(eina_list_count(shmpool) > shmcountlimit))
{
Evas_List *xl;
Eina_List *xl;
xl = evas_list_last(shmpool);
xl = eina_list_last(shmpool);
if (!xl)
{
shmsize = 0;
break;
}
xob = xl->data;
shmpool = evas_list_remove_list(shmpool, xl);
shmpool = eina_list_remove_list(shmpool, xl);
evas_software_x11_x_output_buffer_free(xob, sync);
}
}
@ -103,7 +102,7 @@ _clear_xob(int sync)
X_Output_Buffer *xob;
xob = shmpool->data;
shmpool = evas_list_remove_list(shmpool, shmpool);
shmpool = eina_list_remove_list(shmpool, shmpool);
evas_software_x11_x_output_buffer_free(xob, sync);
}
shmsize = 0;
@ -123,7 +122,7 @@ evas_software_x11_outbuf_free(Outbuf *buf)
Outbuf_Region *obr;
im = buf->priv.pending_writes->data;
buf->priv.pending_writes = evas_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
obr = im->extended_info;
evas_cache_image_drop(&im->cache_entry);
if (obr->xob) _unfind_xob(obr->xob, 0);
@ -342,7 +341,7 @@ evas_software_x11_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w,
rect->y = y;
rect->w = w;
rect->h = h;
buf->priv.onebuf_regions = evas_list_append(buf->priv.onebuf_regions, rect);
buf->priv.onebuf_regions = eina_list_append(buf->priv.onebuf_regions, rect);
if (buf->priv.onebuf)
{
*cx = x;
@ -548,7 +547,7 @@ evas_software_x11_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w,
/* FIXME: faster memset! */
memset(im->image.data, 0, w * h * sizeof(DATA32));
buf->priv.pending_writes = evas_list_append(buf->priv.pending_writes, im);
buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im);
return im;
}
@ -561,14 +560,14 @@ evas_software_x11_outbuf_free_region_for_update(Outbuf *buf, RGBA_Image *update)
void
evas_software_x11_outbuf_flush(Outbuf *buf)
{
Evas_List *l;
Eina_List *l;
RGBA_Image *im;
Outbuf_Region *obr;
if ((buf->priv.onebuf) && (buf->priv.onebuf_regions))
{
RGBA_Image *im;
Outbuf_Region *obr;
Region tmpr;
im = buf->priv.onebuf;
obr = im->extended_info;
tmpr = XCreateRegion();
@ -576,9 +575,9 @@ evas_software_x11_outbuf_flush(Outbuf *buf)
{
Evas_Rectangle *rect;
XRectangle xr;
rect = buf->priv.onebuf_regions->data;
buf->priv.onebuf_regions = evas_list_remove_list(buf->priv.onebuf_regions, buf->priv.onebuf_regions);
buf->priv.onebuf_regions = eina_list_remove_list(buf->priv.onebuf_regions, buf->priv.onebuf_regions);
xr.x = rect->x;
xr.y = rect->y;
xr.width = rect->w;
@ -607,13 +606,9 @@ evas_software_x11_outbuf_flush(Outbuf *buf)
else
{
#if 1
XSync(buf->priv.x.disp, False);
for (l = buf->priv.pending_writes; l; l = l->next)
XSync(buf->priv.x.disp, False);
EINA_LIST_FOREACH(buf->priv.pending_writes, l, im)
{
RGBA_Image *im;
Outbuf_Region *obr;
im = l->data;
obr = im->extended_info;
if (buf->priv.debug)
evas_software_x11_outbuf_debug_show(buf, buf->priv.x.win,
@ -629,12 +624,9 @@ evas_software_x11_outbuf_flush(Outbuf *buf)
}
while (buf->priv.prev_pending_writes)
{
RGBA_Image *im;
Outbuf_Region *obr;
im = buf->priv.prev_pending_writes->data;
buf->priv.prev_pending_writes =
evas_list_remove_list(buf->priv.prev_pending_writes,
eina_list_remove_list(buf->priv.prev_pending_writes,
buf->priv.prev_pending_writes);
obr = im->extended_info;
evas_cache_image_drop(&im->cache_entry);
@ -652,12 +644,8 @@ evas_software_x11_outbuf_flush(Outbuf *buf)
#else
/* XX async push - disable */
/*
for (l = buf->priv.pending_writes; l; l = l->next)
EINA_LIST_FOREACH(buf->priv.pending_writes, l, im)
{
RGBA_Image *im;
Outbuf_Region *obr;
im = l->data;
obr = im->extended_info;
if (buf->priv.debug)
evas_software_x11_outbuf_debug_show(buf, buf->priv.x.win,
@ -679,8 +667,8 @@ evas_software_x11_outbuf_flush(Outbuf *buf)
RGBA_Image *im;
Outbuf_Region *obr;
im = evas_list_data(buf->priv.pending_writes);
buf->priv.pending_writes = evas_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
im = eina_list_data_get(buf->priv.pending_writes);
buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
obr = im->extended_info;
evas_cache_image_drop(&im->cache_entry);
if (obr->xob) _unfind_xob(obr->xob, 0);
@ -723,7 +711,7 @@ evas_software_x11_outbuf_idle_flush(Outbuf *buf)
im = buf->priv.prev_pending_writes->data;
buf->priv.prev_pending_writes =
evas_list_remove_list(buf->priv.prev_pending_writes,
eina_list_remove_list(buf->priv.prev_pending_writes,
buf->priv.prev_pending_writes);
obr = im->extended_info;
evas_cache_image_drop(&im->cache_entry);

View File

@ -17,7 +17,7 @@ typedef DATA8 * (*X_Func_Alloc_Colors) (Display *d, Colormap cmap, Visual *v);
static X_Func_Alloc_Colors x_color_alloc[PAL_MODE_LAST + 1];
static int x_color_count[PAL_MODE_LAST + 1];
static Evas_List *palettes = NULL;
static Eina_List *palettes = NULL;
static DATA8 * x_color_alloc_rgb(int nr, int ng, int nb, Display *d, Colormap cmap, Visual *v);
static DATA8 * x_color_alloc_gray(int ng, Display *d, Colormap cmap, Visual *v);
@ -291,12 +291,11 @@ evas_software_x11_x_color_allocate(Display *disp, Colormap cmap, Visual *vis, Co
Convert_Pal_Priv *palpriv;
Convert_Pal *pal;
Convert_Pal_Mode c;
Evas_List *l;
Eina_List *l;
/* printf("ALLOC cmap=%i vis=%p\n", cmap, vis);*/
for (l = palettes; l; l = l->next)
EINA_LIST_FOREACH(palettes, l, pal)
{
pal = l->data;
palpriv = pal->data;
if ((disp == palpriv->disp) &&
(vis == palpriv->vis) &&
@ -337,7 +336,7 @@ evas_software_x11_x_color_allocate(Display *disp, Colormap cmap, Visual *vis, Co
free(pal);
return NULL;
}
palettes = evas_list_append(palettes, pal);
palettes = eina_list_append(palettes, pal);
return pal;
}
@ -357,6 +356,6 @@ evas_software_x11_x_color_deallocate(Display *disp, Colormap cmap, Visual *vis,
free(pal->lookup);
}
free(pal->data);
palettes = evas_list_remove(palettes, pal);
palettes = eina_list_remove(palettes, pal);
free(pal);
}

View File

@ -54,12 +54,12 @@ struct _Outbuf
/* 1 big buffer for updates - flush on idle_flush */
RGBA_Image *onebuf;
Evas_List *onebuf_regions;
Eina_List *onebuf_regions;
/* a list of pending regions to write to the target */
Evas_List *pending_writes;
Eina_List *pending_writes;
/* a list of previous frame pending regions to write to the target */
Evas_List *prev_pending_writes;
Eina_List *prev_pending_writes;
unsigned char mask_dither : 1;
unsigned char destination_alpha : 1;

View File

@ -8,7 +8,7 @@
#include <sys/utsname.h>
static Evas_List *shmpool = NULL;
static Eina_List *shmpool = NULL;
static int shmsize = 0;
static int shmmemlimit = 10 * 1024 * 1024;
static int shmcountlimit = 32;
@ -16,9 +16,10 @@ static int shmcountlimit = 32;
static Xcb_Output_Buffer *
_find_xcbob(xcb_connection_t *conn, int depth, int w, int h, int shm, void *data)
{
Evas_List *l;
Evas_List *xl;
Eina_List *l;
Eina_List *xl;
Xcb_Output_Buffer *xcbob = NULL;
Xcb_Output_Buffer *xcbob2;
int fitness = 0x7fffffff;
int sz;
int lbytes;
@ -36,12 +37,10 @@ _find_xcbob(xcb_connection_t *conn, int depth, int w, int h, int shm, void *data
else
lbytes = ((w + 31) / 32) * 4;
sz = lbytes * h;
for (l = shmpool; l; l = l->next)
EINA_LIST_FOREACH(shmpool, l, xcbob2)
{
Xcb_Output_Buffer *xcbob2;
int szdif;
xcbob2 = l->data;
if ((xcbob2->image->depth != depth) ||
(xcbob2->connection != conn))
continue;
@ -64,7 +63,7 @@ _find_xcbob(xcb_connection_t *conn, int depth, int w, int h, int shm, void *data
return evas_software_xcb_x_output_buffer_new(conn, depth, w, h, shm, data);
have_xcbob:
shmpool = evas_list_remove_list(shmpool, xl);
shmpool = eina_list_remove_list(shmpool, xl);
xcbob->w = w;
xcbob->h = h;
xcbob->bpl = lbytes;
@ -81,21 +80,21 @@ _unfind_xcbob(Xcb_Output_Buffer *xcbob, int sync)
// evas_software_xcb_x_output_buffer_free(xcbob, sync); return;
if (xcbob->shm_info)
{
shmpool = evas_list_prepend(shmpool, xcbob);
shmpool = eina_list_prepend(shmpool, xcbob);
shmsize += xcbob->psize * xcbob->image->depth / 8;
while ((shmsize > (shmmemlimit)) ||
(evas_list_count(shmpool) > shmcountlimit))
(eina_list_count(shmpool) > shmcountlimit))
{
Evas_List *xl;
Eina_List *xl;
xl = evas_list_last(shmpool);
xl = eina_list_last(shmpool);
if (!xl)
{
shmsize = 0;
break;
}
xcbob = xl->data;
shmpool = evas_list_remove_list(shmpool, xl);
shmpool = eina_list_remove_list(shmpool, xl);
evas_software_xcb_x_output_buffer_free(xcbob, sync);
}
}
@ -111,7 +110,7 @@ _clear_xcbob(int sync)
Xcb_Output_Buffer *xcbob;
xcbob = shmpool->data;
shmpool = evas_list_remove_list(shmpool, shmpool);
shmpool = eina_list_remove_list(shmpool, shmpool);
evas_software_xcb_x_output_buffer_free(xcbob, sync);
}
shmsize = 0;
@ -131,7 +130,7 @@ evas_software_xcb_outbuf_free(Outbuf * buf)
Outbuf_Region *obr;
im = buf->priv.pending_writes->data;
buf->priv.pending_writes = evas_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
obr = im->extended_info;
evas_cache_image_drop(&im->cache_entry);
if (obr->xcbob) _unfind_xcbob(obr->xcbob, 0);
@ -389,7 +388,7 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
rect->y = y;
rect->w = w;
rect->h = h;
buf->priv.onebuf_regions = evas_list_append(buf->priv.onebuf_regions, rect);
buf->priv.onebuf_regions = eina_list_append(buf->priv.onebuf_regions, rect);
if (buf->priv.onebuf)
{
*cx = x;
@ -575,7 +574,7 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf,
/* FIXME: faster memset! */
memset(im->image.data, 0, w * h * sizeof(DATA32));
buf->priv.pending_writes = evas_list_append(buf->priv.pending_writes, im);
buf->priv.pending_writes = eina_list_append(buf->priv.pending_writes, im);
return im;
}
@ -589,12 +588,13 @@ evas_software_xcb_outbuf_free_region_for_update(Outbuf *buf,
void
evas_software_xcb_outbuf_flush(Outbuf *buf)
{
Evas_List *l;
Eina_List *l;
RGBA_Image *im;
Outbuf_Region *obr;
if ((buf->priv.onebuf) && (buf->priv.onebuf_regions))
{
RGBA_Image *im;
Outbuf_Region *obr;
pixman_region16_t tmpr;
im = buf->priv.onebuf;
@ -605,7 +605,7 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
Evas_Rectangle *rect;
rect = buf->priv.onebuf_regions->data;
buf->priv.onebuf_regions = evas_list_remove_list(buf->priv.onebuf_regions, buf->priv.onebuf_regions);
buf->priv.onebuf_regions = eina_list_remove_list(buf->priv.onebuf_regions, buf->priv.onebuf_regions);
pixman_region_union_rect(&tmpr, &tmpr,
rect->x, rect->y,
rect->w, rect->h);
@ -639,12 +639,8 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
#if 1
/* we sync */
free(xcb_get_input_focus_reply(buf->priv.x.conn, xcb_get_input_focus_unchecked(buf->priv.x.conn), NULL));
for (l = buf->priv.pending_writes; l; l = l->next)
EINA_LIST_FOREACH(buf->priv.pending_writes, l, im)
{
RGBA_Image *im;
Outbuf_Region *obr;
im = l->data;
obr = im->extended_info;
if (buf->priv.debug)
evas_software_xcb_outbuf_debug_show(buf,
@ -667,11 +663,8 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
}
while (buf->priv.pending_writes)
{
RGBA_Image *im;
Outbuf_Region *obr;
im = buf->priv.pending_writes->data;
buf->priv.pending_writes = evas_list_remove_list(buf->priv.pending_writes,
buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes,
buf->priv.pending_writes);
obr = im->extended_info;
evas_cache_image_drop(&im->cache_entry);
@ -687,12 +680,8 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
#else
/* XX async push - disable */
/*
for (l = buf->priv.pending_writes; l; l = l->next)
EINA_LIST_FOREACH(buf->priv.pending_writes, l, im)
{
RGBA_Image *im;
Outbuf_Region *obr;
im = l->data;
obr = im->extended_info;
if (buf->priv.debug)
evas_software_x11_outbuf_debug_show(buf, buf->priv.x.win,
@ -712,11 +701,8 @@ evas_software_xcb_outbuf_flush(Outbuf *buf)
while (buf->priv.pending_writes)
{
RGBA_Image *im;
Outbuf_Region *obr;
im = evas_list_data(buf->priv.pending_writes);
buf->priv.pending_writes = evas_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
im = eina_list_data_get(buf->priv.pending_writes);
buf->priv.pending_writes = eina_list_remove_list(buf->priv.pending_writes, buf->priv.pending_writes);
obr = im->extended_info;
evas_cache_image_drop(&im->cache_entry);
if (obr->xcbob) _unfind_xcbob(obr->xcbob, 0);
@ -760,7 +746,7 @@ evas_software_xcb_outbuf_idle_flush(Outbuf *buf)
im = buf->priv.prev_pending_writes->data;
buf->priv.prev_pending_writes =
evas_list_remove_list(buf->priv.prev_pending_writes,
eina_list_remove_list(buf->priv.prev_pending_writes,
buf->priv.prev_pending_writes);
obr = im->extended_info;
evas_cache_image_drop(&im->cache_entry);

View File

@ -16,7 +16,7 @@ typedef DATA8 * (*Xcb_Func_Alloc_Colors) (xcb_connection_t *conn, xcb_colormap_t
static Xcb_Func_Alloc_Colors x_color_alloc[PAL_MODE_LAST + 1];
static int x_color_count[PAL_MODE_LAST + 1];
static Evas_List *palettes = NULL;
static Eina_List *palettes = NULL;
static DATA8 * x_color_alloc_rgb(int nr, int ng, int nb, xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v);
static DATA8 * x_color_alloc_gray(int ng, xcb_connection_t *conn, xcb_colormap_t cmap, xcb_visualtype_t *v);
@ -352,12 +352,11 @@ evas_software_xcb_x_color_allocate(xcb_connection_t *conn,
Convert_Pal_Priv *palpriv;
Convert_Pal *pal;
Convert_Pal_Mode c;
Evas_List *l;
Eina_List *l;
/* printf("ALLOC cmap=%i vis=%p\n", cmap, vis);*/
for (l = palettes; l; l = l->next)
EINA_LIST_FOREACH(palettes, l, pal)
{
pal = l->data;
palpriv = pal->data;
if ((conn == palpriv->conn) &&
(vis == palpriv->vis) &&
@ -398,7 +397,7 @@ evas_software_xcb_x_color_allocate(xcb_connection_t *conn,
free(pal);
return NULL;
}
palettes = evas_list_append(palettes, pal);
palettes = eina_list_append(palettes, pal);
return pal;
}
@ -421,6 +420,6 @@ evas_software_xcb_x_color_deallocate(xcb_connection_t *conn,
free(pal->lookup);
}
free(pal->data);
palettes = evas_list_remove(palettes, pal);
palettes = eina_list_remove(palettes, pal);
free(pal);
}

View File

@ -33,7 +33,7 @@ struct _Render_Engine
Eina_Inlist *cur_rect;
int end : 1;
Evas_List *updates;
Eina_List *updates;
};
/* internal engine routines */
@ -140,7 +140,7 @@ eng_output_free(void *data)
Render_Engine_Update *reu;
reu = re->updates->data;
re->updates = evas_list_remove_list(re->updates, re->updates);
re->updates = eina_list_remove_list(re->updates, re->updates);
_xr_render_surface_free(reu->surface);
free(reu);
}
@ -268,7 +268,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
reu->w = w;
reu->h = h;
reu->surface = (Xrender_Surface *)surface;
re->updates = evas_list_append(re->updates, reu);
re->updates = eina_list_append(re->updates, reu);
}
static void
@ -282,7 +282,7 @@ eng_output_flush(void *data)
Render_Engine_Update *reu;
reu = re->updates->data;
re->updates = evas_list_remove_list(re->updates, re->updates);
re->updates = eina_list_remove_list(re->updates, re->updates);
if (re->mask_output)
{
Xrender_Surface *tsurf;

View File

@ -21,7 +21,7 @@ struct _Ximage_Info
int depth;
Visual *vis;
int pool_mem;
Evas_List *pool;
Eina_List *pool;
unsigned char can_do_shm;
XRenderPictFormat *fmt32;
XRenderPictFormat *fmt24;

View File

@ -6,7 +6,7 @@
static Evas_Hash *_xr_image_hash = NULL;
static int _xr_image_cache_size = 0;
static int _xr_image_cache_usage = 0;
static Evas_List *_xr_image_cache = NULL;
static Eina_List *_xr_image_cache = NULL;
static Evas_Hash *_xr_image_dirty_hash = NULL;
static void
@ -46,14 +46,14 @@ __xre_image_find(char *fkey)
im = evas_hash_find(_xr_image_hash, fkey);
if (!im)
{
Evas_List *l;
Eina_List *l;
for (l = _xr_image_cache; l; l = l->next)
{
im = l->data;
if (!strcmp(im->fkey, fkey))
{
_xr_image_cache = evas_list_remove_list(_xr_image_cache, l);
_xr_image_cache = eina_list_remove_list(_xr_image_cache, l);
_xr_image_hash = evas_hash_add(_xr_image_hash, im->fkey, im);
_xr_image_cache_usage -= (im->w * im->h * 4);
break;
@ -255,7 +255,7 @@ _xre_image_free(XR_Image *im)
{
if (im->fkey)
_xr_image_hash = evas_hash_del(_xr_image_hash, im->fkey, im);
_xr_image_cache = evas_list_prepend(_xr_image_cache, im);
_xr_image_cache = eina_list_prepend(_xr_image_cache, im);
_xr_image_cache_usage += (im->w * im->h * 4);
_xre_image_cache_set(_xr_image_cache_size);
}
@ -668,15 +668,15 @@ _xre_image_cache_set(int size)
_xr_image_cache_size = size;
while (_xr_image_cache_usage > _xr_image_cache_size)
{
Evas_List *l;
Eina_List *l;
l = evas_list_last(_xr_image_cache);
l = eina_list_last(_xr_image_cache);
if (l)
{
XR_Image *im;
im = l->data;
_xr_image_cache = evas_list_remove_list(_xr_image_cache, l);
_xr_image_cache = eina_list_remove_list(_xr_image_cache, l);
_xr_image_cache_usage -= (im->w * im->h * 4);
__xre_image_real_free(im);
}

View File

@ -3,7 +3,7 @@
#include "evas_engine.h"
#include "Evas_Engine_XRender_X11.h"
static Evas_List *_image_info_list = NULL;
static Eina_List *_image_info_list = NULL;
static int _x_err = 0;
static void
@ -17,20 +17,17 @@ Ximage_Info *
_xr_image_info_get(Display *disp, Drawable draw, Visual *vis)
{
Ximage_Info *xinf, *xinf2;
Evas_List *l;
Eina_List *l;
int di;
unsigned int dui;
xinf2 = NULL;
for (l = _image_info_list; l; l = l->next)
{
xinf = l->data;
if (xinf->disp == disp)
{
xinf2 = xinf;
break;
}
}
EINA_LIST_FOREACH(_image_info_list, l, xinf)
if (xinf->disp == disp)
{
xinf2 = xinf;
break;
}
xinf = calloc(1, sizeof(Ximage_Info));
if (!xinf) return NULL;
@ -99,7 +96,7 @@ _xr_image_info_get(Display *disp, Drawable draw, Visual *vis)
XDestroyImage(xim);
}
}
_image_info_list = evas_list_prepend(_image_info_list, xinf);
_image_info_list = eina_list_prepend(_image_info_list, xinf);
return xinf;
}
@ -112,14 +109,14 @@ _xr_image_info_free(Ximage_Info *xinf)
if (xinf->references != 0) return;
_xr_render_surface_free(xinf->mul);
free(xinf);
_image_info_list = evas_list_remove(_image_info_list, xinf);
_image_info_list = eina_list_remove(_image_info_list, xinf);
}
void
_xr_image_info_pool_flush(Ximage_Info *xinf, int max_num, int max_mem)
{
if ((xinf->pool_mem <= max_mem) && (evas_list_count(xinf->pool) <= max_num)) return;
while ((xinf->pool_mem > max_mem) || (evas_list_count(xinf->pool) > max_num))
if ((xinf->pool_mem <= max_mem) && (eina_list_count(xinf->pool) <= max_num)) return;
while ((xinf->pool_mem > max_mem) || (eina_list_count(xinf->pool) > max_num))
{
Ximage_Image *xim;
@ -133,12 +130,11 @@ Ximage_Image *
_xr_image_new(Ximage_Info *xinf, int w, int h, int depth)
{
Ximage_Image *xim, *xim2;
Evas_List *l;
Eina_List *l;
xim2 = NULL;
for (l = xinf->pool; l; l = l->next)
EINA_LIST_FOREACH(xinf->pool, l, xim)
{
xim = l->data;
if ((xim->w >= w) && (xim->h >= h) && (xim->depth == depth) && (xim->available))
{
if (!xim2) xim2 = xim;
@ -212,7 +208,7 @@ _xr_image_new(Ximage_Info *xinf, int w, int h, int depth)
xim->line_bytes = xim->xim->bytes_per_line;
xim->data = (void *)(xim->xim->data);
xinf->pool_mem += (xim->w * xim->h * xim->depth);
xinf->pool = evas_list_append(xinf->pool, xim);
xinf->pool = eina_list_append(xinf->pool, xim);
return xim;
}
@ -235,7 +231,7 @@ _xr_image_free(Ximage_Image *xim)
XDestroyImage(xim->xim);
}
xim->xinf->pool_mem -= (xim->w * xim->h * xim->depth);
xim->xinf->pool = evas_list_remove(xim->xinf->pool, xim);
xim->xinf->pool = eina_list_remove(xim->xinf->pool, xim);
free(xim);
}

View File

@ -36,7 +36,7 @@ struct _Render_Engine
Eina_Inlist *cur_rect;
int end : 1;
Evas_List *updates;
Eina_List *updates;
};
/* internal engine routines */
@ -147,7 +147,7 @@ eng_output_free(void *data)
Render_Engine_Update *reu;
reu = re->updates->data;
re->updates = evas_list_remove_list(re->updates, re->updates);
re->updates = eina_list_remove_list(re->updates, re->updates);
_xr_render_surface_free(reu->surface);
free(reu);
}
@ -278,7 +278,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
reu->w = w;
reu->h = h;
reu->surface = (Xcb_Render_Surface *)surface;
re->updates = evas_list_append(re->updates, reu);
re->updates = eina_list_append(re->updates, reu);
}
static void
@ -293,7 +293,7 @@ eng_output_flush(void *data)
Render_Engine_Update *reu;
reu = re->updates->data;
re->updates = evas_list_remove_list(re->updates, re->updates);
re->updates = eina_list_remove_list(re->updates, re->updates);
if (re->mask_output)
{
Xcb_Render_Surface *tsurf;

View File

@ -20,7 +20,7 @@ struct _Xcb_Image_Info
int depth;
xcb_visualid_t vis;
int pool_mem;
Evas_List *pool;
Eina_List *pool;
unsigned char can_do_shm;
xcb_render_pictforminfo_t *fmt32;
xcb_render_pictforminfo_t *fmt24;

View File

@ -6,7 +6,7 @@
static Evas_Hash *_xr_image_hash = NULL;
static int _xr_image_cache_size = 0;
static int _xr_image_cache_usage = 0;
static Evas_List *_xr_image_cache = NULL;
static Eina_List *_xr_image_cache = NULL;
static Evas_Hash *_xr_image_dirty_hash = NULL;
static void
@ -42,18 +42,17 @@ static XR_Image *
__xre_image_find(char *fkey)
{
XR_Image *im;
im = evas_hash_find(_xr_image_hash, fkey);
if (!im)
{
Evas_List *l;
for (l = _xr_image_cache; l; l = l->next)
Eina_List *l;
EINA_LIST_FOREACH(_xr_image_cache, l, im)
{
im = l->data;
if (!strcmp(im->fkey, fkey))
{
_xr_image_cache = evas_list_remove_list(_xr_image_cache, l);
_xr_image_cache = eina_list_remove_list(_xr_image_cache, l);
_xr_image_hash = evas_hash_add(_xr_image_hash, im->fkey, im);
_xr_image_cache_usage -= (im->w * im->h * 4);
break;
@ -219,7 +218,7 @@ _xre_image_free(XR_Image *im)
{
if (im->fkey)
_xr_image_hash = evas_hash_del(_xr_image_hash, im->fkey, im);
_xr_image_cache = evas_list_prepend(_xr_image_cache, im);
_xr_image_cache = eina_list_prepend(_xr_image_cache, im);
_xr_image_cache_usage += (im->w * im->h * 4);
_xre_image_cache_set(_xr_image_cache_size);
}
@ -592,15 +591,15 @@ _xre_image_cache_set(int size)
_xr_image_cache_size = size;
while (_xr_image_cache_usage > _xr_image_cache_size)
{
Evas_List *l;
Eina_List *l;
l = evas_list_last(_xr_image_cache);
l = eina_list_last(_xr_image_cache);
if (l)
{
XR_Image *im;
im = l->data;
_xr_image_cache = evas_list_remove_list(_xr_image_cache, l);
_xr_image_cache = eina_list_remove_list(_xr_image_cache, l);
_xr_image_cache_usage -= (im->w * im->h * 4);
__xre_image_real_free(im);
}

View File

@ -3,7 +3,7 @@
#include "evas_engine.h"
#include "Evas_Engine_XRender_Xcb.h"
static Evas_List *_image_info_list = NULL;
static Eina_List *_image_info_list = NULL;
static int _xcb_err = 0;
@ -265,12 +265,11 @@ _xr_image_info_get(xcb_connection_t *conn, xcb_drawable_t draw, xcb_visualid_t v
xcb_get_geometry_reply_t *rep;
Xcb_Image_Info *xcbinf;
Xcb_Image_Info *xcbinf2;
Evas_List *l;
Eina_List *l;
xcbinf2 = NULL;
for (l = _image_info_list; l; l = l->next)
EINA_LIST_FOREACH(_image_info_list, l, xcbinf)
{
xcbinf = l->data;
if (xcbinf->conn == conn)
{
xcbinf2 = xcbinf;
@ -368,7 +367,7 @@ _xr_image_info_get(xcb_connection_t *conn, xcb_drawable_t draw, xcb_visualid_t v
xcb_image_shm_destroy(xcbim);
}
}
_image_info_list = evas_list_prepend(_image_info_list, xcbinf);
_image_info_list = eina_list_prepend(_image_info_list, xcbinf);
return xcbinf;
}
@ -400,14 +399,14 @@ _xr_image_info_free(Xcb_Image_Info *xcbinf)
if (xcbinf->fmt32)
free(xcbinf->fmt32);
free(xcbinf);
_image_info_list = evas_list_remove(_image_info_list, xcbinf);
_image_info_list = eina_list_remove(_image_info_list, xcbinf);
}
void
_xr_image_info_pool_flush(Xcb_Image_Info *xcbinf, int max_num, int max_mem)
{
if ((xcbinf->pool_mem <= max_mem) && (evas_list_count(xcbinf->pool) <= max_num)) return;
while ((xcbinf->pool_mem > max_mem) || (evas_list_count(xcbinf->pool) > max_num))
if ((xcbinf->pool_mem <= max_mem) && (eina_list_count(xcbinf->pool) <= max_num)) return;
while ((xcbinf->pool_mem > max_mem) || (eina_list_count(xcbinf->pool) > max_num))
{
Xcb_Image_Image *xcbim;
@ -421,12 +420,11 @@ Xcb_Image_Image *
_xr_image_new(Xcb_Image_Info *xcbinf, int w, int h, int depth)
{
Xcb_Image_Image *xcbim, *xcbim2;
Evas_List *l;
Eina_List *l;
xcbim2 = NULL;
for (l = xcbinf->pool; l; l = l->next)
EINA_LIST_FOREACH(xcbinf->pool, l, xcbim)
{
xcbim = l->data;
if ((xcbim->w >= w) && (xcbim->h >= h) && (xcbim->depth == depth) && (xcbim->available))
{
if (!xcbim2) xcbim2 = xcbim;
@ -513,7 +511,7 @@ _xr_image_new(Xcb_Image_Info *xcbinf, int w, int h, int depth)
xcbim->line_bytes = xcbim->xcbim->bytes_per_line;
xcbim->data = (void *)(xcbim->xcbim->data);
xcbinf->pool_mem += (xcbim->w * xcbim->h * xcbim->depth);
xcbinf->pool = evas_list_append(xcbinf->pool, xcbim);
xcbinf->pool = eina_list_append(xcbinf->pool, xcbim);
return xcbim;
}
@ -544,7 +542,7 @@ _xr_image_free(Xcb_Image_Image *xcbim)
xcb_image_destroy(xcbim->xcbim);
}
xcbim->xcbinf->pool_mem -= (xcbim->w * xcbim->h * xcbim->depth);
xcbim->xcbinf->pool = evas_list_remove(xcbim->xcbinf->pool, xcbim);
xcbim->xcbinf->pool = eina_list_remove(xcbim->xcbinf->pool, xcbim);
free(xcbim);
}