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.

371 lines
12 KiB

  1. // Microsoft Visual Studio Object Model
  2. // Copyright (C) 1996-1997 Microsoft Corporation
  3. // All rights reserved.
  4. /////////////////////////////////////////////////////////////////////////////
  5. // textauto.h
  6. // Declaration of dual interfaces to objects found in the type library
  7. // VISUAL STUDIO 97 TEXT EDITOR (SharedIDE\bin\devedit.pkg)
  8. #ifndef __TEXTAUTO_H__
  9. #define __TEXTAUTO_H__
  10. #include "appauto.h"
  11. #include "textdefs.h"
  12. #ifndef BEGIN_INTERFACE
  13. #define BEGIN_INTERFACE
  14. #endif
  15. /////////////////////////////////////////////////////////////////////////////
  16. // Interfaces declared in this file:
  17. //IGenericDocument
  18. interface ITextDocument;
  19. interface ITextSelection;
  20. //IGenericWindow
  21. interface ITextWindow;
  22. interface ITextEditor;
  23. // to remove any redefinitions by the Windows headers
  24. #undef FindText
  25. #undef ReplaceText
  26. /////////////////////////////////////////////////////////////////////////////
  27. // TextDocument object
  28. // ITextDocument interface
  29. #undef INTERFACE
  30. #define INTERFACE ITextDocument
  31. DECLARE_INTERFACE_(ITextDocument, IGenericDocument)
  32. {
  33. BEGIN_INTERFACE
  34. #ifndef NO_BASEINTERFACE_FUNCS
  35. /* IUnknown methods */
  36. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  37. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  38. STDMETHOD_(ULONG, Release)(THIS) PURE;
  39. /* IDispatch methods */
  40. STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
  41. STDMETHOD(GetTypeInfo)(
  42. THIS_
  43. UINT itinfo,
  44. LCID lcid,
  45. ITypeInfo FAR* FAR* pptinfo) PURE;
  46. STDMETHOD(GetIDsOfNames)(
  47. THIS_
  48. REFIID riid,
  49. OLECHAR FAR* FAR* rgszNames,
  50. UINT cNames,
  51. LCID lcid,
  52. DISPID FAR* rgdispid) PURE;
  53. STDMETHOD(Invoke)(
  54. THIS_
  55. DISPID dispidMember,
  56. REFIID riid,
  57. LCID lcid,
  58. WORD wFlags,
  59. DISPPARAMS FAR* pdispparams,
  60. VARIANT FAR* pvarResult,
  61. EXCEPINFO FAR* pexcepinfo,
  62. UINT FAR* puArgErr) PURE;
  63. /* IGenericDocument methods */
  64. STDMETHOD(get_Name)(THIS_ BSTR FAR* pName) PURE;
  65. STDMETHOD(get_FullName)(THIS_ BSTR FAR* pName) PURE;
  66. STDMETHOD(get_Application)(THIS_ IDispatch * FAR* ppApplication) PURE;
  67. STDMETHOD(get_Parent)(THIS_ IDispatch * FAR* ppParent) PURE;
  68. STDMETHOD(get_Path)(THIS_ BSTR FAR* pPath) PURE;
  69. STDMETHOD(get_Saved)(THIS_ VARIANT_BOOL FAR* pSaved) PURE;
  70. STDMETHOD(get_ActiveWindow)(THIS_ IDispatch * FAR* ppWindow) PURE;
  71. STDMETHOD(get_ReadOnly)(THIS_ VARIANT_BOOL FAR* pReadOnly) PURE;
  72. STDMETHOD(put_ReadOnly)(THIS_ VARIANT_BOOL ReadOnly) PURE;
  73. STDMETHOD(get_Type)(THIS_ BSTR FAR* pType) PURE;
  74. STDMETHOD(get_Windows)(THIS_ IDispatch * FAR* ppWindows) PURE;
  75. STDMETHOD(put_Active)(THIS_ VARIANT_BOOL bActive) PURE;
  76. STDMETHOD(get_Active)(THIS_ VARIANT_BOOL FAR* pbActive) PURE;
  77. STDMETHOD(NewWindow)(THIS_ IDispatch * FAR* ppWindow) PURE;
  78. STDMETHOD(Save)(THIS_ VARIANT vFilename, VARIANT vBoolPrompt, DsSaveStatus FAR* pSaved) PURE;
  79. STDMETHOD(Undo)(THIS_ VARIANT_BOOL FAR* pSuccess) PURE;
  80. STDMETHOD(Redo)(THIS_ VARIANT_BOOL FAR* pSuccess) PURE;
  81. STDMETHOD(PrintOut)(THIS_ VARIANT_BOOL FAR* pSuccess) PURE;
  82. STDMETHOD(Close)(THIS_ VARIANT vSaveChanges, DsSaveStatus FAR* pSaved) PURE;
  83. STDMETHOD(Reserved1)(THIS) PURE;
  84. STDMETHOD(Reserved2)(THIS) PURE;
  85. STDMETHOD(Reserved3)(THIS) PURE;
  86. STDMETHOD(Reserved4)(THIS) PURE;
  87. STDMETHOD(Reserved5)(THIS) PURE;
  88. STDMETHOD(Reserved6)(THIS) PURE;
  89. STDMETHOD(Reserved7)(THIS) PURE;
  90. STDMETHOD(Reserved8)(THIS) PURE;
  91. STDMETHOD(Reserved9)(THIS) PURE;
  92. STDMETHOD(Reserved10)(THIS) PURE;
  93. #endif
  94. /* ITextDocument methods */
  95. STDMETHOD(get_Selection)(THIS_ IDispatch * FAR* ppSelection) PURE;
  96. STDMETHOD(put_IndentSize)(THIS_ long Size) PURE;
  97. STDMETHOD(get_IndentSize)(THIS_ long FAR* pSize) PURE;
  98. STDMETHOD(put_TabSize)(THIS_ long Size) PURE;
  99. STDMETHOD(get_TabSize)(THIS_ long FAR* pSize) PURE;
  100. STDMETHOD(put_Language)(THIS_ BSTR Language) PURE;
  101. STDMETHOD(get_Language)(THIS_ BSTR FAR* pLanguage) PURE;
  102. STDMETHOD(ReplaceText)(THIS_ BSTR FindText, BSTR ReplaceText, VARIANT Flags, VARIANT_BOOL FAR* pbRetVal) PURE;
  103. STDMETHOD(ClearBookmarks)(THIS) PURE;
  104. STDMETHOD(MarkText)(THIS_ BSTR FindText, VARIANT Flags, VARIANT_BOOL FAR* pbRetVal) PURE;
  105. };
  106. /////////////////////////////////////////////////////////////////////////////
  107. // TextSelection object
  108. // ITextSelection interface
  109. #undef INTERFACE
  110. #define INTERFACE ITextSelection
  111. DECLARE_INTERFACE_(ITextSelection, IDispatch)
  112. {
  113. BEGIN_INTERFACE
  114. #ifndef NO_BASEINTERFACE_FUNCS
  115. /* IUnknown methods */
  116. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  117. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  118. STDMETHOD_(ULONG, Release)(THIS) PURE;
  119. /* IDispatch methods */
  120. STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
  121. STDMETHOD(GetTypeInfo)(
  122. THIS_
  123. UINT itinfo,
  124. LCID lcid,
  125. ITypeInfo FAR* FAR* pptinfo) PURE;
  126. STDMETHOD(GetIDsOfNames)(
  127. THIS_
  128. REFIID riid,
  129. OLECHAR FAR* FAR* rgszNames,
  130. UINT cNames,
  131. LCID lcid,
  132. DISPID FAR* rgdispid) PURE;
  133. STDMETHOD(Invoke)(
  134. THIS_
  135. DISPID dispidMember,
  136. REFIID riid,
  137. LCID lcid,
  138. WORD wFlags,
  139. DISPPARAMS FAR* pdispparams,
  140. VARIANT FAR* pvarResult,
  141. EXCEPINFO FAR* pexcepinfo,
  142. UINT FAR* puArgErr) PURE;
  143. #endif
  144. /* ITextSelection methods */
  145. STDMETHOD(put_Text)(THIS_ BSTR newText) PURE;
  146. STDMETHOD(get_Text)(THIS_ BSTR FAR* pText) PURE;
  147. STDMETHOD(get_Application)(THIS_ IDispatch * FAR* ppApp) PURE;
  148. STDMETHOD(get_CurrentLine)(THIS_ long FAR* plLine) PURE;
  149. STDMETHOD(get_CurrentColumn)(THIS_ long FAR* plCol) PURE;
  150. STDMETHOD(get_Parent)(THIS_ IDispatch * FAR* ppParent) PURE;
  151. STDMETHOD(get_BottomLine)(THIS_ long FAR* plLine) PURE;
  152. STDMETHOD(get_TopLine)(THIS_ long FAR* plLine) PURE;
  153. STDMETHOD(Delete)(THIS_ VARIANT Count) PURE;
  154. STDMETHOD(SelectLine)(THIS) PURE;
  155. STDMETHOD(Backspace)(THIS_ VARIANT Count) PURE;
  156. STDMETHOD(StartOfDocument)(THIS_ VARIANT Extend) PURE;
  157. STDMETHOD(Copy)(THIS) PURE;
  158. STDMETHOD(Cut)(THIS) PURE;
  159. STDMETHOD(Paste)(THIS) PURE;
  160. STDMETHOD(EndOfDocument)(THIS_ VARIANT Extend) PURE;
  161. STDMETHOD(SelectAll)(THIS) PURE;
  162. STDMETHOD(Tabify)(THIS) PURE;
  163. STDMETHOD(Untabify)(THIS) PURE;
  164. STDMETHOD(Indent)(THIS_ VARIANT Reserved) PURE;
  165. STDMETHOD(Unindent)(THIS_ VARIANT Reserved) PURE;
  166. STDMETHOD(CharLeft)(THIS_ VARIANT Extend, VARIANT Count) PURE;
  167. STDMETHOD(CharRight)(THIS_ VARIANT Extend, VARIANT Count) PURE;
  168. STDMETHOD(LineUp)(THIS_ VARIANT Extend, VARIANT Count) PURE;
  169. STDMETHOD(LineDown)(THIS_ VARIANT Extend, VARIANT Count) PURE;
  170. STDMETHOD(PageUp)(THIS_ VARIANT Extend, VARIANT Count) PURE;
  171. STDMETHOD(PageDown)(THIS_ VARIANT Extend, VARIANT Count) PURE;
  172. STDMETHOD(WordLeft)(THIS_ VARIANT Extend, VARIANT Count) PURE;
  173. STDMETHOD(WordRight)(THIS_ VARIANT Extend, VARIANT Count) PURE;
  174. STDMETHOD(EndOfLine)(THIS_ VARIANT Extend) PURE;
  175. STDMETHOD(StartOfLine)(THIS_ VARIANT MoveTo, VARIANT Extend) PURE;
  176. STDMETHOD(SmartFormat)(THIS) PURE;
  177. STDMETHOD(ChangeCase)(THIS_ DsCaseOptions Type) PURE;
  178. STDMETHOD(DeleteWhitespace)(THIS_ VARIANT Direction) PURE;
  179. STDMETHOD(Cancel)(THIS) PURE;
  180. STDMETHOD(GoToLine)(THIS_ long Line, VARIANT Select) PURE;
  181. STDMETHOD(MoveTo)(THIS_ long Line, long Column, VARIANT Extend) PURE;
  182. STDMETHOD(FindText)(THIS_ BSTR FindString, VARIANT Flags, VARIANT_BOOL FAR* pbRet) PURE;
  183. STDMETHOD(PreviousBookmark)(THIS_ VARIANT_BOOL FAR* pbRet) PURE;
  184. STDMETHOD(NextBookmark)(THIS_ VARIANT_BOOL FAR* pbRet) PURE;
  185. STDMETHOD(SetBookmark)(THIS) PURE;
  186. STDMETHOD(ClearBookmark)(THIS_ VARIANT_BOOL FAR* pbRet) PURE;
  187. STDMETHOD(NewLine)(THIS_ VARIANT Reserved) PURE;
  188. STDMETHOD(ReplaceText)(THIS_ BSTR FindText, BSTR ReplaceText, VARIANT Flags, VARIANT_BOOL FAR* pbRetVal) PURE;
  189. STDMETHOD(DestructiveInsert)(THIS_ BSTR szText) PURE;
  190. };
  191. /////////////////////////////////////////////////////////////////////////////
  192. // TextWindow object
  193. // ITextWindow interface
  194. #undef INTERFACE
  195. #define INTERFACE ITextWindow
  196. DECLARE_INTERFACE_(ITextWindow, IGenericWindow)
  197. {
  198. BEGIN_INTERFACE
  199. #ifndef NO_BASEINTERFACE_FUNCS
  200. /* IUnknown methods */
  201. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  202. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  203. STDMETHOD_(ULONG, Release)(THIS) PURE;
  204. /* IDispatch methods */
  205. STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
  206. STDMETHOD(GetTypeInfo)(
  207. THIS_
  208. UINT itinfo,
  209. LCID lcid,
  210. ITypeInfo FAR* FAR* pptinfo) PURE;
  211. STDMETHOD(GetIDsOfNames)(
  212. THIS_
  213. REFIID riid,
  214. OLECHAR FAR* FAR* rgszNames,
  215. UINT cNames,
  216. LCID lcid,
  217. DISPID FAR* rgdispid) PURE;
  218. STDMETHOD(Invoke)(
  219. THIS_
  220. DISPID dispidMember,
  221. REFIID riid,
  222. LCID lcid,
  223. WORD wFlags,
  224. DISPPARAMS FAR* pdispparams,
  225. VARIANT FAR* pvarResult,
  226. EXCEPINFO FAR* pexcepinfo,
  227. UINT FAR* puArgErr) PURE;
  228. /* IGenericWindow methods */
  229. STDMETHOD(get_Caption)(THIS_ BSTR FAR* pbstrCaption) PURE;
  230. STDMETHOD(get_Type)(THIS_ BSTR FAR* pbstrCaption) PURE;
  231. STDMETHOD(put_Active)(THIS_ VARIANT_BOOL bActive) PURE;
  232. STDMETHOD(get_Active)(THIS_ VARIANT_BOOL FAR* pbActive) PURE;
  233. STDMETHOD(put_Left)(THIS_ long lVal) PURE;
  234. STDMETHOD(get_Left)(THIS_ long FAR* plVal) PURE;
  235. STDMETHOD(put_Top)(THIS_ long lVal) PURE;
  236. STDMETHOD(get_Top)(THIS_ long FAR* plVal) PURE;
  237. STDMETHOD(put_Height)(THIS_ long lVal) PURE;
  238. STDMETHOD(get_Height)(THIS_ long FAR* plVal) PURE;
  239. STDMETHOD(put_Width)(THIS_ long lVal) PURE;
  240. STDMETHOD(get_Width)(THIS_ long FAR* plVal) PURE;
  241. STDMETHOD(get_Index)(THIS_ long FAR* plVal) PURE;
  242. STDMETHOD(get_Next)(THIS_ IDispatch * FAR* ppDispatch) PURE;
  243. STDMETHOD(get_Previous)(THIS_ IDispatch * FAR* ppDispatch) PURE;
  244. STDMETHOD(put_WindowState)(THIS_ DsWindowState lVal) PURE;
  245. STDMETHOD(get_WindowState)(THIS_ DsWindowState FAR* plVal) PURE;
  246. STDMETHOD(get_Application)(THIS_ IDispatch * FAR* ppDispatch) PURE;
  247. STDMETHOD(get_Parent)(THIS_ IDispatch * FAR* ppDispatch) PURE;
  248. STDMETHOD(Close)(THIS_ VARIANT boolSaveChanges, DsSaveStatus FAR* pSaved) PURE;
  249. STDMETHOD(Reserved1)(THIS) PURE;
  250. STDMETHOD(Reserved2)(THIS) PURE;
  251. STDMETHOD(Reserved3)(THIS) PURE;
  252. STDMETHOD(Reserved4)(THIS) PURE;
  253. STDMETHOD(Reserved5)(THIS) PURE;
  254. STDMETHOD(Reserved6)(THIS) PURE;
  255. STDMETHOD(Reserved7)(THIS) PURE;
  256. STDMETHOD(Reserved8)(THIS) PURE;
  257. STDMETHOD(Reserved9)(THIS) PURE;
  258. STDMETHOD(Reserved10)(THIS) PURE;
  259. #endif
  260. /* ITextWindow methods */
  261. STDMETHOD(get_Selection)(THIS_ IDispatch * FAR* ppDispatch) PURE;
  262. };
  263. /////////////////////////////////////////////////////////////////////////////
  264. // TextEditor object
  265. // ITextEditor interface
  266. #undef INTERFACE
  267. #define INTERFACE ITextEditor
  268. DECLARE_INTERFACE_(ITextEditor, IDispatch)
  269. {
  270. BEGIN_INTERFACE
  271. #ifndef NO_BASEINTERFACE_FUNCS
  272. /* IUnknown methods */
  273. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  274. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  275. STDMETHOD_(ULONG, Release)(THIS) PURE;
  276. /* IDispatch methods */
  277. STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;
  278. STDMETHOD(GetTypeInfo)(
  279. THIS_
  280. UINT itinfo,
  281. LCID lcid,
  282. ITypeInfo FAR* FAR* pptinfo) PURE;
  283. STDMETHOD(GetIDsOfNames)(
  284. THIS_
  285. REFIID riid,
  286. OLECHAR FAR* FAR* rgszNames,
  287. UINT cNames,
  288. LCID lcid,
  289. DISPID FAR* rgdispid) PURE;
  290. STDMETHOD(Invoke)(
  291. THIS_
  292. DISPID dispidMember,
  293. REFIID riid,
  294. LCID lcid,
  295. WORD wFlags,
  296. DISPPARAMS FAR* pdispparams,
  297. VARIANT FAR* pvarResult,
  298. EXCEPINFO FAR* pexcepinfo,
  299. UINT FAR* puArgErr) PURE;
  300. #endif
  301. /* ITextEditor methods */
  302. STDMETHOD(put_VisibleWhitespace)(THIS_ VARIANT_BOOL bVisible) PURE;
  303. STDMETHOD(get_VisibleWhitespace)(THIS_ VARIANT_BOOL FAR* pbVisible) PURE;
  304. STDMETHOD(put_Emulation)(THIS_ long lEmulation) PURE;
  305. STDMETHOD(get_Emulation)(THIS_ long FAR* plEmulation) PURE;
  306. STDMETHOD(get_Application)(THIS_ IDispatch * FAR* ppDispatch) PURE;
  307. STDMETHOD(get_Parent)(THIS_ IDispatch * FAR* ppDispatch) PURE;
  308. STDMETHOD(put_Overtype)(THIS_ VARIANT_BOOL bOvertype) PURE;
  309. STDMETHOD(get_Overtype)(THIS_ VARIANT_BOOL FAR* pbOvertype) PURE;
  310. };
  311. #endif //__TEXTAUTO_H__