/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. #include <iprt/cdefs.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct CRList CRList;
  8. typedef struct CRListIterator CRListIterator;
  9. typedef int ( *CRListCompareFunc ) ( const void *element1, const void *element2 );
  10. typedef void ( *CRListApplyFunc ) ( void *element, void *arg );
  11. DECLEXPORT(CRList *) crAllocList( void );
  12. DECLEXPORT(void) crFreeList( CRList *l );
  13. DECLEXPORT(unsigned) crListSize( const CRList *l );
  14. DECLEXPORT(int) crListIsEmpty( const CRList *l );
  15. DECLEXPORT(void) crListInsert( CRList *l, CRListIterator *iter, void *elem );
  16. DECLEXPORT(void) crListErase( CRList *l, CRListIterator *iter );
  17. DECLEXPORT(void) crListClear( CRList *l );
  18. DECLEXPORT(void) crListPushBack( CRList *l, void *elem );
  19. DECLEXPORT(void) crListPushFront( CRList *l, void *elem );
  20. DECLEXPORT(void) crListPopBack( CRList *l );
  21. DECLEXPORT(void) crListPopFront( CRList *l );
  22. DECLEXPORT(void *) crListFront( CRList *l );
  23. DECLEXPORT(void *) crListBack( CRList *l );
  24. DECLEXPORT(CRListIterator *) crListBegin( CRList *l );
  25. DECLEXPORT(CRListIterator *) crListEnd( CRList *l );
  26. DECLEXPORT(CRListIterator *) crListNext( CRListIterator *iter );
  27. DECLEXPORT(CRListIterator *) crListPrev( CRListIterator *iter );
  28. DECLEXPORT(void *) crListElement( CRListIterator *iter );
  29. DECLEXPORT(CRListIterator *) crListFind( CRList *l, void *element, CRListCompareFunc compare );
  30. DECLEXPORT(void) crListApply( CRList *l, CRListApplyFunc apply, void *arg );
  31. #ifdef __cplusplus
  32. } /* extern "C" */
  33. #endif
  34. #endif /* CR_LIST_H */