Evas_List_Data_Group (3) - Linux Manuals

Evas_List_Data_Group: Functions that add data to an Evas_List.

NAME

Linked List Creation Functions - Functions that add data to an Evas_List.

Functions


EAPI Evas_List * evas_list_append (Evas_List *list, const void *data)
Appends the given data to the given linked list.
EAPI Evas_List * evas_list_prepend (Evas_List *list, const void *data)
Prepends the given data to the given linked list.
EAPI Evas_List * evas_list_append_relative (Evas_List *list, const void *data, const void *relative)
Inserts the given data into the given linked list after the specified data.
EAPI Evas_List * evas_list_prepend_relative (Evas_List *list, const void *data, const void *relative)
Prepend a data pointer to a linked list before the memeber specified.

Detailed Description

Functions that add data to an Evas_List.

Function Documentation

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

Appends the given data to the given linked list.

The following example code demonstrates how to ensure that the given data has been successfully appended.

 Evas_List *list = NULL;
 extern void *my_data;

 list = evas_list_append(list, my_data);
 if (evas_list_alloc_error())
   {
     fprintf(stderr, 'ERROR: Memory is low. List allocation failed.);
     exit(-1);
   }

Parameters:

list The given list. If NULL is given, then a new list is created.
data The data to append.

Returns:

A new list pointer that should be used in place of the one given to this function if successful. Otherwise, the old pointer is returned.

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

Referenced by evas_damage_rectangle_add(), evas_event_feed_mouse_move(), evas_font_path_append(), evas_list_append_relative(), evas_object_clip_set(), evas_object_image_data_update_add(), evas_object_polygon_point_add(), evas_object_smart_members_get(), evas_object_textblock_style_set(), evas_obscured_rectangle_add(), and evas_render_method_list().

EAPI Evas_List* evas_list_append_relative (Evas_List * list, const void * data, const void * relative)

Inserts the given data into the given linked list after the specified data.

If relative is not in the list, data is appended to the end of the list. If there are multiple instances of relative in the list, data is inserted after the first instance.

The following example code demonstrates how to ensure that the given data has been successfully inserted.

 Evas_List *list = NULL;
 extern void *my_data;
 extern void *relative_member;

 list = evas_list_append(list, relative_member);
 if (evas_list_alloc_error())
   {
     fprintf(stderr, 'ERROR: Memory is low. List allocation failed.);
     exit(-1);
   }
 list = evas_list_append_relative(list, my_data, relative_member);
 if (evas_list_alloc_error())
   {
     fprintf(stderr, 'ERROR: Memory is low. List allocation failed.);
     exit(-1);
   }

Parameters:

list The given linked list.
data The given data.
relative The data to insert after.

Returns:

A new list pointer that should be used in place of the one given to this function if successful. Otherwise, the old pointer is returned.

References _Evas_List::data, evas_list_append(), and _Evas_List::next.

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

Prepends the given data to the given linked list.

The following example code demonstrates how to ensure that the given data has been successfully prepended.

Example:

 Evas_List *list = NULL;
 extern void *my_data;

 list = evas_list_prepend(list, my_data);
 if (evas_list_alloc_error())
   {
     fprintf(stderr, 'ERROR: Memory is low. List allocation failed.);
     exit(-1);
   }

Parameters:

list The given list.
data The given data.

Returns:

A new list pointer that should be used in place of the one given to this function, if successful. Otherwise, the old pointer is returned.

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

Referenced by evas_font_path_prepend(), evas_list_prepend_relative(), evas_object_data_set(), evas_object_smart_callback_add(), evas_objects_at_xy_get(), and evas_objects_in_rectangle_get().

EAPI Evas_List* evas_list_prepend_relative (Evas_List * list, const void * data, const void * relative)

Prepend a data pointer to a linked list before the memeber specified.

Parameters:

list The list handle to prepend data too
data The data pointer to prepend to list list before relative
relative The data pointer before which to insert data

Returns:

A new list handle to replace the old one

Inserts the given data into the given linked list before the member specified.

If relative is not in the list, data is prepended to the start of the list. If there are multiple instances of relative in the list, data is inserted before the first instance.

The following code example demonstrates how to ensure that the given data has been successfully inserted.

 Evas_List *list = NULL;
 extern void *my_data;
 extern void *relative_member;

 list = evas_list_append(list, relative_member);
 if (evas_list_alloc_error())
   {
     fprintf(stderr, 'ERROR: Memory is low. List allocation failed.);
     exit(-1);
   }
 list = evas_list_prepend_relative(list, my_data, relative_member);
 if (evas_list_alloc_error())
   {
     fprintf(stderr, 'ERROR: Memory is low. List allocation failed.);
     exit(-1);
   }

Parameters:

list The given linked list.
data The given data.
relative The data to insert before.

Returns:

A new list pointer that should be used in place of the one given to this function if successful. Otherwise the old pointer is returned.

References _Evas_List::data, evas_list_prepend(), and _Evas_List::next.

Author

Generated automatically by Doxygen for Evas from the source code.