Source code of Windows XP (NT5)
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.

291 lines
8.7 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. HelpHost.idl
  5. Abstract:
  6. This file contains the declaration of the set of coclasses and interfaces
  7. that make up the common API shared by Havana and HSS
  8. Revision History:
  9. Davide Massarenti (Dmassare) 10/18/2000
  10. created
  11. ******************************************************************************/
  12. import "oaidl.idl";
  13. ///////////////////////////////////////////////////////////////////////////////
  14. ///////////////////////////////////////////////////////////////////////////////
  15. ///////////////////////////////////////////////////////////////////////////////
  16. //
  17. // Forward declaration.
  18. //
  19. interface IHelpHost;
  20. interface IHelpHostPanes;
  21. interface IHelpHostPane;
  22. interface IHelpHostWindow;
  23. dispinterface DHelpHostEvents;
  24. dispinterface DHelpHostNavEvents;
  25. ///////////////////////////////////////////////////////////////////////////////
  26. ///////////////////////////////////////////////////////////////////////////////
  27. ///////////////////////////////////////////////////////////////////////////////
  28. [
  29. object,
  30. uuid(AF72E210-FA10-4BB5-A348-269D7615A520),
  31. dual,
  32. oleautomation,
  33. helpstring("IHelpHost Interface"),
  34. pointer_default(unique)
  35. ]
  36. interface IHelpHost : IDispatch
  37. {
  38. ////////////////////////////////////////
  39. //
  40. // Read/write Properties
  41. //
  42. ////////////////////////////////////////
  43. [propput] HRESULT FilterName( [in] BSTR Value );
  44. [propget] HRESULT FilterName( [out, retval] BSTR *pValue );
  45. ////////////////////////////////////////
  46. //
  47. // Read-only Properties
  48. //
  49. ////////////////////////////////////////
  50. [propget] HRESULT Namespace ( [out, retval] BSTR *pValue );
  51. [propget] HRESULT Session ( [out, retval] IDispatch* *pValue );
  52. [propget] HRESULT FilterExpression( [out, retval] BSTR *pValue );
  53. [propget] HRESULT CurrentUrl ( [out, retval] BSTR *pValue );
  54. [propget] HRESULT Panes ( [out, retval] IHelpHostPanes* *pValue );
  55. [propget] HRESULT HelpHostWindow ( [out, retval] IHelpHostWindow* *pValue );
  56. ////////////////////////////////////////
  57. //
  58. // Methods
  59. //
  60. ////////////////////////////////////////
  61. //
  62. // Initialize a session for a namespace
  63. //
  64. HRESULT OpenNamespace( [in] BSTR newNamespace ,
  65. [in] BSTR filterName );
  66. //
  67. // Navigate to a topic
  68. //
  69. HRESULT DisplayTopicFromURL( [in] BSTR url ,
  70. [in] VARIANT options );
  71. //
  72. // Perform keyword or other lookup
  73. //
  74. HRESULT DisplayResultsFromQuery( [in] BSTR query ,
  75. [in] BSTR navMoniker ,
  76. [in] VARIANT options ); // show only 1
  77. //
  78. // Show a UI element
  79. //
  80. // <paneName> examples :
  81. //
  82. // //topic/1
  83. // //toc/1
  84. // //index/1
  85. // //search/1
  86. //
  87. //
  88. HRESULT ShowPane( [in] BSTR paneName , // "path" style name of pane
  89. [in] BSTR query , // prepopulate edit box (optional)
  90. [in] BSTR navMoniker ,
  91. [in] VARIANT options ); // options: hide, doquery
  92. //
  93. // Close the Help window
  94. //
  95. HRESULT Terminate();
  96. };
  97. [
  98. object,
  99. uuid(AF72E211-FA10-4BB5-A348-269D7615A520),
  100. dual,
  101. oleautomation,
  102. helpstring("IHelpHostPanes Interface"),
  103. pointer_default(unique)
  104. ]
  105. interface IHelpHostPanes : IDispatch
  106. {
  107. [propget, id(DISPID_NEWENUM)] HRESULT _NewEnum( [out, retval] IUnknown* *pVal );
  108. [propget, id(DISPID_VALUE) ] HRESULT Item ( [in] VARIANT vIndex, [out, retval] VARIANT *ppEntry );
  109. [propget ] HRESULT Count ( [out, retval] long *pVal );
  110. };
  111. [
  112. object,
  113. uuid(AF72E212-FA10-4BB5-A348-269D7615A520),
  114. dual,
  115. oleautomation,
  116. helpstring("IHelpHostPane Interface"),
  117. pointer_default(unique)
  118. ]
  119. interface IHelpHostPane : IDispatch
  120. {
  121. ////////////////////////////////////////
  122. //
  123. // Read/write Properties
  124. //
  125. ////////////////////////////////////////
  126. [propput] HRESULT Visible ( [in ] VARIANT_BOOL Value );
  127. [propget] HRESULT Visible ( [out, retval] VARIANT_BOOL *pValue );
  128. [propput] HRESULT NavMoniker( [in ] BSTR Value );
  129. [propget] HRESULT NavMoniker( [out, retval] BSTR *pValue );
  130. ////////////////////////////////////////
  131. //
  132. // Read-only Properties
  133. //
  134. ////////////////////////////////////////
  135. [propget] HRESULT Name ( [out, retval] VARIANT_BOOL *pValue );
  136. [propget] HRESULT CurrentUrl( [out, retval] BSTR *pValue );
  137. [propget] HRESULT WebBrowser( [out, retval] IDispatch* *pValue );
  138. //
  139. // Navigate to a topic
  140. //
  141. HRESULT DisplayTopicFromURL( [in] BSTR url ,
  142. [in] VARIANT options );
  143. //
  144. // Perform keyword or other lookup
  145. //
  146. HRESULT DisplayResultsFromQuery( [in] BSTR query ,
  147. [in] VARIANT options ); // show only 1
  148. //
  149. // Synchronize a navigation pane
  150. //
  151. HRESULT Sync( [in] BSTR url ,
  152. [in] VARIANT options ); // force pane to show
  153. };
  154. [
  155. object,
  156. uuid(AF72E213-FA10-4BB5-A348-269D7615A520),
  157. dual,
  158. oleautomation,
  159. helpstring("IHelpHostWindow Interface"),
  160. pointer_default(unique)
  161. ]
  162. interface IHelpHostWindow : IDispatch
  163. {
  164. ////////////////////////////////////////
  165. //
  166. // Read/write Properties
  167. //
  168. ////////////////////////////////////////
  169. //
  170. // Must be set before opening the namespace.
  171. //
  172. [propput] HRESULT ParentWindow( [in ] long HWND );
  173. [propget] HRESULT ParentWindow( [out, retval] long *pHWND );
  174. //
  175. // Recommended to call this before showing the window. Viewers can optionally allow more dynamic setting.
  176. //
  177. [propput] HRESULT UILanguage( [in ] long LCID );
  178. [propget] HRESULT UILanguage( [out, retval] long *pLCID );
  179. [propput] HRESULT Visible ( [in ] VARIANT_BOOL Value );
  180. [propget] HRESULT Visible ( [out, retval] VARIANT_BOOL *pValue );
  181. ////////////////////////////////////////
  182. //
  183. // Read-only Properties
  184. //
  185. ////////////////////////////////////////
  186. [propget] HRESULT OriginX ( [out, retval] long *pValue );
  187. [propget] HRESULT OriginY ( [out, retval] long *pValue );
  188. [propget] HRESULT Width ( [out, retval] long *pValue );
  189. [propget] HRESULT Height ( [out, retval] long *pValue );
  190. ////////////////////////////////////////
  191. //
  192. // Methods
  193. //
  194. ////////////////////////////////////////
  195. //
  196. // Set the window position and size
  197. //
  198. HRESULT MoveWindow( [in] long originX, [in] long originY , // corner
  199. [in] long width , [in] long height ); // size
  200. //
  201. // Can we pull this from the interface? Davide will try.
  202. // Wait (blocked) for user to finish using the Help window
  203. //
  204. HRESULT WaitForTermination( [in] long timeOut ); // milliseconds
  205. };
  206. ////////////////////////////////////////////////////////////////////////////////
  207. [
  208. uuid(AF72E220-FA10-4BB5-A348-269D7615A520),
  209. helpstring("DHelpHostEvents Interface"),
  210. ]
  211. dispinterface DHelpHostEvents
  212. {
  213. properties:
  214. methods:
  215. [id(1)] void OnFilterSelectionChanged( [in] BSTR filterName );
  216. [id(2)] void OnFilterModified ( [in] BSTR filterName );
  217. [id(3)] void OnFilterAdded ( [in] BSTR filterName );
  218. [id(4)] void OnFilterDeleted ( [in] BSTR filterName );
  219. [id(5)] void OnNamespaceChanged ( [in] BSTR newNamespace, [in] BSTR newFilter );
  220. [id(6)] void OnPaneOpened( [in] IHelpHostPane* newPane );
  221. [id(7)] void OnPaneClosed( [in] IHelpHostPane* oldPane );
  222. [id(8)] void OnClose();
  223. };
  224. [
  225. uuid(AF72E221-FA10-4BB5-A348-269D7615A520),
  226. helpstring("DHelpHostNavEvents Interface"),
  227. ]
  228. dispinterface DHelpHostNavEvents
  229. {
  230. properties:
  231. methods:
  232. [id(1)] void OnBeforeNavigate ( [in] BSTR url, [in] IHelpHostPane* pane, [in, out] VARIANT_BOOL *pCancel );
  233. [id(2)] void OnDownloadBegin ( [in] BSTR url, [in] IHelpHostPane* pane );
  234. [id(3)] void OnDownloadComplete( [in] BSTR url, [in] IHelpHostPane* pane );
  235. [id(4)] void OnNavigateComplete( [in] BSTR url, [in] IHelpHostPane* pane );
  236. [id(5)] void OnDocumentComplete( [in] BSTR url, [in] IHelpHostPane* pane );
  237. };