1
0

pngLoader.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef NULLSOFT_WINAMP_OMIMAGELOADER_PNG_HEADER
  2. #define NULLSOFT_WINAMP_OMIMAGELOADER_PNG_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./ifc_imageloader.h"
  7. class ifc_wasabihelper;
  8. class PngLoader : public ifc_omimageloader
  9. {
  10. protected:
  11. PngLoader(HINSTANCE hInstance, LPCWSTR pszName, BOOL fPremultiply);
  12. ~PngLoader();
  13. public:
  14. static HRESULT CreateInstance(HINSTANCE hInstance, LPCWSTR pszName, BOOL fPremultiply, ifc_omimageloader **imageLoader);
  15. public:
  16. size_t AddRef();
  17. size_t Release();
  18. int QueryInterface(GUID interface_guid, void **object);
  19. HRESULT (LoadData)(int *widthOut, int *heightOut, void **dataOut);
  20. HRESULT (FreeData)(void *data);
  21. HRESULT (LoadBitmapEx)(HBITMAP *bitmapOut, BITMAPINFOHEADER *headerInfo, void **dataOut);
  22. HRESULT (LoadBitmap)(HBITMAP *bitmapOut, int *widthOut, int *heightOut);
  23. protected:
  24. RECVS_DISPATCH;
  25. typedef enum
  26. {
  27. flagPremultiply = 0x0001,
  28. } Flags;
  29. protected:
  30. ULONG ref;
  31. HINSTANCE instance;
  32. LPWSTR name;
  33. UINT flags;
  34. };
  35. #endif //NULLSOFT_WINAMP_OMIMAGELOADER_PNG_HEADER