libgutenprint API Reference
5.2.10-pre1
|
Generic list functions. More...
Typedefs | |
typedef struct stp_list_item | stp_list_item_t |
The list item opaque data type. More... | |
typedef struct stp_list | stp_list_t |
The list opaque data type. More... | |
typedef void(* | stp_node_freefunc )(void *) |
A callback function to free the data a node contains. More... | |
typedef void *(* | stp_node_copyfunc )(const void *) |
A callback function to copy the data a node contains. More... | |
typedef const char *(* | stp_node_namefunc )(const void *) |
A callback function to get the name of a node. More... | |
typedef int(* | stp_node_sortfunc )(const void *, const void *) |
A callback function to compare two nodes. More... | |
Functions | |
void | stp_list_node_free_data (void *item) |
Free node data allocated with stp_malloc. More... | |
stp_list_t * | stp_list_create (void) |
Create a new list object. More... | |
stp_list_t * | stp_list_copy (const stp_list_t *list) |
Copy and allocate a list object. More... | |
int | stp_list_destroy (stp_list_t *list) |
Destroy a list object. More... | |
stp_list_item_t * | stp_list_get_start (const stp_list_t *list) |
Find the first item in a list. More... | |
stp_list_item_t * | stp_list_get_end (const stp_list_t *list) |
Find the last item in a list. More... | |
stp_list_item_t * | stp_list_get_item_by_index (const stp_list_t *list, int idx) |
Find an item in a list by its index. More... | |
stp_list_item_t * | stp_list_get_item_by_name (const stp_list_t *list, const char *name) |
Find an item in a list by its name. More... | |
stp_list_item_t * | stp_list_get_item_by_long_name (const stp_list_t *list, const char *long_name) |
Find an item in a list by its long name. More... | |
int | stp_list_get_length (const stp_list_t *list) |
Get the length of a list. More... | |
void | stp_list_set_freefunc (stp_list_t *list, stp_node_freefunc freefunc) |
Set a list node free function. More... | |
stp_node_freefunc | stp_list_get_freefunc (const stp_list_t *list) |
Get a list node free function. More... | |
void | stp_list_set_copyfunc (stp_list_t *list, stp_node_copyfunc copyfunc) |
Set a list node copy function. More... | |
stp_node_copyfunc | stp_list_get_copyfunc (const stp_list_t *list) |
Get a list node copy function. More... | |
void | stp_list_set_namefunc (stp_list_t *list, stp_node_namefunc namefunc) |
Set a list node name function. More... | |
stp_node_namefunc | stp_list_get_namefunc (const stp_list_t *list) |
Get a list node name function. More... | |
void | stp_list_set_long_namefunc (stp_list_t *list, stp_node_namefunc long_namefunc) |
Set a list node long name function. More... | |
stp_node_namefunc | stp_list_get_long_namefunc (const stp_list_t *list) |
Get a list node long name function. More... | |
void | stp_list_set_sortfunc (stp_list_t *list, stp_node_sortfunc sortfunc) |
Set a list node sort function. More... | |
stp_node_sortfunc | stp_list_get_sortfunc (const stp_list_t *list) |
Get a list node sort function. More... | |
int | stp_list_item_create (stp_list_t *list, stp_list_item_t *next, const void *data) |
Create a new list item. More... | |
int | stp_list_item_destroy (stp_list_t *list, stp_list_item_t *item) |
Destroy a list item. More... | |
stp_list_item_t * | stp_list_item_prev (const stp_list_item_t *item) |
Get the previous item in the list. More... | |
stp_list_item_t * | stp_list_item_next (const stp_list_item_t *item) |
Get the next item in the list. More... | |
void * | stp_list_item_get_data (const stp_list_item_t *item) |
Get the data associated with a list item. More... | |
int | stp_list_item_set_data (stp_list_item_t *item, void *data) |
Set the data associated with a list item. More... | |
Generic list functions.