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.

104 lines
3.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: gen.h
  7. //
  8. // Contents: Declaration of CGenObject
  9. //
  10. // Classes: CGenObject
  11. //
  12. // Functions:
  13. //
  14. // History: dd-mmm-yy Author Comment
  15. // 01-Feb-95 t-ScottH add Dump method to CGenObject
  16. // 24-Jan-94 alexgo first pass converting to Cairo style
  17. // memory allocation
  18. // 23-Nov-93 alexgo 32bit port
  19. // 23-Nov-93 alexgo removed internal function declarations
  20. // (only used in gen.cpp, so put them there)
  21. //
  22. //--------------------------------------------------------------------------
  23. #include "olepres.h"
  24. #include "olecache.h"
  25. #include "cachenod.h"
  26. //+-------------------------------------------------------------------------
  27. //
  28. // Class: CGenObject::IOlePresObj
  29. //
  30. // Purpose: Implementation of IOlePresObj for device independent bitmaps
  31. //
  32. // Interface: IOlePresObj (internal OLE interface)
  33. //
  34. // History: dd-mmm-yy Author Comment
  35. // 01-Feb-95 t-ScottH add Dump method (_DEBUG only) (this method
  36. // is also a method in IOlePresObj
  37. // 23-Nov-93 alexgo 32bit port
  38. //
  39. // Notes:
  40. //
  41. //--------------------------------------------------------------------------
  42. class FAR CGenObject : public IOlePresObj, public CPrivAlloc
  43. {
  44. public:
  45. CGenObject (LPCACHENODE pCacheNode, CLIPFORMAT cfFormat,
  46. DWORD dwAspect);
  47. ~CGenObject( void );
  48. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  49. STDMETHOD_(ULONG,AddRef) (THIS) ;
  50. STDMETHOD_(ULONG,Release) (THIS);
  51. STDMETHOD(GetData) (THIS_ LPFORMATETC pformatetcIn,
  52. LPSTGMEDIUM pmedium );
  53. STDMETHOD(GetDataHere) (THIS_ LPFORMATETC pformatetcIn,
  54. LPSTGMEDIUM pmedium );
  55. STDMETHOD(SetDataWDO) (THIS_ LPFORMATETC pformatetc, LPSTGMEDIUM pmedium,
  56. BOOL fRelease, IDataObject * pdo);
  57. STDMETHOD(Draw) (THIS_ void FAR* pvAspect, HDC hicTargetDev,
  58. HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds,
  59. BOOL (CALLBACK * pfnContinue)(ULONG_PTR),
  60. ULONG_PTR dwContinue);
  61. STDMETHOD(GetExtent) (THIS_ DWORD dwAspect, LPSIZEL lpsizel);
  62. STDMETHOD(Load) (THIS_ LPSTREAM pstm, BOOL fReadHeaderOnly = FALSE);
  63. STDMETHOD(Save) (THIS_ LPSTREAM pstm);
  64. STDMETHOD(GetColorSet) (void FAR* pvAspect, HDC hicTargetDev,
  65. LPLOGPALETTE FAR* ppColorSet);
  66. STDMETHOD_(BOOL, IsBlank) (THIS);
  67. STDMETHOD_(void, DiscardHPRES)(THIS);
  68. #ifdef _DEBUG
  69. STDMETHOD(Dump) (THIS_ char **ppszDump, ULONG ulFlag, int nIndentLevel);
  70. #endif // _DEBUG
  71. private:
  72. #ifndef _MAC
  73. INTERNAL GetBitmapData(LPFORMATETC pformatetcIn, LPSTGMEDIUM pmedium);
  74. INTERNAL SetBitmapData(LPFORMATETC pformatetc, LPSTGMEDIUM pmedium,
  75. BOOL fRelease, IDataObject *pDataObject);
  76. #endif
  77. INTERNAL ChangeData(HANDLE hData, BOOL fDelete);
  78. INTERNAL_(HANDLE) LoadHPRES(void);
  79. INTERNAL_(HANDLE) GetCopyOfHPRES(void);
  80. shared_state:
  81. ULONG m_ulRefs;
  82. DWORD m_dwAspect;
  83. DWORD m_dwSize;
  84. LONG m_lWidth;
  85. LONG m_lHeight;
  86. HANDLE m_hPres;
  87. CLIPFORMAT m_cfFormat;
  88. LPCACHENODE m_pCacheNode;
  89. };
  90.