ifc_imageloader.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef NULLSOFT_WINAMP_OMIMAGELOADER_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_OMIMAGELOADER_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <bfc/dispatch.h>
  7. class __declspec(novtable) ifc_omimageloader : public Dispatchable
  8. {
  9. protected:
  10. ifc_omimageloader() {}
  11. ~ifc_omimageloader() {}
  12. public:
  13. HRESULT LoadData(int *widthOut, int *heightOut, void **dataOut);
  14. HRESULT FreeData(void *data);
  15. HRESULT LoadBitmapEx(HBITMAP *bitmapOut, BITMAPINFOHEADER *headerInfo, void **dataOut);
  16. HRESULT LoadBitmap(HBITMAP *bitmapOut, int *widthOut, int *heightOut);
  17. public:
  18. DISPATCH_CODES
  19. {
  20. API_LOADDATA = 10,
  21. API_FREEDATA = 20,
  22. API_LOADBITMAP = 30,
  23. API_LOADBITMAPEX = 40,
  24. };
  25. };
  26. inline HRESULT ifc_omimageloader::LoadData(int *widthOut, int *heightOut, void **dataOut)
  27. {
  28. return _call(API_LOADDATA, (HRESULT)E_NOTIMPL, widthOut, heightOut, dataOut);
  29. }
  30. inline HRESULT ifc_omimageloader::FreeData(void *data)
  31. {
  32. return _call(API_FREEDATA, (HRESULT)E_NOTIMPL, data);
  33. }
  34. inline HRESULT ifc_omimageloader::LoadBitmapEx(HBITMAP *bitmapOut, BITMAPINFOHEADER *headerInfo, void **dataOut)
  35. {
  36. return _call(API_LOADBITMAPEX, (HRESULT)E_NOTIMPL, bitmapOut, headerInfo, dataOut, bitmapOut);
  37. }
  38. inline HRESULT ifc_omimageloader::LoadBitmap(HBITMAP *bitmapOut, int *widthOut, int *heightOut)
  39. {
  40. return _call(API_LOADBITMAP, (HRESULT)E_NOTIMPL, bitmapOut, widthOut, heightOut);
  41. }
  42. #endif //NULLSOFT_WINAMP_OMIMAGELOADER_INTERFACE_HEADER