Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
4.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright 1996-1997 Microsoft Corporation. All Rights Reserved.
  5. //
  6. // File: iimgctx.h
  7. //
  8. //--------------------------------------------------------------------------
  9. #ifndef _IImgCtxObjects_H_
  10. #define _IImgCtxObjects_H_
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. typedef void (CALLBACK *PFNIMGCTXCALLBACK)(void *, void *);
  15. #ifdef __cplusplus
  16. }
  17. #endif
  18. #define IMGCHG_SIZE 0x0001
  19. #define IMGCHG_VIEW 0x0002
  20. #define IMGCHG_COMPLETE 0x0004
  21. #define IMGCHG_ANIMATE 0x0008
  22. #define IMGCHG_MASK 0x000F
  23. #define IMGLOAD_NOTLOADED 0x00100000 // Image has not yet been loaded
  24. #define IMGLOAD_LOADING 0x00200000 // Image in the process of being loaded
  25. #define IMGLOAD_STOPPED 0x00400000 // Imaged aborted
  26. #define IMGLOAD_ERROR 0x00800000 // Error loading image
  27. #define IMGLOAD_COMPLETE 0x01000000 // Image loaded
  28. #define IMGLOAD_MASK 0x01F00000
  29. #define IMGBITS_NONE 0x02000000
  30. #define IMGBITS_PARTIAL 0x04000000
  31. #define IMGBITS_TOTAL 0x08000000
  32. #define IMGBITS_MASK 0x0E000000
  33. #define IMGANIM_ANIMATED 0x10000000
  34. #define IMGANIM_MASK 0x10000000
  35. #define IMGTRANS_OPAQUE 0x20000000
  36. #define IMGTRANS_MASK 0x20000000
  37. #define DWN_COLORMODE 0x0000003F // Explicit color mode requested
  38. #define DWN_DOWNLOADONLY 0x00000040 // Download data only, don't decode
  39. #define DWN_FORCEDITHER 0x00000080 // Override automatic dithering
  40. #define DWN_RAWIMAGE 0x00000100 // Disable dithering
  41. /* Definition of interface: IImgCtx */
  42. #undef INTERFACE
  43. #define INTERFACE IImgCtx
  44. // {3050f3d7-98b5-11cf-bb82-00aa00bdce0b}
  45. DEFINE_GUID(IID_IImgCtx, 0x3050f3d7, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
  46. DECLARE_INTERFACE_(IImgCtx, IUnknown)
  47. {
  48. #ifndef NO_BASEINTERFACE_FUNCS
  49. /* IUnknown methods */
  50. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  51. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  52. STDMETHOD_(ULONG, Release)(THIS) PURE;
  53. #endif
  54. /* IImgCtx methods */
  55. /* Initialization/Download methods */
  56. STDMETHOD(Load)(THIS_ LPCWSTR pszUrl, DWORD dwFlags) PURE;
  57. STDMETHOD(SelectChanges)(THIS_ ULONG ulChgOn, ULONG ulChgOff, BOOL fSignal) PURE;
  58. STDMETHOD(SetCallback)(THIS_ PFNIMGCTXCALLBACK pfn, void * pvPrivateData) PURE;
  59. STDMETHOD(Disconnect)(THIS) PURE;
  60. /* Query methods */
  61. STDMETHOD(GetUpdateRects)(THIS_ struct tagRECT FAR* prc, struct tagRECT FAR* prcImg, long FAR* pcrc) PURE;
  62. STDMETHOD(GetStateInfo)(THIS_ ULONG FAR* pulState, struct tagSIZE FAR* psize, BOOL fClearChanges) PURE;
  63. STDMETHOD(GetPalette)(THIS_ HPALETTE FAR* phpal) PURE;
  64. /* Rendering methods */
  65. STDMETHOD(Draw)(THIS_ HDC hdc, struct tagRECT FAR* prcBounds) PURE;
  66. STDMETHOD(Tile)(THIS_ HDC hdc, struct tagPOINT FAR* pptBackOrg, struct tagRECT FAR* prcClip, struct tagSIZE FAR* psize) PURE;
  67. STDMETHOD(StretchBlt)(THIS_ HDC hdc, int dstX, int dstY, int dstXE, int dstYE, int srcX, int srcY, int srcXE, int srcYE, DWORD dwROP) PURE;
  68. };
  69. #ifdef COBJMACROS
  70. #define IImgCtx_QueryInterface(This,riid,ppvObject) \
  71. (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  72. #define IImgCtx_AddRef(This) \
  73. (This)->lpVtbl -> AddRef(This)
  74. #define IImgCtx_Release(This) \
  75. (This)->lpVtbl -> Release(This)
  76. #define IImgCtx_Load(This, pszUrl, dwFlags) \
  77. (This)->lpVtbl -> Load(This, pszUrl, dwFlags)
  78. #define IImgCtx_Draw(This, hdc, prcBounds) \
  79. (This)->lpVtbl -> Draw(This, hdc, prcBounds)
  80. #define IImgCtx_Tile(This, hdc, pptBackOrg, prcClip, psize) \
  81. (This)->lpVtbl -> Tile(This, hdc, pptBackOrg, prcClip, psize)
  82. #define IImgCtx_GetUpdateRects(This, prc, prcImg, pcrc) \
  83. (This)->lpVtbl -> GetUpdateRects(This, prc, prcImg, pcrc)
  84. #define IImgCtx_GetStateInfo(This, pulState, psize, fClearChanges) \
  85. (This)->lpVtbl -> GetStateInfo(This, pulState, psize, fClearChanges)
  86. #define IImgCtx_GetPalette(This, phpal) \
  87. (This)->lpVtbl -> GetPalette(This, phpal)
  88. #define IImgCtx_SelectChanges(This, ulChgOn, ulChgOff, fSignal) \
  89. (This)->lpVtbl -> SelectChanges(This, ulChgOn, ulChgOff, fSignal)
  90. #define IImgCtx_SetCallback(This, pfnCallback, pvPrivateData) \
  91. (This)->lpVtbl -> SetCallback(This, pfnCallback, pvPrivateData)
  92. #define IImgCtx_Disconnect(This) \
  93. (This)->lpVtbl -> Disconnect(This)
  94. #define IImgCtx_StretchBlt(This, hdc, dstX, dstY, dstXE, dstYE, srcX, srcY, srcXE, srcYE, dwROP) \
  95. (This)->lpVtbl -> StretchBlt(This, hdc, dstX, dstY, dstXE, dstYE, srcX, srcY, srcXE, srcYE, dwROP)
  96. #endif /* COBJMACROS */
  97. // {3050f3d6-98b5-11cf-bb82-00aa00bdce0b}
  98. DEFINE_GUID(CLSID_IImgCtx, 0x3050f3d6, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
  99. #endif