diff options
Diffstat (limited to 'source/blender/blenlib/BLI_dynamiclist.h')
-rw-r--r-- | source/blender/blenlib/BLI_dynamiclist.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_dynamiclist.h b/source/blender/blenlib/BLI_dynamiclist.h index e8c93fbcf23..b496d633b31 100644 --- a/source/blender/blenlib/BLI_dynamiclist.h +++ b/source/blender/blenlib/BLI_dynamiclist.h @@ -26,12 +26,10 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef B_DYNAMIC_LIST_H -#define B_DYNAMIC_LIST_H +#ifndef BLI_DYNAMIC_LIST_H +#define BLI_DYNAMIC_LIST_H -#define PAGE_SIZE 4 - -struct ListBase; +#include "DNA_listBase.h" /* * Access array using realloc @@ -52,4 +50,15 @@ typedef struct DynamicList { struct ListBase lb; /* two way linked dynamic list */ } DynamicList; +struct DynamicList *BLI_dlist_from_listbase(struct ListBase *lb); +struct ListBase *BLI_listbase_from_dlist(struct DynamicList *dlist, struct ListBase *lb); +void * BLI_dlist_find_link(struct DynamicList *dlist, unsigned int index); +unsigned int BLI_count_items(struct DynamicList *dlist); +void BLI_dlist_free_item(struct DynamicList *dlist, unsigned int index); +void BLI_dlist_rem_item(struct DynamicList *dlist, unsigned int index); +void * BLI_dlist_add_item_index(struct DynamicList *dlist, void *item, unsigned int index); +void BLI_dlist_destroy(struct DynamicList *dlist); +void BLI_dlist_init(struct DynamicList *dlist); +void BLI_dlist_reinit(struct DynamicList *dlist); + #endif |