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.

77 lines
2.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1998
  6. //
  7. // File: ddpaletteobj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // ddPaletteObj.h : Declaration of the C_dxj_DirectDrawPaletteObject
  11. #include "resource.h" // main symbols
  12. #define typedef__dxj_DirectDrawPalette LPDIRECTDRAWPALETTE
  13. /////////////////////////////////////////////////////////////////////////////
  14. // Direct
  15. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  16. //references as template arguments.
  17. class C_dxj_DirectDrawPaletteObject :
  18. #ifdef USING_IDISPATCH
  19. public CComDualImpl<I_dxj_DirectDrawPalette, &IID_I_dxj_DirectDrawPalette, &LIBID_DIRECTLib>,
  20. public ISupportErrorInfo,
  21. #else
  22. public I_dxj_DirectDrawPalette,
  23. #endif
  24. // public CComCoClass<C_dxj_DirectDrawPaletteObject, &CLSID__dxj_DirectDrawPalette>,
  25. public CComObjectRoot
  26. {
  27. public:
  28. C_dxj_DirectDrawPaletteObject() ;
  29. virtual ~C_dxj_DirectDrawPaletteObject() ;
  30. BEGIN_COM_MAP(C_dxj_DirectDrawPaletteObject)
  31. COM_INTERFACE_ENTRY(I_dxj_DirectDrawPalette)
  32. #ifdef USING_IDISPATCH
  33. COM_INTERFACE_ENTRY(IDispatch)
  34. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  35. #endif
  36. END_COM_MAP()
  37. // DECLARE_REGISTRY(CLSID__dxj_DirectDrawPalette, "DIRECT.ddPalette.3", "DIRECT.DirectDrawPalette.3", IDS_DDPALETTE_DESC, THREADFLAGS_BOTH)
  38. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectDrawPaletteObject) if you don't want your object
  39. // to support aggregation
  40. DECLARE_AGGREGATABLE(C_dxj_DirectDrawPaletteObject)
  41. #ifdef USING_IDISPATCH
  42. // ISupportsErrorInfo
  43. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  44. #endif
  45. // I_dxj_DirectDrawPalette
  46. public:
  47. STDMETHOD(InternalSetObject)(IUnknown *lpddp);
  48. STDMETHOD(InternalGetObject)(IUnknown **lpddp);
  49. //STDMETHOD(initialize)( I_dxj_DirectDraw2 *val);
  50. STDMETHOD(getCaps)( long *caps);
  51. STDMETHOD(setEntries)(/*long,*/ long, long, SAFEARRAY **pe);
  52. STDMETHOD(getEntries)(/*long,*/ long, long, SAFEARRAY **pe);
  53. //STDMETHOD(internalAttachDD)(I_dxj_DirectDraw2 *dd);
  54. STDMETHOD(setEntriesHalftone)(long start, long count);
  55. STDMETHOD(setEntriesSystemPalette)(long start, long count);
  56. private:
  57. DECL_VARIABLE(_dxj_DirectDrawPalette);
  58. IUnknown *m_dd; // circular def's, use IUnknown to compile
  59. public:
  60. DX3J_GLOBAL_LINKS( _dxj_DirectDrawPalette )
  61. };