AlbumArtContainer.h 795 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef NULLSOFT_ML_LOCAL_ALBUMARTCONTAINER_H
  2. #define NULLSOFT_ML_LOCAL_ALBUMARTCONTAINER_H
  3. #include <windows.h> // for HDC
  4. #include <tataki/canvas/bltcanvas.h>
  5. class AlbumArtContainer
  6. {
  7. public:
  8. enum CacheStatus
  9. {
  10. CACHE_UNKNOWN,
  11. CACHE_CACHED,
  12. CACHE_NOTFOUND,
  13. CACHE_LOADING,
  14. };
  15. AlbumArtContainer();
  16. enum
  17. {
  18. DRAW_SUCCESS,
  19. DRAW_NOART,
  20. DRAW_LOADING,
  21. };
  22. int drawArt(DCCanvas *pCanvas, RECT *prcDst);
  23. // benski> this definition is just temporary to get things going
  24. void AddRef();
  25. void Release();
  26. wchar_t *filename; // actually an NDE reference counted string
  27. MSG updateMsg;
  28. void SetCache(SkinBitmap *bitmap, CacheStatus status);
  29. void Reset();
  30. private:
  31. ~AlbumArtContainer();
  32. SkinBitmap * volatile cache;
  33. volatile CacheStatus cached;
  34. size_t references;
  35. };
  36. #endif