*API BREAK* see the discussion in the mailing list. misc and e_modules will follow

SVN revision: 30970
This commit is contained in:
Peter Wehrfritz 2007-07-25 17:01:04 +00:00
parent 65a19ed366
commit cd20fbc9d9
40 changed files with 550 additions and 515 deletions

View File

@ -25,6 +25,38 @@
/* we need this for size_t */ /* we need this for size_t */
#include <stddef.h> #include <stddef.h>
/* NOTE: these aliases will be removed! DO NOT USE THEM! */
#define ecore_list_nodes(l) ecore_list_count(l)
#define ecore_list_is_empty(l) ecore_list_empty_is(l)
#define ecore_list_set_free_cb(l, f) ecore_list_free_cb_set(l, f)
#define ecore_dlist_nodes(l) ecore_dlist_count(l)
#define ecore_dlist_is_empty(l) ecore_dlist_empty_is(l)
#define ecore_dlist_set_free_cb(l, f) ecore_dlist_free_cb_set(l, f)
#define ecore_hash_set_free_key(l, f) ecore_hash_free_key_cb_set(l, f)
#define ecore_hash_set_free_value(l, f) ecore_hash_free_value_cb_set(l, f)
#define ecore_hash_set_hash(l, k, v) ecore_hash_hash_set(l, k, v)
#define ecore_plugin_get_available(id) ecore_plugin_available_get(id)
#define ecore_sheap_set_free_cb(s, f) ecore_sheap_free_cb_set(s, f)
#define ecore_sheap_set_compare(s, f) ecore_sheap_compare_set(s, f)
#define ecore_sheap_set_order(s, o) ecore_sheap_order_set(s, o)
#define ecore_tree_is_empty(t) ecore_tree_empty_is(t)
#define ecore_tree_get_closest_larger(t) ecore_tree_closest_larger_get(t)
#define ecore_tree_get_closest_smaller(t) ecore_tree_closest_smaller_get(t)
#define ecore_tree_add_node(t, n) ecore_tree_node_add(t, n);
#define ecore_tree_remove_node(t, n) ecore_tree_node_remove(t, n)
#define ecore_tree_set_free_value(t, f) ecore_tree_free_value_cb_set(t, f)
#define ecore_tree_set_free_key(t, f) ecore_tree_free_key_cb_set(t, f)
#define ecore_list_remove_first(l) ecore_list_first_remove(l)
#define ecore_list_remove_last(l) ecore_list_last_remove(l)
#define ecore_list_goto_first(l) ecore_list_first_goto(l)
#define ecore_list_goto_last(l) ecore_list_last_goto(l)
#define ecore_list_goto_index(l) ecore_list_index_goto(l)
#define ecore_dlist_remove_first(l) ecore_dlist_first_remove(l)
#define ecore_dlist_remove_last(l) ecore_dlist_last_remove(l)
#define ecore_dlist_goto_first(l) ecore_dlist_first_goto(l)
#define ecore_dlist_goto_last(l) ecore_dlist_last_goto(l)
#define ecore_dlist_goto_index(l) ecore_dlist_index_goto(l)
/** /**
* @file Ecore_Data.h * @file Ecore_Data.h
* @brief Contains threading, list, hash, debugging and tree functions. * @brief Contains threading, list, hash, debugging and tree functions.
@ -104,22 +136,22 @@ extern "C" {
/* Removing items from the list */ /* Removing items from the list */
EAPI int ecore_list_remove_destroy(Ecore_List *list); EAPI int ecore_list_remove_destroy(Ecore_List *list);
EAPI void *ecore_list_remove(Ecore_List * list); EAPI void *ecore_list_remove(Ecore_List * list);
EAPI void *ecore_list_remove_first(Ecore_List * list); EAPI void *ecore_list_first_remove(Ecore_List * list);
EAPI void *ecore_list_remove_last(Ecore_List * list); EAPI void *ecore_list_last_remove(Ecore_List * list);
/* Retrieve the current position in the list */ /* Retrieve the current position in the list */
EAPI void *ecore_list_current(Ecore_List * list); EAPI void *ecore_list_current(Ecore_List * list);
EAPI void *ecore_list_first(Ecore_List * list); EAPI void *ecore_list_first(Ecore_List * list);
EAPI void *ecore_list_last(Ecore_List * list); EAPI void *ecore_list_last(Ecore_List * list);
EAPI int ecore_list_index(Ecore_List * list); EAPI int ecore_list_index(Ecore_List * list);
EAPI int ecore_list_nodes(Ecore_List * list); EAPI int ecore_list_count(Ecore_List * list);
/* Traversing the list */ /* Traversing the list */
EAPI int ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, EAPI int ecore_list_for_each(Ecore_List *list, Ecore_For_Each function,
void *user_data); void *user_data);
EAPI void *ecore_list_goto_first(Ecore_List * list); EAPI void *ecore_list_first_goto(Ecore_List * list);
EAPI void *ecore_list_goto_last(Ecore_List * list); EAPI void *ecore_list_last_goto(Ecore_List * list);
EAPI void *ecore_list_goto_index(Ecore_List * list, int index); EAPI void *ecore_list_index_goto(Ecore_List * list, int index);
EAPI void *ecore_list_goto(Ecore_List * list, const void *_data); EAPI void *ecore_list_goto(Ecore_List * list, const void *_data);
/* Traversing the list and returning data */ /* Traversing the list and returning data */
@ -136,7 +168,7 @@ extern "C" {
char order); char order);
/* Check to see if there is any data in the list */ /* Check to see if there is any data in the list */
EAPI int ecore_list_is_empty(Ecore_List * list); EAPI int ecore_list_empty_is(Ecore_List * list);
/* Remove every node in the list without freeing the list itself */ /* Remove every node in the list without freeing the list itself */
EAPI int ecore_list_clear(Ecore_List * list); EAPI int ecore_list_clear(Ecore_List * list);
@ -150,7 +182,7 @@ extern "C" {
/* Destroying nodes */ /* Destroying nodes */
EAPI int ecore_list_node_destroy(Ecore_List_Node * _e_node, Ecore_Free_Cb free_func); EAPI int ecore_list_node_destroy(Ecore_List_Node * _e_node, Ecore_Free_Cb free_func);
EAPI int ecore_list_set_free_cb(Ecore_List * list, Ecore_Free_Cb free_func); EAPI int ecore_list_free_cb_set(Ecore_List * list, Ecore_Free_Cb free_func);
typedef Ecore_List Ecore_DList; typedef Ecore_List Ecore_DList;
# define ECORE_DLIST(dlist) ((Ecore_DList *)dlist) # define ECORE_DLIST(dlist) ((Ecore_DList *)dlist)
@ -178,20 +210,20 @@ extern "C" {
/* Info about list's state */ /* Info about list's state */
EAPI void *ecore_dlist_current(Ecore_DList *list); EAPI void *ecore_dlist_current(Ecore_DList *list);
EAPI int ecore_dlist_index(Ecore_DList *list); EAPI int ecore_dlist_index(Ecore_DList *list);
# define ecore_dlist_nodes(list) ecore_list_nodes(ECORE_LIST(list)) # define ecore_dlist_count(list) ecore_list_count(ECORE_LIST(list))
/* Removing items from the list */ /* Removing items from the list */
EAPI void *ecore_dlist_remove(Ecore_DList * _e_dlist); EAPI void *ecore_dlist_remove(Ecore_DList * _e_dlist);
EAPI void *ecore_dlist_remove_first(Ecore_DList * _e_dlist); EAPI void *ecore_dlist_first_remove(Ecore_DList * _e_dlist);
EAPI int ecore_dlist_remove_destroy(Ecore_DList *list); EAPI int ecore_dlist_remove_destroy(Ecore_DList *list);
EAPI void *ecore_dlist_remove_last(Ecore_DList * _e_dlist); EAPI void *ecore_dlist_last_remove(Ecore_DList * _e_dlist);
/* Traversing the list */ /* Traversing the list */
# define ecore_dlist_for_each(list, function, user_data) \ # define ecore_dlist_for_each(list, function, user_data) \
ecore_list_for_each(ECORE_LIST(list), function, user_data) ecore_list_for_each(ECORE_LIST(list), function, user_data)
EAPI void *ecore_dlist_goto_first(Ecore_DList * _e_dlist); EAPI void *ecore_dlist_first_goto(Ecore_DList * _e_dlist);
EAPI void *ecore_dlist_goto_last(Ecore_DList * _e_dlist); EAPI void *ecore_dlist_last_goto(Ecore_DList * _e_dlist);
EAPI void *ecore_dlist_goto_index(Ecore_DList * _e_dlist, int index); EAPI void *ecore_dlist_index_goto(Ecore_DList * _e_dlist, int index);
EAPI void *ecore_dlist_goto(Ecore_DList * _e_dlist, void *_data); EAPI void *ecore_dlist_goto(Ecore_DList * _e_dlist, void *_data);
/* Traversing the list and returning data */ /* Traversing the list and returning data */
@ -207,7 +239,7 @@ extern "C" {
ecore_list_heapsort(list, compare, order) ecore_list_heapsort(list, compare, order)
/* Check to see if there is any data in the list */ /* Check to see if there is any data in the list */
EAPI int ecore_dlist_is_empty(Ecore_DList * _e_dlist); EAPI int ecore_dlist_empty_is(Ecore_DList * _e_dlist);
/* Remove every node in the list without free'ing it */ /* Remove every node in the list without free'ing it */
EAPI int ecore_dlist_clear(Ecore_DList * _e_dlist); EAPI int ecore_dlist_clear(Ecore_DList * _e_dlist);
@ -219,7 +251,7 @@ extern "C" {
/* Destroying nodes */ /* Destroying nodes */
EAPI int ecore_dlist_node_destroy(Ecore_DList_Node * node, Ecore_Free_Cb free_func); EAPI int ecore_dlist_node_destroy(Ecore_DList_Node * node, Ecore_Free_Cb free_func);
EAPI int ecore_dlist_set_free_cb(Ecore_DList * dlist, Ecore_Free_Cb free_func); EAPI int ecore_dlist_free_cb_set(Ecore_DList * dlist, Ecore_Free_Cb free_func);
@ -263,8 +295,8 @@ extern "C" {
EAPI int ecore_hash_init(Ecore_Hash *hash, Ecore_Hash_Cb hash_func, Ecore_Compare_Cb compare); EAPI int ecore_hash_init(Ecore_Hash *hash, Ecore_Hash_Cb hash_func, Ecore_Compare_Cb compare);
/* Functions related to freeing the data in the hash table */ /* Functions related to freeing the data in the hash table */
EAPI int ecore_hash_set_free_key(Ecore_Hash *hash, Ecore_Free_Cb function); EAPI int ecore_hash_free_key_cb_set(Ecore_Hash *hash, Ecore_Free_Cb function);
EAPI int ecore_hash_set_free_value(Ecore_Hash *hash, Ecore_Free_Cb function); EAPI int ecore_hash_free_value_cb_set(Ecore_Hash *hash, Ecore_Free_Cb function);
EAPI void ecore_hash_destroy(Ecore_Hash *hash); EAPI void ecore_hash_destroy(Ecore_Hash *hash);
EAPI int ecore_hash_count(Ecore_Hash *hash); EAPI int ecore_hash_count(Ecore_Hash *hash);
@ -275,7 +307,7 @@ extern "C" {
/* Retrieve and store data into the hash */ /* Retrieve and store data into the hash */
EAPI void *ecore_hash_get(Ecore_Hash *hash, const void *key); EAPI void *ecore_hash_get(Ecore_Hash *hash, const void *key);
EAPI int ecore_hash_set(Ecore_Hash *hash, void *key, void *value); EAPI int ecore_hash_set(Ecore_Hash *hash, void *key, void *value);
EAPI int ecore_hash_set_hash(Ecore_Hash *hash, Ecore_Hash *set); EAPI int ecore_hash_hash_set(Ecore_Hash *hash, Ecore_Hash *set);
EAPI void *ecore_hash_remove(Ecore_Hash *hash, const void *key); EAPI void *ecore_hash_remove(Ecore_Hash *hash, const void *key);
EAPI void *ecore_hash_find(Ecore_Hash *hash, Ecore_Compare_Cb compare, const void *value); EAPI void *ecore_hash_find(Ecore_Hash *hash, Ecore_Compare_Cb compare, const void *value);
EAPI void ecore_hash_dump_graph(Ecore_Hash *hash); EAPI void ecore_hash_dump_graph(Ecore_Hash *hash);
@ -344,7 +376,7 @@ extern "C" {
*/ */
EAPI void *ecore_plugin_call(Ecore_Plugin * plugin, const char *symbol_name); EAPI void *ecore_plugin_call(Ecore_Plugin * plugin, const char *symbol_name);
EAPI Ecore_List *ecore_plugin_get_available(int group_id); EAPI Ecore_List *ecore_plugin_available_get(int group_id);
typedef struct _ecore_heap Ecore_Sheap; typedef struct _ecore_heap Ecore_Sheap;
@ -367,13 +399,13 @@ extern "C" {
EAPI Ecore_Sheap *ecore_sheap_new(Ecore_Compare_Cb compare, int size); EAPI Ecore_Sheap *ecore_sheap_new(Ecore_Compare_Cb compare, int size);
EAPI void ecore_sheap_destroy(Ecore_Sheap *heap); EAPI void ecore_sheap_destroy(Ecore_Sheap *heap);
EAPI int ecore_sheap_init(Ecore_Sheap *heap, Ecore_Compare_Cb compare, int size); EAPI int ecore_sheap_init(Ecore_Sheap *heap, Ecore_Compare_Cb compare, int size);
EAPI int ecore_sheap_set_free_cb(Ecore_Sheap *heap, Ecore_Free_Cb free_func); EAPI int ecore_sheap_free_cb_set(Ecore_Sheap *heap, Ecore_Free_Cb free_func);
EAPI int ecore_sheap_insert(Ecore_Sheap *heap, void *data); EAPI int ecore_sheap_insert(Ecore_Sheap *heap, void *data);
EAPI void *ecore_sheap_extract(Ecore_Sheap *heap); EAPI void *ecore_sheap_extract(Ecore_Sheap *heap);
EAPI void *ecore_sheap_extreme(Ecore_Sheap *heap); EAPI void *ecore_sheap_extreme(Ecore_Sheap *heap);
EAPI int ecore_sheap_change(Ecore_Sheap *heap, void *item, void *newval); EAPI int ecore_sheap_change(Ecore_Sheap *heap, void *item, void *newval);
EAPI int ecore_sheap_set_compare(Ecore_Sheap *heap, Ecore_Compare_Cb compare); EAPI int ecore_sheap_compare_set(Ecore_Sheap *heap, Ecore_Compare_Cb compare);
EAPI void ecore_sheap_set_order(Ecore_Sheap *heap, char order); EAPI void ecore_sheap_order_set(Ecore_Sheap *heap, char order);
EAPI void ecore_sheap_sort(Ecore_Sheap *heap); EAPI void ecore_sheap_sort(Ecore_Sheap *heap);
EAPI void *ecore_sheap_item(Ecore_Sheap *heap, int i); EAPI void *ecore_sheap_item(Ecore_Sheap *heap, int i);
@ -435,15 +467,15 @@ extern "C" {
/* Free the tree */ /* Free the tree */
EAPI int ecore_tree_destroy(Ecore_Tree * tree); EAPI int ecore_tree_destroy(Ecore_Tree * tree);
/* Check to see if the tree has any nodes in it */ /* Check to see if the tree has any nodes in it */
EAPI int ecore_tree_is_empty(Ecore_Tree * tree); EAPI int ecore_tree_empty_is(Ecore_Tree * tree);
/* Retrieve the value associated with key */ /* Retrieve the value associated with key */
EAPI void *ecore_tree_get(Ecore_Tree * tree, const void *key); EAPI void *ecore_tree_get(Ecore_Tree * tree, const void *key);
EAPI Ecore_Tree_Node *ecore_tree_get_node(Ecore_Tree * tree, const void *key); EAPI Ecore_Tree_Node *ecore_tree_get_node(Ecore_Tree * tree, const void *key);
/* Retrieve the value of node with key greater than or equal to key */ /* Retrieve the value of node with key greater than or equal to key */
EAPI void *ecore_tree_get_closest_larger(Ecore_Tree * tree, const void *key); EAPI void *ecore_tree_closest_larger_get(Ecore_Tree * tree, const void *key);
/* Retrieve the value of node with key less than or equal to key */ /* Retrieve the value of node with key less than or equal to key */
EAPI void *ecore_tree_get_closest_smaller(Ecore_Tree * tree, const void *key); EAPI void *ecore_tree_closest_smaller_get(Ecore_Tree * tree, const void *key);
/* Set the value associated with key to value */ /* Set the value associated with key to value */
EAPI int ecore_tree_set(Ecore_Tree * tree, void *key, void *value); EAPI int ecore_tree_set(Ecore_Tree * tree, void *key, void *value);
@ -451,9 +483,9 @@ extern "C" {
EAPI int ecore_tree_remove(Ecore_Tree * tree, const void *key); EAPI int ecore_tree_remove(Ecore_Tree * tree, const void *key);
/* Add a node to the tree */ /* Add a node to the tree */
EAPI int ecore_tree_add_node(Ecore_Tree * tree, Ecore_Tree_Node * node); EAPI int ecore_tree_node_add(Ecore_Tree * tree, Ecore_Tree_Node * node);
/* Remove a node from the tree */ /* Remove a node from the tree */
EAPI int ecore_tree_remove_node(Ecore_Tree * tree, Ecore_Tree_Node * node); EAPI int ecore_tree_node_remove(Ecore_Tree * tree, Ecore_Tree_Node * node);
/* For each node in the tree perform the for_each_func function */ /* For each node in the tree perform the for_each_func function */
/* For this one pass in the node */ /* For this one pass in the node */
@ -484,9 +516,9 @@ extern "C" {
EAPI void *ecore_tree_node_value_get(Ecore_Tree_Node * node); EAPI void *ecore_tree_node_value_get(Ecore_Tree_Node * node);
/* Add a function to free the data stored in nodes */ /* Add a function to free the data stored in nodes */
EAPI int ecore_tree_set_free_value(Ecore_Tree * tree, Ecore_Free_Cb free_value); EAPI int ecore_tree_free_value_cb_set(Ecore_Tree * tree, Ecore_Free_Cb free_value);
/* Add a function to free the keys stored in nodes */ /* Add a function to free the keys stored in nodes */
EAPI int ecore_tree_set_free_key(Ecore_Tree * tree, Ecore_Free_Cb free_key); EAPI int ecore_tree_free_key_cb_set(Ecore_Tree * tree, Ecore_Free_Cb free_key);
EAPI Ecore_Strbuf * ecore_strbuf_new(void); EAPI Ecore_Strbuf * ecore_strbuf_new(void);

View File

@ -101,7 +101,7 @@ ecore_hash_init(Ecore_Hash *hash, Ecore_Hash_Cb hash_func, Ecore_Compare_Cb comp
* @ingroup Ecore_Data_Hash_ADT_Destruction_Group * @ingroup Ecore_Data_Hash_ADT_Destruction_Group
*/ */
EAPI int EAPI int
ecore_hash_set_free_key(Ecore_Hash *hash, Ecore_Free_Cb function) ecore_hash_free_key_cb_set(Ecore_Hash *hash, Ecore_Free_Cb function)
{ {
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE); CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("function", function, FALSE); CHECK_PARAM_POINTER_RETURN("function", function, FALSE);
@ -119,7 +119,7 @@ ecore_hash_set_free_key(Ecore_Hash *hash, Ecore_Free_Cb function)
* @ingroup Ecore_Data_Hash_ADT_Destruction_Group * @ingroup Ecore_Data_Hash_ADT_Destruction_Group
*/ */
EAPI int EAPI int
ecore_hash_set_free_value(Ecore_Hash *hash, Ecore_Free_Cb function) ecore_hash_free_value_cb_set(Ecore_Hash *hash, Ecore_Free_Cb function)
{ {
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE); CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("function", function, FALSE); CHECK_PARAM_POINTER_RETURN("function", function, FALSE);
@ -177,7 +177,7 @@ ecore_hash_set(Ecore_Hash *hash, void *key, void *value)
* @ingroup Ecore_Data_Hash_ADT_Data_Group * @ingroup Ecore_Data_Hash_ADT_Data_Group
*/ */
EAPI int EAPI int
ecore_hash_set_hash(Ecore_Hash *hash, Ecore_Hash *set) ecore_hash_hash_set(Ecore_Hash *hash, Ecore_Hash *set)
{ {
unsigned int i; unsigned int i;
Ecore_Hash_Node *node, *old; Ecore_Hash_Node *node, *old;
@ -334,7 +334,7 @@ ecore_hash_keys(Ecore_Hash *hash)
} }
i++; i++;
} }
ecore_list_goto_first(keys); ecore_list_first_goto(keys);
return keys; return keys;
} }

View File

@ -17,15 +17,15 @@ static int _ecore_list_prepend_0(Ecore_List * list, Ecore_List_Node *node);
/* Remove functions */ /* Remove functions */
static void *_ecore_list_remove_0(Ecore_List * list); static void *_ecore_list_remove_0(Ecore_List * list);
static void *_ecore_list_remove_first(Ecore_List * list); static void *_ecore_list_first_remove(Ecore_List * list);
static void *_ecore_list_remove_last(Ecore_List * list); static void *_ecore_list_last_remove(Ecore_List * list);
/* Basic traversal functions */ /* Basic traversal functions */
static void *_ecore_list_next(Ecore_List * list); static void *_ecore_list_next(Ecore_List * list);
static void *_ecore_list_goto_last(Ecore_List * list); static void *_ecore_list_last_goto(Ecore_List * list);
static void *_ecore_list_goto_first(Ecore_List * list); static void *_ecore_list_first_goto(Ecore_List * list);
static void *_ecore_list_goto(Ecore_List * list, const void *data); static void *_ecore_list_goto(Ecore_List * list, const void *data);
static void *_ecore_list_goto_index(Ecore_List *list, int index); static void *_ecore_list_index_goto(Ecore_List *list, int index);
/* Iterative functions */ /* Iterative functions */
static int _ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, static int _ecore_list_for_each(Ecore_List *list, Ecore_For_Each function,
@ -49,8 +49,8 @@ static Ecore_List_Node *_ecore_dlist_node_merge(Ecore_List_Node *first,
/* Private double linked list functions */ /* Private double linked list functions */
static void *_ecore_dlist_previous(Ecore_DList * list); static void *_ecore_dlist_previous(Ecore_DList * list);
static void *_ecore_dlist_remove_first(Ecore_DList *list); static void *_ecore_dlist_first_remove(Ecore_DList *list);
static void *_ecore_dlist_goto_index(Ecore_DList *list, int index); static void *_ecore_dlist_index_goto(Ecore_DList *list, int index);
/* XXX: Begin deprecated code */ /* XXX: Begin deprecated code */
EAPI void * EAPI void *
@ -283,7 +283,7 @@ ecore_list_destroy(Ecore_List *list)
while (list->first) while (list->first)
{ {
data = _ecore_list_remove_first(list); data = _ecore_list_first_remove(list);
if (list->free_func) if (list->free_func)
list->free_func(data); list->free_func(data);
} }
@ -299,7 +299,7 @@ ecore_list_destroy(Ecore_List *list)
* @return @c TRUE on successful set, @c FALSE otherwise. * @return @c TRUE on successful set, @c FALSE otherwise.
*/ */
EAPI int EAPI int
ecore_list_set_free_cb(Ecore_List *list, Ecore_Free_Cb free_func) ecore_list_free_cb_set(Ecore_List *list, Ecore_Free_Cb free_func)
{ {
CHECK_PARAM_POINTER_RETURN("list", list, FALSE); CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -314,7 +314,7 @@ ecore_list_set_free_cb(Ecore_List *list, Ecore_Free_Cb free_func)
* @return @c TRUE if no nodes in list, @c FALSE if the list contains nodes * @return @c TRUE if no nodes in list, @c FALSE if the list contains nodes
*/ */
EAPI int EAPI int
ecore_list_is_empty(Ecore_List *list) ecore_list_empty_is(Ecore_List *list)
{ {
int ret = TRUE; int ret = TRUE;
@ -349,7 +349,7 @@ ecore_list_index(Ecore_List *list)
* @return The number of nodes in the list. * @return The number of nodes in the list.
*/ */
EAPI int EAPI int
ecore_list_nodes(Ecore_List *list) ecore_list_count(Ecore_List *list)
{ {
int ret = 0; int ret = 0;
@ -503,7 +503,7 @@ _ecore_list_insert(Ecore_List *list, Ecore_List_Node *new_node)
new_node->next = list->current; new_node->next = list->current;
/* And hook the node into the list */ /* And hook the node into the list */
_ecore_list_goto_index(list, ecore_list_index(list) - 1); _ecore_list_index_goto(list, ecore_list_index(list) - 1);
list->current->next = new_node; list->current->next = new_node;
@ -527,9 +527,9 @@ ecore_list_append_list(Ecore_List *list, Ecore_List *append)
CHECK_PARAM_POINTER_RETURN("list", list, FALSE); CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("append", append, FALSE); CHECK_PARAM_POINTER_RETURN("append", append, FALSE);
if (ecore_list_is_empty(append)) return TRUE; if (ecore_list_empty_is(append)) return TRUE;
if (ecore_list_is_empty(list)) if (ecore_list_empty_is(list))
{ {
list->first = append->first; list->first = append->first;
list->current = NULL; list->current = NULL;
@ -559,9 +559,9 @@ ecore_list_prepend_list(Ecore_List *list, Ecore_List *prepend)
CHECK_PARAM_POINTER_RETURN("list", list, FALSE); CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("prepend", prepend, FALSE); CHECK_PARAM_POINTER_RETURN("prepend", prepend, FALSE);
if (ecore_list_is_empty(prepend)) return TRUE; if (ecore_list_empty_is(prepend)) return TRUE;
if (ecore_list_is_empty(list)) if (ecore_list_empty_is(list))
{ {
list->first = prepend->first; list->first = prepend->first;
list->current = NULL; list->current = NULL;
@ -613,21 +613,21 @@ _ecore_list_remove_0(Ecore_List *list)
if (!list) if (!list)
return NULL; return NULL;
if (ecore_list_is_empty(list)) if (ecore_list_empty_is(list))
return NULL; return NULL;
if (!list->current) if (!list->current)
return NULL; return NULL;
if (list->current == list->first) if (list->current == list->first)
return _ecore_list_remove_first(list); return _ecore_list_first_remove(list);
if (list->current == list->last) if (list->current == list->last)
return _ecore_list_remove_last(list); return _ecore_list_last_remove(list);
old = list->current; old = list->current;
_ecore_list_goto_index(list, list->index - 1); _ecore_list_index_goto(list, list->index - 1);
list->current->next = old->next; list->current->next = old->next;
old->next = NULL; old->next = NULL;
@ -670,20 +670,20 @@ ecore_list_remove_destroy(Ecore_List *list)
* @ingroup Ecore_Data_List_Remove_Item_Group * @ingroup Ecore_Data_List_Remove_Item_Group
*/ */
EAPI inline void * EAPI inline void *
ecore_list_remove_first(Ecore_List *list) ecore_list_first_remove(Ecore_List *list)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_list_remove_first(list); ret = _ecore_list_first_remove(list);
return ret; return ret;
} }
/* Remove the first item from the list */ /* Remove the first item from the list */
static void * static void *
_ecore_list_remove_first(Ecore_List *list) _ecore_list_first_remove(Ecore_List *list)
{ {
void *ret = NULL; void *ret = NULL;
Ecore_List_Node *old; Ecore_List_Node *old;
@ -691,7 +691,7 @@ _ecore_list_remove_first(Ecore_List *list)
if (!list) if (!list)
return NULL; return NULL;
if (ecore_list_is_empty(list)) if (ecore_list_empty_is(list))
return NULL; return NULL;
old = list->first; old = list->first;
@ -722,20 +722,20 @@ _ecore_list_remove_first(Ecore_List *list)
* @ingroup Ecore_Data_List_Remove_Item_Group * @ingroup Ecore_Data_List_Remove_Item_Group
*/ */
EAPI inline void * EAPI inline void *
ecore_list_remove_last(Ecore_List *list) ecore_list_last_remove(Ecore_List *list)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_list_remove_last(list); ret = _ecore_list_last_remove(list);
return ret; return ret;
} }
/* Remove the last item from the list */ /* Remove the last item from the list */
static void * static void *
_ecore_list_remove_last(Ecore_List *list) _ecore_list_last_remove(Ecore_List *list)
{ {
void *ret = NULL; void *ret = NULL;
Ecore_List_Node *old, *prev; Ecore_List_Node *old, *prev;
@ -743,7 +743,7 @@ _ecore_list_remove_last(Ecore_List *list)
if (!list) if (!list)
return NULL; return NULL;
if (ecore_list_is_empty(list)) if (ecore_list_empty_is(list))
return NULL; return NULL;
old = list->last; old = list->last;
@ -781,13 +781,13 @@ Functions that can be used to traverse an Ecore_List.
* @ingroup Ecore_Data_List_Traverse_Group * @ingroup Ecore_Data_List_Traverse_Group
*/ */
EAPI inline void * EAPI inline void *
ecore_list_goto_index(Ecore_List *list, int index) ecore_list_index_goto(Ecore_List *list, int index)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_list_goto_index(list, index); ret = _ecore_list_index_goto(list, index);
return ret; return ret;
} }
@ -795,22 +795,22 @@ ecore_list_goto_index(Ecore_List *list, int index)
/* This is the non-threadsafe version, use this inside internal functions that /* This is the non-threadsafe version, use this inside internal functions that
* already lock the list */ * already lock the list */
static void * static void *
_ecore_list_goto_index(Ecore_List *list, int index) _ecore_list_index_goto(Ecore_List *list, int index)
{ {
int i; int i;
if (!list) if (!list)
return NULL; return NULL;
if (ecore_list_is_empty(list)) if (ecore_list_empty_is(list))
return NULL; return NULL;
if (index > ecore_list_nodes(list) || index < 0) if (index > ecore_list_count(list) || index < 0)
return NULL; return NULL;
if (index < list->index) if (index < list->index)
{ {
_ecore_list_goto_first(list); _ecore_list_first_goto(list);
i = 0; i = 0;
} }
else else
@ -888,20 +888,20 @@ _ecore_list_goto(Ecore_List *list, const void *data)
* @ingroup Ecore_Data_List_Traverse_Group * @ingroup Ecore_Data_List_Traverse_Group
*/ */
EAPI inline void * EAPI inline void *
ecore_list_goto_first(Ecore_List *list) ecore_list_first_goto(Ecore_List *list)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_list_goto_first(list); ret = _ecore_list_first_goto(list);
return ret; return ret;
} }
/* Set the current position to the start of the list */ /* Set the current position to the start of the list */
static void * static void *
_ecore_list_goto_first(Ecore_List *list) _ecore_list_first_goto(Ecore_List *list)
{ {
if (!list || !list->first) if (!list || !list->first)
return NULL; return NULL;
@ -919,20 +919,20 @@ _ecore_list_goto_first(Ecore_List *list)
* @ingroup Ecore_Data_List_Traverse_Group * @ingroup Ecore_Data_List_Traverse_Group
*/ */
EAPI inline void * EAPI inline void *
ecore_list_goto_last(Ecore_List *list) ecore_list_last_goto(Ecore_List *list)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_list_goto_last(list); ret = _ecore_list_last_goto(list);
return ret; return ret;
} }
/* Set the current position to the end of the list */ /* Set the current position to the end of the list */
static void * static void *
_ecore_list_goto_last(Ecore_List *list) _ecore_list_last_goto(Ecore_List *list)
{ {
if (!list || !list->last) if (!list || !list->last)
return NULL; return NULL;
@ -1058,8 +1058,8 @@ ecore_list_clear(Ecore_List *list)
{ {
CHECK_PARAM_POINTER_RETURN("list", list, FALSE); CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
while (!ecore_list_is_empty(list)) while (!ecore_list_empty_is(list))
_ecore_list_remove_first(list); _ecore_list_first_remove(list);
return TRUE; return TRUE;
} }
@ -1092,7 +1092,7 @@ _ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, void *user_data)
if (!list || !function) if (!list || !function)
return FALSE; return FALSE;
_ecore_list_goto_first(list); _ecore_list_first_goto(list);
while ((value = _ecore_list_next(list)) != NULL) while ((value = _ecore_list_next(list)) != NULL)
function(value, user_data); function(value, user_data);
@ -1121,7 +1121,7 @@ _ecore_list_find(Ecore_List *list, Ecore_Compare_Cb function, const void *user_d
void *value; void *value;
if (!list || !function) return NULL; if (!list || !function) return NULL;
_ecore_list_goto_first(list); _ecore_list_first_goto(list);
while ((value = _ecore_list_current(list)) != NULL) while ((value = _ecore_list_current(list)) != NULL)
{ {
if (!function(value, user_data)) return value; if (!function(value, user_data)) return value;
@ -1190,7 +1190,7 @@ ecore_list_mergesort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
node = node->next; node = node->next;
list->last = node; list->last = node;
_ecore_list_goto_first(list); _ecore_list_first_goto(list);
return 1; return 1;
} }
@ -1310,8 +1310,8 @@ ecore_list_heapsort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
if (!heap) if (!heap)
return 0; return 0;
ecore_sheap_set_order(heap, order); ecore_sheap_order_set(heap, order);
_ecore_list_goto_first(list); _ecore_list_first_goto(list);
while ((data = _ecore_list_next(list))) while ((data = _ecore_list_next(list)))
{ {
ecore_sheap_insert(heap, data); ecore_sheap_insert(heap, data);
@ -1329,7 +1329,7 @@ ecore_list_heapsort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
ecore_sheap_destroy(heap); ecore_sheap_destroy(heap);
_ecore_list_goto_first(list); _ecore_list_first_goto(list);
return 1; return 1;
} }
@ -1452,7 +1452,7 @@ ecore_dlist_destroy(Ecore_DList *list)
while (list->first) while (list->first)
{ {
data = _ecore_dlist_remove_first(list); data = _ecore_dlist_first_remove(list);
if (list->free_func) if (list->free_func)
list->free_func(data); list->free_func(data);
} }
@ -1469,11 +1469,11 @@ ecore_dlist_destroy(Ecore_DList *list)
* @ingroup Ecore_Data_DList_Creation_Group * @ingroup Ecore_Data_DList_Creation_Group
*/ */
EAPI int EAPI int
ecore_dlist_set_free_cb(Ecore_DList *list, Ecore_Free_Cb free_func) ecore_dlist_free_cb_set(Ecore_DList *list, Ecore_Free_Cb free_func)
{ {
CHECK_PARAM_POINTER_RETURN("list", list, FALSE); CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
return ecore_list_set_free_cb(ECORE_LIST(list), free_func); return ecore_list_free_cb_set(ECORE_LIST(list), free_func);
} }
/** /**
@ -1482,11 +1482,11 @@ ecore_dlist_set_free_cb(Ecore_DList *list, Ecore_Free_Cb free_func)
* @return @c TRUE if there are nodes, @c FALSE otherwise. * @return @c TRUE if there are nodes, @c FALSE otherwise.
*/ */
EAPI int EAPI int
ecore_dlist_is_empty(Ecore_DList *list) ecore_dlist_empty_is(Ecore_DList *list)
{ {
CHECK_PARAM_POINTER_RETURN("list", list, FALSE); CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
return ecore_list_is_empty(ECORE_LIST(list)); return ecore_list_empty_is(ECORE_LIST(list));
} }
/** /**
@ -1618,9 +1618,9 @@ ecore_dlist_append_list(Ecore_DList *list, Ecore_DList *append)
CHECK_PARAM_POINTER_RETURN("list", list, FALSE); CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("append", append, FALSE); CHECK_PARAM_POINTER_RETURN("append", append, FALSE);
if (ecore_dlist_is_empty(append)) return TRUE; if (ecore_dlist_empty_is(append)) return TRUE;
if (ecore_dlist_is_empty(list)) if (ecore_dlist_empty_is(list))
{ {
list->first = append->first; list->first = append->first;
list->current = NULL; list->current = NULL;
@ -1651,9 +1651,9 @@ ecore_dlist_prepend_list(Ecore_DList *list, Ecore_DList *prepend)
CHECK_PARAM_POINTER_RETURN("list", list, FALSE); CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("prepend", prepend, FALSE); CHECK_PARAM_POINTER_RETURN("prepend", prepend, FALSE);
if (ecore_dlist_is_empty(prepend)) return TRUE; if (ecore_dlist_empty_is(prepend)) return TRUE;
if (ecore_dlist_is_empty(list)) if (ecore_dlist_empty_is(list))
{ {
list->first = prepend->first; list->first = prepend->first;
list->current = NULL; list->current = NULL;
@ -1711,13 +1711,13 @@ ecore_dlist_remove(Ecore_DList *list)
* @ingroup Ecore_Data_DList_Remove_Item_Group * @ingroup Ecore_Data_DList_Remove_Item_Group
*/ */
EAPI void * EAPI void *
ecore_dlist_remove_first(Ecore_DList *list) ecore_dlist_first_remove(Ecore_DList *list)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_dlist_remove_first(list); ret = _ecore_dlist_first_remove(list);
return ret; return ret;
} }
@ -1747,14 +1747,14 @@ ecore_dlist_remove_destroy(Ecore_DList *list)
} }
static void * static void *
_ecore_dlist_remove_first(Ecore_DList *list) _ecore_dlist_first_remove(Ecore_DList *list)
{ {
void *ret; void *ret;
if (!list) if (!list)
return NULL; return NULL;
ret = _ecore_list_remove_first(list); ret = _ecore_list_first_remove(list);
if (ret && ECORE_LIST(list)->first) if (ret && ECORE_LIST(list)->first)
ECORE_DLIST_NODE(ECORE_LIST(list)->first)->previous = NULL; ECORE_DLIST_NODE(ECORE_LIST(list)->first)->previous = NULL;
@ -1768,14 +1768,14 @@ _ecore_dlist_remove_first(Ecore_DList *list)
* @ingroup Ecore_Data_DList_Remove_Item_Group * @ingroup Ecore_Data_DList_Remove_Item_Group
*/ */
EAPI void * EAPI void *
ecore_dlist_remove_last(Ecore_DList *list) ecore_dlist_last_remove(Ecore_DList *list)
{ {
void *ret; void *ret;
Ecore_List_Node *node; Ecore_List_Node *node;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
if (ecore_list_is_empty(list)) if (ecore_list_empty_is(list))
return NULL; return NULL;
node = list->last; node = list->last;
@ -1804,13 +1804,13 @@ ecore_dlist_remove_last(Ecore_DList *list)
* @return The node at specified index on success, @c NULL on error. * @return The node at specified index on success, @c NULL on error.
*/ */
EAPI void * EAPI void *
ecore_dlist_goto_index(Ecore_DList *list, int index) ecore_dlist_index_goto(Ecore_DList *list, int index)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_dlist_goto_index(list, index); ret = _ecore_dlist_index_goto(list, index);
return ret; return ret;
} }
@ -1818,21 +1818,21 @@ ecore_dlist_goto_index(Ecore_DList *list, int index)
/* This is the non-threadsafe version, use this inside internal functions that /* This is the non-threadsafe version, use this inside internal functions that
* already lock the list */ * already lock the list */
static void * static void *
_ecore_dlist_goto_index(Ecore_DList *list, int index) _ecore_dlist_index_goto(Ecore_DList *list, int index)
{ {
int i, increment; int i, increment;
if (!list) if (!list)
return NULL; return NULL;
if (ecore_list_is_empty(ECORE_LIST(list))) if (ecore_list_empty_is(ECORE_LIST(list)))
return NULL; return NULL;
if (index > ecore_list_nodes(ECORE_LIST(list)) || index < 0) if (index > ecore_list_count(ECORE_LIST(list)) || index < 0)
return NULL; return NULL;
if (ECORE_LIST(list)->index >= ECORE_LIST(list)->nodes) if (ECORE_LIST(list)->index >= ECORE_LIST(list)->nodes)
_ecore_list_goto_last(ECORE_LIST(list)); _ecore_list_last_goto(ECORE_LIST(list));
if (index < ECORE_LIST(list)->index) if (index < ECORE_LIST(list)->index)
increment = -1; increment = -1;
@ -1876,13 +1876,13 @@ ecore_dlist_goto(Ecore_DList *list, void *data)
* @return Returns a pointer to the first item on success, NULL on failure. * @return Returns a pointer to the first item on success, NULL on failure.
*/ */
EAPI void * EAPI void *
ecore_dlist_goto_first(Ecore_DList *list) ecore_dlist_first_goto(Ecore_DList *list)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_list_goto_first(list); ret = _ecore_list_first_goto(list);
return ret; return ret;
} }
@ -1893,13 +1893,13 @@ ecore_dlist_goto_first(Ecore_DList *list)
* @return Returns a pointer to the last item in the list , NULL if empty. * @return Returns a pointer to the last item in the list , NULL if empty.
*/ */
EAPI void * EAPI void *
ecore_dlist_goto_last(Ecore_DList *list) ecore_dlist_last_goto(Ecore_DList *list)
{ {
void *ret; void *ret;
CHECK_PARAM_POINTER_RETURN("list", list, NULL); CHECK_PARAM_POINTER_RETURN("list", list, NULL);
ret = _ecore_list_goto_last(ECORE_LIST(list)); ret = _ecore_list_last_goto(ECORE_LIST(list));
return ret; return ret;
} }
@ -1965,7 +1965,7 @@ _ecore_dlist_previous(Ecore_DList *list)
ECORE_LIST(list)->index--; ECORE_LIST(list)->index--;
} }
else else
_ecore_list_goto_last(ECORE_LIST(list)); _ecore_list_last_goto(ECORE_LIST(list));
return data; return data;
} }
@ -2045,7 +2045,7 @@ ecore_dlist_mergesort(Ecore_DList *list, Ecore_Compare_Cb compare, char order)
node = node->next; node = node->next;
list->last = node; list->last = node;
_ecore_list_goto_first(list); _ecore_list_first_goto(list);
return 1; return 1;
} }

View File

@ -43,7 +43,7 @@ ecore_path_group_new(char *group_name)
group->name = strdup(group_name); group->name = strdup(group_name);
ecore_list_append(group_list, group); ecore_list_append(group_list, group);
last = ecore_list_goto_last(group_list); last = ecore_list_last_goto(group_list);
group->id = last->id + 1; group->id = last->id + 1;
return group->id; return group->id;
@ -73,7 +73,7 @@ ecore_path_group_del(int group_id)
if (ecore_list_goto(group_list, group)) if (ecore_list_goto(group_list, group))
ecore_list_remove(group_list); ecore_list_remove(group_list);
if (ecore_list_is_empty(group_list)) if (ecore_list_empty_is(group_list))
{ {
ecore_list_destroy(group_list); ecore_list_destroy(group_list);
group_list = NULL; group_list = NULL;
@ -129,7 +129,7 @@ ecore_path_group_remove(int group_id, char *path)
/* /*
* Find the path in the list of available paths * Find the path in the list of available paths
*/ */
ecore_list_goto_first(group->paths); ecore_list_first_goto(group->paths);
while ((found = ecore_list_current(group->paths)) && strcmp(found, path)) while ((found = ecore_list_current(group->paths)) && strcmp(found, path))
ecore_list_next(group->paths); ecore_list_next(group->paths);
@ -168,7 +168,7 @@ ecore_path_group_find(int group_id, char *name)
/* /*
* Search the paths of the path group for the specified file name * Search the paths of the path group for the specified file name
*/ */
ecore_list_goto_first(group->paths); ecore_list_first_goto(group->paths);
p = ecore_list_next(group->paths); p = ecore_list_next(group->paths);
do do
{ {
@ -200,10 +200,10 @@ ecore_path_group_available(int group_id)
group = __ecore_path_group_find_id(group_id); group = __ecore_path_group_find_id(group_id);
if (!group || !group->paths || ecore_list_is_empty(group->paths)) if (!group || !group->paths || ecore_list_empty_is(group->paths))
return NULL; return NULL;
ecore_list_goto_first(group->paths); ecore_list_first_goto(group->paths);
while ((path = ecore_list_next(group->paths)) != NULL) while ((path = ecore_list_next(group->paths)) != NULL)
{ {
@ -268,7 +268,7 @@ __ecore_path_group_find(char *name)
CHECK_PARAM_POINTER_RETURN("name", name, NULL); CHECK_PARAM_POINTER_RETURN("name", name, NULL);
ecore_list_goto_first(group_list); ecore_list_first_goto(group_list);
while ((group = ecore_list_next(group_list)) != NULL) while ((group = ecore_list_next(group_list)) != NULL)
if (!strcmp(group->name, name)) if (!strcmp(group->name, name))
@ -285,7 +285,7 @@ __ecore_path_group_find_id(int id)
{ {
Ecore_Path_Group *group; Ecore_Path_Group *group;
ecore_list_goto_first(group_list); ecore_list_first_goto(group_list);
while ((group = ecore_list_next(group_list)) != NULL) while ((group = ecore_list_next(group_list)) != NULL)
if (group->id == id) if (group->id == id)

View File

@ -83,7 +83,7 @@ ecore_plugin_unload(Ecore_Plugin *plugin)
if (ecore_list_goto(loaded_plugins, plugin)) if (ecore_list_goto(loaded_plugins, plugin))
ecore_list_remove(loaded_plugins); ecore_list_remove(loaded_plugins);
if (ecore_list_is_empty(loaded_plugins)) if (ecore_list_empty_is(loaded_plugins))
{ {
ecore_list_destroy(loaded_plugins); ecore_list_destroy(loaded_plugins);
loaded_plugins = NULL; loaded_plugins = NULL;

View File

@ -99,7 +99,7 @@ ecore_sheap_destroy(Ecore_Sheap *heap)
* @return @c TRUE on successful set, @c FALSE otherwise. * @return @c TRUE on successful set, @c FALSE otherwise.
*/ */
EAPI int EAPI int
ecore_sheap_set_free_cb(Ecore_Sheap *heap, Ecore_Free_Cb free_func) ecore_sheap_free_cb_set(Ecore_Sheap *heap, Ecore_Free_Cb free_func)
{ {
CHECK_PARAM_POINTER_RETURN("heap", heap, FALSE); CHECK_PARAM_POINTER_RETURN("heap", heap, FALSE);
@ -283,7 +283,7 @@ ecore_sheap_change(Ecore_Sheap *heap, void *item, void *newval)
* by the new comparison. * by the new comparison.
*/ */
EAPI int EAPI int
ecore_sheap_set_compare(Ecore_Sheap *heap, Ecore_Compare_Cb compare) ecore_sheap_compare_set(Ecore_Sheap *heap, Ecore_Compare_Cb compare)
{ {
CHECK_PARAM_POINTER_RETURN("heap", heap, FALSE); CHECK_PARAM_POINTER_RETURN("heap", heap, FALSE);
@ -306,7 +306,7 @@ ecore_sheap_set_compare(Ecore_Sheap *heap, Ecore_Compare_Cb compare)
* order. The default order is a min heap. * order. The default order is a min heap.
*/ */
EAPI void EAPI void
ecore_sheap_set_order(Ecore_Sheap *heap, char order) ecore_sheap_order_set(Ecore_Sheap *heap, char order)
{ {
CHECK_PARAM_POINTER("heap", heap); CHECK_PARAM_POINTER("heap", heap);

View File

@ -29,7 +29,7 @@ ecore_string_init()
ecore_strings = ecore_hash_new(ecore_str_hash, ecore_str_compare); ecore_strings = ecore_hash_new(ecore_str_hash, ecore_str_compare);
if (!ecore_strings) if (!ecore_strings)
return 0; return 0;
ecore_hash_set_free_value(ecore_strings, ecore_string_free_cb); ecore_hash_free_value_cb_set(ecore_strings, ecore_string_free_cb);
} }
ecore_string_init_count++; ecore_string_init_count++;

View File

@ -73,7 +73,7 @@ ecore_tree_init(Ecore_Tree *new_tree, Ecore_Compare_Cb compare_func)
* @return Returns TRUE on successful set, FALSE otherwise. * @return Returns TRUE on successful set, FALSE otherwise.
*/ */
EAPI int EAPI int
ecore_tree_set_free_value(Ecore_Tree *tree, Ecore_Free_Cb free_value) ecore_tree_free_value_cb_set(Ecore_Tree *tree, Ecore_Free_Cb free_value)
{ {
CHECK_PARAM_POINTER_RETURN("tree", tree, FALSE); CHECK_PARAM_POINTER_RETURN("tree", tree, FALSE);
@ -89,7 +89,7 @@ ecore_tree_set_free_value(Ecore_Tree *tree, Ecore_Free_Cb free_value)
* @return Returns TRUE on successful set, FALSE otherwise. * @return Returns TRUE on successful set, FALSE otherwise.
*/ */
EAPI int EAPI int
ecore_tree_set_free_key(Ecore_Tree *tree, Ecore_Free_Cb free_key) ecore_tree_free_key_cb_set(Ecore_Tree *tree, Ecore_Free_Cb free_key)
{ {
CHECK_PARAM_POINTER_RETURN("tree", tree, FALSE); CHECK_PARAM_POINTER_RETURN("tree", tree, FALSE);
@ -244,7 +244,7 @@ ecore_tree_destroy(Ecore_Tree *tree)
while ((node = tree->tree)) while ((node = tree->tree))
{ {
ecore_tree_remove_node(tree, node); ecore_tree_node_remove(tree, node);
ecore_tree_node_destroy(node, tree->free_value, tree->free_key); ecore_tree_node_destroy(node, tree->free_value, tree->free_key);
} }
@ -300,7 +300,7 @@ ecore_tree_get(Ecore_Tree *tree, const void *key)
* equal to the key * equal to the key
*/ */
EAPI void * EAPI void *
ecore_tree_get_closest_larger(Ecore_Tree *tree, const void *key) ecore_tree_closest_larger_get(Ecore_Tree *tree, const void *key)
{ {
Ecore_Tree_Node *node; Ecore_Tree_Node *node;
@ -327,7 +327,7 @@ ecore_tree_get_closest_larger(Ecore_Tree *tree, const void *key)
* @return Returns NULL if no valid nodes, otherwise the node <= key * @return Returns NULL if no valid nodes, otherwise the node <= key
*/ */
EAPI void * EAPI void *
ecore_tree_get_closest_smaller(Ecore_Tree *tree, const void *key) ecore_tree_closest_smaller_get(Ecore_Tree *tree, const void *key)
{ {
Ecore_Tree_Node *node; Ecore_Tree_Node *node;
@ -363,7 +363,7 @@ ecore_tree_set(Ecore_Tree *tree, void *key, void *value)
{ {
node = ecore_tree_node_new(); node = ecore_tree_node_new();
ecore_tree_node_key_set(node, key); ecore_tree_node_key_set(node, key);
if (!ecore_tree_add_node(tree, node)) if (!ecore_tree_node_add(tree, node))
return FALSE; return FALSE;
} }
else else
@ -389,7 +389,7 @@ ecore_tree_set(Ecore_Tree *tree, void *key, void *value)
* @return TRUE on a successful add, FALSE otherwise. * @return TRUE on a successful add, FALSE otherwise.
*/ */
EAPI int EAPI int
ecore_tree_add_node(Ecore_Tree *tree, Ecore_Tree_Node *node) ecore_tree_node_add(Ecore_Tree *tree, Ecore_Tree_Node *node)
{ {
Ecore_Tree_Node *travel = NULL; Ecore_Tree_Node *travel = NULL;
@ -428,7 +428,7 @@ ecore_tree_add_node(Ecore_Tree *tree, Ecore_Tree_Node *node)
* @return TRUE on a successful remove, FALSE otherwise. * @return TRUE on a successful remove, FALSE otherwise.
*/ */
EAPI int EAPI int
ecore_tree_remove_node(Ecore_Tree *tree, Ecore_Tree_Node *node) ecore_tree_node_remove(Ecore_Tree *tree, Ecore_Tree_Node *node)
{ {
Ecore_Tree_Node *traverse; Ecore_Tree_Node *traverse;
@ -560,7 +560,7 @@ ecore_tree_remove(Ecore_Tree *tree, const void *key)
if (!node) if (!node)
return FALSE; return FALSE;
if (!ecore_tree_remove_node(tree, node)) if (!ecore_tree_node_remove(tree, node))
return FALSE; return FALSE;
ecore_tree_node_destroy(node, tree->free_value, tree->free_key); ecore_tree_node_destroy(node, tree->free_value, tree->free_key);
@ -574,7 +574,7 @@ ecore_tree_remove(Ecore_Tree *tree, const void *key)
* @return Returns TRUE if no nodes exist, FALSE otherwise * @return Returns TRUE if no nodes exist, FALSE otherwise
*/ */
EAPI int EAPI int
ecore_tree_is_empty(Ecore_Tree *tree) ecore_tree_empty_is(Ecore_Tree *tree)
{ {
CHECK_PARAM_POINTER_RETURN("tree", tree, FALSE); CHECK_PARAM_POINTER_RETURN("tree", tree, FALSE);

View File

@ -102,8 +102,8 @@ ecore_con_shutdown(void)
{ {
if (--init_count != 0) return init_count; if (--init_count != 0) return init_count;
while (!ecore_list_is_empty(servers)) while (!ecore_list_empty_is(servers))
_ecore_con_server_free(ecore_list_remove_first(servers)); _ecore_con_server_free(ecore_list_first_remove(servers));
ecore_list_destroy(servers); ecore_list_destroy(servers);
servers = NULL; servers = NULL;
@ -974,8 +974,8 @@ _ecore_con_server_free(Ecore_Con_Server *svr)
} }
} }
if (svr->write_buf) free(svr->write_buf); if (svr->write_buf) free(svr->write_buf);
while (!ecore_list_is_empty(svr->clients)) while (!ecore_list_empty_is(svr->clients))
_ecore_con_client_free(ecore_list_remove_first(svr->clients)); _ecore_con_client_free(ecore_list_first_remove(svr->clients));
ecore_list_destroy(svr->clients); ecore_list_destroy(svr->clients);
if ((svr->created) && (svr->path) && (svr->ppid == getpid())) unlink(svr->path); if ((svr->created) && (svr->path) && (svr->ppid == getpid())) unlink(svr->path);
if (svr->fd >= 0) close(svr->fd); if (svr->fd >= 0) close(svr->fd);
@ -1034,7 +1034,7 @@ _ecore_con_svr_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
if (svr->delete_me) return 1; if (svr->delete_me) return 1;
if ((svr->client_limit >= 0) && (!svr->reject_excess_clients)) if ((svr->client_limit >= 0) && (!svr->reject_excess_clients))
{ {
if (ecore_list_nodes(svr->clients) >= svr->client_limit) return 1; if (ecore_list_count(svr->clients) >= svr->client_limit) return 1;
} }
/* a new client */ /* a new client */
size_in = sizeof(struct sockaddr_in); size_in = sizeof(struct sockaddr_in);

View File

@ -109,10 +109,10 @@ ecore_con_url_shutdown(void)
init_count--; init_count--;
if (_url_con_list) if (_url_con_list)
{ {
if (!ecore_list_is_empty(_url_con_list)) if (!ecore_list_empty_is(_url_con_list))
{ {
Ecore_Con_Url *url_con; Ecore_Con_Url *url_con;
while ((url_con = ecore_list_remove_first(_url_con_list))) while ((url_con = ecore_list_first_remove(_url_con_list)))
{ {
ecore_con_url_destroy(url_con); ecore_con_url_destroy(url_con);
} }
@ -356,7 +356,7 @@ _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match)
if (curlmsg->msg != CURLMSG_DONE) continue; if (curlmsg->msg != CURLMSG_DONE) continue;
/* find the job which is done */ /* find the job which is done */
ecore_list_goto_first(_url_con_list); ecore_list_first_goto(_url_con_list);
while ((url_con = ecore_list_current(_url_con_list))) while ((url_con = ecore_list_current(_url_con_list)))
{ {
if (curlmsg->easy_handle == url_con->curl_easy) if (curlmsg->easy_handle == url_con->curl_easy)

View File

@ -60,8 +60,8 @@ ecore_desktop_ini_get(const char *file)
ecore_hash_destroy(result); ecore_hash_destroy(result);
return NULL; return NULL;
} }
ecore_hash_set_free_key(result, free); ecore_hash_free_key_cb_set(result, free);
ecore_hash_set_free_value(result, (Ecore_Free_Cb) ecore_hash_destroy); ecore_hash_free_value_cb_set(result, (Ecore_Free_Cb) ecore_hash_destroy);
*buffer = '\0'; *buffer = '\0';
#ifdef DEBUG #ifdef DEBUG
fprintf(stdout, "PARSING INI %s\n", file); fprintf(stdout, "PARSING INI %s\n", file);
@ -87,8 +87,8 @@ ecore_desktop_ini_get(const char *file)
current = ecore_hash_new(ecore_str_hash, ecore_str_compare); current = ecore_hash_new(ecore_str_hash, ecore_str_compare);
if (current) if (current)
{ {
ecore_hash_set_free_key(current, free); ecore_hash_free_key_cb_set(current, free);
ecore_hash_set_free_value(current, free); ecore_hash_free_value_cb_set(current, free);
ecore_hash_set(result, strdup(key), current); ecore_hash_set(result, strdup(key), current);
#ifdef DEBUG #ifdef DEBUG
fprintf(stdout, " GROUP [%s]\n", key); fprintf(stdout, " GROUP [%s]\n", key);
@ -222,7 +222,7 @@ _ecore_desktop_get(const char *file, const char *lang)
{ {
int size = 0; int size = 0;
value = (char *) ecore_file_get_file(result->original_path); value = (char *) ecore_file_file_get(result->original_path);
/* Figure out the eap_name. */ /* Figure out the eap_name. */
if (value) if (value)
{ {
@ -275,7 +275,7 @@ _ecore_desktop_get(const char *file, const char *lang)
{ {
char *p; char *p;
value = (char *)ecore_file_get_file(tmp); /* In case the exe included a path. */ value = (char *)ecore_file_file_get(tmp); /* In case the exe included a path. */
p = value; p = value;
while ((*p != '\0') && (*p != ' ')) while ((*p != '\0') && (*p != ' '))
{ {
@ -322,7 +322,7 @@ _ecore_desktop_get(const char *file, const char *lang)
char *dir; char *dir;
dir = dir =
ecore_file_get_dir(result->original_path); ecore_file_dir_get(result->original_path);
if (dir) if (dir)
{ {
sprintf(temp, "%s/%s", dir, result->icon); sprintf(temp, "%s/%s", dir, result->icon);
@ -383,7 +383,7 @@ _ecore_desktop_get(const char *file, const char *lang)
{ {
char *tmp; char *tmp;
tmp = strdup(ecore_file_get_file(result->exec)); tmp = strdup(ecore_file_file_get(result->exec));
if (tmp) if (tmp)
{ {
char *p2; char *p2;
@ -534,8 +534,8 @@ ecore_desktop_save(Ecore_Desktop * desktop)
desktop->group = ecore_hash_new(ecore_str_hash, ecore_str_compare); desktop->group = ecore_hash_new(ecore_str_hash, ecore_str_compare);
if (desktop->group) if (desktop->group)
{ {
ecore_hash_set_free_key(desktop->group, free); ecore_hash_free_key_cb_set(desktop->group, free);
ecore_hash_set_free_value(desktop->group, free); ecore_hash_free_value_cb_set(desktop->group, free);
} }
} }
} }
@ -669,7 +669,7 @@ ecore_desktop_save(Ecore_Desktop * desktop)
fprintf(f, "[Trash Info]\n"); fprintf(f, "[Trash Info]\n");
else else
fprintf(f, "[Desktop Entry]\n"); fprintf(f, "[Desktop Entry]\n");
ecore_list_goto_first(list); ecore_list_first_goto(list);
while ((key = (char *)ecore_list_next(list))) while ((key = (char *)ecore_list_next(list)))
{ {
char *value; char *value;
@ -714,8 +714,8 @@ ecore_desktop_init()
desktop_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare); desktop_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare);
if (desktop_cache) if (desktop_cache)
{ {
ecore_hash_set_free_key(desktop_cache, free); ecore_hash_free_key_cb_set(desktop_cache, free);
ecore_hash_set_free_value(desktop_cache, ecore_hash_free_value_cb_set(desktop_cache,
(Ecore_Free_Cb) _ecore_desktop_destroy); (Ecore_Free_Cb) _ecore_desktop_destroy);
} }
} }
@ -847,7 +847,7 @@ ecore_desktop_get_command(Ecore_Desktop * desktop, Ecore_List * files, int fill)
result = ecore_list_new(); result = ecore_list_new();
if (!result) return NULL; if (!result) return NULL;
ecore_list_set_free_cb(result, free); ecore_list_free_cb_set(result, free);
if (desktop->exec_params) if (desktop->exec_params)
params = strdup(desktop->exec_params); params = strdup(desktop->exec_params);
@ -857,14 +857,14 @@ if (files)
{ {
char *file; char *file;
ecore_list_goto_first(files); ecore_list_first_goto(files);
while((file = ecore_list_next(files)) != NULL) while((file = ecore_list_next(files)) != NULL)
printf("FILE FOR COMMAND IS - %s\n", file); printf("FILE FOR COMMAND IS - %s\n", file);
} }
#endif #endif
if (files) if (files)
ecore_list_goto_first(files); ecore_list_first_goto(files);
/* FIXME: The string handling could be better, but it's good enough for now. */ /* FIXME: The string handling could be better, but it's good enough for now. */
do do
@ -879,7 +879,7 @@ if (files)
command = ecore_dlist_new(); command = ecore_dlist_new();
if (!command) goto error; if (!command) goto error;
ecore_dlist_set_free_cb(command, free); ecore_dlist_free_cb_set(command, free);
/* Grab a fresh copy of the params. The default is %F as per rasters request. */ /* Grab a fresh copy of the params. The default is %F as per rasters request. */
if (params) free(params); if (params) free(params);
if (desktop->exec_params) if (desktop->exec_params)
@ -910,9 +910,9 @@ if (files)
t = NULL; t = NULL;
p = NULL; p = NULL;
/* Check the bits for replacables. */ /* Check the bits for replacables. */
if (!ecore_dlist_is_empty(command)) if (!ecore_dlist_empty_is(command))
{ {
ecore_dlist_goto_first(command); ecore_dlist_first_goto(command);
while ((p = ecore_dlist_next(command)) != NULL) while ((p = ecore_dlist_next(command)) != NULL)
{ {
int is_URL = 0, is_directory = 0, is_file = 0; int is_URL = 0, is_directory = 0, is_file = 0;
@ -1025,10 +1025,10 @@ if (files)
* thus %d/%D would be ./ implicitly (but may need to be explicit * thus %d/%D would be ./ implicitly (but may need to be explicit
* in the command line) * in the command line)
*/ */
text = ecore_file_get_dir(file); text = ecore_file_dir_get(file);
} }
else if (is_file) else if (is_file)
text = strdup(ecore_file_get_file(file)); text = strdup(ecore_file_file_get(file));
else else
{ {
/* FIXME: If the file is on the net, download /* FIXME: If the file is on the net, download
@ -1089,7 +1089,7 @@ if (files)
if (params) if (params)
{ {
params[0] = '\0'; params[0] = '\0';
ecore_dlist_goto_first(command); ecore_dlist_first_goto(command);
while ((p = ecore_dlist_next(command)) != NULL) while ((p = ecore_dlist_next(command)) != NULL)
{ {
if (p[0] == '%') if (p[0] == '%')

View File

@ -79,7 +79,7 @@ ecore_desktop_icon_find(const char *icon, const char *icon_size,
icon_size = "48x48"; icon_size = "48x48";
if (icon_theme == NULL) if (icon_theme == NULL)
icon_theme = "hicolor"; icon_theme = "hicolor";
ecore_list_goto_first(icons); ecore_list_first_goto(icons);
while ((icn = ecore_list_next(icons))) while ((icn = ecore_list_next(icons)))
{ {
char *ext; char *ext;
@ -183,7 +183,7 @@ _ecore_desktop_icon_find0(const char *icon, const char *icon_size,
wanted_size = atoi(icon_size); wanted_size = atoi(icon_size);
/* Loop through the themes directories. */ /* Loop through the themes directories. */
ecore_list_goto_first(theme->Directories); ecore_list_first_goto(theme->Directories);
while ((directory = ecore_list_next(theme->Directories)) != NULL) while ((directory = ecore_list_next(theme->Directories)) != NULL)
{ {
if (directory->size) if (directory->size)
@ -294,7 +294,7 @@ _ecore_desktop_icon_find0(const char *icon, const char *icon_size,
{ {
char *inherits; char *inherits;
ecore_list_goto_first(theme->Inherits); ecore_list_first_goto(theme->Inherits);
while ((inherits = ecore_list_next(theme->Inherits)) != NULL) while ((inherits = ecore_list_next(theme->Inherits)) != NULL)
{ {
found = _ecore_desktop_icon_find0(icon, icon_size, inherits, in_cache); found = _ecore_desktop_icon_find0(icon, icon_size, inherits, in_cache);
@ -386,8 +386,8 @@ ecore_desktop_icon_init()
icon_theme_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare); icon_theme_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare);
if (icon_theme_cache) if (icon_theme_cache)
{ {
ecore_hash_set_free_key(icon_theme_cache, free); ecore_hash_free_key_cb_set(icon_theme_cache, free);
ecore_hash_set_free_value(icon_theme_cache, ecore_hash_free_value_cb_set(icon_theme_cache,
ECORE_FREE_CB(_ecore_desktop_icon_theme_destroy)); ECORE_FREE_CB(_ecore_desktop_icon_theme_destroy));
} }
} }
@ -446,9 +446,9 @@ ecore_desktop_icon_theme_get(const char *icon_theme, const char *lang __UNUSED__
if (icon_theme[0] == '/') if (icon_theme[0] == '/')
{ {
theme_path = strdup(icon_theme); theme_path = strdup(icon_theme);
theme_dir = ecore_file_get_dir(theme_path); theme_dir = ecore_file_dir_get(theme_path);
if (theme_dir) if (theme_dir)
icon_theme = ecore_file_get_file(theme_dir); icon_theme = ecore_file_file_get(theme_dir);
#ifdef DEBUG #ifdef DEBUG
printf("LOADING THEME %s - %s\n", icon_theme, theme_path); printf("LOADING THEME %s - %s\n", icon_theme, theme_path);
#endif #endif
@ -467,7 +467,7 @@ ecore_desktop_icon_theme_get(const char *icon_theme, const char *lang __UNUSED__
theme_path = ecore_desktop_paths_file_find(ecore_desktop_paths_icons, icn, theme_path = ecore_desktop_paths_file_find(ecore_desktop_paths_icons, icn,
2, NULL, NULL); 2, NULL, NULL);
if (!theme_path) goto error; if (!theme_path) goto error;
theme_dir = ecore_file_get_dir(theme_path); theme_dir = ecore_file_dir_get(theme_path);
} }
if (!theme_path) goto error; if (!theme_path) goto error;
result = calloc(1, sizeof(Ecore_Desktop_Icon_Theme)); result = calloc(1, sizeof(Ecore_Desktop_Icon_Theme));
@ -506,9 +506,9 @@ ecore_desktop_icon_theme_get(const char *icon_theme, const char *lang __UNUSED__
if (!Directories) goto error; if (!Directories) goto error;
result->Directories = ecore_list_new(); result->Directories = ecore_list_new();
if (!result->Directories) goto error; if (!result->Directories) goto error;
ecore_list_set_free_cb(result->Directories, ecore_list_free_cb_set(result->Directories,
ECORE_FREE_CB(_ecore_desktop_icon_theme_directory_destroy)); ECORE_FREE_CB(_ecore_desktop_icon_theme_directory_destroy));
ecore_list_goto_first(Directories); ecore_list_first_goto(Directories);
while ((directory = ecore_list_next(Directories)) != NULL) while ((directory = ecore_list_next(Directories)) != NULL)
{ {
Ecore_Hash *sub_group; Ecore_Hash *sub_group;
@ -681,7 +681,7 @@ _ecore_desktop_icon_theme_cache_check(Ecore_Desktop_Icon_Theme *icon_theme)
Ecore_Desktop_Icon_Theme_Directory *dir; Ecore_Desktop_Icon_Theme_Directory *dir;
char full_path[PATH_MAX]; char full_path[PATH_MAX];
ecore_list_goto_first(icon_theme->Directories); ecore_list_first_goto(icon_theme->Directories);
while ((dir = ecore_list_next(icon_theme->Directories)) != NULL) while ((dir = ecore_list_next(icon_theme->Directories)) != NULL)
{ {
if (dir->icons) if (dir->icons)
@ -694,8 +694,8 @@ _ecore_desktop_icon_theme_cache_check(Ecore_Desktop_Icon_Theme *icon_theme)
{ {
Ecore_List *files; Ecore_List *files;
ecore_hash_set_free_key(dir->icons, free); ecore_hash_free_key_cb_set(dir->icons, free);
ecore_hash_set_free_value(dir->icons, free); ecore_hash_free_value_cb_set(dir->icons, free);
files = ecore_file_ls(dir->full_path); files = ecore_file_ls(dir->full_path);
if (files) if (files)
{ {

View File

@ -248,8 +248,8 @@ _ecore_desktop_menu_get0(char *file, Ecore_Desktop_Tree * merge_stack,
/* Preperation. */ /* Preperation. */
data.stack = ecore_desktop_tree_new(NULL); data.stack = ecore_desktop_tree_new(NULL);
/* FIXME data.base and data.path leak */ /* FIXME data.base and data.path leak */
data.base = ecore_file_strip_ext(ecore_file_get_file(file)); data.base = ecore_file_strip_ext(ecore_file_file_get(file));
data.path = ecore_file_get_dir(file); data.path = ecore_file_dir_get(file);
if ((level == 0) && (merge_stack == NULL)) if ((level == 0) && (merge_stack == NULL))
merge_stack = ecore_desktop_tree_new(NULL); merge_stack = ecore_desktop_tree_new(NULL);
#ifdef DEBUG #ifdef DEBUG
@ -658,10 +658,10 @@ _ecore_desktop_menu_create_menu()
apps = ecore_hash_new(ecore_str_hash, ecore_str_compare); apps = ecore_hash_new(ecore_str_hash, ecore_str_compare);
if ((menu) && (rules) && (pool) && (apps)) if ((menu) && (rules) && (pool) && (apps))
{ {
ecore_hash_set_free_key(pool, free); ecore_hash_free_key_cb_set(pool, free);
ecore_hash_set_free_value(pool, free); ecore_hash_free_value_cb_set(pool, free);
ecore_hash_set_free_key(apps, free); ecore_hash_free_key_cb_set(apps, free);
ecore_hash_set_free_value(apps, free); ecore_hash_free_value_cb_set(apps, free);
ecore_desktop_tree_extend(menu, "<MENU < > <> <>"); ecore_desktop_tree_extend(menu, "<MENU < > <> <>");
ecore_desktop_tree_extend(menu, "<MENU_PATH "); ecore_desktop_tree_extend(menu, "<MENU_PATH ");
ecore_desktop_tree_add_hash(menu, pool); ecore_desktop_tree_add_hash(menu, pool);
@ -1052,7 +1052,7 @@ _ecore_desktop_menu_add_dirs(Ecore_Desktop_Tree * tree, Ecore_List * paths,
char t[PATH_MAX], *this_path; char t[PATH_MAX], *this_path;
/* reverse the order of the dirs. */ /* reverse the order of the dirs. */
ecore_list_goto_first(paths); ecore_list_first_goto(paths);
while ((this_path = ecore_list_next(paths)) != NULL) while ((this_path = ecore_list_next(paths)) != NULL)
{ {
if (extra) if (extra)
@ -1277,7 +1277,7 @@ _ecore_desktop_menu_merge(const void *data, Ecore_Desktop_Tree * tree,
*/ */
merge_path[0] = '\0'; merge_path[0] = '\0';
ecore_list_goto_first(ecore_desktop_paths_config); ecore_list_first_goto(ecore_desktop_paths_config);
while ((xdg_path = ecore_list_next(ecore_desktop_paths_config)) != NULL) while ((xdg_path = ecore_list_next(ecore_desktop_paths_config)) != NULL)
{ {
if (found < 0) if (found < 0)

View File

@ -107,7 +107,7 @@ ecore_desktop_paths_init(void)
#ifdef GNOME_SUPPORT #ifdef GNOME_SUPPORT
if (exit_handler) if (exit_handler)
{ {
ecore_list_set_free_cb(gnome_data, free); ecore_list_free_cb_set(gnome_data, free);
_ecore_desktop_paths_exec_config(gnome_data, home, NULL, _ecore_desktop_paths_exec_config(gnome_data, home, NULL,
"gnome-config --datadir"); "gnome-config --datadir");
} }
@ -120,7 +120,7 @@ ecore_desktop_paths_init(void)
char *this_config; char *this_config;
char path[PATH_MAX]; char path[PATH_MAX];
ecore_list_goto_first(config_list); ecore_list_first_goto(config_list);
while ((this_config = ecore_list_next(config_list)) != NULL) while ((this_config = ecore_list_next(config_list)) != NULL)
{ {
@ -213,13 +213,13 @@ _ecore_desktop_paths_create(void)
temp_list = ecore_list_new(); temp_list = ecore_list_new();
if (temp_list) if (temp_list)
{ {
ecore_list_goto_first(ecore_desktop_paths_kde_legacy); ecore_list_first_goto(ecore_desktop_paths_kde_legacy);
while ((path = while ((path =
ecore_list_next(ecore_desktop_paths_kde_legacy)) != ecore_list_next(ecore_desktop_paths_kde_legacy)) !=
NULL) NULL)
ecore_list_append(temp_list, path); ecore_list_append(temp_list, path);
ecore_list_goto_first(temp_list); ecore_list_first_goto(temp_list);
while ((path = ecore_list_next(temp_list)) != NULL) while ((path = ecore_list_next(temp_list)) != NULL)
{ {
char *t1, *t2; char *t1, *t2;
@ -312,16 +312,16 @@ ecore_desktop_paths_extras_clear(void)
E_FN_DEL(ecore_list_destroy, append_system_paths[i]); E_FN_DEL(ecore_list_destroy, append_system_paths[i]);
prepend_user_paths[i] = ecore_list_new(); prepend_user_paths[i] = ecore_list_new();
if (prepend_user_paths[i]) if (prepend_user_paths[i])
ecore_list_set_free_cb(prepend_user_paths[i], free); ecore_list_free_cb_set(prepend_user_paths[i], free);
prepend_system_paths[i] = ecore_list_new(); prepend_system_paths[i] = ecore_list_new();
if (prepend_system_paths[i]) if (prepend_system_paths[i])
ecore_list_set_free_cb(prepend_system_paths[i], free); ecore_list_free_cb_set(prepend_system_paths[i], free);
append_user_paths[i] = ecore_list_new(); append_user_paths[i] = ecore_list_new();
if (append_user_paths[i]) if (append_user_paths[i])
ecore_list_set_free_cb(append_user_paths[i], free); ecore_list_free_cb_set(append_user_paths[i], free);
append_system_paths[i] = ecore_list_new(); append_system_paths[i] = ecore_list_new();
if (append_system_paths[i]) if (append_system_paths[i])
ecore_list_set_free_cb(append_system_paths[i], free); ecore_list_free_cb_set(append_system_paths[i], free);
} }
} }
@ -378,7 +378,7 @@ ecore_desktop_paths_file_find(Ecore_List * paths, const char *file, int sub,
struct stat path_stat; struct stat path_stat;
if (!paths) return NULL; if (!paths) return NULL;
ecore_list_goto_first(paths); ecore_list_first_goto(paths);
while ((this_path = ecore_list_next(paths)) != NULL) while ((this_path = ecore_list_next(paths)) != NULL)
{ {
if (path) if (path)
@ -431,7 +431,7 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
paths = ecore_list_new(); paths = ecore_list_new();
if (!paths) return NULL; if (!paths) return NULL;
ecore_list_set_free_cb(paths, free); ecore_list_free_cb_set(paths, free);
/* Don't sort them, as they are in preferred order from each source. */ /* Don't sort them, as they are in preferred order from each source. */
/* Merge the results, there are probably some duplicates. */ /* Merge the results, there are probably some duplicates. */
@ -455,7 +455,7 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_before; char *this_before;
ecore_list_goto_first(befores); ecore_list_first_goto(befores);
while ((this_before = ecore_list_next(befores)) != NULL) while ((this_before = ecore_list_next(befores)) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, _ecore_desktop_paths_massage_path(path, home,
@ -470,7 +470,7 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_path; char *this_path;
ecore_list_goto_first(prepend_user_paths[path_type]); ecore_list_first_goto(prepend_user_paths[path_type]);
while ((this_path = ecore_list_next(prepend_user_paths[path_type])) != NULL) while ((this_path = ecore_list_next(prepend_user_paths[path_type])) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, this_path, NULL); _ecore_desktop_paths_massage_path(path, home, this_path, NULL);
@ -490,14 +490,14 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_env; char *this_env;
ecore_list_goto_first(env_list); ecore_list_first_goto(env_list);
while ((this_env = ecore_list_next(env_list)) != NULL) while ((this_env = ecore_list_next(env_list)) != NULL)
{ {
if (types) if (types)
{ {
char *this_type; char *this_type;
ecore_list_goto_first(types); ecore_list_first_goto(types);
while ((this_type = ecore_list_next(types)) != NULL) while ((this_type = ecore_list_next(types)) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, _ecore_desktop_paths_massage_path(path, home,
@ -519,7 +519,7 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_path; char *this_path;
ecore_list_goto_first(append_user_paths[path_type]); ecore_list_first_goto(append_user_paths[path_type]);
while ((this_path = ecore_list_next(append_user_paths[path_type])) != NULL) while ((this_path = ecore_list_next(append_user_paths[path_type])) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, this_path, NULL); _ecore_desktop_paths_massage_path(path, home, this_path, NULL);
@ -531,7 +531,7 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_path; char *this_path;
ecore_list_goto_first(prepend_system_paths[path_type]); ecore_list_first_goto(prepend_system_paths[path_type]);
while ((this_path = ecore_list_next(prepend_system_paths[path_type])) != NULL) while ((this_path = ecore_list_next(prepend_system_paths[path_type])) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, this_path, NULL); _ecore_desktop_paths_massage_path(path, home, this_path, NULL);
@ -551,14 +551,14 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_env; char *this_env;
ecore_list_goto_first(env_list); ecore_list_first_goto(env_list);
while ((this_env = ecore_list_next(env_list)) != NULL) while ((this_env = ecore_list_next(env_list)) != NULL)
{ {
if (types) if (types)
{ {
char *this_type; char *this_type;
ecore_list_goto_first(types); ecore_list_first_goto(types);
while ((this_type = ecore_list_next(types)) != NULL) while ((this_type = ecore_list_next(types)) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, _ecore_desktop_paths_massage_path(path, home,
@ -580,7 +580,7 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_path; char *this_path;
ecore_list_goto_first(append_system_paths[path_type]); ecore_list_first_goto(append_system_paths[path_type]);
while ((this_path = ecore_list_next(append_system_paths[path_type])) != NULL) while ((this_path = ecore_list_next(append_system_paths[path_type])) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, this_path, NULL); _ecore_desktop_paths_massage_path(path, home, this_path, NULL);
@ -599,14 +599,14 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_gnome; char *this_gnome;
ecore_list_goto_first(gnome_data); ecore_list_first_goto(gnome_data);
while ((this_gnome = ecore_list_next(gnome_data)) != NULL) while ((this_gnome = ecore_list_next(gnome_data)) != NULL)
{ {
if (types) if (types)
{ {
char *this_type; char *this_type;
ecore_list_goto_first(types); ecore_list_first_goto(types);
while ((this_type = ecore_list_next(types)) != NULL) while ((this_type = ecore_list_next(types)) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, _ecore_desktop_paths_massage_path(path, home,
@ -625,10 +625,10 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_gnome, *this_type; char *this_gnome, *this_type;
ecore_list_goto_first(gnome_data); ecore_list_first_goto(gnome_data);
while ((this_gnome = ecore_list_next(gnome_data)) != NULL) while ((this_gnome = ecore_list_next(gnome_data)) != NULL)
{ {
ecore_list_goto_first(gnome_extras); ecore_list_first_goto(gnome_extras);
while ((this_type = ecore_list_next(gnome_extras)) != NULL) while ((this_type = ecore_list_next(gnome_extras)) != NULL)
{ {
_ecore_desktop_paths_massage_path(path, home, _ecore_desktop_paths_massage_path(path, home,
@ -643,7 +643,7 @@ _ecore_desktop_paths_get(Ecore_Desktop_Paths_Type path_type,
{ {
char *this_kde; char *this_kde;
ecore_list_goto_first(kdes); ecore_list_first_goto(kdes);
while ((this_kde = ecore_list_next(kdes)) != NULL) while ((this_kde = ecore_list_next(kdes)) != NULL)
{ {
char cmd[128]; char cmd[128];
@ -714,7 +714,7 @@ _ecore_desktop_paths_check_and_add(Ecore_List * paths, const char *path)
if (!paths) return; if (!paths) return;
/* Check if we have it already. */ /* Check if we have it already. */
ecore_list_goto_first(paths); ecore_list_first_goto(paths);
while ((this_path = ecore_list_next(paths)) != NULL) while ((this_path = ecore_list_next(paths)) != NULL)
{ {
if (strcmp(path, this_path) == 0) if (strcmp(path, this_path) == 0)
@ -865,12 +865,12 @@ _ecore_desktop_paths_cb_exe_exit(void *data, int type, void *event)
{ {
char *this_config, *this_type; char *this_config, *this_type;
ecore_list_goto_first(config_list); ecore_list_first_goto(config_list);
while ((this_config = ecore_list_next(config_list)) != NULL) while ((this_config = ecore_list_next(config_list)) != NULL)
{ {
if (ced->types) if (ced->types)
{ {
ecore_list_goto_first(ced->types); ecore_list_first_goto(ced->types);
while ((this_type = while ((this_type =
ecore_list_next(ced->types)) != NULL) ecore_list_next(ced->types)) != NULL)
{ {
@ -915,8 +915,8 @@ ecore_desktop_paths_to_hash(const char *paths)
if (!paths) return NULL; if (!paths) return NULL;
result = ecore_hash_new(ecore_str_hash, ecore_str_compare); result = ecore_hash_new(ecore_str_hash, ecore_str_compare);
if (!result) return NULL; if (!result) return NULL;
ecore_hash_set_free_key(result, free); ecore_hash_free_key_cb_set(result, free);
ecore_hash_set_free_value(result, free); ecore_hash_free_value_cb_set(result, free);
path = strdup(paths); path = strdup(paths);
if (path) if (path)
@ -968,7 +968,7 @@ ecore_desktop_paths_to_list(const char *paths)
if (!paths) return NULL; if (!paths) return NULL;
result = ecore_list_new(); result = ecore_list_new();
if (!result) return NULL; if (!result) return NULL;
ecore_list_set_free_cb(result, free); ecore_list_free_cb_set(result, free);
path = strdup(paths); path = strdup(paths);
if (path) if (path)

View File

@ -74,7 +74,7 @@ _ecore_evas_fb_lose(void *data __UNUSED__)
ee = (Ecore_Evas *)l; ee = (Ecore_Evas *)l;
ee->visible = 0; ee->visible = 0;
} }
ecore_list_goto_first(ecore_evas_input_devices); ecore_list_first_goto(ecore_evas_input_devices);
dev = ecore_list_current(ecore_evas_input_devices); dev = ecore_list_current(ecore_evas_input_devices);
do do
{ {
@ -99,7 +99,7 @@ _ecore_evas_fb_gain(void *data __UNUSED__)
else else
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
} }
ecore_list_goto_first(ecore_evas_input_devices); ecore_list_first_goto(ecore_evas_input_devices);
dev = ecore_list_current(ecore_evas_input_devices); dev = ecore_list_current(ecore_evas_input_devices);
do do
{ {
@ -486,7 +486,7 @@ _ecore_evas_fullscreen_set(Ecore_Evas *ee, int on)
{ {
Ecore_Fb_Input_Device *dev; Ecore_Fb_Input_Device *dev;
ecore_list_goto_first(ecore_evas_input_devices); ecore_list_first_goto(ecore_evas_input_devices);
dev = ecore_list_current(ecore_evas_input_devices); dev = ecore_list_current(ecore_evas_input_devices);
do do
{ {

View File

@ -66,8 +66,11 @@ extern "C" {
EAPI int ecore_file_symlink (const char *src, const char *dest); EAPI int ecore_file_symlink (const char *src, const char *dest);
EAPI char *ecore_file_realpath (const char *file); EAPI char *ecore_file_realpath (const char *file);
EAPI int ecore_file_unlink (const char *file); EAPI int ecore_file_unlink (const char *file);
EAPI const char *ecore_file_get_file (const char *path); /* NOTE: these aliases will be removed! DO NOT USE THEM */
EAPI char *ecore_file_get_dir (const char *path); #define ecore_file_get_file(path) ecore_file_file_get(path)
#define ecore_file_get_dir(path) ecore_file_dir_get(path)
EAPI const char *ecore_file_file_get (const char *path);
EAPI char *ecore_file_dir_get (const char *path);
EAPI int ecore_file_can_read (const char *file); EAPI int ecore_file_can_read (const char *file);
EAPI int ecore_file_can_write (const char *file); EAPI int ecore_file_can_write (const char *file);

View File

@ -254,7 +254,7 @@ ecore_file_realpath(const char *file)
} }
EAPI const char * EAPI const char *
ecore_file_get_file(const char *path) ecore_file_file_get(const char *path)
{ {
char *result = NULL; char *result = NULL;
@ -265,7 +265,7 @@ ecore_file_get_file(const char *path)
} }
EAPI char * EAPI char *
ecore_file_get_dir(const char *file) ecore_file_dir_get(const char *file)
{ {
char *p; char *p;
char buf[PATH_MAX]; char buf[PATH_MAX];
@ -330,7 +330,7 @@ ecore_file_ls(const char *dir)
if (!dirp) return NULL; if (!dirp) return NULL;
list = ecore_list_new(); list = ecore_list_new();
ecore_list_set_free_cb(list, free); ecore_list_free_cb_set(list, free);
while ((dp = readdir(dirp))) while ((dp = readdir(dirp)))
{ {
@ -344,7 +344,7 @@ ecore_file_ls(const char *dir)
ecore_list_sort(list, ECORE_COMPARE_CB(strcoll), ECORE_SORT_MIN); ecore_list_sort(list, ECORE_COMPARE_CB(strcoll), ECORE_SORT_MIN);
ecore_list_goto_first(list); ecore_list_first_goto(list);
return list; return list;
} }

View File

@ -62,9 +62,9 @@ ecore_file_download_shutdown(void)
#ifdef HAVE_CURL #ifdef HAVE_CURL
Ecore_File_Download_Job *job; Ecore_File_Download_Job *job;
if (!ecore_list_is_empty(_job_list)) if (!ecore_list_empty_is(_job_list))
{ {
ecore_list_goto_first(_job_list); ecore_list_first_goto(_job_list);
while ((job = ecore_list_next(_job_list))) while ((job = ecore_list_next(_job_list)))
{ {
ecore_main_fd_handler_del(job->fd_handler); ecore_main_fd_handler_del(job->fd_handler);
@ -91,7 +91,7 @@ ecore_file_download_abort_all(void)
if (!_job_list) if (!_job_list)
return; return;
ecore_list_goto_first(_job_list); ecore_list_first_goto(_job_list);
while ((job = ecore_list_next(_job_list))) while ((job = ecore_list_next(_job_list)))
{ {
ecore_main_fd_handler_del(job->fd_handler); ecore_main_fd_handler_del(job->fd_handler);
@ -111,7 +111,7 @@ ecore_file_download(const char *url, const char *dst,
int (*progress_cb)(void *data, const char *file, long int dltotal, long int dlnow, long int ultotal, long int ulnow), int (*progress_cb)(void *data, const char *file, long int dltotal, long int dlnow, long int ultotal, long int ulnow),
void *data) void *data)
{ {
if (!ecore_file_is_dir(ecore_file_get_dir((char *)dst))) return 0; if (!ecore_file_is_dir(ecore_file_dir_get((char *)dst))) return 0;
if (ecore_file_exists(dst)) return 0; if (ecore_file_exists(dst)) return 0;
/* FIXME: Add handlers for http and ftp! */ /* FIXME: Add handlers for http and ftp! */
@ -249,7 +249,7 @@ _ecore_file_download_curl(const char *url, const char *dst,
if (curlmsg->msg != CURLMSG_DONE) continue; if (curlmsg->msg != CURLMSG_DONE) continue;
/* find the job which is done */ /* find the job which is done */
ecore_list_goto_first(_job_list); ecore_list_first_goto(_job_list);
while ((current = ecore_list_current(_job_list))) while ((current = ecore_list_current(_job_list)))
{ {
if (curlmsg->easy_handle == current->curl) if (curlmsg->easy_handle == current->curl)
@ -335,7 +335,7 @@ _ecore_file_download_curl_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd
if (curlmsg->msg != CURLMSG_DONE) continue; if (curlmsg->msg != CURLMSG_DONE) continue;
/* find the job which is done */ /* find the job which is done */
ecore_list_goto_first(_job_list); ecore_list_first_goto(_job_list);
while ((job = ecore_list_current(_job_list))) while ((job = ecore_list_current(_job_list)))
{ {
if (curlmsg->easy_handle == job->curl) if (curlmsg->easy_handle == job->curl)

View File

@ -13,7 +13,7 @@ ecore_file_path_init(void)
{ {
if (++init != 1) return init; if (++init != 1) return init;
__ecore_file_path_bin = _ecore_file_path_from_env("PATH"); __ecore_file_path_bin = _ecore_file_path_from_env("PATH");
ecore_list_set_free_cb(__ecore_file_path_bin, free); ecore_list_free_cb_set(__ecore_file_path_bin, free);
return init; return init;
} }
@ -65,7 +65,7 @@ ecore_file_path_dir_exists(const char *in_dir)
char *dir; char *dir;
if (!__ecore_file_path_bin) return 0; if (!__ecore_file_path_bin) return 0;
ecore_list_goto_first(__ecore_file_path_bin); ecore_list_first_goto(__ecore_file_path_bin);
while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL) while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
{ {
if (!strcmp(dir, in_dir)) return 1; if (!strcmp(dir, in_dir)) return 1;
@ -82,7 +82,7 @@ ecore_file_app_installed(const char *exe)
if (!exe) return 0; if (!exe) return 0;
if (ecore_file_can_exec(exe)) return 1; if (ecore_file_can_exec(exe)) return 1;
ecore_list_goto_first(__ecore_file_path_bin); ecore_list_first_goto(__ecore_file_path_bin);
while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL) while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
{ {
snprintf(buf, sizeof(buf), "%s/%s", dir, exe); snprintf(buf, sizeof(buf), "%s/%s", dir, exe);
@ -99,14 +99,14 @@ ecore_file_app_list(void)
list = ecore_list_new(); list = ecore_list_new();
if (!list) return NULL; if (!list) return NULL;
ecore_list_set_free_cb(list, free); ecore_list_free_cb_set(list, free);
ecore_list_goto_first(__ecore_file_path_bin); ecore_list_first_goto(__ecore_file_path_bin);
while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL) while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
{ {
files = ecore_file_ls(dir); files = ecore_file_ls(dir);
if (files) if (files)
{ {
ecore_list_goto_first(files); ecore_list_first_goto(files);
while ((exe = ecore_list_next(files)) != NULL) while ((exe = ecore_list_next(files)) != NULL)
{ {
snprintf(buf, sizeof(buf), "%s/%s", dir, exe); snprintf(buf, sizeof(buf), "%s/%s", dir, exe);

View File

@ -1042,7 +1042,7 @@ _ecore_ipc_event_client_del(void *data __UNUSED__, int ev_type __UNUSED__, void
svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client)); svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client));
ecore_list_goto(svr->client_list, cl); ecore_list_goto(svr->client_list, cl);
ecore_list_remove(svr->client_list); ecore_list_remove(svr->client_list);
ecore_list_goto_first(svr->client_list); ecore_list_first_goto(svr->client_list);
if (!cl->delete_me) if (!cl->delete_me)
{ {
e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del)); e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del));

View File

@ -256,7 +256,7 @@ ecore_x_netwm_init(void)
startup_info = ecore_hash_new(ecore_direct_hash, ecore_direct_compare); startup_info = ecore_hash_new(ecore_direct_hash, ecore_direct_compare);
if (startup_info) if (startup_info)
{ {
ecore_hash_set_free_value(startup_info, _ecore_x_netwm_startup_info_free); ecore_hash_free_value_cb_set(startup_info, _ecore_x_netwm_startup_info_free);
} }
} }

View File

@ -71,7 +71,7 @@ ecore_x_netwm_init(void)
startup_info = ecore_hash_new(ecore_direct_hash, ecore_direct_compare); startup_info = ecore_hash_new(ecore_direct_hash, ecore_direct_compare);
if (startup_info) if (startup_info)
{ {
ecore_hash_set_free_value(startup_info, _ecore_x_netwm_startup_info_free); ecore_hash_free_value_cb_set(startup_info, _ecore_x_netwm_startup_info_free);
} }
} }

View File

@ -43,7 +43,7 @@ _ecore_x_reply_init ()
return 0; return 0;
} }
if (!ecore_list_set_free_cb(_ecore_xcb_cookies, ECORE_FREE_CB(free))) if (!ecore_list_free_cb_set(_ecore_xcb_cookies, ECORE_FREE_CB(free)))
{ {
ecore_list_destroy(_ecore_xcb_cookies); ecore_list_destroy(_ecore_xcb_cookies);
return 0; return 0;
@ -94,7 +94,7 @@ _ecore_xcb_cookie_get (void)
if (!_ecore_xcb_cookies) if (!_ecore_xcb_cookies)
return 0; return 0;
data = ecore_list_remove_first(_ecore_xcb_cookies); data = ecore_list_first_remove(_ecore_xcb_cookies);
if (data) if (data)
{ {
cookie = data->cookie; cookie = data->cookie;

View File

@ -21,7 +21,7 @@ timer(void *data)
list = efreet_util_desktop_mime_list("application/ogg"); list = efreet_util_desktop_mime_list("application/ogg");
if (list) if (list)
{ {
ecore_list_goto_first(list); ecore_list_first_goto(list);
while ((desktop = ecore_list_next(list))) while ((desktop = ecore_list_next(list)))
{ {
printf("application/ogg: %s\n", desktop->name); printf("application/ogg: %s\n", desktop->name);

View File

@ -172,7 +172,7 @@ ef_cb_efreet_data_dirs(void)
i = 0; i = 0;
tmp = efreet_data_dirs_get(); tmp = efreet_data_dirs_get();
ecore_list_goto_first(tmp); ecore_list_first_goto(tmp);
while ((val = ecore_list_next(tmp))) while ((val = ecore_list_next(tmp)))
{ {
if (vals[i] == NULL) if (vals[i] == NULL)
@ -199,13 +199,13 @@ ef_cb_efreet_data_dirs(void)
i = 0; i = 0;
tmp = efreet_data_dirs_get(); tmp = efreet_data_dirs_get();
if (ecore_list_nodes(tmp) != 2) if (ecore_list_count(tmp) != 2)
{ {
printf("efreet_data_dirs_get() nodes is differnet from expected default\n"); printf("efreet_data_dirs_get() nodes is differnet from expected default\n");
ret = 0; ret = 0;
} }
ecore_list_goto_first(tmp); ecore_list_first_goto(tmp);
while ((val = ecore_list_next(tmp))) while ((val = ecore_list_next(tmp)))
{ {
if (def_vals[i] == NULL) if (def_vals[i] == NULL)
@ -251,7 +251,7 @@ ef_cb_efreet_config_dirs(void)
i = 0; i = 0;
tmp = efreet_config_dirs_get(); tmp = efreet_config_dirs_get();
ecore_list_goto_first(tmp); ecore_list_first_goto(tmp);
while ((val = ecore_list_next(tmp))) while ((val = ecore_list_next(tmp)))
{ {
if (vals[i] == NULL) if (vals[i] == NULL)
@ -278,7 +278,7 @@ ef_cb_efreet_config_dirs(void)
i = 0; i = 0;
tmp = efreet_config_dirs_get(); tmp = efreet_config_dirs_get();
ecore_list_goto_first(tmp); ecore_list_first_goto(tmp);
while ((val = ecore_list_next(tmp))) while ((val = ecore_list_next(tmp)))
{ {
if (def_vals[i] == NULL) if (def_vals[i] == NULL)

View File

@ -48,7 +48,7 @@ ef_cb_desktop_parse(void)
const char *cat; const char *cat;
int num_categories = 2, i = 0; int num_categories = 2, i = 0;
ecore_list_goto_first(desktop->categories); ecore_list_first_goto(desktop->categories);
while ((cat = ecore_list_next(desktop->categories))) while ((cat = ecore_list_next(desktop->categories)))
{ {
if (i >= num_categories) if (i >= num_categories)
@ -139,7 +139,7 @@ ef_cb_desktop_save(void)
desktop->generic_name = strdup("Test Application"); desktop->generic_name = strdup("Test Application");
desktop->exec = strdup("efreet_test"); desktop->exec = strdup("efreet_test");
desktop->categories = ecore_list_new(); desktop->categories = ecore_list_new();
ecore_list_set_free_cb(desktop->categories, ECORE_FREE_CB(free)); ecore_list_free_cb_set(desktop->categories, ECORE_FREE_CB(free));
ecore_list_append(desktop->categories, strdup("Test")); ecore_list_append(desktop->categories, strdup("Test"));
ecore_list_append(desktop->categories, strdup("Enlightenment")); ecore_list_append(desktop->categories, strdup("Enlightenment"));
printf("save test: %d\n", efreet_desktop_save(desktop)); printf("save test: %d\n", efreet_desktop_save(desktop));
@ -199,7 +199,7 @@ ef_cb_desktop_command_get(void)
ecore_list_append(expected, "app '/tmp/absolute_uri'"); ecore_list_append(expected, "app '/tmp/absolute_uri'");
ecore_list_append(expected, "app '/relative_uri'"); ecore_list_append(expected, "app '/relative_uri'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, files, _cb_command, info); efreet_desktop_command_get(desktop, files, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -212,7 +212,7 @@ ef_cb_desktop_command_get(void)
ecore_list_append(expected, "app 'file:///tmp/absolute_uri'"); ecore_list_append(expected, "app 'file:///tmp/absolute_uri'");
ecore_list_append(expected, "app 'file:///relative_uri'"); ecore_list_append(expected, "app 'file:///relative_uri'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, files, _cb_command, info); efreet_desktop_command_get(desktop, files, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -225,7 +225,7 @@ ef_cb_desktop_command_get(void)
ecore_list_append(expected, "app '/tmp'"); ecore_list_append(expected, "app '/tmp'");
ecore_list_append(expected, "app '/'"); ecore_list_append(expected, "app '/'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, files, _cb_command, info); efreet_desktop_command_get(desktop, files, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -239,7 +239,7 @@ ef_cb_desktop_command_get(void)
ecore_list_append(expected, "app 'absolute_uri'"); ecore_list_append(expected, "app 'absolute_uri'");
ecore_list_append(expected, "app 'relative_uri'"); ecore_list_append(expected, "app 'relative_uri'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, files, _cb_command, info); efreet_desktop_command_get(desktop, files, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -249,7 +249,7 @@ ef_cb_desktop_command_get(void)
desktop->exec = strdup("app %F"); desktop->exec = strdup("app %F");
ecore_list_append(expected, "app '/tmp/absolute_path' '/relative_path' '/tmp/absolute_uri' '/relative_uri'"); ecore_list_append(expected, "app '/tmp/absolute_path' '/relative_path' '/tmp/absolute_uri' '/relative_uri'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, files, _cb_command, info); efreet_desktop_command_get(desktop, files, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -259,7 +259,7 @@ ef_cb_desktop_command_get(void)
desktop->exec = strdup("app %U"); desktop->exec = strdup("app %U");
ecore_list_append(expected, "app 'file:///tmp/absolute_path' 'file:///relative_path' 'file:///tmp/absolute_uri' 'file:///relative_uri'"); ecore_list_append(expected, "app 'file:///tmp/absolute_path' 'file:///relative_path' 'file:///tmp/absolute_uri' 'file:///relative_uri'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, files, _cb_command, info); efreet_desktop_command_get(desktop, files, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -269,7 +269,7 @@ ef_cb_desktop_command_get(void)
desktop->exec = strdup("app %D"); desktop->exec = strdup("app %D");
ecore_list_append(expected, "app '/tmp' '/' '/tmp' '/'"); ecore_list_append(expected, "app '/tmp' '/' '/tmp' '/'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, files, _cb_command, info); efreet_desktop_command_get(desktop, files, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -279,7 +279,7 @@ ef_cb_desktop_command_get(void)
desktop->exec = strdup("app %N"); desktop->exec = strdup("app %N");
ecore_list_append(expected, "app 'absolute_path' 'relative_path' 'absolute_uri' 'relative_uri'"); ecore_list_append(expected, "app 'absolute_path' 'relative_path' 'absolute_uri' 'relative_uri'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, files, _cb_command, info); efreet_desktop_command_get(desktop, files, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -289,7 +289,7 @@ ef_cb_desktop_command_get(void)
desktop->exec = strdup("app %i"); desktop->exec = strdup("app %i");
ecore_list_append(expected, "app --icon 'icon.png'"); ecore_list_append(expected, "app --icon 'icon.png'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, NULL, _cb_command, info); efreet_desktop_command_get(desktop, NULL, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -299,7 +299,7 @@ ef_cb_desktop_command_get(void)
desktop->exec = strdup("app %c"); desktop->exec = strdup("app %c");
ecore_list_append(expected, "app 'App Name'"); ecore_list_append(expected, "app 'App Name'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, NULL, _cb_command, info); efreet_desktop_command_get(desktop, NULL, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);
@ -309,7 +309,7 @@ ef_cb_desktop_command_get(void)
desktop->exec = strdup("app %k"); desktop->exec = strdup("app %k");
ecore_list_append(expected, "app 'test.desktop'"); ecore_list_append(expected, "app 'test.desktop'");
ecore_list_goto_first(expected); ecore_list_first_goto(expected);
efreet_desktop_command_get(desktop, NULL, _cb_command, info); efreet_desktop_command_get(desktop, NULL, _cb_command, info);
ecore_list_clear(expected); ecore_list_clear(expected);

View File

@ -64,10 +64,10 @@ ef_cb_efreet_icon_theme_list(void)
char buf[PATH_MAX]; char buf[PATH_MAX];
dirs = ecore_hash_new(ecore_str_hash, ecore_str_compare); dirs = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(dirs, free); ecore_hash_free_key_cb_set(dirs, free);
icon_dirs = efreet_data_dirs_get(); icon_dirs = efreet_data_dirs_get();
ecore_list_goto_first(icon_dirs); ecore_list_first_goto(icon_dirs);
ef_icon_theme_themes_find(efreet_icon_user_dir_get(), dirs); ef_icon_theme_themes_find(efreet_icon_user_dir_get(), dirs);
while ((dir = ecore_list_next(icon_dirs))) while ((dir = ecore_list_next(icon_dirs)))
@ -78,7 +78,7 @@ ef_cb_efreet_icon_theme_list(void)
ef_icon_theme_themes_find("/usr/share/pixmaps", dirs); ef_icon_theme_themes_find("/usr/share/pixmaps", dirs);
themes = efreet_icon_theme_list_get(); themes = efreet_icon_theme_list_get();
ecore_list_goto_first(themes); ecore_list_first_goto(themes);
while ((theme = ecore_list_next(themes))) while ((theme = ecore_list_next(themes)))
{ {
if (ecore_hash_get(dirs, theme->name.internal)) if (ecore_hash_get(dirs, theme->name.internal))
@ -93,12 +93,12 @@ ef_cb_efreet_icon_theme_list(void)
ecore_list_destroy(themes); ecore_list_destroy(themes);
themes = ecore_hash_keys(dirs); themes = ecore_hash_keys(dirs);
if (ecore_list_nodes(themes) > 0) if (ecore_list_count(themes) > 0)
{ {
char *dir; char *dir;
printf("efreet_icon_theme_list_get() missed: "); printf("efreet_icon_theme_list_get() missed: ");
ecore_list_goto_first(themes); ecore_list_first_goto(themes);
while ((dir = ecore_list_next(themes))) while ((dir = ecore_list_next(themes)))
printf("%s ", dir); printf("%s ", dir);
printf("\n"); printf("\n");
@ -122,7 +122,7 @@ ef_icon_theme_themes_find(const char *search_dir, Ecore_Hash *themes)
dirs = ecore_file_ls(search_dir); dirs = ecore_file_ls(search_dir);
if (!dirs) return; if (!dirs) return;
while ((dir = ecore_list_remove_first(dirs))) while ((dir = ecore_list_first_remove(dirs)))
{ {
char p[PATH_MAX]; char p[PATH_MAX];
@ -427,7 +427,7 @@ ef_cb_efreet_icon_match(void)
Ecore_List *themes; Ecore_List *themes;
themes = efreet_icon_theme_list_get(); themes = efreet_icon_theme_list_get();
ecore_list_goto_first(themes); ecore_list_first_goto(themes);
while ((theme = ecore_list_next(themes))) while ((theme = ecore_list_next(themes)))
{ {
if (!strcmp(theme->name.internal, THEME)) if (!strcmp(theme->name.internal, THEME))
@ -442,8 +442,8 @@ ef_cb_efreet_icon_match(void)
} }
icon_hash = ecore_hash_new(ecore_str_hash, ecore_str_compare); icon_hash = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(icon_hash, free); ecore_hash_free_key_cb_set(icon_hash, free);
ecore_hash_set_free_value(icon_hash, free); ecore_hash_free_value_cb_set(icon_hash, free);
ef_icons_find(theme, themes, icon_hash); ef_icons_find(theme, themes, icon_hash);
ecore_list_destroy(themes); ecore_list_destroy(themes);
@ -494,7 +494,7 @@ ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, Ecore_Hash *icons)
{ {
Efreet_Icon_Theme_Directory *dir; Efreet_Icon_Theme_Directory *dir;
ecore_list_goto_first(theme->directories); ecore_list_first_goto(theme->directories);
while ((dir = ecore_list_next(theme->directories))) while ((dir = ecore_list_next(theme->directories)))
{ {
if (theme->paths.count > 1) if (theme->paths.count > 1)
@ -503,7 +503,7 @@ ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, Ecore_Hash *icons)
char *tmp; char *tmp;
list = theme->paths.path; list = theme->paths.path;
ecore_list_goto_first(list); ecore_list_first_goto(list);
while ((tmp = ecore_list_next(list))) while ((tmp = ecore_list_next(list)))
{ {
snprintf(path, sizeof(path), "%s/%s/", tmp, dir->name); snprintf(path, sizeof(path), "%s/%s/", tmp, dir->name);
@ -521,12 +521,12 @@ ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, Ecore_Hash *icons)
{ {
const char *theme_path; const char *theme_path;
ecore_list_goto_first(theme->paths.path); ecore_list_first_goto(theme->paths.path);
while ((theme_path = ecore_list_next(theme->paths.path))) while ((theme_path = ecore_list_next(theme->paths.path)))
{ {
Efreet_Icon_Theme_Directory *dir; Efreet_Icon_Theme_Directory *dir;
ecore_list_goto_first(theme->directories); ecore_list_first_goto(theme->directories);
while ((dir = ecore_list_next(theme->directories))) while ((dir = ecore_list_next(theme->directories)))
{ {
snprintf(path, sizeof(path), "%s/%s/", theme_path, dir->name); snprintf(path, sizeof(path), "%s/%s/", theme_path, dir->name);
@ -540,10 +540,10 @@ ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, Ecore_Hash *icons)
Efreet_Icon_Theme *parent_theme; Efreet_Icon_Theme *parent_theme;
char *parent; char *parent;
ecore_list_goto_first(theme->inherits); ecore_list_first_goto(theme->inherits);
while ((parent = ecore_list_next(theme->inherits))) while ((parent = ecore_list_next(theme->inherits)))
{ {
ecore_list_goto_first(themes); ecore_list_first_goto(themes);
while ((parent_theme = ecore_list_next(themes))) while ((parent_theme = ecore_list_next(themes)))
{ {
if (!strcmp(parent_theme->name.internal, parent)) if (!strcmp(parent_theme->name.internal, parent))
@ -555,7 +555,7 @@ ef_icons_find(Efreet_Icon_Theme *theme, Ecore_List *themes, Ecore_Hash *icons)
{ {
Efreet_Icon_Theme *parent_theme; Efreet_Icon_Theme *parent_theme;
ecore_list_goto_first(themes); ecore_list_first_goto(themes);
while ((parent_theme = ecore_list_next(themes))) while ((parent_theme = ecore_list_next(themes)))
{ {
if (!strcmp(parent_theme->name.internal, "hicolor")) if (!strcmp(parent_theme->name.internal, "hicolor"))
@ -577,7 +577,7 @@ ef_read_dir(const char *dir, Ecore_Hash *icons)
files = ecore_file_ls(dir); files = ecore_file_ls(dir);
if (!files) return; if (!files) return;
while ((file = ecore_list_remove_first(files))) while ((file = ecore_list_first_remove(files)))
{ {
char *p; char *p;

View File

@ -10,7 +10,7 @@ ef_menu_desktop_exec(Efreet_Menu *menu)
{ {
Efreet_Desktop *desktop; Efreet_Desktop *desktop;
ecore_list_goto_first(menu->entries); ecore_list_first_goto(menu->entries);
while ((desktop = ecore_list_next(menu->entries))) while ((desktop = ecore_list_next(menu->entries)))
efreet_desktop_exec(desktop, NULL); efreet_desktop_exec(desktop, NULL);
} }
@ -18,7 +18,7 @@ ef_menu_desktop_exec(Efreet_Menu *menu)
{ {
Efreet_Menu *sub_menu; Efreet_Menu *sub_menu;
ecore_list_goto_first(menu->sub_menus); ecore_list_first_goto(menu->sub_menus);
while ((sub_menu = ecore_list_next(menu->sub_menus))) while ((sub_menu = ecore_list_next(menu->sub_menus)))
ef_menu_desktop_exec(sub_menu); ef_menu_desktop_exec(sub_menu);
} }
@ -111,7 +111,7 @@ ef_cb_menu_edit(void)
efreet_menu_dump(menu, ""); efreet_menu_dump(menu, "");
printf("\n"); printf("\n");
#endif #endif
ecore_list_goto_first(menu->entries); ecore_list_first_goto(menu->entries);
entry = ecore_list_current(menu->entries); entry = ecore_list_current(menu->entries);
if (desktop != entry->desktop) if (desktop != entry->desktop)
{ {
@ -125,7 +125,7 @@ ef_cb_menu_edit(void)
efreet_menu_dump(menu, ""); efreet_menu_dump(menu, "");
printf("\n"); printf("\n");
#endif #endif
ecore_list_goto_index(menu->entries, 2); ecore_list_index_goto(menu->entries, 2);
entry = ecore_list_current(menu->entries); entry = ecore_list_current(menu->entries);
if (desktop != entry->desktop) if (desktop != entry->desktop)
{ {
@ -139,7 +139,7 @@ ef_cb_menu_edit(void)
efreet_menu_dump(menu, ""); efreet_menu_dump(menu, "");
printf("\n"); printf("\n");
#endif #endif
ecore_list_goto_last(menu->entries); ecore_list_last_goto(menu->entries);
entry = ecore_list_current(menu->entries); entry = ecore_list_current(menu->entries);
if (desktop != entry->desktop) if (desktop != entry->desktop)
{ {

View File

@ -37,7 +37,7 @@ dump(Efreet_Menu *menu, const char *path)
if (!menu || !menu->entries) return; if (!menu || !menu->entries) return;
ecore_list_goto_first(menu->entries); ecore_list_first_goto(menu->entries);
while ((entry = ecore_list_next(menu->entries))) while ((entry = ecore_list_next(menu->entries)))
{ {
if (entry->type == EFREET_MENU_ENTRY_DESKTOP) if (entry->type == EFREET_MENU_ENTRY_DESKTOP)

View File

@ -83,7 +83,7 @@ environment_store(void)
else else
{ {
environment = ecore_list_new(); environment = ecore_list_new();
ecore_list_set_free_cb(environment, ECORE_FREE_CB(free)); ecore_list_free_cb_set(environment, ECORE_FREE_CB(free));
} }
for (e = environ; *e; e++) for (e = environ; *e; e++)
@ -97,7 +97,7 @@ environment_restore(void)
if (!environment) return; if (!environment) return;
*environ = NULL; *environ = NULL;
ecore_list_goto_first(environment); ecore_list_first_goto(environment);
while ((e = ecore_list_next(environment))) while ((e = ecore_list_next(environment)))
putenv(e); putenv(e);
} }

View File

@ -188,7 +188,7 @@ efreet_dirs_get(const char *key, const char *fallback)
if (!path || (path[0] == '\0')) path = fallback; if (!path || (path[0] == '\0')) path = fallback;
dirs = ecore_list_new(); dirs = ecore_list_new();
ecore_list_set_free_cb(dirs, ECORE_FREE_CB(ecore_string_release)); ecore_list_free_cb_set(dirs, ECORE_FREE_CB(ecore_string_release));
if (!path) return dirs; if (!path) return dirs;
tmp = strdup(path); tmp = strdup(path);

View File

@ -115,14 +115,14 @@ efreet_desktop_init(void)
if (!ecore_file_init()) return --init; if (!ecore_file_init()) return --init;
efreet_desktop_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare); efreet_desktop_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(efreet_desktop_cache, ECORE_FREE_CB(free)); ecore_hash_free_key_cb_set(efreet_desktop_cache, ECORE_FREE_CB(free));
#if 0 #if 0
ecore_hash_set_free_value(efreet_desktop_cache, ecore_hash_free_value_cb_set(efreet_desktop_cache,
ECORE_FREE_CB(efreet_desktop_free)); ECORE_FREE_CB(efreet_desktop_free));
#endif #endif
efreet_desktop_types = ecore_list_new(); efreet_desktop_types = ecore_list_new();
ecore_list_set_free_cb(efreet_desktop_types, ecore_list_free_cb_set(efreet_desktop_types,
ECORE_FREE_CB(efreet_desktop_type_info_free)); ECORE_FREE_CB(efreet_desktop_type_info_free));
EFREET_DESKTOP_TYPE_APPLICATION = efreet_desktop_type_add("Application", EFREET_DESKTOP_TYPE_APPLICATION = efreet_desktop_type_add("Application",
@ -373,7 +373,7 @@ efreet_desktop_clear(Efreet_Desktop *desktop)
if (desktop->type_data) if (desktop->type_data)
{ {
Efreet_Desktop_Type_Info *info; Efreet_Desktop_Type_Info *info;
info = ecore_list_goto_index(efreet_desktop_types, desktop->type); info = ecore_list_index_goto(efreet_desktop_types, desktop->type);
if (info->free_func) if (info->free_func)
info->free_func(desktop->type_data); info->free_func(desktop->type_data);
} }
@ -396,7 +396,7 @@ efreet_desktop_save(Efreet_Desktop *desktop)
efreet_ini_section_add(ini, "Desktop Entry"); efreet_ini_section_add(ini, "Desktop Entry");
efreet_ini_section_set(ini, "Desktop Entry"); efreet_ini_section_set(ini, "Desktop Entry");
info = ecore_list_goto_index(efreet_desktop_types, desktop->type); info = ecore_list_index_goto(efreet_desktop_types, desktop->type);
if (info) if (info)
{ {
efreet_ini_string_set(ini, "Type", info->type); efreet_ini_string_set(ini, "Type", info->type);
@ -500,7 +500,7 @@ efreet_desktop_free(Efreet_Desktop *desktop)
if (desktop->type_data) if (desktop->type_data)
{ {
Efreet_Desktop_Type_Info *info; Efreet_Desktop_Type_Info *info;
info = ecore_list_goto_index(efreet_desktop_types, desktop->type); info = ecore_list_index_goto(efreet_desktop_types, desktop->type);
if (info->free_func) if (info->free_func)
info->free_func(desktop->type_data); info->free_func(desktop->type_data);
} }
@ -563,7 +563,7 @@ unsigned int
efreet_desktop_category_count_get(Efreet_Desktop *desktop) efreet_desktop_category_count_get(Efreet_Desktop *desktop)
{ {
if (!desktop || !desktop->categories) return 0; if (!desktop || !desktop->categories) return 0;
return ecore_list_nodes(desktop->categories); return ecore_list_count(desktop->categories);
} }
/** /**
@ -579,7 +579,7 @@ efreet_desktop_category_add(Efreet_Desktop *desktop, const char *category)
if (!desktop->categories) if (!desktop->categories)
{ {
desktop->categories = ecore_list_new(); desktop->categories = ecore_list_new();
ecore_list_set_free_cb(desktop->categories, ecore_list_free_cb_set(desktop->categories,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
} }
else else
@ -631,7 +631,7 @@ efreet_desktop_type_add(const char *type, Efreet_Desktop_Type_Parse_Cb parse_fun
info = NEW(Efreet_Desktop_Type_Info, 1); info = NEW(Efreet_Desktop_Type_Info, 1);
if (!info) return 0; if (!info) return 0;
id = ecore_list_nodes(efreet_desktop_types); id = ecore_list_count(efreet_desktop_types);
info->id = id; info->id = id;
info->type = strdup(type); info->type = strdup(type);
@ -656,7 +656,7 @@ int
efreet_desktop_type_alias (int from_type, const char *alias) efreet_desktop_type_alias (int from_type, const char *alias)
{ {
Efreet_Desktop_Type_Info *info; Efreet_Desktop_Type_Info *info;
info = ecore_list_goto_index(efreet_desktop_types, from_type); info = ecore_list_index_goto(efreet_desktop_types, from_type);
if (!info) return -1; if (!info) return -1;
return efreet_desktop_type_add(alias, info->parse_func, info->save_func, info->free_func); return efreet_desktop_type_add(alias, info->parse_func, info->save_func, info->free_func);
@ -698,7 +698,7 @@ efreet_desktop_type_parse(const char *type_str)
if (!type_str) return NULL; if (!type_str) return NULL;
ecore_list_goto_first(efreet_desktop_types); ecore_list_first_goto(efreet_desktop_types);
while ((info = ecore_list_next(efreet_desktop_types))) while ((info = ecore_list_next(efreet_desktop_types)))
{ {
if (!strcmp(info->type, type_str)) if (!strcmp(info->type, type_str))
@ -725,7 +725,7 @@ efreet_desktop_string_list_parse(const char *string)
list = ecore_list_new(); list = ecore_list_new();
if (!list) return NULL; if (!list) return NULL;
ecore_list_set_free_cb(list, ECORE_FREE_CB(ecore_string_release)); ecore_list_free_cb_set(list, ECORE_FREE_CB(ecore_string_release));
tmp = strdup(string); tmp = strdup(string);
s = tmp; s = tmp;
@ -764,13 +764,13 @@ efreet_desktop_string_list_join(Ecore_List *list)
char *string; char *string;
size_t size, pos, len; size_t size, pos, len;
if (ecore_list_is_empty(list)) return strdup(""); if (ecore_list_empty_is(list)) return strdup("");
size = 1024; size = 1024;
string = malloc(size); string = malloc(size);
pos = 0; pos = 0;
ecore_list_goto_first(list); ecore_list_first_goto(list);
while ((tmp = ecore_list_next(list))) while ((tmp = ecore_list_next(list)))
{ {
len = strlen(tmp); len = strlen(tmp);
@ -1003,9 +1003,9 @@ efreet_desktop_x_fields_parse(Ecore_Hash_Node *node, Efreet_Desktop *desktop)
if (!desktop->x) if (!desktop->x)
{ {
desktop->x = ecore_hash_new(ecore_str_hash, ecore_str_compare); desktop->x = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(desktop->x, ecore_hash_free_key_cb_set(desktop->x,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(desktop->x, ecore_hash_free_value_cb_set(desktop->x,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
} }
ecore_hash_set(desktop->x, (void *)ecore_string_instance(node->key), ecore_hash_set(desktop->x, (void *)ecore_string_instance(node->key),
@ -1033,7 +1033,7 @@ efreet_desktop_environment_check(Efreet_Ini *ini)
if (desktop_environment) if (desktop_environment)
{ {
ecore_list_goto_first(list); ecore_list_first_goto(list);
while ((val = ecore_list_next(list))) while ((val = ecore_list_next(list)))
{ {
if (!strcmp(val, desktop_environment)) if (!strcmp(val, desktop_environment))
@ -1055,7 +1055,7 @@ efreet_desktop_environment_check(Efreet_Ini *ini)
list = efreet_desktop_string_list_parse(efreet_ini_string_get(ini, "NotShowIn")); list = efreet_desktop_string_list_parse(efreet_ini_string_get(ini, "NotShowIn"));
if (list) if (list)
{ {
ecore_list_goto_first(list); ecore_list_first_goto(list);
while ((val = ecore_list_next(list))) while ((val = ecore_list_next(list)))
{ {
if (!strcmp(val, desktop_environment)) if (!strcmp(val, desktop_environment))
@ -1113,14 +1113,14 @@ efreet_desktop_command_local_get(Efreet_Desktop *desktop, Ecore_List *files)
command->files = ecore_list_new(); command->files = ecore_list_new();
command->desktop = desktop; command->desktop = desktop;
ecore_list_set_free_cb(command->files, ecore_list_free_cb_set(command->files,
ECORE_FREE_CB(efreet_desktop_command_file_free)); ECORE_FREE_CB(efreet_desktop_command_file_free));
command->flags = efreet_desktop_command_flags_get(desktop); command->flags = efreet_desktop_command_flags_get(desktop);
/* get the required info for each file passed in */ /* get the required info for each file passed in */
if (files) if (files)
{ {
ecore_list_goto_first(files); ecore_list_first_goto(files);
while ((file = ecore_list_next(files))) while ((file = ecore_list_next(files)))
{ {
Efreet_Desktop_Command_File *dcf; Efreet_Desktop_Command_File *dcf;
@ -1174,14 +1174,14 @@ efreet_desktop_command_progress_get(Efreet_Desktop *desktop, Ecore_List *files,
command->files = ecore_list_new(); command->files = ecore_list_new();
command->desktop = desktop; command->desktop = desktop;
ecore_list_set_free_cb(command->files, ecore_list_free_cb_set(command->files,
ECORE_FREE_CB(efreet_desktop_command_file_free)); ECORE_FREE_CB(efreet_desktop_command_file_free));
command->flags = efreet_desktop_command_flags_get(desktop); command->flags = efreet_desktop_command_flags_get(desktop);
/* get the required info for each file passed in */ /* get the required info for each file passed in */
if (files) if (files)
{ {
ecore_list_goto_first(files); ecore_list_first_goto(files);
while ((file = ecore_list_next(files))) while ((file = ecore_list_next(files)))
{ {
Efreet_Desktop_Command_File *dcf; Efreet_Desktop_Command_File *dcf;
@ -1265,8 +1265,8 @@ efreet_desktop_command_execs_process(Efreet_Desktop_Command *command, Ecore_List
{ {
char *exec; char *exec;
int num; int num;
num = ecore_list_nodes(execs); num = ecore_list_count(execs);
ecore_list_goto_first(execs); ecore_list_first_goto(execs);
while ((exec = ecore_list_next(execs))) while ((exec = ecore_list_next(execs)))
{ {
command->cb_command(command->data, command->desktop, exec, --num); command->cb_command(command->data, command->desktop, exec, --num);
@ -1292,7 +1292,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
execs = ecore_list_new(); execs = ecore_list_new();
ecore_list_goto_first(command->files); ecore_list_first_goto(command->files);
/* if the Exec field appends multiple, that will run the list to the end, /* if the Exec field appends multiple, that will run the list to the end,
* causing this loop to only run once. otherwise, this loop will generate a * causing this loop to only run once. otherwise, this loop will generate a
@ -1437,7 +1437,7 @@ efreet_desktop_command_append_multiple(char *dest, int *size, int *len,
if (!command->files) return dest; if (!command->files) return dest;
ecore_list_goto_first(command->files); ecore_list_first_goto(command->files);
while ((file = ecore_list_next(command->files))) while ((file = ecore_list_next(command->files)))
{ {
if (first) if (first)
@ -1566,7 +1566,7 @@ efreet_desktop_command_file_process(Efreet_Desktop_Command *command, const char
if(!strncmp(file, "http://", 7) || !strncmp(file, "ftp://", 6)) if(!strncmp(file, "http://", 7) || !strncmp(file, "ftp://", 6))
{ {
uri = file; uri = file;
base = ecore_file_get_file(file); base = ecore_file_file_get(file);
nonlocal = 1; nonlocal = 1;
} }
@ -1617,9 +1617,9 @@ efreet_desktop_command_file_process(Efreet_Desktop_Command *command, const char
f->uri = strdup(buf); f->uri = strdup(buf);
} }
if (command->flags & EFREET_DESKTOP_EXEC_FLAG_DIR) if (command->flags & EFREET_DESKTOP_EXEC_FLAG_DIR)
f->dir = ecore_file_get_dir(abs); f->dir = ecore_file_dir_get(abs);
if (command->flags & EFREET_DESKTOP_EXEC_FLAG_FILE) if (command->flags & EFREET_DESKTOP_EXEC_FLAG_FILE)
f->file = strdup(ecore_file_get_file(file)); f->file = strdup(ecore_file_file_get(file));
free(abs); free(abs);
} }

View File

@ -107,13 +107,13 @@ efreet_icon_init(void)
/* setup the default extension list */ /* setup the default extension list */
efreet_icon_extensions = ecore_list_new(); efreet_icon_extensions = ecore_list_new();
ecore_list_set_free_cb(efreet_icon_extensions, free); ecore_list_free_cb_set(efreet_icon_extensions, free);
for (i = 0; default_exts[i] != NULL; i++) for (i = 0; default_exts[i] != NULL; i++)
ecore_list_append(efreet_icon_extensions, strdup(default_exts[i])); ecore_list_append(efreet_icon_extensions, strdup(default_exts[i]));
efreet_icon_themes = ecore_hash_new(NULL, NULL); efreet_icon_themes = ecore_hash_new(NULL, NULL);
ecore_hash_set_free_value(efreet_icon_themes, ecore_hash_free_value_cb_set(efreet_icon_themes,
ECORE_FREE_CB(efreet_icon_theme_free)); ECORE_FREE_CB(efreet_icon_theme_free));
efreet_extra_icon_dirs = ecore_list_new(); efreet_extra_icon_dirs = ecore_list_new();
} }
@ -224,7 +224,7 @@ efreet_icon_theme_list_get(void)
/* create the list for the user */ /* create the list for the user */
list = ecore_list_new(); list = ecore_list_new();
theme_list = ecore_hash_keys(efreet_icon_themes); theme_list = ecore_hash_keys(efreet_icon_themes);
ecore_list_goto_first(theme_list); ecore_list_first_goto(theme_list);
while ((dir = ecore_list_next(theme_list))) while ((dir = ecore_list_next(theme_list)))
{ {
Efreet_Icon_Theme *theme; Efreet_Icon_Theme *theme;
@ -282,7 +282,7 @@ efreet_icon_remove_extension(const char *icon)
if (ext) if (ext)
{ {
const char *ext2; const char *ext2;
ecore_list_goto_first(efreet_icon_extensions); ecore_list_first_goto(efreet_icon_extensions);
while ((ext2 = ecore_list_next(efreet_icon_extensions))) while ((ext2 = ecore_list_next(efreet_icon_extensions)))
{ {
if (!strcmp(ext, ext2)) if (!strcmp(ext, ext2))
@ -395,8 +395,8 @@ efreet_icon_list_find(const char *theme_name, Ecore_List *icons,
theme = efreet_icon_find_theme_check(theme_name); theme = efreet_icon_find_theme_check(theme_name);
share_keys = ecore_list_new(); share_keys = ecore_list_new();
ecore_list_set_free_cb(share_keys,free); ecore_list_free_cb_set(share_keys,free);
ecore_list_goto_first(icons); ecore_list_first_goto(icons);
while ((icon = ecore_list_next(icons))) while ((icon = ecore_list_next(icons)))
{ {
@ -408,8 +408,8 @@ efreet_icon_list_find(const char *theme_name, Ecore_List *icons,
Ecore_List *tmps = NULL; Ecore_List *tmps = NULL;
tmps = ecore_list_new(); tmps = ecore_list_new();
ecore_list_set_free_cb(tmps, free); ecore_list_free_cb_set(tmps, free);
ecore_list_goto_first(icons); ecore_list_first_goto(icons);
while ((icon = ecore_list_next(icons))) while ((icon = ecore_list_next(icons)))
ecore_list_append(tmps, efreet_icon_remove_extension(icon)); ecore_list_append(tmps, efreet_icon_remove_extension(icon));
@ -425,7 +425,7 @@ efreet_icon_list_find(const char *theme_name, Ecore_List *icons,
*/ */
if(!value) if(!value)
{ {
ecore_list_goto_first(icons); ecore_list_first_goto(icons);
while ((icon = ecore_list_next(icons))) while ((icon = ecore_list_next(icons)))
{ {
if ((value = efreet_icon_fallback_icon(icon))) if ((value = efreet_icon_fallback_icon(icon)))
@ -433,7 +433,7 @@ efreet_icon_list_find(const char *theme_name, Ecore_List *icons,
} }
} }
ecore_list_goto_first(share_keys); ecore_list_first_goto(share_keys);
while ((share_key = ecore_list_next(share_keys))) while ((share_key = ecore_list_next(share_keys)))
efreet_icon_cache_set(theme, ecore_string_instance(share_key), value); efreet_icon_cache_set(theme, ecore_string_instance(share_key), value);
ecore_list_destroy(share_keys); ecore_list_destroy(share_keys);
@ -480,7 +480,7 @@ efreet_icon_find_fallback(Efreet_Icon_Theme *theme, const char *cache_key,
if (theme->inherits) if (theme->inherits)
{ {
ecore_list_goto_first(theme->inherits); ecore_list_first_goto(theme->inherits);
while ((parent = ecore_list_next(theme->inherits))) while ((parent = ecore_list_next(theme->inherits)))
{ {
Efreet_Icon_Theme *parent_theme; Efreet_Icon_Theme *parent_theme;
@ -568,7 +568,7 @@ efreet_icon_list_find_fallback(Efreet_Icon_Theme *theme, Ecore_List *cache_keys,
if (theme->inherits) if (theme->inherits)
{ {
ecore_list_goto_first(theme->inherits); ecore_list_first_goto(theme->inherits);
while ((parent = ecore_list_next(theme->inherits))) while ((parent = ecore_list_next(theme->inherits)))
{ {
Efreet_Icon_Theme *parent_theme; Efreet_Icon_Theme *parent_theme;
@ -621,7 +621,7 @@ efreet_icon_list_find_helper(Efreet_Icon_Theme *theme, Ecore_List *cache_keys,
efreet_icon_theme_cache_check(theme); efreet_icon_theme_cache_check(theme);
/* see if this is in the cache already */ /* see if this is in the cache already */
ecore_list_goto_first(cache_keys); ecore_list_first_goto(cache_keys);
while ((cache_key = ecore_list_next(cache_keys))) while ((cache_key = ecore_list_next(cache_keys)))
{ {
if ((value = efreet_icon_cache_get(theme, cache_key))) if ((value = efreet_icon_cache_get(theme, cache_key)))
@ -635,7 +635,7 @@ efreet_icon_list_find_helper(Efreet_Icon_Theme *theme, Ecore_List *cache_keys,
if (recurse > 256) return NULL; if (recurse > 256) return NULL;
recurse++; recurse++;
ecore_list_goto_first(icons); ecore_list_first_goto(icons);
while ((icon = ecore_list_next(icons))) while ((icon = ecore_list_next(icons)))
{ {
if ((value = efreet_icon_lookup_icon(theme, icon, size))) if ((value = efreet_icon_lookup_icon(theme, icon, size)))
@ -674,7 +674,7 @@ efreet_icon_lookup_icon(Efreet_Icon_Theme *theme, const char *icon_name,
real_size = atoi(size); real_size = atoi(size);
/* search for allowed size == requested size */ /* search for allowed size == requested size */
ecore_list_goto_first(theme->directories); ecore_list_first_goto(theme->directories);
while ((dir = ecore_list_next(theme->directories))) while ((dir = ecore_list_next(theme->directories)))
{ {
if (!efreet_icon_directory_size_match(dir, real_size)) continue; if (!efreet_icon_directory_size_match(dir, real_size)) continue;
@ -684,7 +684,7 @@ efreet_icon_lookup_icon(Efreet_Icon_Theme *theme, const char *icon_name,
} }
/* search for any icon that matches */ /* search for any icon that matches */
ecore_list_goto_first(theme->directories); ecore_list_first_goto(theme->directories);
while ((dir = ecore_list_next(theme->directories))) while ((dir = ecore_list_next(theme->directories)))
{ {
int distance; int distance;
@ -741,7 +741,7 @@ efreet_icon_lookup_directory(Efreet_Icon_Theme *theme,
{ {
const char *path; const char *path;
ecore_list_goto_first(theme->paths.path); ecore_list_first_goto(theme->paths.path);
while ((path = ecore_list_next(theme->paths.path))) while ((path = ecore_list_next(theme->paths.path)))
efreet_icon_directory_cache(theme, dir, path); efreet_icon_directory_cache(theme, dir, path);
} }
@ -833,7 +833,7 @@ efreet_icon_fallback_icon(const char *icon_name)
const char *dir; const char *dir;
char path[PATH_MAX]; char path[PATH_MAX];
ecore_list_goto_first(efreet_extra_icon_dirs); ecore_list_first_goto(efreet_extra_icon_dirs);
while ((dir = ecore_list_next(efreet_extra_icon_dirs))) while ((dir = ecore_list_next(efreet_extra_icon_dirs)))
{ {
icon = efreet_icon_fallback_dir_scan(dir, icon_name); icon = efreet_icon_fallback_dir_scan(dir, icon_name);
@ -841,7 +841,7 @@ efreet_icon_fallback_icon(const char *icon_name)
} }
xdg_dirs = efreet_data_dirs_get(); xdg_dirs = efreet_data_dirs_get();
ecore_list_goto_first(xdg_dirs); ecore_list_first_goto(xdg_dirs);
while ((dir = ecore_list_next(xdg_dirs))) while ((dir = ecore_list_next(xdg_dirs)))
{ {
snprintf(path, PATH_MAX, "%s/icons", dir); snprintf(path, PATH_MAX, "%s/icons", dir);
@ -871,7 +871,7 @@ efreet_icon_fallback_dir_scan(const char *dir, const char *icon_name)
if (!dir || !icon_name) return NULL; if (!dir || !icon_name) return NULL;
ecore_list_goto_first(efreet_icon_extensions); ecore_list_first_goto(efreet_icon_extensions);
while ((ext = ecore_list_next(efreet_icon_extensions))) while ((ext = ecore_list_next(efreet_icon_extensions)))
{ {
const char *icon_path[] = { dir, "/", icon_name, ext, NULL }; const char *icon_path[] = { dir, "/", icon_name, ext, NULL };
@ -926,7 +926,7 @@ efreet_icon_directory_cache(Efreet_Icon_Theme *theme,
if (!efreet_icon_dirs_cached) if (!efreet_icon_dirs_cached)
{ {
efreet_icon_dirs_cached = ecore_hash_new(NULL, NULL); efreet_icon_dirs_cached = ecore_hash_new(NULL, NULL);
ecore_hash_set_free_key(efreet_icon_dirs_cached, ecore_hash_free_key_cb_set(efreet_icon_dirs_cached,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
} }
@ -1098,7 +1098,7 @@ efreet_icon_new(const char *path)
{ {
const char *file; const char *file;
file = ecore_file_get_file(icon->path); file = ecore_file_file_get(icon->path);
p = strrchr(icon->path, '.'); p = strrchr(icon->path, '.');
if (p) *p = '\0'; if (p) *p = '\0';
icon->name = strdup(file); icon->name = strdup(file);
@ -1209,7 +1209,7 @@ efreet_icon_populate(Efreet_Icon *icon, const char *file)
char *t, *s, *p; char *t, *s, *p;
icon->attach_points = ecore_list_new(); icon->attach_points = ecore_list_new();
ecore_list_set_free_cb(icon->attach_points, ecore_list_free_cb_set(icon->attach_points,
ECORE_FREE_CB(efreet_icon_point_free)); ECORE_FREE_CB(efreet_icon_point_free));
t = strdup(tmp); t = strdup(tmp);
@ -1314,7 +1314,7 @@ efreet_icon_theme_path_add(Efreet_Icon_Theme *theme, const char *path)
old = theme->paths.path; old = theme->paths.path;
theme->paths.path = ecore_list_new(); theme->paths.path = ecore_list_new();
ecore_list_set_free_cb(theme->paths.path, free); ecore_list_free_cb_set(theme->paths.path, free);
ecore_list_append(theme->paths.path, old); ecore_list_append(theme->paths.path, old);
ecore_list_append(theme->paths.path, strdup(path)); ecore_list_append(theme->paths.path, strdup(path));
@ -1352,7 +1352,7 @@ efreet_icon_theme_cache_check(Efreet_Icon_Theme *theme)
{ {
char *path; char *path;
ecore_list_goto_first(theme->paths.path); ecore_list_first_goto(theme->paths.path);
while ((path = ecore_list_next(theme->paths.path))) while ((path = ecore_list_next(theme->paths.path)))
{ {
if (!efreet_icon_theme_cache_check_dir(theme, path)) if (!efreet_icon_theme_cache_check_dir(theme, path))
@ -1365,9 +1365,9 @@ efreet_icon_theme_cache_check(Efreet_Icon_Theme *theme)
if (!theme->icon_cache) if (!theme->icon_cache)
{ {
theme->icon_cache = ecore_hash_new(NULL, NULL); theme->icon_cache = ecore_hash_new(NULL, NULL);
ecore_hash_set_free_key(theme->icon_cache, ecore_hash_free_key_cb_set(theme->icon_cache,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(theme->icon_cache, ecore_hash_free_value_cb_set(theme->icon_cache,
ECORE_FREE_CB(efreet_icon_free)); ECORE_FREE_CB(efreet_icon_free));
} }
@ -1417,7 +1417,7 @@ efreet_icon_theme_dir_scan_all(const char *theme_name)
efreet_icon_theme_dir_scan(efreet_icon_user_dir_get(), theme_name); efreet_icon_theme_dir_scan(efreet_icon_user_dir_get(), theme_name);
xdg_dirs = efreet_data_dirs_get(); xdg_dirs = efreet_data_dirs_get();
ecore_list_goto_first(xdg_dirs); ecore_list_first_goto(xdg_dirs);
while ((dir = ecore_list_next(xdg_dirs))) while ((dir = ecore_list_next(xdg_dirs)))
{ {
snprintf(path, sizeof(path), "%s/icons", dir); snprintf(path, sizeof(path), "%s/icons", dir);
@ -1550,7 +1550,7 @@ efreet_icon_theme_index_read(Efreet_Icon_Theme *theme, const char *path)
char *t, *s, *p; char *t, *s, *p;
theme->inherits = ecore_list_new(); theme->inherits = ecore_list_new();
ecore_list_set_free_cb(theme->inherits, free); ecore_list_free_cb_set(theme->inherits, free);
t = strdup(tmp); t = strdup(tmp);
s = t; s = t;
@ -1578,7 +1578,7 @@ efreet_icon_theme_index_read(Efreet_Icon_Theme *theme, const char *path)
int last = 0; int last = 0;
theme->directories = ecore_list_new(); theme->directories = ecore_list_new();
ecore_list_set_free_cb(theme->directories, ecore_list_free_cb_set(theme->directories,
ECORE_FREE_CB(efreet_icon_theme_directory_free)); ECORE_FREE_CB(efreet_icon_theme_directory_free));
t = strdup(tmp); t = strdup(tmp);
@ -1620,7 +1620,7 @@ efreet_icon_theme_dir_validity_check(void)
const char *name; const char *name;
keys = ecore_hash_keys(efreet_icon_themes); keys = ecore_hash_keys(efreet_icon_themes);
ecore_list_goto_first(keys); ecore_list_first_goto(keys);
while ((name = ecore_list_next(keys))) while ((name = ecore_list_next(keys)))
{ {
Efreet_Icon_Theme *theme; Efreet_Icon_Theme *theme;

View File

@ -97,8 +97,8 @@ efreet_ini_parse(const char *file)
if (!f) return NULL; if (!f) return NULL;
data = ecore_hash_new(ecore_str_hash, ecore_str_compare); data = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(data, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_key_cb_set(data, ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(data, ECORE_FREE_CB(ecore_hash_destroy)); ecore_hash_free_value_cb_set(data, ECORE_FREE_CB(ecore_hash_destroy));
/* if a line is longer than the buffer size, this \n will get overwritten. */ /* if a line is longer than the buffer size, this \n will get overwritten. */
read_buf[read_len - 2] = '\n'; read_buf[read_len - 2] = '\n';
@ -156,8 +156,8 @@ efreet_ini_parse(const char *file)
Ecore_Hash *old; Ecore_Hash *old;
*p = '\0'; *p = '\0';
section = ecore_hash_new(ecore_str_hash, ecore_str_compare); section = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(section, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_key_cb_set(section, ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(section, ECORE_FREE_CB(free)); ecore_hash_free_value_cb_set(section, ECORE_FREE_CB(free));
old = ecore_hash_remove(data, header); old = ecore_hash_remove(data, header);
//if (old) printf("[efreet] Warning: duplicate section '%s' in file '%s'\n", header, file); //if (old) printf("[efreet] Warning: duplicate section '%s' in file '%s'\n", header, file);
@ -309,14 +309,14 @@ efreet_ini_section_add(Efreet_Ini *ini, const char *section)
if (!ini->data) if (!ini->data)
{ {
ini->data = ecore_hash_new(ecore_str_hash, ecore_str_compare); ini->data = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(ini->data, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_key_cb_set(ini->data, ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(ini->data, ECORE_FREE_CB(ecore_hash_destroy)); ecore_hash_free_value_cb_set(ini->data, ECORE_FREE_CB(ecore_hash_destroy));
} }
if (ecore_hash_get(ini->data, section)) return; if (ecore_hash_get(ini->data, section)) return;
hash = ecore_hash_new(ecore_str_hash, ecore_str_compare); hash = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(hash, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_key_cb_set(hash, ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(hash, ECORE_FREE_CB(free)); ecore_hash_free_value_cb_set(hash, ECORE_FREE_CB(free));
ecore_hash_set(ini->data, (void *)ecore_string_instance(section), hash); ecore_hash_set(ini->data, (void *)ecore_string_instance(section), hash);
} }

View File

@ -445,13 +445,13 @@ efreet_menu_init(void)
|| !efreet_menu_move_cbs || !efreet_menu_layout_cbs) || !efreet_menu_move_cbs || !efreet_menu_layout_cbs)
return 0; return 0;
ecore_hash_set_free_key(efreet_menu_handle_cbs, ecore_hash_free_key_cb_set(efreet_menu_handle_cbs,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_key(efreet_menu_filter_cbs, ecore_hash_free_key_cb_set(efreet_menu_filter_cbs,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_key(efreet_menu_move_cbs, ecore_hash_free_key_cb_set(efreet_menu_move_cbs,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_key(efreet_menu_layout_cbs, ecore_hash_free_key_cb_set(efreet_menu_layout_cbs,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
/* set Menu into it's own so we can check the XML is valid before trying /* set Menu into it's own so we can check the XML is valid before trying
@ -499,7 +499,7 @@ efreet_menu_kde_legacy_init(void)
if (!f) return 0; if (!f) return 0;
efreet_menu_kde_legacy_dirs = ecore_list_new(); efreet_menu_kde_legacy_dirs = ecore_list_new();
ecore_list_set_free_cb(efreet_menu_kde_legacy_dirs, ecore_list_free_cb_set(efreet_menu_kde_legacy_dirs,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
/* XXX if the return from kde-config is a line longer than PATH_MAX, /* XXX if the return from kde-config is a line longer than PATH_MAX,
@ -583,7 +583,7 @@ efreet_menu_get(void)
/* fallback to the XDG_CONFIG_DIRS */ /* fallback to the XDG_CONFIG_DIRS */
config_dirs = efreet_config_dirs_get(); config_dirs = efreet_config_dirs_get();
ecore_list_goto_first(config_dirs); ecore_list_first_goto(config_dirs);
while ((dir = ecore_list_next(config_dirs))) while ((dir = ecore_list_next(config_dirs)))
{ {
snprintf(menu, sizeof(menu), "%s/menus/%sapplications.menu", snprintf(menu, sizeof(menu), "%s/menus/%sapplications.menu",
@ -622,11 +622,11 @@ efreet_menu_parse(const char *path)
IF_FREE_HASH(efreet_merged_menus); IF_FREE_HASH(efreet_merged_menus);
efreet_merged_menus = ecore_hash_new(ecore_str_hash, ecore_str_compare); efreet_merged_menus = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(efreet_merged_menus, ECORE_FREE_CB(free)); ecore_hash_free_key_cb_set(efreet_merged_menus, ECORE_FREE_CB(free));
IF_FREE_HASH(efreet_merged_dirs); IF_FREE_HASH(efreet_merged_dirs);
efreet_merged_dirs = ecore_hash_new(ecore_str_hash, ecore_str_compare); efreet_merged_dirs = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(efreet_merged_dirs, ECORE_FREE_CB(free)); ecore_hash_free_key_cb_set(efreet_merged_dirs, ECORE_FREE_CB(free));
/* split appart the filename and the path */ /* split appart the filename and the path */
internal = efreet_menu_internal_new(); internal = efreet_menu_internal_new();
@ -729,7 +729,7 @@ efreet_menu_save_menu(Efreet_Menu *menu, FILE *f, int indent)
efreet_menu_save_indent(f, indent + 1); efreet_menu_save_indent(f, indent + 1);
fprintf(f, "<Layout>\n"); fprintf(f, "<Layout>\n");
ecore_list_goto_first(menu->entries); ecore_list_first_goto(menu->entries);
while ((entry = ecore_list_next(menu->entries))) while ((entry = ecore_list_next(menu->entries)))
{ {
if (entry->type == EFREET_MENU_ENTRY_MENU) if (entry->type == EFREET_MENU_ENTRY_MENU)
@ -757,7 +757,7 @@ efreet_menu_save_menu(Efreet_Menu *menu, FILE *f, int indent)
{ {
efreet_menu_save_indent(f, indent + 1); efreet_menu_save_indent(f, indent + 1);
fprintf(f, "<Include>\n"); fprintf(f, "<Include>\n");
ecore_list_goto_first(menu->entries); ecore_list_first_goto(menu->entries);
while ((entry = ecore_list_next(menu->entries))) while ((entry = ecore_list_next(menu->entries)))
{ {
if (entry->type == EFREET_MENU_ENTRY_DESKTOP) if (entry->type == EFREET_MENU_ENTRY_DESKTOP)
@ -772,7 +772,7 @@ efreet_menu_save_menu(Efreet_Menu *menu, FILE *f, int indent)
if (has_menu) if (has_menu)
{ {
ecore_list_goto_first(menu->entries); ecore_list_first_goto(menu->entries);
while ((entry = ecore_list_next(menu->entries))) while ((entry = ecore_list_next(menu->entries)))
{ {
if (entry->type == EFREET_MENU_ENTRY_MENU) if (entry->type == EFREET_MENU_ENTRY_MENU)
@ -822,14 +822,14 @@ efreet_menu_desktop_insert(Efreet_Menu *menu, Efreet_Desktop *desktop, int pos)
if (!menu->entries) if (!menu->entries)
{ {
menu->entries = ecore_list_new(); menu->entries = ecore_list_new();
ecore_list_set_free_cb(menu->entries, ECORE_FREE_CB(efreet_menu_free)); ecore_list_free_cb_set(menu->entries, ECORE_FREE_CB(efreet_menu_free));
} }
if (pos < 0 || pos >= ecore_list_nodes(menu->entries)) if (pos < 0 || pos >= ecore_list_count(menu->entries))
ecore_list_append(menu->entries, entry); ecore_list_append(menu->entries, entry);
else else
{ {
ecore_list_goto_index(menu->entries, pos); ecore_list_index_goto(menu->entries, pos);
ecore_list_insert(menu->entries, entry); ecore_list_insert(menu->entries, entry);
} }
return 1; return 1;
@ -885,7 +885,7 @@ efreet_menu_dump(Efreet_Menu *menu, const char *indent)
new_indent = malloc(sizeof(char *) * len); new_indent = malloc(sizeof(char *) * len);
snprintf(new_indent, len, "%s ", indent); snprintf(new_indent, len, "%s ", indent);
ecore_list_goto_first(menu->entries); ecore_list_first_goto(menu->entries);
while ((entry = ecore_list_next(menu->entries))) while ((entry = ecore_list_next(menu->entries)))
{ {
if (entry->type == EFREET_MENU_ENTRY_SEPARATOR) if (entry->type == EFREET_MENU_ENTRY_SEPARATOR)
@ -919,12 +919,12 @@ efreet_default_dirs_get(const char *user_dir, Ecore_List *system_dirs,
Ecore_List *list; Ecore_List *list;
list = ecore_list_new(); list = ecore_list_new();
ecore_list_set_free_cb(list, ECORE_FREE_CB(free)); ecore_list_free_cb_set(list, ECORE_FREE_CB(free));
snprintf(dir, sizeof(dir), "%s/%s", user_dir, suffix); snprintf(dir, sizeof(dir), "%s/%s", user_dir, suffix);
ecore_list_append(list, strdup(dir)); ecore_list_append(list, strdup(dir));
ecore_list_goto_first(system_dirs); ecore_list_first_goto(system_dirs);
while ((xdg_dir = ecore_list_next(system_dirs))) while ((xdg_dir = ecore_list_next(system_dirs)))
{ {
snprintf(dir, sizeof(dir), "%s/%s", xdg_dir, suffix); snprintf(dir, sizeof(dir), "%s/%s", xdg_dir, suffix);
@ -1026,7 +1026,7 @@ efreet_menu_handle_menu(Efreet_Menu_Internal *internal, Efreet_Xml *xml)
Efreet_Xml *child; Efreet_Xml *child;
int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml); int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml);
ecore_list_goto_last(xml->children); ecore_list_last_goto(xml->children);
while ((child = ecore_dlist_previous(xml->children))) while ((child = ecore_dlist_previous(xml->children)))
{ {
cb = ecore_hash_get(efreet_menu_handle_cbs, child->tag); cb = ecore_hash_get(efreet_menu_handle_cbs, child->tag);
@ -1135,7 +1135,7 @@ efreet_menu_handle_default_app_dirs(Efreet_Menu_Internal *parent, Efreet_Xml *xm
dirs = efreet_default_dirs_get(efreet_data_home_get(), efreet_data_dirs_get(), dirs = efreet_default_dirs_get(efreet_data_home_get(), efreet_data_dirs_get(),
"applications"); "applications");
prepend = ecore_list_new(); prepend = ecore_list_new();
ecore_list_goto_first(dirs); ecore_list_first_goto(dirs);
while ((dir = ecore_list_next(dirs))) while ((dir = ecore_list_next(dirs)))
{ {
Efreet_Menu_App_Dir *app_dir; Efreet_Menu_App_Dir *app_dir;
@ -1204,7 +1204,7 @@ efreet_menu_handle_default_directory_dirs(Efreet_Menu_Internal *parent, Efreet_X
efreet_menu_create_directory_dirs_list(parent); efreet_menu_create_directory_dirs_list(parent);
dirs = efreet_default_dirs_get(efreet_data_home_get(), efreet_data_dirs_get(), dirs = efreet_default_dirs_get(efreet_data_home_get(), efreet_data_dirs_get(),
"desktop-directories"); "desktop-directories");
ecore_list_goto_first(dirs); ecore_list_first_goto(dirs);
while ((dir = ecore_list_next(dirs))) while ((dir = ecore_list_next(dirs)))
{ {
if (ecore_list_find(parent->directory_dirs, ECORE_COMPARE_CB(strcmp), dir)) if (ecore_list_find(parent->directory_dirs, ECORE_COMPARE_CB(strcmp), dir))
@ -1391,7 +1391,7 @@ efreet_menu_handle_filename(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml)
if (!op->filenames) if (!op->filenames)
{ {
op->filenames = ecore_list_new(); op->filenames = ecore_list_new();
ecore_list_set_free_cb(op->filenames, free); ecore_list_free_cb_set(op->filenames, free);
} }
ecore_list_append(op->filenames, strdup(xml->text)); ecore_list_append(op->filenames, strdup(xml->text));
@ -1414,7 +1414,7 @@ efreet_menu_handle_category(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml)
if (!op->categories) if (!op->categories)
{ {
op->categories = ecore_list_new(); op->categories = ecore_list_new();
ecore_list_set_free_cb(op->categories, free); ecore_list_free_cb_set(op->categories, free);
} }
ecore_list_append(op->categories, strdup(xml->text)); ecore_list_append(op->categories, strdup(xml->text));
@ -1537,7 +1537,7 @@ efreet_menu_handle_merge_file(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
* be left at the next pointer so we can start looking for the menu * be left at the next pointer so we can start looking for the menu
* from that point */ * from that point */
ecore_list_goto_first(search_dirs); ecore_list_first_goto(search_dirs);
dir = efreet_config_home_get(); dir = efreet_config_home_get();
len = strlen(dir); len = strlen(dir);
if (strncmp(dir, parent->file.path, len)) if (strncmp(dir, parent->file.path, len))
@ -1749,8 +1749,8 @@ efreet_menu_handle_default_merge_dirs(Efreet_Menu_Internal *parent, Efreet_Xml *
dirs = efreet_default_dirs_get(efreet_config_home_get(), dirs = efreet_default_dirs_get(efreet_config_home_get(),
efreet_config_dirs_get(), path); efreet_config_dirs_get(), path);
ecore_list_goto_first(dirs); ecore_list_first_goto(dirs);
while ((p = ecore_list_remove_first(dirs))) while ((p = ecore_list_first_remove(dirs)))
{ {
efreet_menu_merge_dir(parent, xml, p); efreet_menu_merge_dir(parent, xml, p);
FREE(p); FREE(p);
@ -1817,7 +1817,7 @@ efreet_menu_handle_legacy_dir_helper(Efreet_Menu_Internal *root,
} }
legacy_internal = efreet_menu_internal_new(); legacy_internal = efreet_menu_internal_new();
legacy_internal->name.internal = ecore_string_instance(ecore_file_get_file(path)); legacy_internal->name.internal = ecore_string_instance(ecore_file_file_get(path));
/* add the legacy dir as an app dir */ /* add the legacy dir as an app dir */
app_dir = efreet_menu_app_dir_new(); app_dir = efreet_menu_app_dir_new();
@ -1850,7 +1850,7 @@ efreet_menu_handle_legacy_dir_helper(Efreet_Menu_Internal *root,
filter->op->type = EFREET_MENU_FILTER_OP_OR; filter->op->type = EFREET_MENU_FILTER_OP_OR;
filter->op->filenames = ecore_list_new(); filter->op->filenames = ecore_list_new();
ecore_list_set_free_cb(filter->op->filenames, free); ecore_list_free_cb_set(filter->op->filenames, free);
efreet_menu_create_filter_list(legacy_internal); efreet_menu_create_filter_list(legacy_internal);
ecore_list_append(legacy_internal->filters, filter); ecore_list_append(legacy_internal->filters, filter);
@ -1946,7 +1946,7 @@ efreet_menu_handle_kde_legacy_dirs(Efreet_Menu_Internal *parent, Efreet_Xml *xml
/* XXX if one _helper() call succeeds, we return success. should this be flipped? /* XXX if one _helper() call succeeds, we return success. should this be flipped?
* (return fail if on of them failed) */ * (return fail if on of them failed) */
ecore_list_goto_first(efreet_menu_kde_legacy_dirs); ecore_list_first_goto(efreet_menu_kde_legacy_dirs);
while ((dir = ecore_list_next(efreet_menu_kde_legacy_dirs))) while ((dir = ecore_list_next(efreet_menu_kde_legacy_dirs)))
{ {
Efreet_Menu_Internal *kde; Efreet_Menu_Internal *kde;
@ -1979,7 +1979,7 @@ efreet_menu_handle_move(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
efreet_menu_create_move_list(parent); efreet_menu_create_move_list(parent);
ecore_list_goto_first(xml->children); ecore_list_first_goto(xml->children);
while ((child = ecore_list_next(xml->children))) while ((child = ecore_list_next(xml->children)))
{ {
int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml); int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml);
@ -2084,7 +2084,7 @@ efreet_menu_handle_layout(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
efreet_menu_create_layout_list(parent); efreet_menu_create_layout_list(parent);
ecore_list_goto_first(xml->children); ecore_list_first_goto(xml->children);
while ((child = ecore_list_next(xml->children))) while ((child = ecore_list_next(xml->children)))
{ {
int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml, int def); int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml, int def);
@ -2141,7 +2141,7 @@ efreet_menu_handle_default_layout(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
efreet_menu_create_default_layout_list(parent); efreet_menu_create_default_layout_list(parent);
ecore_list_goto_first(xml->children); ecore_list_first_goto(xml->children);
while ((child = ecore_list_next(xml->children))) while ((child = ecore_list_next(xml->children)))
{ {
int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml, int def); int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml, int def);
@ -2320,7 +2320,7 @@ efreet_menu_handle_filter_op(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml)
{ {
Efreet_Xml *child; Efreet_Xml *child;
ecore_list_goto_first(xml->children); ecore_list_first_goto(xml->children);
while ((child = ecore_list_next(xml->children))) while ((child = ecore_list_next(xml->children)))
{ {
int (*cb)(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml); int (*cb)(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml);
@ -2532,7 +2532,7 @@ efreet_menu_handle_filter_child_op(Efreet_Menu_Filter_Op *op, Efreet_Xml *xml,
if (!op->filters) if (!op->filters)
{ {
op->filters = ecore_list_new(); op->filters = ecore_list_new();
ecore_list_set_free_cb(op->filters, ecore_list_free_cb_set(op->filters,
ECORE_FREE_CB(efreet_menu_filter_op_free)); ECORE_FREE_CB(efreet_menu_filter_op_free));
} }
@ -2564,7 +2564,7 @@ efreet_menu_process(Efreet_Menu_Internal *internal, unsigned int only_unallocate
{ {
Efreet_Menu_Internal *sub_internal; Efreet_Menu_Internal *sub_internal;
ecore_list_goto_first(internal->sub_menus); ecore_list_first_goto(internal->sub_menus);
while ((sub_internal = ecore_list_next(internal->sub_menus))) while ((sub_internal = ecore_list_next(internal->sub_menus)))
{ {
sub_internal->parent = internal; sub_internal->parent = internal;
@ -2593,7 +2593,7 @@ efreet_menu_process_dirs(Efreet_Menu_Internal *internal)
{ {
Efreet_Menu_Internal *sub_internal; Efreet_Menu_Internal *sub_internal;
ecore_list_goto_first(internal->sub_menus); ecore_list_first_goto(internal->sub_menus);
while ((sub_internal = ecore_list_next(internal->sub_menus))) while ((sub_internal = ecore_list_next(internal->sub_menus)))
{ {
sub_internal->parent = internal; sub_internal->parent = internal;
@ -2628,7 +2628,7 @@ efreet_menu_process_filters(Efreet_Menu_Internal *internal, unsigned int only_un
if (!internal->filters) return; if (!internal->filters) return;
ecore_list_goto_first(internal->filters); ecore_list_first_goto(internal->filters);
while ((filter = ecore_list_next(internal->filters))) while ((filter = ecore_list_next(internal->filters)))
{ {
Efreet_Menu_Desktop *md; Efreet_Menu_Desktop *md;
@ -2661,7 +2661,7 @@ efreet_menu_process_filters(Efreet_Menu_Internal *internal, unsigned int only_un
else else
{ {
/* check each item in our menu so far and see if it's excluded */ /* check each item in our menu so far and see if it's excluded */
ecore_list_goto_first(internal->applications); ecore_list_first_goto(internal->applications);
while ((md = ecore_list_current(internal->applications))) while ((md = ecore_list_current(internal->applications)))
{ {
if (efreet_menu_filter_matches(filter->op, md)) if (efreet_menu_filter_matches(filter->op, md))
@ -2678,7 +2678,7 @@ efreet_menu_process_filters(Efreet_Menu_Internal *internal, unsigned int only_un
{ {
int count; int count;
count = ecore_list_nodes(internal->applications); count = ecore_list_count(internal->applications);
if (count) if (count)
{ {
Ecore_Sheap *sheap; Ecore_Sheap *sheap;
@ -2686,7 +2686,7 @@ efreet_menu_process_filters(Efreet_Menu_Internal *internal, unsigned int only_un
sheap = ecore_sheap_new( sheap = ecore_sheap_new(
ECORE_COMPARE_CB(efreet_menu_cb_md_compare), count); ECORE_COMPARE_CB(efreet_menu_cb_md_compare), count);
while ((md = ecore_list_remove_first(internal->applications))) while ((md = ecore_list_first_remove(internal->applications)))
ecore_sheap_insert(sheap, md); ecore_sheap_insert(sheap, md);
while ((md = ecore_sheap_extract(sheap))) while ((md = ecore_sheap_extract(sheap)))
@ -2699,7 +2699,7 @@ efreet_menu_process_filters(Efreet_Menu_Internal *internal, unsigned int only_un
} }
/* Don't keep the list if it is empty */ /* Don't keep the list if it is empty */
if (ecore_list_is_empty(internal->applications)) if (ecore_list_empty_is(internal->applications))
IF_FREE_LIST(internal->applications); IF_FREE_LIST(internal->applications);
} }
} }
@ -2727,7 +2727,7 @@ void efreet_menu_process_app_pool(Ecore_List *pool, Ecore_List *applications,
if (!pool) return; if (!pool) return;
ecore_list_goto_first(pool); ecore_list_first_goto(pool);
while ((md = ecore_list_next(pool))) while ((md = ecore_list_next(pool)))
{ {
if (ecore_hash_get(matches, md->id)) continue; if (ecore_hash_get(matches, md->id)) continue;
@ -2780,7 +2780,7 @@ efreet_menu_filter_or_matches(Efreet_Menu_Filter_Op *op, Efreet_Menu_Desktop *md
if (op->categories && md->desktop->categories) if (op->categories && md->desktop->categories)
{ {
ecore_list_goto_first(op->categories); ecore_list_first_goto(op->categories);
while ((t = ecore_list_next(op->categories))) while ((t = ecore_list_next(op->categories)))
{ {
if (ecore_list_find(md->desktop->categories, ECORE_COMPARE_CB(strcmp), t)) if (ecore_list_find(md->desktop->categories, ECORE_COMPARE_CB(strcmp), t))
@ -2790,14 +2790,14 @@ efreet_menu_filter_or_matches(Efreet_Menu_Filter_Op *op, Efreet_Menu_Desktop *md
if (op->filenames) if (op->filenames)
{ {
ecore_list_goto_first(op->filenames); ecore_list_first_goto(op->filenames);
while ((t = ecore_list_next(op->filenames))) while ((t = ecore_list_next(op->filenames)))
if (!strcmp(t, md->id)) return 1; if (!strcmp(t, md->id)) return 1;
} }
if (op->filters) if (op->filters)
{ {
ecore_list_goto_first(op->filters); ecore_list_first_goto(op->filters);
while ((child = ecore_list_next(op->filters))) while ((child = ecore_list_next(op->filters)))
{ {
if (efreet_menu_filter_matches(child, md)) if (efreet_menu_filter_matches(child, md))
@ -2823,10 +2823,10 @@ efreet_menu_filter_and_matches(Efreet_Menu_Filter_Op *op, Efreet_Menu_Desktop *m
if (op->categories) if (op->categories)
{ {
if ((ecore_list_nodes(op->categories) > 0) && !md->desktop->categories) if ((ecore_list_count(op->categories) > 0) && !md->desktop->categories)
return 0; return 0;
ecore_list_goto_first(op->categories); ecore_list_first_goto(op->categories);
while ((t = ecore_list_next(op->categories))) while ((t = ecore_list_next(op->categories)))
{ {
if (!ecore_list_find(md->desktop->categories, ECORE_COMPARE_CB(strcmp), t)) if (!ecore_list_find(md->desktop->categories, ECORE_COMPARE_CB(strcmp), t))
@ -2836,7 +2836,7 @@ efreet_menu_filter_and_matches(Efreet_Menu_Filter_Op *op, Efreet_Menu_Desktop *m
if (op->filenames) if (op->filenames)
{ {
ecore_list_goto_first(op->filenames); ecore_list_first_goto(op->filenames);
while ((t = ecore_list_next(op->filenames))) while ((t = ecore_list_next(op->filenames)))
{ {
if (strcmp(t, md->id)) return 0; if (strcmp(t, md->id)) return 0;
@ -2845,7 +2845,7 @@ efreet_menu_filter_and_matches(Efreet_Menu_Filter_Op *op, Efreet_Menu_Desktop *m
if (op->filters) if (op->filters)
{ {
ecore_list_goto_first(op->filters); ecore_list_first_goto(op->filters);
while ((child = ecore_list_next(op->filters))) while ((child = ecore_list_next(op->filters)))
{ {
if (!efreet_menu_filter_matches(child, md)) if (!efreet_menu_filter_matches(child, md))
@ -2874,10 +2874,10 @@ efreet_menu_filter_not_matches(Efreet_Menu_Filter_Op *op, Efreet_Menu_Desktop *m
if (op->categories) if (op->categories)
{ {
if ((ecore_list_nodes(op->categories) > 0) && !md->desktop->categories) if ((ecore_list_count(op->categories) > 0) && !md->desktop->categories)
return 1; return 1;
ecore_list_goto_first(op->categories); ecore_list_first_goto(op->categories);
while ((t = ecore_list_next(op->categories))) while ((t = ecore_list_next(op->categories)))
{ {
if (ecore_list_find(md->desktop->categories, ECORE_COMPARE_CB(strcmp), t)) if (ecore_list_find(md->desktop->categories, ECORE_COMPARE_CB(strcmp), t))
@ -2887,7 +2887,7 @@ efreet_menu_filter_not_matches(Efreet_Menu_Filter_Op *op, Efreet_Menu_Desktop *m
if (op->filenames) if (op->filenames)
{ {
ecore_list_goto_first(op->filenames); ecore_list_first_goto(op->filenames);
while ((t = ecore_list_next(op->filenames))) while ((t = ecore_list_next(op->filenames)))
{ {
if (!strcmp(t, md->id)) return 0; if (!strcmp(t, md->id)) return 0;
@ -2896,7 +2896,7 @@ efreet_menu_filter_not_matches(Efreet_Menu_Filter_Op *op, Efreet_Menu_Desktop *m
if (op->filters) if (op->filters)
{ {
ecore_list_goto_first(op->filters); ecore_list_first_goto(op->filters);
while ((child = ecore_list_next(op->filters))) while ((child = ecore_list_next(op->filters)))
{ {
if (efreet_menu_filter_matches(child, md)) if (efreet_menu_filter_matches(child, md))
@ -2974,7 +2974,7 @@ efreet_menu_concatenate(Efreet_Menu_Internal *dest, Efreet_Menu_Internal *src)
{ {
efreet_menu_create_sub_menu_list(dest); efreet_menu_create_sub_menu_list(dest);
while ((submenu = ecore_list_remove_last(src->sub_menus))) while ((submenu = ecore_list_last_remove(src->sub_menus)))
{ {
Efreet_Menu_Internal *match; Efreet_Menu_Internal *match;
@ -3006,7 +3006,7 @@ efreet_menu_resolve_moves(Efreet_Menu_Internal *internal)
/* child moves are handled before parent moves */ /* child moves are handled before parent moves */
if (internal->sub_menus) if (internal->sub_menus)
{ {
ecore_list_goto_first(internal->sub_menus); ecore_list_first_goto(internal->sub_menus);
while ((child = ecore_list_next(internal->sub_menus))) while ((child = ecore_list_next(internal->sub_menus)))
efreet_menu_resolve_moves(child); efreet_menu_resolve_moves(child);
} }
@ -3014,7 +3014,7 @@ efreet_menu_resolve_moves(Efreet_Menu_Internal *internal)
/* nothing to do if this menu has no moves */ /* nothing to do if this menu has no moves */
if (!internal->moves) return; if (!internal->moves) return;
ecore_list_goto_first(internal->moves); ecore_list_first_goto(internal->moves);
while ((move = ecore_list_next(internal->moves))) while ((move = ecore_list_next(internal->moves)))
{ {
Efreet_Menu_Internal *origin, *dest, *parent; Efreet_Menu_Internal *origin, *dest, *parent;
@ -3223,7 +3223,7 @@ efreet_menu_create_sub_menu_list(Efreet_Menu_Internal *internal)
if (!internal || internal->sub_menus) return; if (!internal || internal->sub_menus) return;
internal->sub_menus = ecore_list_new(); internal->sub_menus = ecore_list_new();
ecore_list_set_free_cb(internal->sub_menus, ecore_list_free_cb_set(internal->sub_menus,
ECORE_FREE_CB(efreet_menu_internal_free)); ECORE_FREE_CB(efreet_menu_internal_free));
} }
@ -3233,7 +3233,7 @@ efreet_menu_create_app_dirs_list(Efreet_Menu_Internal *internal)
if (!internal || internal->app_dirs) return; if (!internal || internal->app_dirs) return;
internal->app_dirs = ecore_list_new(); internal->app_dirs = ecore_list_new();
ecore_list_set_free_cb(internal->app_dirs, ecore_list_free_cb_set(internal->app_dirs,
ECORE_FREE_CB(efreet_menu_app_dir_free)); ECORE_FREE_CB(efreet_menu_app_dir_free));
} }
@ -3243,7 +3243,7 @@ efreet_menu_create_directory_dirs_list(Efreet_Menu_Internal *internal)
if (!internal || internal->directory_dirs) return; if (!internal || internal->directory_dirs) return;
internal->directory_dirs = ecore_dlist_new(); internal->directory_dirs = ecore_dlist_new();
ecore_list_set_free_cb(internal->directory_dirs, ECORE_FREE_CB(free)); ecore_list_free_cb_set(internal->directory_dirs, ECORE_FREE_CB(free));
} }
static void static void
@ -3252,7 +3252,7 @@ efreet_menu_create_move_list(Efreet_Menu_Internal *internal)
if (!internal || internal->moves) return; if (!internal || internal->moves) return;
internal->moves = ecore_list_new(); internal->moves = ecore_list_new();
ecore_list_set_free_cb(internal->moves, ECORE_FREE_CB(efreet_menu_move_free)); ecore_list_free_cb_set(internal->moves, ECORE_FREE_CB(efreet_menu_move_free));
} }
static void static void
@ -3261,7 +3261,7 @@ efreet_menu_create_filter_list(Efreet_Menu_Internal *internal)
if (!internal || internal->filters) return; if (!internal || internal->filters) return;
internal->filters = ecore_list_new(); internal->filters = ecore_list_new();
ecore_list_set_free_cb(internal->filters, ecore_list_free_cb_set(internal->filters,
ECORE_FREE_CB(efreet_menu_filter_free)); ECORE_FREE_CB(efreet_menu_filter_free));
} }
@ -3271,7 +3271,7 @@ efreet_menu_create_layout_list(Efreet_Menu_Internal *internal)
if (!internal || internal->layout) return; if (!internal || internal->layout) return;
internal->layout = ecore_list_new(); internal->layout = ecore_list_new();
ecore_list_set_free_cb(internal->layout, ecore_list_free_cb_set(internal->layout,
ECORE_FREE_CB(efreet_menu_layout_free)); ECORE_FREE_CB(efreet_menu_layout_free));
} }
@ -3281,7 +3281,7 @@ efreet_menu_create_default_layout_list(Efreet_Menu_Internal *internal)
if (!internal || internal->default_layout) return; if (!internal || internal->default_layout) return;
internal->default_layout = ecore_list_new(); internal->default_layout = ecore_list_new();
ecore_list_set_free_cb(internal->default_layout, ecore_list_free_cb_set(internal->default_layout,
ECORE_FREE_CB(efreet_menu_layout_free)); ECORE_FREE_CB(efreet_menu_layout_free));
} }
@ -3291,7 +3291,7 @@ efreet_menu_create_directories_list(Efreet_Menu_Internal *internal)
if (!internal || internal->directories) return; if (!internal || internal->directories) return;
internal->directories = ecore_dlist_new(); internal->directories = ecore_dlist_new();
ecore_list_set_free_cb(internal->directories, free); ecore_list_free_cb_set(internal->directories, free);
} }
static char * static char *
@ -3340,9 +3340,9 @@ efreet_menu_app_dirs_process(Efreet_Menu_Internal *internal)
if (internal->app_dirs) if (internal->app_dirs)
{ {
internal->app_pool = ecore_list_new(); internal->app_pool = ecore_list_new();
ecore_list_set_free_cb(internal->app_pool, ECORE_FREE_CB(efreet_menu_desktop_free)); ecore_list_free_cb_set(internal->app_pool, ECORE_FREE_CB(efreet_menu_desktop_free));
ecore_list_goto_first(internal->app_dirs); ecore_list_first_goto(internal->app_dirs);
while ((app_dir = ecore_list_next(internal->app_dirs))) while ((app_dir = ecore_list_next(internal->app_dirs)))
efreet_menu_app_dir_scan(internal, app_dir->path, app_dir->prefix, app_dir->legacy); efreet_menu_app_dir_scan(internal, app_dir->path, app_dir->prefix, app_dir->legacy);
} }
@ -3413,16 +3413,16 @@ efreet_menu_directory_dirs_process(Efreet_Menu_Internal *internal)
if (internal->directory_dirs) if (internal->directory_dirs)
{ {
internal->directory_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare); internal->directory_cache = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(internal->directory_cache, ECORE_FREE_CB(free)); ecore_hash_free_key_cb_set(internal->directory_cache, ECORE_FREE_CB(free));
ecore_dlist_goto_last(internal->directory_dirs); ecore_dlist_last_goto(internal->directory_dirs);
while ((path = ecore_dlist_previous(internal->directory_dirs))) while ((path = ecore_dlist_previous(internal->directory_dirs)))
efreet_menu_directory_dir_scan(path, NULL, internal->directory_cache); efreet_menu_directory_dir_scan(path, NULL, internal->directory_cache);
} }
if (internal->directories) if (internal->directories)
{ {
ecore_dlist_goto_last(internal->directories); ecore_dlist_last_goto(internal->directories);
while ((path = ecore_dlist_previous(internal->directories))) while ((path = ecore_dlist_previous(internal->directories)))
{ {
internal->directory = efreet_menu_directory_get(internal, path); internal->directory = efreet_menu_directory_get(internal, path);
@ -3522,7 +3522,7 @@ static int
efreet_menu_cb_md_compare(Efreet_Menu_Desktop *a, Efreet_Menu_Desktop *b) efreet_menu_cb_md_compare(Efreet_Menu_Desktop *a, Efreet_Menu_Desktop *b)
{ {
#ifdef STRICT_SPEC #ifdef STRICT_SPEC
return strcmp(ecore_file_get_file(a->desktop->orig_path), ecore_file_get_file(b->desktop->orig_path)); return strcmp(ecore_file_file_get(a->desktop->orig_path), ecore_file_file_get(b->desktop->orig_path));
#else #else
return strcasecmp(a->desktop->name, b->desktop->name); return strcasecmp(a->desktop->name, b->desktop->name);
#endif #endif
@ -3578,7 +3578,7 @@ efreet_menu_layout_menu(Efreet_Menu_Internal *internal)
if (internal->directory) entry->icon = ecore_string_instance(internal->directory->icon); if (internal->directory) entry->icon = ecore_string_instance(internal->directory->icon);
entry->desktop = internal->directory; entry->desktop = internal->directory;
entry->entries = ecore_list_new(); entry->entries = ecore_list_new();
ecore_list_set_free_cb(entry->entries, ECORE_FREE_CB(efreet_menu_free)); ecore_list_free_cb_set(entry->entries, ECORE_FREE_CB(efreet_menu_free));
#if 1 //STRICT_SPEC #if 1 //STRICT_SPEC
if (internal->sub_menus) if (internal->sub_menus)
@ -3592,7 +3592,7 @@ efreet_menu_layout_menu(Efreet_Menu_Internal *internal)
{ {
Efreet_Menu_Layout *lay; Efreet_Menu_Layout *lay;
ecore_list_goto_first(layout); ecore_list_first_goto(layout);
while ((lay = ecore_list_next(layout))) while ((lay = ecore_list_next(layout)))
efreet_menu_layout_entries_get(entry, internal, lay); efreet_menu_layout_entries_get(entry, internal, lay);
} }
@ -3603,7 +3603,7 @@ efreet_menu_layout_menu(Efreet_Menu_Internal *internal)
{ {
Efreet_Menu_Internal *sub; Efreet_Menu_Internal *sub;
ecore_list_goto_first(internal->sub_menus); ecore_list_first_goto(internal->sub_menus);
while ((sub = ecore_list_next(internal->sub_menus))) while ((sub = ecore_list_next(internal->sub_menus)))
{ {
Efreet_Menu *sub_entry; Efreet_Menu *sub_entry;
@ -3623,7 +3623,7 @@ efreet_menu_layout_menu(Efreet_Menu_Internal *internal)
{ {
Efreet_Menu_Desktop *md; Efreet_Menu_Desktop *md;
ecore_list_goto_first(internal->applications); ecore_list_first_goto(internal->applications);
while ((md = ecore_list_next(internal->applications))) while ((md = ecore_list_next(internal->applications)))
{ {
Efreet_Menu *sub_entry; Efreet_Menu *sub_entry;
@ -3634,7 +3634,7 @@ efreet_menu_layout_menu(Efreet_Menu_Internal *internal)
} }
/* Don't keep this list around if it is empty */ /* Don't keep this list around if it is empty */
if (ecore_list_is_empty(entry->entries)) IF_FREE_LIST(entry->entries); if (ecore_list_empty_is(entry->entries)) IF_FREE_LIST(entry->entries);
return entry; return entry;
} }
@ -3694,7 +3694,7 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
efreet_menu_free(sub_entry); efreet_menu_free(sub_entry);
else if (in_line && else if (in_line &&
((inline_limit == 0) || ((inline_limit == 0) ||
(!sub_entry->entries || (ecore_list_nodes(sub_entry->entries) <= inline_limit)))) (!sub_entry->entries || (ecore_list_count(sub_entry->entries) <= inline_limit))))
{ {
/* Inline */ /* Inline */
if (!sub_entry->entries) if (!sub_entry->entries)
@ -3702,11 +3702,11 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
/* Can't inline an empty submenu */ /* Can't inline an empty submenu */
ecore_list_append(entry->entries, sub_entry); ecore_list_append(entry->entries, sub_entry);
} }
else if (inline_alias && (ecore_list_nodes(sub_entry->entries) == 1)) else if (inline_alias && (ecore_list_count(sub_entry->entries) == 1))
{ {
Efreet_Menu *tmp; Efreet_Menu *tmp;
tmp = ecore_list_remove_first(sub_entry->entries); tmp = ecore_list_first_remove(sub_entry->entries);
IF_RELEASE(tmp->name); IF_RELEASE(tmp->name);
tmp->name = sub_entry->name; tmp->name = sub_entry->name;
sub_entry->name = NULL; sub_entry->name = NULL;
@ -3730,8 +3730,8 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
sub_entry->icon = NULL; sub_entry->icon = NULL;
ecore_list_append(entry->entries, tmp); ecore_list_append(entry->entries, tmp);
} }
ecore_list_goto_first(sub_entry->entries); ecore_list_first_goto(sub_entry->entries);
while ((tmp = ecore_list_remove_first(sub_entry->entries))) while ((tmp = ecore_list_first_remove(sub_entry->entries)))
ecore_list_append(entry->entries, tmp); ecore_list_append(entry->entries, tmp);
efreet_menu_free(sub_entry); efreet_menu_free(sub_entry);
} }
@ -3742,7 +3742,7 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
ecore_list_remove(internal->sub_menus); ecore_list_remove(internal->sub_menus);
efreet_menu_internal_free(sub); efreet_menu_internal_free(sub);
} }
if (ecore_list_is_empty(internal->sub_menus)) IF_FREE_LIST(internal->sub_menus); if (ecore_list_empty_is(internal->sub_menus)) IF_FREE_LIST(internal->sub_menus);
} }
else if (internal->applications && layout->type == EFREET_MENU_LAYOUT_FILENAME) else if (internal->applications && layout->type == EFREET_MENU_LAYOUT_FILENAME)
{ {
@ -3755,7 +3755,7 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
ecore_list_append(entry->entries, sub_entry); ecore_list_append(entry->entries, sub_entry);
ecore_list_remove(internal->applications); ecore_list_remove(internal->applications);
} }
if (ecore_list_is_empty(internal->applications)) IF_FREE_LIST(internal->applications); if (ecore_list_empty_is(internal->applications)) IF_FREE_LIST(internal->applications);
} }
else if (layout->type == EFREET_MENU_LAYOUT_MERGE) else if (layout->type == EFREET_MENU_LAYOUT_MERGE)
{ {
@ -3763,8 +3763,8 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
{ {
Efreet_Menu_Desktop *md; Efreet_Menu_Desktop *md;
ecore_list_goto_first(internal->applications); ecore_list_first_goto(internal->applications);
while ((md = ecore_list_remove_first(internal->applications))) while ((md = ecore_list_first_remove(internal->applications)))
{ {
sub_entry = ecore_list_find(entry->entries, sub_entry = ecore_list_find(entry->entries,
ECORE_COMPARE_CB(efreet_menu_cb_entry_compare_desktop), md->desktop); ECORE_COMPARE_CB(efreet_menu_cb_entry_compare_desktop), md->desktop);
@ -3780,8 +3780,8 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
{ {
Efreet_Menu_Internal *sub; Efreet_Menu_Internal *sub;
ecore_list_goto_first(internal->sub_menus); ecore_list_first_goto(internal->sub_menus);
while ((sub = ecore_list_remove_first(internal->sub_menus))) while ((sub = ecore_list_first_remove(internal->sub_menus)))
{ {
if ((sub->directory && sub->directory->no_display) || sub->deleted) if ((sub->directory && sub->directory->no_display) || sub->deleted)
{ {
@ -3797,7 +3797,7 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
efreet_menu_free(sub_entry); efreet_menu_free(sub_entry);
else if (internal->in_line && else if (internal->in_line &&
((internal->inline_limit == 0) || ((internal->inline_limit == 0) ||
(!sub_entry->entries || (ecore_list_nodes(sub_entry->entries) <= internal->inline_limit)))) (!sub_entry->entries || (ecore_list_count(sub_entry->entries) <= internal->inline_limit))))
{ {
/* Inline */ /* Inline */
if (!sub_entry->entries) if (!sub_entry->entries)
@ -3805,11 +3805,11 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
/* Can't inline an empty submenu */ /* Can't inline an empty submenu */
ecore_list_append(entry->entries, sub_entry); ecore_list_append(entry->entries, sub_entry);
} }
else if (internal->inline_alias && (ecore_list_nodes(sub_entry->entries) == 1)) else if (internal->inline_alias && (ecore_list_count(sub_entry->entries) == 1))
{ {
Efreet_Menu *tmp; Efreet_Menu *tmp;
tmp = ecore_list_remove_first(sub_entry->entries); tmp = ecore_list_first_remove(sub_entry->entries);
ecore_string_release(tmp->name); ecore_string_release(tmp->name);
tmp->name = sub_entry->name; tmp->name = sub_entry->name;
sub_entry->name = NULL; sub_entry->name = NULL;
@ -3836,8 +3836,8 @@ efreet_menu_layout_entries_get(Efreet_Menu *entry, Efreet_Menu_Internal *interna
sub_entry->icon = NULL; sub_entry->icon = NULL;
ecore_list_append(entry->entries, tmp); ecore_list_append(entry->entries, tmp);
} }
ecore_list_goto_first(sub_entry->entries); ecore_list_first_goto(sub_entry->entries);
while ((tmp = ecore_list_remove_first(sub_entry->entries))) while ((tmp = ecore_list_first_remove(sub_entry->entries)))
ecore_list_append(entry->entries, tmp); ecore_list_append(entry->entries, tmp);
efreet_menu_free(sub_entry); efreet_menu_free(sub_entry);
} }

View File

@ -112,8 +112,8 @@ efreet_mime_init(void)
efreet_mime_endianess = efreet_mime_endian_check(); efreet_mime_endianess = efreet_mime_endian_check();
monitors = ecore_hash_new(ecore_str_hash, ecore_str_compare); monitors = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(monitors, ECORE_FREE_CB(free)); ecore_hash_free_key_cb_set(monitors, ECORE_FREE_CB(free));
ecore_hash_set_free_value(monitors, ecore_hash_free_value_cb_set(monitors,
ECORE_FREE_CB(ecore_file_monitor_del)); ECORE_FREE_CB(ecore_file_monitor_del));
if (!efreet_mime_init_files()) if (!efreet_mime_init_files())
@ -190,7 +190,7 @@ efreet_mime_type_icon_get(const char *mime, const char *theme, const char *size)
return NULL; return NULL;
icons = ecore_list_new(); icons = ecore_list_new();
ecore_list_set_free_cb(icons, free); ecore_list_free_cb_set(icons, free);
/* Standard icon name */ /* Standard icon name */
p = strdup(mime); p = strdup(mime);
@ -280,7 +280,7 @@ const char *efreet_mime_globs_type_get(const char *file)
/* /*
* Fallback to the other globs if not found * Fallback to the other globs if not found
*/ */
ecore_list_goto_first(globs); ecore_list_first_goto(globs);
while ((g = ecore_list_next(globs))) while ((g = ecore_list_next(globs)))
{ {
if (efreet_mime_glob_match(file, g->glob)) if (efreet_mime_glob_match(file, g->glob))
@ -288,7 +288,7 @@ const char *efreet_mime_globs_type_get(const char *file)
} }
s = strdup(file); s = strdup(file);
ecore_list_goto_first(globs); ecore_list_first_goto(globs);
while ((g = ecore_list_next(globs))) while ((g = ecore_list_next(globs)))
{ {
if (efreet_mime_glob_case_match(s, g->glob)) if (efreet_mime_glob_case_match(s, g->glob))
@ -370,12 +370,12 @@ efreet_mime_load_globs(Ecore_List *datadirs, const char *datahome)
IF_FREE_HASH(wild); IF_FREE_HASH(wild);
wild = ecore_hash_new(ecore_str_hash, ecore_str_compare); wild = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(wild, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_key_cb_set(wild, ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(wild, ecore_hash_free_value_cb_set(wild,
ECORE_FREE_CB(ecore_string_release)); ECORE_FREE_CB(ecore_string_release));
IF_FREE_LIST(globs); IF_FREE_LIST(globs);
globs = ecore_list_new(); globs = ecore_list_new();
ecore_list_set_free_cb(globs, efreet_mime_glob_free); ecore_list_free_cb_set(globs, efreet_mime_glob_free);
/* /*
@ -387,7 +387,7 @@ efreet_mime_load_globs(Ecore_List *datadirs, const char *datahome)
efreet_mime_mime_types_load("/etc/mime.types"); efreet_mime_mime_types_load("/etc/mime.types");
datadir = datahome; datadir = datahome;
ecore_list_goto_first(datadirs); ecore_list_first_goto(datadirs);
while (datadir) while (datadir)
{ {
snprintf(buf, sizeof(buf), "%s/mime/globs", datadir); snprintf(buf, sizeof(buf), "%s/mime/globs", datadir);
@ -412,10 +412,10 @@ efreet_mime_load_magics(Ecore_List *datadirs, const char *datahome)
IF_FREE_LIST(magics); IF_FREE_LIST(magics);
magics = ecore_list_new(); magics = ecore_list_new();
ecore_list_set_free_cb(magics, efreet_mime_magic_free); ecore_list_free_cb_set(magics, efreet_mime_magic_free);
datadir = datahome; datadir = datahome;
ecore_list_goto_first(datadirs); ecore_list_first_goto(datadirs);
while (datadir) while (datadir)
{ {
snprintf(buf, sizeof(buf), "%s/mime/magic", datadir); snprintf(buf, sizeof(buf), "%s/mime/magic", datadir);
@ -483,7 +483,7 @@ efreet_mime_init_files(void)
* We watch the directories so we can watch for new files * We watch the directories so we can watch for new files
*/ */
datadir = datahome; datadir = datahome;
ecore_list_goto_first(datadirs); ecore_list_first_goto(datadirs);
while (datadir) while (datadir)
{ {
snprintf(buf, PATH_MAX, "%s/mime", datadir); snprintf(buf, PATH_MAX, "%s/mime", datadir);
@ -631,7 +631,7 @@ efreet_mime_glob_remove(const char *glob)
{ {
Efreet_Mime_Glob *mime = NULL; Efreet_Mime_Glob *mime = NULL;
mime = ecore_list_goto_first(globs); mime = ecore_list_first_goto(globs);
while ((mime = ecore_list_current(globs))) while ((mime = ecore_list_current(globs)))
{ {
if (!strcmp(glob, mime->glob)) if (!strcmp(glob, mime->glob))
@ -891,7 +891,7 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
mime = NEW(Efreet_Mime_Magic, 1); mime = NEW(Efreet_Mime_Magic, 1);
mime->entries = ecore_list_new(); mime->entries = ecore_list_new();
ecore_list_set_free_cb(mime->entries, ecore_list_free_cb_set(mime->entries,
efreet_mime_magic_entry_free); efreet_mime_magic_entry_free);
ecore_list_append(magics, mime); ecore_list_append(magics, mime);
@ -1062,7 +1062,7 @@ efreet_mime_magic_check_priority(const char *file,
f = fopen(file, "rb"); f = fopen(file, "rb");
if (!f) return NULL; if (!f) return NULL;
if (!(m = ecore_list_goto_first(magics))) if (!(m = ecore_list_first_goto(magics)))
{ {
fclose(f); fclose(f);
return NULL; return NULL;
@ -1082,7 +1082,7 @@ efreet_mime_magic_check_priority(const char *file,
if (m->priority < end) if (m->priority < end)
break; break;
ecore_list_goto_first(m->entries); ecore_list_first_goto(m->entries);
while ((e = ecore_list_next(m->entries))) while ((e = ecore_list_next(m->entries)))
{ {
if ((level < e->indent) && !match) if ((level < e->indent) && !match)

View File

@ -102,23 +102,23 @@ efreet_util_init(void)
if (!EFREET_EVENT_DESKTOP_CHANGE) if (!EFREET_EVENT_DESKTOP_CHANGE)
EFREET_EVENT_DESKTOP_CHANGE = ecore_event_type_new(); EFREET_EVENT_DESKTOP_CHANGE = ecore_event_type_new();
desktop_by_file_id = ecore_hash_new(ecore_str_hash, ecore_str_compare); desktop_by_file_id = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(desktop_by_file_id, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_key_cb_set(desktop_by_file_id, ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(desktop_by_file_id, free); ecore_hash_free_value_cb_set(desktop_by_file_id, free);
file_id_by_desktop_path = ecore_hash_new(ecore_str_hash, ecore_str_compare); file_id_by_desktop_path = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(file_id_by_desktop_path, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_key_cb_set(file_id_by_desktop_path, ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(file_id_by_desktop_path, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_value_cb_set(file_id_by_desktop_path, ECORE_FREE_CB(ecore_string_release));
desktops_by_category = ecore_hash_new(ecore_str_hash, ecore_str_compare); desktops_by_category = ecore_hash_new(ecore_str_hash, ecore_str_compare);
ecore_hash_set_free_key(desktops_by_category, ECORE_FREE_CB(ecore_string_release)); ecore_hash_free_key_cb_set(desktops_by_category, ECORE_FREE_CB(ecore_string_release));
ecore_hash_set_free_value(desktops_by_category, ECORE_FREE_CB(ecore_list_destroy)); ecore_hash_free_value_cb_set(desktops_by_category, ECORE_FREE_CB(ecore_list_destroy));
monitors = ecore_list_new(); monitors = ecore_list_new();
ecore_list_set_free_cb(monitors, efreet_util_monitor_free); ecore_list_free_cb_set(monitors, efreet_util_monitor_free);
fill = NEW(Efreet_Cache_Fill, 1); fill = NEW(Efreet_Cache_Fill, 1);
fill->dirs = ecore_list_new(); fill->dirs = ecore_list_new();
ecore_list_set_free_cb(fill->dirs, efreet_util_cache_dir_free); ecore_list_free_cb_set(fill->dirs, efreet_util_cache_dir_free);
dirs = efreet_default_dirs_get(efreet_data_home_get(), efreet_data_dirs_get(), dirs = efreet_default_dirs_get(efreet_data_home_get(), efreet_data_dirs_get(),
"applications"); "applications");
if (dirs) if (dirs)
@ -127,7 +127,7 @@ efreet_util_init(void)
char *path; char *path;
int priority = 0; int priority = 0;
while ((path = ecore_list_remove_first(dirs))) while ((path = ecore_list_first_remove(dirs)))
{ {
dir = NEW(Efreet_Cache_Fill_Dir, 1); dir = NEW(Efreet_Cache_Fill_Dir, 1);
dir->path = path; dir->path = path;
@ -175,7 +175,7 @@ efreet_util_path_in_default(const char *section, const char *path)
dirs = efreet_default_dirs_get(efreet_data_home_get(), efreet_data_dirs_get(), dirs = efreet_default_dirs_get(efreet_data_home_get(), efreet_data_dirs_get(),
section); section);
ecore_list_goto_first(dirs); ecore_list_first_goto(dirs);
while ((dir = ecore_list_next(dirs))) while ((dir = ecore_list_next(dirs)))
{ {
size_t len; size_t len;
@ -245,7 +245,7 @@ efreet_util_desktop_mime_list(const char *mime)
ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_mime, &search); ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_mime, &search);
ecore_string_release(search.what); ecore_string_release(search.what);
if (ecore_list_is_empty(search.list)) IF_FREE_LIST(search.list); if (ecore_list_empty_is(search.list)) IF_FREE_LIST(search.list);
return search.list; return search.list;
} }
@ -280,7 +280,7 @@ efreet_util_desktop_file_id_find(const char *file_id)
"applications"); "applications");
if (!dirs) return NULL; if (!dirs) return NULL;
ecore_list_goto_first(dirs); ecore_list_first_goto(dirs);
while ((dir = ecore_list_next(dirs))) while ((dir = ecore_list_next(dirs)))
{ {
char *tmp, *p; char *tmp, *p;
@ -373,7 +373,7 @@ efreet_util_desktop_name_glob_list(const char *glob)
ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_name_glob, &search); ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_name_glob, &search);
if (ecore_list_is_empty(search.list)) IF_FREE_LIST(search.list); if (ecore_list_empty_is(search.list)) IF_FREE_LIST(search.list);
return search.list; return search.list;
} }
@ -387,7 +387,7 @@ efreet_util_desktop_exec_glob_list(const char *glob)
ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_exec_glob, &search); ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_exec_glob, &search);
if (ecore_list_is_empty(search.list)) IF_FREE_LIST(search.list); if (ecore_list_empty_is(search.list)) IF_FREE_LIST(search.list);
return search.list; return search.list;
} }
@ -401,7 +401,7 @@ efreet_util_desktop_generic_name_glob_list(const char *glob)
ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_generic_name_glob, &search); ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_generic_name_glob, &search);
if (ecore_list_is_empty(search.list)) IF_FREE_LIST(search.list); if (ecore_list_empty_is(search.list)) IF_FREE_LIST(search.list);
return search.list; return search.list;
} }
@ -415,7 +415,7 @@ efreet_util_desktop_comment_glob_list(const char *glob)
ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_comment_glob, &search); ecore_hash_for_each_node(desktop_by_file_id, efreet_util_cache_search_comment_glob, &search);
if (ecore_list_is_empty(search.list)) IF_FREE_LIST(search.list); if (ecore_list_empty_is(search.list)) IF_FREE_LIST(search.list);
return search.list; return search.list;
} }
@ -474,7 +474,7 @@ efreet_util_cache_fill(void *data __UNUSED__)
} }
if (!fill->current) if (!fill->current)
{ {
fill->current = ecore_list_remove_first(fill->dirs); fill->current = ecore_list_first_remove(fill->dirs);
if (!fill->current) if (!fill->current)
{ {
IF_FREE_LIST(fill->dirs); IF_FREE_LIST(fill->dirs);
@ -705,7 +705,7 @@ efreet_util_cache_search_mime(void *value, void *data)
ud = node->value; ud = node->value;
if (!ud->desktop->mime_types) return; if (!ud->desktop->mime_types) return;
ecore_list_goto_first(ud->desktop->mime_types); ecore_list_first_goto(ud->desktop->mime_types);
while ((mime = ecore_list_next(ud->desktop->mime_types))) while ((mime = ecore_list_next(ud->desktop->mime_types)))
{ {
if (search->what == mime) if (search->what == mime)
@ -753,7 +753,7 @@ efreet_util_cache_search_exec(const void *value, const void *data)
return 0; return 0;
} }
file = ecore_file_get_file(exec); file = ecore_file_file_get(exec);
if (file && !strcmp(file, search->what1)) if (file && !strcmp(file, search->what1))
{ {
free(exec); free(exec);
@ -892,9 +892,9 @@ efreet_util_monitor_cb(void *data, Ecore_File_Monitor *monitor __UNUSED__,
em = data; em = data;
if (em->file_id) if (em->file_id)
snprintf(file_id, sizeof(file_id), "%s-%s", em->file_id, ecore_file_get_file(path)); snprintf(file_id, sizeof(file_id), "%s-%s", em->file_id, ecore_file_file_get(path));
else else
strcpy(file_id, ecore_file_get_file(path)); strcpy(file_id, ecore_file_file_get(path));
switch (event) switch (event)
{ {
case ECORE_FILE_EVENT_NONE: case ECORE_FILE_EVENT_NONE:
@ -911,7 +911,7 @@ efreet_util_monitor_cb(void *data, Ecore_File_Monitor *monitor __UNUSED__,
{ {
fill = NEW(Efreet_Cache_Fill, 1); fill = NEW(Efreet_Cache_Fill, 1);
fill->dirs = ecore_list_new(); fill->dirs = ecore_list_new();
ecore_list_set_free_cb(fill->dirs, efreet_util_cache_dir_free); ecore_list_free_cb_set(fill->dirs, efreet_util_cache_dir_free);
} }
dir = NEW(Efreet_Cache_Fill_Dir, 1); dir = NEW(Efreet_Cache_Fill_Dir, 1);
@ -963,12 +963,12 @@ efreet_util_menus_find(void)
const char *dir; const char *dir;
menus = ecore_list_new(); menus = ecore_list_new();
ecore_list_set_free_cb(menus, ECORE_FREE_CB(free)); ecore_list_free_cb_set(menus, ECORE_FREE_CB(free));
efreet_util_menus_find_helper(menus, efreet_config_home_get()); efreet_util_menus_find_helper(menus, efreet_config_home_get());
dirs = efreet_config_dirs_get(); dirs = efreet_config_dirs_get();
ecore_list_goto_first(dirs); ecore_list_first_goto(dirs);
while ((dir = ecore_list_next(dirs))) while ((dir = ecore_list_next(dirs)))
efreet_util_menus_find_helper(menus, dir); efreet_util_menus_find_helper(menus, dir);
@ -1006,7 +1006,7 @@ efreet_util_desktops_by_category_add(Efreet_Desktop *desktop)
if (!desktop->categories) return; if (!desktop->categories) return;
ecore_list_goto_first(desktop->categories); ecore_list_first_goto(desktop->categories);
while ((category = ecore_list_next(desktop->categories))) while ((category = ecore_list_next(desktop->categories)))
{ {
Ecore_List *list; Ecore_List *list;
@ -1029,7 +1029,7 @@ efreet_util_desktops_by_category_remove(Efreet_Desktop *desktop)
if (!desktop->categories) return; if (!desktop->categories) return;
ecore_list_goto_first(desktop->categories); ecore_list_first_goto(desktop->categories);
while ((category = ecore_list_next(desktop->categories))) while ((category = ecore_list_next(desktop->categories)))
{ {
Ecore_List *list; Ecore_List *list;
@ -1037,7 +1037,7 @@ efreet_util_desktops_by_category_remove(Efreet_Desktop *desktop)
if (!list) continue; if (!list) continue;
if (ecore_list_goto(list, desktop)) if (ecore_list_goto(list, desktop))
ecore_list_remove(list); ecore_list_remove(list);
if (ecore_list_is_empty(list)) if (ecore_list_empty_is(list))
{ {
ecore_hash_remove(desktops_by_category, category); ecore_hash_remove(desktops_by_category, category);
ecore_list_destroy(list); ecore_list_destroy(list);

View File

@ -166,7 +166,7 @@ efreet_xml_dump(Efreet_Xml *xml, int level)
printf(">\n"); printf(">\n");
ecore_dlist_goto_first(xml->children); ecore_dlist_first_goto(xml->children);
while ((child = ecore_dlist_next(xml->children))) while ((child = ecore_dlist_next(xml->children)))
efreet_xml_dump(child, level + 1); efreet_xml_dump(child, level + 1);
@ -197,7 +197,7 @@ efreet_xml_parse(char **data, int *size)
} }
xml->children = ecore_dlist_new(); xml->children = ecore_dlist_new();
ecore_dlist_set_free_cb(xml->children, efreet_xml_cb_attribute_free); ecore_dlist_free_cb_set(xml->children, efreet_xml_cb_attribute_free);
xml->tag = tag; xml->tag = tag;
efreet_xml_attributes_parse(data, size, &(xml->attributes)); efreet_xml_attributes_parse(data, size, &(xml->attributes));

View File

@ -259,11 +259,11 @@ em_init(Evas_Object *obj,
ev->video_sinks = ecore_list_new (); ev->video_sinks = ecore_list_new ();
if (!ev->video_sinks) if (!ev->video_sinks)
goto failure_video_sinks; goto failure_video_sinks;
ecore_list_set_free_cb(ev->video_sinks, ECORE_FREE_CB(free)); ecore_list_free_cb_set(ev->video_sinks, ECORE_FREE_CB(free));
ev->audio_sinks = ecore_list_new (); ev->audio_sinks = ecore_list_new ();
if (!ev->audio_sinks) if (!ev->audio_sinks)
goto failure_audio_sinks; goto failure_audio_sinks;
ecore_list_set_free_cb(ev->audio_sinks, ECORE_FREE_CB(free)); ecore_list_free_cb_set(ev->audio_sinks, ECORE_FREE_CB(free));
*emotion_video = ev; *emotion_video = ev;
@ -403,7 +403,7 @@ em_file_open(const char *file,
Emotion_Video_Sink *vsink; Emotion_Video_Sink *vsink;
Emotion_Audio_Sink *asink; Emotion_Audio_Sink *asink;
vsink = (Emotion_Video_Sink *)ecore_list_goto_first (ev->video_sinks); vsink = (Emotion_Video_Sink *)ecore_list_first_goto (ev->video_sinks);
if (vsink) { if (vsink) {
g_print ("video : \n"); g_print ("video : \n");
g_print (" size : %dx%d\n", vsink->width, vsink->height); g_print (" size : %dx%d\n", vsink->width, vsink->height);
@ -413,7 +413,7 @@ em_file_open(const char *file,
GST_TIME_ARGS ((guint64)(vsink->length_time * GST_SECOND))); GST_TIME_ARGS ((guint64)(vsink->length_time * GST_SECOND)));
} }
asink = (Emotion_Audio_Sink *)ecore_list_goto_first (ev->audio_sinks); asink = (Emotion_Audio_Sink *)ecore_list_first_goto (ev->audio_sinks);
if (asink) { if (asink) {
g_print ("audio : \n"); g_print ("audio : \n");
g_print (" chan : %d\n", asink->channels); g_print (" chan : %d\n", asink->channels);
@ -535,7 +535,7 @@ em_size_get(void *video,
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
if (vsink) { if (vsink) {
if (width) *width = vsink->width; if (width) *width = vsink->width;
if (height) *height = vsink->height; if (height) *height = vsink->height;
@ -558,8 +558,8 @@ em_pos_set(void *video,
if (ev->seek_to_pos == pos) return; if (ev->seek_to_pos == pos) return;
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
asink = (Emotion_Audio_Sink *)ecore_list_goto_index (ev->video_sinks, ev->audio_sink_nbr); asink = (Emotion_Audio_Sink *)ecore_list_index_goto (ev->video_sinks, ev->audio_sink_nbr);
if (vsink) { if (vsink) {
gst_element_seek(vsink->sink, 1.0, gst_element_seek(vsink->sink, 1.0,
@ -602,7 +602,7 @@ em_len_get(void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
if (vsink) if (vsink)
return (double)vsink->length_time; return (double)vsink->length_time;
@ -617,7 +617,7 @@ em_fps_num_get(void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
if (vsink) if (vsink)
return vsink->fps_num; return vsink->fps_num;
@ -632,7 +632,7 @@ em_fps_den_get(void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
if (vsink) if (vsink)
return vsink->fps_den; return vsink->fps_den;
@ -647,7 +647,7 @@ em_fps_get(void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
if (vsink) if (vsink)
return (double)vsink->fps_num / (double)vsink->fps_den; return (double)vsink->fps_num / (double)vsink->fps_den;
@ -691,7 +691,7 @@ em_video_handled(void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
if (ecore_list_is_empty (ev->video_sinks)) if (ecore_list_empty_is (ev->video_sinks))
return 0; return 0;
return 1; return 1;
@ -704,7 +704,7 @@ em_audio_handled(void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
if (ecore_list_is_empty (ev->audio_sinks)) if (ecore_list_empty_is (ev->audio_sinks))
return 0; return 0;
return 1; return 1;
@ -736,7 +736,7 @@ em_format_get (void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
if (vsink) { if (vsink) {
switch (vsink->fourcc) { switch (vsink->fourcc) {
case GST_MAKE_FOURCC ('I','4','2','0'): case GST_MAKE_FOURCC ('I','4','2','0'):
@ -762,7 +762,7 @@ em_video_data_size_get(void *video, int *w, int *h)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
if (vsink) { if (vsink) {
*w = vsink->width; *w = vsink->width;
*h = vsink->height; *h = vsink->height;
@ -863,7 +863,7 @@ em_video_channel_count(void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
return ecore_list_nodes(ev->video_sinks); return ecore_list_count(ev->video_sinks);
} }
static void static void
@ -929,7 +929,7 @@ em_audio_channel_count(void *video)
ev = (Emotion_Gstreamer_Video *)video; ev = (Emotion_Gstreamer_Video *)video;
return ecore_list_nodes(ev->audio_sinks); return ecore_list_count(ev->audio_sinks);
} }
static void static void
@ -1293,7 +1293,7 @@ _em_fd_ev_active(void *data, Ecore_Fd_Handler *fdh)
frame_data = buf[0]; frame_data = buf[0];
buffer = buf[1]; buffer = buf[1];
_emotion_frame_new(ev->obj); _emotion_frame_new(ev->obj);
vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr); vsink = (Emotion_Video_Sink *)ecore_list_index_goto (ev->video_sinks, ev->video_sink_nbr);
_emotion_video_pos_update(ev->obj, ev->position, vsink->length_time); _emotion_video_pos_update(ev->obj, ev->position, vsink->length_time);
} }
} }

View File

@ -79,7 +79,7 @@ cb_handoff (GstElement *fakesrc,
} }
else { else {
Emotion_Audio_Sink *asink; Emotion_Audio_Sink *asink;
asink = (Emotion_Audio_Sink *)ecore_list_goto_index (ev->audio_sinks, ev->audio_sink_nbr); asink = (Emotion_Audio_Sink *)ecore_list_index_goto (ev->audio_sinks, ev->audio_sink_nbr);
_emotion_video_pos_update(ev->obj, ev->position, asink->length_time); _emotion_video_pos_update(ev->obj, ev->position, asink->length_time);
} }
@ -216,8 +216,8 @@ emotion_pipeline_dvd_build (void *video, const char *device)
no_more_pads = 0; no_more_pads = 0;
/* We get the informations of streams */ /* We get the informations of streams */
ecore_list_goto_first (ev->video_sinks); ecore_list_first_goto (ev->video_sinks);
ecore_list_goto_first (ev->audio_sinks); ecore_list_first_goto (ev->audio_sinks);
{ {
GstIterator *it; GstIterator *it;
@ -321,7 +321,7 @@ emotion_pipeline_dvd_build (void *video, const char *device)
{ {
Emotion_Video_Sink *vsink; Emotion_Video_Sink *vsink;
vsink = (Emotion_Video_Sink *)ecore_list_goto_first (ev->video_sinks); vsink = (Emotion_Video_Sink *)ecore_list_first_goto (ev->video_sinks);
if (vsink && vsink->sink) { if (vsink && vsink->sink) {
g_object_set (G_OBJECT (vsink->sink), "sync", TRUE, NULL); g_object_set (G_OBJECT (vsink->sink), "sync", TRUE, NULL);
g_object_set (G_OBJECT (vsink->sink), "signal-handoffs", TRUE, NULL); g_object_set (G_OBJECT (vsink->sink), "signal-handoffs", TRUE, NULL);
@ -373,8 +373,8 @@ emotion_pipeline_file_build (void *video, const char *file)
goto failure_gstreamer_pause; goto failure_gstreamer_pause;
/* We get the informations of streams */ /* We get the informations of streams */
ecore_list_goto_first (ev->video_sinks); ecore_list_first_goto (ev->video_sinks);
ecore_list_goto_first (ev->audio_sinks); ecore_list_first_goto (ev->audio_sinks);
{ {
GstIterator *it; GstIterator *it;
@ -453,7 +453,7 @@ emotion_pipeline_file_build (void *video, const char *file)
index = ecore_list_index (ev->audio_sinks); index = ecore_list_index (ev->audio_sinks);
if (ecore_list_nodes (ev->video_sinks) == 0) { if (ecore_list_count (ev->video_sinks) == 0) {
if (index == 1) { if (index == 1) {
Emotion_Video_Sink *vsink; Emotion_Video_Sink *vsink;
@ -493,7 +493,7 @@ emotion_pipeline_file_build (void *video, const char *file)
{ {
Emotion_Video_Sink *vsink; Emotion_Video_Sink *vsink;
vsink = (Emotion_Video_Sink *)ecore_list_goto_first (ev->video_sinks); vsink = (Emotion_Video_Sink *)ecore_list_first_goto (ev->video_sinks);
if (vsink && vsink->sink) { if (vsink && vsink->sink) {
g_object_set (G_OBJECT (vsink->sink), "sync", TRUE, NULL); g_object_set (G_OBJECT (vsink->sink), "sync", TRUE, NULL);
g_object_set (G_OBJECT (vsink->sink), "signal-handoffs", TRUE, NULL); g_object_set (G_OBJECT (vsink->sink), "signal-handoffs", TRUE, NULL);
@ -594,7 +594,7 @@ file_new_decoded_pad_cb (GstElement *decodebin,
videopad = gst_element_get_pad (queue, "sink"); videopad = gst_element_get_pad (queue, "sink");
gst_pad_link (new_pad, videopad); gst_pad_link (new_pad, videopad);
gst_object_unref (videopad); gst_object_unref (videopad);
if (ecore_list_nodes(ev->video_sinks) == 1) { if (ecore_list_count(ev->video_sinks) == 1) {
ev->ratio = (double)vsink->width / (double)vsink->height; ev->ratio = (double)vsink->width / (double)vsink->height;
} }
gst_element_set_state (queue, GST_STATE_PAUSED); gst_element_set_state (queue, GST_STATE_PAUSED);
@ -655,7 +655,7 @@ dvd_pad_added_cb (GstElement *dvddemuxer,
videopad = gst_element_get_pad (queue, "sink"); videopad = gst_element_get_pad (queue, "sink");
gst_pad_link (GST_PAD (new_pad), videopad); gst_pad_link (GST_PAD (new_pad), videopad);
gst_object_unref (videopad); gst_object_unref (videopad);
if (ecore_list_nodes(ev->video_sinks) == 1) { if (ecore_list_count(ev->video_sinks) == 1) {
ev->ratio = (double)vsink->width / (double)vsink->height; ev->ratio = (double)vsink->width / (double)vsink->height;
} }
gst_element_set_state (queue, GST_STATE_PAUSED); gst_element_set_state (queue, GST_STATE_PAUSED);