home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / atl / atltangram / atlgdiworld / atlgdiworld.idl < prev    next >
Text File  |  1998-03-26  |  3KB  |  126 lines

  1. // ATLGdiWorld.idl : IDL source for ATLGdiWorld.dll
  2. //
  3.  
  4. // This file will be processed by the MIDL tool to
  5. // produce the type library (ATLGdiWorld.tlb) and marshalling code.
  6.  
  7. ///////////////////////////////////////////////////////////
  8. //
  9. // Forwards
  10. //
  11. interface ITangramModel ;
  12. interface IAtlTangramVisual ;
  13.  
  14. ///////////////////////////////////////////////////////////
  15. //
  16. // Imports
  17. //
  18.  
  19. // Graphic Definitions
  20. import "unknwn.idl" ; 
  21. import "tantype.idl" ;
  22. import "AtlModel.idl" ;
  23. import "AtlTangramCanvas.idl";
  24.  
  25.     ///////////////////////////////////////////////////////////
  26.     //
  27.     // Interface IAtlTangramVisual
  28.     //
  29.     [
  30.         object,
  31.         uuid(D62E8DC8-AEDD-11d0-80C9-00609714FDFE),
  32.         helpstring("ITangramVisual Interface"),
  33.         pointer_default(unique)
  34.     ]
  35.     interface IAtlTangramVisual : IUnknown
  36.     {
  37.  
  38.         HRESULT GetModel(    [in] REFIID iid, 
  39.                             [out, iid_is(iid)] IUnknown** ppI);
  40.         HRESULT SetSelected([in] BOOL bSelected) ;
  41.     };
  42.  
  43.     ///////////////////////////////////////////////////////////
  44.     //
  45.     // Interface IAtlTangramWorld
  46.     //
  47.     [
  48.         object,
  49.         uuid(582787A4-AED3-11d0-80C9-00609714FDFE),
  50.         helpstring("ITangramWorld Interface"),
  51.         pointer_default(unique)
  52.     ]
  53.     interface IAtlTangramWorld : IUnknown
  54.     {
  55.         import  "oaidl.idl";
  56.  
  57.         HRESULT Initialize([in] HWND hwnd, [in] double logicalCX, [in] double logicalCY) ;
  58.         HRESULT DeviceToModel([in] POINT ptIN, [out] TangramPoint2d* pptOut) ;
  59.  
  60.         HRESULT VisualFromPoint([in] POINT pt, 
  61.                                 [in] REFIID iid, 
  62.                                 [out, iid_is(iid)] IUnknown** pITangramVisual) ;
  63.  
  64.         HRESULT CreateVisualForModel([in] IATLTangramModel* pModel) ;
  65.         HRESULT SelectVisual([in] IAtlTangramVisual* pSelectedVisual, [in] BOOL bSelect);
  66.         HRESULT Animate() ; 
  67.     };
  68.  
  69.     [
  70.     
  71.         uuid(09A63AE0-AED1-11D0-80C9-00609714FDFE),
  72.     
  73.         helpstring("IAtlTangramGdiWorld Interface"),
  74.         pointer_default(unique)
  75.     ]
  76.     interface IAtlTangramGdiWorld : IAtlTangramWorld
  77.     {
  78.         HRESULT ModelToDevice(    [in] TangramPoint2d pptIn, [out] POINT* pptOut) ;
  79.         HRESULT AddUpdateRect([in] RECT rectUpdate) ; 
  80.     };
  81.  
  82.     [
  83.     
  84.         uuid(09A63AEF-AED1-11D0-80C9-00609714FDFE),
  85.     
  86.         helpstring("IAtlTangramGdiVisual Interface"),
  87.         pointer_default(unique)
  88.     ]
  89.     interface IAtlTangramGdiVisual : IAtlTangramVisual
  90.     {
  91.  
  92.         HRESULT Initialize([in] IATLTangramModel* pModel, [in] IAtlTangramGdiWorld* pWorld) ;
  93.         HRESULT IsPtIn([in] POINT pt) ;
  94.         HRESULT GetBoundingRect([out] RECT* pBoundingRect) ;
  95.         HRESULT DrawOn([in] IAtlTangramCanvas* pCanvas) ;    
  96.         [helpstring("method ReleaseConnectionPoint")] 
  97.         HRESULT ReleaseConnectionPoint();
  98.     };
  99. [
  100.     uuid(09A63AD3-AED1-11D0-80C9-00609714FDFE),
  101.     version(1.0),
  102.     helpstring("ATLGdiWorld 1.0 Type Library")
  103. ]
  104. library ATLGDIWORLDLib
  105. {
  106.     importlib("stdole32.tlb");
  107.     importlib("stdole2.tlb");
  108.  
  109.     [
  110.         uuid(09A63AE1-AED1-11D0-80C9-00609714FDFE),
  111.         helpstring("AtlTangramGdiWorld Class")
  112.     ]
  113.     coclass AtlGdiWorld
  114.     {
  115.         [default] interface IAtlTangramGdiWorld;
  116.     };
  117.     [
  118.         uuid(09A63AF0-AED1-11D0-80C9-00609714FDFE),
  119.         helpstring("AtlTangramGdiVisual Class")
  120.     ]
  121.     coclass AtlTangramGdiVisual
  122.     {
  123.         [default] interface IAtlTangramGdiVisual;
  124.     };
  125. };
  126.