PageRenderTime 25ms CodeModel.GetById 7ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/src/VBox/GuestHost/OpenGL/include/cr_list.h

https://gitlab.com/ufo/virtualbox-ose-3-1-8
C Header | 48 lines | 34 code | 14 blank | 0 comment | 0 complexity | a029419c098d97424925590840da1974 MD5 | raw file
 1#ifndef CR_LIST_H
 2#define CR_LIST_H
 3
 4#include <iprt/cdefs.h>
 5
 6#ifdef __cplusplus
 7extern "C" {
 8#endif
 9
10typedef struct CRList CRList;
11typedef struct CRListIterator CRListIterator;
12typedef int ( *CRListCompareFunc ) ( const void *element1, const void *element2 );
13typedef void ( *CRListApplyFunc ) ( void *element, void *arg );
14
15DECLEXPORT(CRList *) crAllocList( void );
16DECLEXPORT(void) crFreeList( CRList *l );
17
18DECLEXPORT(unsigned) crListSize( const CRList *l );
19DECLEXPORT(int) crListIsEmpty( const CRList *l );
20
21DECLEXPORT(void) crListInsert( CRList *l, CRListIterator *iter, void *elem );
22DECLEXPORT(void) crListErase( CRList *l, CRListIterator *iter );
23DECLEXPORT(void) crListClear( CRList *l );
24
25DECLEXPORT(void) crListPushBack( CRList *l, void *elem );
26DECLEXPORT(void) crListPushFront( CRList *l, void *elem );
27
28DECLEXPORT(void) crListPopBack( CRList *l );
29DECLEXPORT(void) crListPopFront( CRList *l );
30
31DECLEXPORT(void *) crListFront( CRList *l );
32DECLEXPORT(void *) crListBack( CRList *l );
33
34DECLEXPORT(CRListIterator *) crListBegin( CRList *l );
35DECLEXPORT(CRListIterator *) crListEnd( CRList *l );
36
37DECLEXPORT(CRListIterator *) crListNext( CRListIterator *iter );
38DECLEXPORT(CRListIterator *) crListPrev( CRListIterator *iter );
39DECLEXPORT(void *) crListElement( CRListIterator *iter );
40
41DECLEXPORT(CRListIterator *) crListFind( CRList *l, void *element, CRListCompareFunc compare );
42DECLEXPORT(void) crListApply( CRList *l, CRListApplyFunc apply, void *arg );
43
44#ifdef __cplusplus
45} /* extern "C" */
46#endif
47
48#endif /* CR_LIST_H */