Evas_List_Find_Group (3) - Linux Manuals

Evas_List_Find_Group: Functions that find specified data in a linked list.

NAME

Linked List Find Functions - Functions that find specified data in a linked list.

Functions


EAPI void * evas_list_find (const Evas_List *list, const void *data)
Find a member of a list and return the member.
EAPI Evas_List * evas_list_find_list (const Evas_List *list, const void *data)
Find a member of a list and return the list node containing that member.
EAPI void * evas_list_nth (const Evas_List *list, int n)
Get the nth member's data pointer in a list.
EAPI Evas_List * evas_list_nth_list (const Evas_List *list, int n)
Get the nth member's list node in a list.

Detailed Description

Functions that find specified data in a linked list.

Function Documentation

EAPI void* evas_list_find (const Evas_List * list, const void * data)

Find a member of a list and return the member.

Parameters:

list The list handle to search for data
data The data pointer to find in the list list

Returns:

The found member data pointer

A call to this function will search the list list from beginning to end for the first member whose data pointer is data. If it is found, data will be returned, otherwise NULL will be returned.

Example:

 extern Evas_List *list;
 extern void *my_data;

 if (evas_list_find(list, my_data) == my_data)
   {
     printf('Found member %p, my_data);
   }


 

References _Evas_List::data, and _Evas_List::next.

Referenced by evas_event_feed_mouse_in(), evas_event_feed_mouse_move(), evas_event_feed_mouse_up(), and evas_object_layer_set().

EAPI Evas_List* evas_list_find_list (const Evas_List * list, const void * data)

Find a member of a list and return the list node containing that member.

Parameters:

list The list handle to search for data
data The data pointer to find in the list list

Returns:

The found members list node

A call to this function will search the list list from beginning to end for the first member whose data pointer is data. If it is found, the list node containing the specified member will be returned, otherwise NULL will be returned.

Example:

 extern Evas_List *list;
 extern void *my_data;
 Evas_List *found_node;

 found_node = evas_list_find_list(list, my_data);
 if (found_node)
   {
     printf('Found member %p, found_node->data);
   }


 

References _Evas_List::data, and _Evas_List::next.

EAPI void* evas_list_nth (const Evas_List * list, int n)

Get the nth member's data pointer in a list.

Parameters:

list The list to get member number n from
n The number of the element (0 being the first)

Returns:

The data pointer stored in the specified element

This function returns the data pointer of element number n, in the list list. The first element in the array is element number 0. If the element number n does not exist, NULL will be returned.

Example:

 extern Evas_List *list;
 extern int number;
 void *data;

 data = evas_list_nth(list, number);
 if (data)
   printf('Element number %i has data %p, number, data);


 

References _Evas_List::data, and evas_list_nth_list().

EAPI Evas_List* evas_list_nth_list (const Evas_List * list, int n)

Get the nth member's list node in a list.

Parameters:

list The list to get member number n from
n The number of the element (0 being the first)

Returns:

The list node stored in the numbered element

This function returns the list node of element number n, in the list list. The first element in the array is element number 0. If the element number n does not exist, NULL will be returned.

Example:

 extern Evas_List *list;
 extern int number;
 Evas_List *nth_list;

 nth_list = evas_list_nth_list(list, number);
 if (nth_list)
   printf('Element number %i has data %p, number, nth_list->data);


 

References _Evas_List::accounting, _Evas_List::next, and _Evas_List::prev.

Referenced by evas_list_nth().

Author

Generated automatically by Doxygen for Evas from the source code.