home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / iimgctx.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  4.8 KB  |  137 lines

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright 1996-1997 Microsoft Corporation. All Rights Reserved.
  5. //
  6. //  File: iimgctx.h
  7. //
  8. //--------------------------------------------------------------------------
  9.  
  10. #ifndef _IImgCtxObjects_H_
  11. #define _IImgCtxObjects_H_
  12. #pragma option push -b
  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.  
  51. /* Definition of interface: IImgCtx */
  52. #undef INTERFACE
  53. #define INTERFACE IImgCtx
  54.  
  55. // {3050f3d7-98b5-11cf-bb82-00aa00bdce0b}
  56. DEFINE_GUID(IID_IImgCtx, 0x3050f3d7, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
  57.  
  58. DECLARE_INTERFACE_(IImgCtx, IUnknown)
  59. {
  60. #ifndef NO_BASEINTERFACE_FUNCS
  61.  
  62.     /* IUnknown methods */
  63.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  64.     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  65.     STDMETHOD_(ULONG, Release)(THIS) PURE;
  66. #endif
  67.  
  68.     /* IImgCtx methods */
  69.  
  70.     /* Initialization/Download methods */
  71.     STDMETHOD(Load)(THIS_ LPCWSTR pszUrl, DWORD dwFlags) PURE;
  72.     STDMETHOD(SelectChanges)(THIS_ ULONG ulChgOn, ULONG ulChgOff, BOOL fSignal) PURE;
  73.     STDMETHOD(SetCallback)(THIS_ PFNIMGCTXCALLBACK pfn, void * pvPrivateData) PURE;
  74.     STDMETHOD(Disconnect)(THIS) PURE;
  75.  
  76.     /* Query methods */
  77.     STDMETHOD(GetUpdateRects)(THIS_ struct tagRECT FAR* prc, struct tagRECT FAR* prcImg, long FAR* pcrc) PURE;
  78.     STDMETHOD(GetStateInfo)(THIS_ ULONG FAR* pulState, struct tagSIZE FAR* psize, BOOL fClearChanges) PURE;
  79.     STDMETHOD(GetPalette)(THIS_ HPALETTE FAR* phpal) PURE;
  80.  
  81.     /* Rendering methods */
  82.     STDMETHOD(Draw)(THIS_ HDC hdc, struct tagRECT FAR* prcBounds) PURE;
  83.     STDMETHOD(Tile)(THIS_ HDC hdc, struct tagPOINT FAR* pptBackOrg, struct tagRECT FAR* prcClip, struct tagSIZE FAR* psize) PURE;
  84.     STDMETHOD(StretchBlt)(THIS_ HDC hdc, int dstX, int dstY, int dstXE, int dstYE, int srcX, int srcY, int srcXE, int srcYE, DWORD dwROP) PURE;
  85. };
  86.  
  87. #ifdef COBJMACROS
  88.  
  89.  
  90. #define IImgCtx_QueryInterface(This,riid,ppvObject)    \
  91.     (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  92.  
  93. #define IImgCtx_AddRef(This)    \
  94.     (This)->lpVtbl -> AddRef(This)
  95.  
  96. #define IImgCtx_Release(This)    \
  97.     (This)->lpVtbl -> Release(This)
  98.  
  99. #define IImgCtx_Load(This, pszUrl, dwFlags)    \
  100.     (This)->lpVtbl -> Load(This, pszUrl, dwFlags)
  101.  
  102. #define IImgCtx_Draw(This, hdc, prcBounds)        \
  103.     (This)->lpVtbl -> Draw(This, hdc, prcBounds)
  104.  
  105. #define IImgCtx_Tile(This, hdc, pptBackOrg, prcClip, psize)        \
  106.     (This)->lpVtbl -> Tile(This, hdc, pptBackOrg, prcClip, psize)
  107.  
  108. #define IImgCtx_GetUpdateRects(This, prc, prcImg, pcrc)    \
  109.     (This)->lpVtbl -> GetUpdateRects(This, prc, prcImg, pcrc)
  110.  
  111. #define IImgCtx_GetStateInfo(This, pulState, psize, fClearChanges)    \
  112.     (This)->lpVtbl -> GetStateInfo(This, pulState, psize, fClearChanges)
  113.  
  114. #define IImgCtx_GetPalette(This, phpal)    \
  115.     (This)->lpVtbl -> GetPalette(This, phpal)
  116.     
  117. #define IImgCtx_SelectChanges(This, ulChgOn, ulChgOff, fSignal)    \
  118.     (This)->lpVtbl -> SelectChanges(This, ulChgOn, ulChgOff, fSignal)
  119.  
  120. #define IImgCtx_SetCallback(This, pfnCallback, pvPrivateData)    \
  121.     (This)->lpVtbl -> SetCallback(This, pfnCallback, pvPrivateData)
  122.  
  123. #define IImgCtx_Disconnect(This) \
  124.     (This)->lpVtbl -> Disconnect(This)
  125.  
  126. #define IImgCtx_StretchBlt(This, hdc, dstX, dstY, dstXE, dstYE, srcX, srcY, srcXE, srcYE, dwROP)   \
  127.     (This)->lpVtbl -> StretchBlt(This, hdc, dstX, dstY, dstXE, dstYE, srcX, srcY, srcXE, srcYE, dwROP)
  128.  
  129. #endif /* COBJMACROS */
  130.  
  131.  
  132. // {3050f3d6-98b5-11cf-bb82-00aa00bdce0b}
  133. DEFINE_GUID(CLSID_IImgCtx, 0x3050f3d6, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
  134.  
  135. #pragma option pop
  136. #endif
  137.