Leaked source code of windows server 2003
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.

135 lines
5.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright 1996-1998 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. #define DWN_MIRRORIMAGE 0x00000200 // Mirror the image
  42. /* Definition of interface: IImgCtx */
  43. #undef INTERFACE
  44. #define INTERFACE IImgCtx
  45. // {3050f3d7-98b5-11cf-bb82-00aa00bdce0b}
  46. DEFINE_GUID(IID_IImgCtx, 0x3050f3d7, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
  47. DECLARE_INTERFACE_(IImgCtx, IUnknown)
  48. {
  49. #ifndef NO_BASEINTERFACE_FUNCS
  50. /* IUnknown methods */
  51. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  52. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  53. STDMETHOD_(ULONG, Release)(THIS) PURE;
  54. #endif
  55. /* IImgCtx methods */
  56. /* Initialization/Download methods */
  57. STDMETHOD(Load)(THIS_ LPCWSTR pszUrl, DWORD dwFlags) PURE;
  58. STDMETHOD(SelectChanges)(THIS_ ULONG ulChgOn, ULONG ulChgOff, BOOL fSignal) PURE;
  59. STDMETHOD(SetCallback)(THIS_ PFNIMGCTXCALLBACK pfn, void * pvPrivateData) PURE;
  60. STDMETHOD(Disconnect)(THIS) PURE;
  61. /* Query methods */
  62. STDMETHOD(GetUpdateRects)(THIS_ struct tagRECT FAR* prc, struct tagRECT FAR* prcImg, long FAR* pcrc) PURE;
  63. STDMETHOD(GetStateInfo)(THIS_ ULONG FAR* pulState, struct tagSIZE FAR* psize, BOOL fClearChanges) PURE;
  64. STDMETHOD(GetPalette)(THIS_ HPALETTE FAR* phpal) PURE;
  65. /* Rendering methods */
  66. STDMETHOD(Draw)(THIS_ HDC hdc, struct tagRECT FAR* prcBounds) PURE;
  67. STDMETHOD(Tile)(THIS_ HDC hdc, struct tagPOINT FAR* pptBackOrg, struct tagRECT FAR* prcClip, struct tagSIZE FAR* psize) PURE;
  68. STDMETHOD(StretchBlt)(THIS_ HDC hdc, int dstX, int dstY, int dstXE, int dstYE, int srcX, int srcY, int srcXE, int srcYE, DWORD dwROP) PURE;
  69. };
  70. #ifdef COBJMACROS
  71. #define IImgCtx_QueryInterface(This,riid,ppvObject) \
  72. (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  73. #define IImgCtx_AddRef(This) \
  74. (This)->lpVtbl -> AddRef(This)
  75. #define IImgCtx_Release(This) \
  76. (This)->lpVtbl -> Release(This)
  77. #define IImgCtx_Load(This, pszUrl, dwFlags) \
  78. (This)->lpVtbl -> Load(This, pszUrl, dwFlags)
  79. #define IImgCtx_Draw(This, hdc, prcBounds) \
  80. (This)->lpVtbl -> Draw(This, hdc, prcBounds)
  81. #define IImgCtx_Tile(This, hdc, pptBackOrg, prcClip, psize) \
  82. (This)->lpVtbl -> Tile(This, hdc, pptBackOrg, prcClip, psize)
  83. #define IImgCtx_GetUpdateRects(This, prc, prcImg, pcrc) \
  84. (This)->lpVtbl -> GetUpdateRects(This, prc, prcImg, pcrc)
  85. #define IImgCtx_GetStateInfo(This, pulState, psize, fClearChanges) \
  86. (This)->lpVtbl -> GetStateInfo(This, pulState, psize, fClearChanges)
  87. #define IImgCtx_GetPalette(This, phpal) \
  88. (This)->lpVtbl -> GetPalette(This, phpal)
  89. #define IImgCtx_SelectChanges(This, ulChgOn, ulChgOff, fSignal) \
  90. (This)->lpVtbl -> SelectChanges(This, ulChgOn, ulChgOff, fSignal)
  91. #define IImgCtx_SetCallback(This, pfnCallback, pvPrivateData) \
  92. (This)->lpVtbl -> SetCallback(This, pfnCallback, pvPrivateData)
  93. #define IImgCtx_Disconnect(This) \
  94. (This)->lpVtbl -> Disconnect(This)
  95. #define IImgCtx_StretchBlt(This, hdc, dstX, dstY, dstXE, dstYE, srcX, srcY, srcXE, srcYE, dwROP) \
  96. (This)->lpVtbl -> StretchBlt(This, hdc, dstX, dstY, dstXE, dstYE, srcX, srcY, srcXE, srcYE, dwROP)
  97. #endif /* COBJMACROS */
  98. // {3050f3d6-98b5-11cf-bb82-00aa00bdce0b}
  99. DEFINE_GUID(CLSID_IImgCtx, 0x3050f3d6, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
  100. #endif