home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / common / msdev98 / template / atl / ctlint.idl < prev    next >
Encoding:
Text File  |  1998-06-16  |  5.7 KB  |  181 lines

  1.     [!crlf]
  2.     [
  3.         object,
  4.         uuid([!InterfaceGUID]),
  5.     [!if=(Dual, "TRUE")]    dual,[!endif]
  6.         helpstring("[!InterfaceName] Interface"),
  7.         pointer_default(unique)
  8.     ]
  9.     interface [!InterfaceName] : [!if=(Dual, "TRUE")]IDispatch[!else]IUnknown[!endif]
  10.     {
  11. [!if=(SP_AUTOSIZE, "TRUE")]
  12.         [propput, id(DISPID_AUTOSIZE)]
  13.         HRESULT AutoSize([in]VARIANT_BOOL vbool);
  14.         [propget, id(DISPID_AUTOSIZE)]
  15.         HRESULT AutoSize([out,retval]VARIANT_BOOL* pbool);
  16. [!endif]
  17. [!if=(SP_BACKCOLOR, "TRUE")]
  18.         [propput, id(DISPID_BACKCOLOR)]
  19.         HRESULT BackColor([in]OLE_COLOR clr);
  20.         [propget, id(DISPID_BACKCOLOR)]
  21.         HRESULT BackColor([out,retval]OLE_COLOR* pclr);
  22. [!endif]
  23. [!if=(SP_BACKSTYLE, "TRUE")]
  24.         [propput, id(DISPID_BACKSTYLE)]
  25.         HRESULT BackStyle([in]long style);
  26.         [propget, id(DISPID_BACKSTYLE)]
  27.         HRESULT BackStyle([out,retval]long* pstyle);
  28. [!endif]
  29. [!if=(SP_BORDERCOLOR, "TRUE")]
  30.         [propput, id(DISPID_BORDERCOLOR)]
  31.         HRESULT BorderColor([in]OLE_COLOR clr);
  32.         [propget, id(DISPID_BORDERCOLOR)]
  33.         HRESULT BorderColor([out, retval]OLE_COLOR* pclr);
  34. [!endif]
  35. [!if=(SP_BORDERSTYLE, "TRUE")]
  36.         [propput, id(DISPID_BORDERSTYLE)]
  37.         HRESULT BorderStyle([in]long style);
  38.         [propget, id(DISPID_BORDERSTYLE)]
  39.         HRESULT BorderStyle([out, retval]long* pstyle);
  40. [!endif]
  41. [!if=(SP_BORDERWIDTH, "TRUE")]
  42.         [propput, id(DISPID_BORDERWIDTH)]
  43.         HRESULT BorderWidth([in]long width);
  44.         [propget, id(DISPID_BORDERWIDTH)]
  45.         HRESULT BorderWidth([out, retval]long* width);
  46. [!endif]
  47. [!if=(SP_DRAWMODE, "TRUE")]
  48.         [propput, id(DISPID_DRAWMODE)]
  49.         HRESULT DrawMode([in]long mode);
  50.         [propget, id(DISPID_DRAWMODE)]
  51.         HRESULT DrawMode([out, retval]long* pmode);
  52. [!endif]
  53. [!if=(SP_DRAWSTYLE, "TRUE")]
  54.         [propput, id(DISPID_DRAWSTYLE)]
  55.         HRESULT DrawStyle([in]long style);
  56.         [propget, id(DISPID_DRAWSTYLE)]
  57.         HRESULT DrawStyle([out, retval]long* pstyle);
  58. [!endif]
  59. [!if=(SP_DRAWWIDTH, "TRUE")]
  60.         [propput, id(DISPID_DRAWWIDTH)]
  61.         HRESULT DrawWidth([in]long width);
  62.         [propget, id(DISPID_DRAWWIDTH)]
  63.         HRESULT DrawWidth([out, retval]long* pwidth);
  64. [!endif]
  65. [!if=(SP_FILLCOLOR, "TRUE")]
  66.         [propput, id(DISPID_FILLCOLOR)]
  67.         HRESULT FillColor([in]OLE_COLOR clr);
  68.         [propget, id(DISPID_FILLCOLOR)]
  69.         HRESULT FillColor([out, retval]OLE_COLOR* pclr);
  70. [!endif]
  71. [!if=(SP_FILLSTYLE, "TRUE")]
  72.         [propput, id(DISPID_FILLSTYLE)]
  73.         HRESULT FillStyle([in]long style);
  74.         [propget, id(DISPID_FILLSTYLE)]
  75.         HRESULT FillStyle([out, retval]long* pstyle);
  76. [!endif]
  77. [!if=(SP_FONT, "TRUE")]
  78.         [propputref, id(DISPID_FONT)]
  79.         HRESULT Font([in]IFontDisp* pFont);
  80.         [propput, id(DISPID_FONT)]
  81.         HRESULT Font([in]IFontDisp* pFont);
  82.         [propget, id(DISPID_FONT)]
  83.         HRESULT Font([out, retval]IFontDisp** ppFont);
  84. [!endif]
  85. [!if=(SP_FORECOLOR, "TRUE")]
  86.         [propput, id(DISPID_FORECOLOR)]
  87.         HRESULT ForeColor([in]OLE_COLOR clr);
  88.         [propget, id(DISPID_FORECOLOR)]
  89.         HRESULT ForeColor([out,retval]OLE_COLOR* pclr);
  90. [!endif]
  91. [!if=(SP_ENABLED, "TRUE")]
  92.         [propput, id(DISPID_ENABLED)]
  93.         HRESULT Enabled([in]VARIANT_BOOL vbool);
  94.         [propget, id(DISPID_ENABLED)]
  95.         HRESULT Enabled([out,retval]VARIANT_BOOL* pbool);
  96. [!endif]
  97. [!if=(SP_HWND, "TRUE")]
  98.         [propget, id(DISPID_HWND)]
  99.         HRESULT Window([out, retval]long* phwnd);
  100. [!endif]
  101. [!if=(SP_TABSTOP, "TRUE")]
  102.         [propput, id(DISPID_TABSTOP)]
  103.         HRESULT TabStop([in]VARIANT_BOOL vbool);
  104.         [propget, id(DISPID_TABSTOP)]
  105.         HRESULT TabStop([out, retval]VARIANT_BOOL* pbool);
  106. [!endif]
  107. [!if=(SP_TEXT, "TRUE")]
  108.         [propput, id(DISPID_TEXT)]
  109.         HRESULT Text([in]BSTR strText);
  110.         [propget, id(DISPID_TEXT)]
  111.         HRESULT Text([out, retval]BSTR* pstrText);
  112. [!endif]
  113. [!if=(SP_CAPTION, "TRUE")]
  114.         [propput, id(DISPID_CAPTION)]
  115.         HRESULT Caption([in]BSTR strCaption);
  116.         [propget, id(DISPID_CAPTION)]
  117.         HRESULT Caption([out,retval]BSTR* pstrCaption);
  118. [!endif]
  119. [!if=(SP_BORDERVISIBLE, "TRUE")]
  120.         [propput, id(DISPID_BORDERVISIBLE)]
  121.         HRESULT BorderVisible([in]VARIANT_BOOL vbool);
  122.         [propget, id(DISPID_BORDERVISIBLE)]
  123.         HRESULT BorderVisible([out, retval]VARIANT_BOOL* pbool);
  124. [!endif]
  125. [!if=(SP_APPEARANCE, "TRUE")]
  126.         [propput, id(DISPID_APPEARANCE)]
  127.         HRESULT Appearance([in]short appearance);
  128.         [propget, id(DISPID_APPEARANCE)]
  129.         HRESULT Appearance([out, retval]short* pappearance);
  130. [!endif]
  131. [!if=(SP_MOUSEPOINTER, "TRUE")]
  132.         [propput, id(DISPID_MOUSEPOINTER)]
  133.         HRESULT MousePointer([in]long pointer);
  134.         [propget, id(DISPID_MOUSEPOINTER)]
  135.         HRESULT MousePointer([out, retval]long* ppointer);
  136. [!endif]
  137. [!if=(SP_MOUSEICON, "TRUE")]
  138.         [propputref, id(DISPID_MOUSEICON)]
  139.         HRESULT MouseIcon([in]IPictureDisp* pMouseIcon);
  140.         [propput, id(DISPID_MOUSEICON)]
  141.         HRESULT MouseIcon([in]IPictureDisp* pMouseIcon);
  142.         [propget, id(DISPID_MOUSEICON)]
  143.         HRESULT MouseIcon([out, retval]IPictureDisp** ppMouseIcon);
  144. [!endif]
  145. [!if=(SP_PICTURE, "TRUE")]
  146.         [propputref, id(DISPID_PICTURE)]
  147.         HRESULT Picture([in]IPictureDisp* pPicture);
  148.         [propput, id(DISPID_PICTURE)]
  149.         HRESULT Picture([in]IPictureDisp* pPicture);
  150.         [propget, id(DISPID_PICTURE)]
  151.         HRESULT Picture([out, retval]IPictureDisp** ppPicture);
  152. [!endif]
  153. [!if=(SP_VALID, "TRUE")]
  154.         [propput, id(DISPID_VALID)]
  155.         HRESULT Valid([in]VARIANT_BOOL vbool);
  156.         [propget, id(DISPID_VALID)]
  157.         HRESULT Valid([out, retval]VARIANT_BOOL* pbool);
  158. [!endif]
  159. [!if=(SP_READYSTATE, "TRUE")]
  160.         [propput, id(DISPID_READYSTATE)]
  161.         HRESULT ReadyState([in]long state);
  162.         [propget, id(DISPID_READYSTATE)]
  163.         HRESULT ReadyState([out, retval]long* pstate);
  164. [!endif]
  165.     };
  166. [!if=(HTMLControl, "TRUE")]
  167.     [!crlf]
  168.     [!newguid(InterfaceGUIDUI)]
  169.     [
  170.         object, dual,
  171.         uuid([!InterfaceGUIDUI]),
  172.         helpstring("[!InterfaceName]UI Interface"),
  173.         pointer_default(unique)
  174.     ]
  175.     interface [!InterfaceName]UI : IDispatch
  176.     {
  177.         // Example method that will be called by the HTML
  178.         HRESULT OnClick([in]IDispatch* pdispBody, [in]VARIANT varColor);
  179.     };
  180. [!endif]
  181.