home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / iimgctx.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  5.0 KB  |  138 lines

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