ml_imagelist.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef NULLOSFT_MEDIALIBRARY_IMAGELIST_HEADER
  2. #define NULLOSFT_MEDIALIBRARY_IMAGELIST_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <windows.h>
  7. #include <commctrl.h>
  8. #include "./ml_imageloader.h" // image loading
  9. #include "./ml_imagefilter.h" // image loading
  10. typedef LPVOID HMLIMGLST;
  11. #define MAX_ALLOWED_CACHE_SIZE 10
  12. #define MAX_ALLOWED_LIST_SIZE 400
  13. // create falgs
  14. #define MLILC_COLOR24_I 0x00000018 // Use a 24-bit DIB section.
  15. #define MLILC_COLOR32_I 0x00000020 // Use a 32-bit DIB section.
  16. #define MLILC_MASK_I 0x00000001 // Use a mask.
  17. HMLIMGLST MLImageListI_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow, INT cCacheSize, HMLIMGFLTRMNGR hmlifManager);
  18. BOOL MLImageListI_Destroy(HMLIMGLST hmlil);
  19. HIMAGELIST MLImageListI_GetRealList(HMLIMGLST hmlil);
  20. INT MLImageListI_GetRealIndex(HMLIMGLST hmlil, INT index, COLORREF rgbBk, COLORREF rgbFg);
  21. INT MLImageListI_Add(HMLIMGLST hmlil, MLIMAGESOURCE_I *pImageSource, REFGUID filterUID, INT_PTR nTag);
  22. BOOL MLImageListI_Replace(HMLIMGLST hmlil, INT index, MLIMAGESOURCE_I *pImageSource, REFGUID filterUID, INT_PTR nTag);
  23. BOOL MLImageListI_Remove(HMLIMGLST hmlil, INT index);
  24. BOOL MLImageListI_GetImageSize(HMLIMGLST hmlil, INT *cx, INT *cy);
  25. INT MLImageListI_GetImageCount(HMLIMGLST hmlil);
  26. INT MLImageListI_GetIndexFromTag(HMLIMGLST hmlil, INT_PTR nTag);
  27. BOOL MLImageListI_GetTagFromIndex(HMLIMGLST hmlil, INT index, INT_PTR *nTag);
  28. BOOL MLImageListI_CheckItemExist(HMLIMGLST hmlil, INT index);
  29. #endif //NULLOSFT_MEDIALIBRARY_IMAGELIST_HEADER