oleidl.idl 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955
  1. /*
  2. * Copyright (C) 1999 Paul Quinn
  3. * Copyright (C) 1999 Francis Beaudet
  4. * Copyright (C) 2003 Alexandre Julliard
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. import "objidl.idl";
  21. /*****************************************************************************
  22. * IOleTypes interface
  23. */
  24. [
  25. uuid(b0916c84-7416-101a-bcea-08002b2b79ef)
  26. ]
  27. interface IOLETypes
  28. {
  29. typedef enum tagOLERENDER
  30. {
  31. OLERENDER_NONE = 0,
  32. OLERENDER_DRAW = 1,
  33. OLERENDER_FORMAT = 2,
  34. OLERENDER_ASIS = 3
  35. } OLERENDER, *LPOLERENDER;
  36. typedef struct tagOBJECTDESCRIPTOR
  37. {
  38. ULONG cbSize;
  39. CLSID clsid;
  40. DWORD dwDrawAspect;
  41. SIZEL sizel;
  42. POINTL pointl;
  43. DWORD dwStatus;
  44. DWORD dwFullUserTypeName;
  45. DWORD dwSrcOfCopy;
  46. } OBJECTDESCRIPTOR, *POBJECTDESCRIPTOR, *LPOBJECTDESCRIPTOR,
  47. LINKSRCDESCRIPTOR, *PLINKSRCDESCRIPTOR, *LPLINKSRCDESCRIPTOR;
  48. }
  49. /*****************************************************************************
  50. * IOleWindow interface
  51. */
  52. [
  53. object,
  54. uuid(00000114-0000-0000-c000-000000000046),
  55. pointer_default(unique)
  56. ]
  57. interface IOleWindow : IUnknown
  58. {
  59. typedef [unique] IOleWindow *LPOLEWINDOW;
  60. HRESULT GetWindow(
  61. [out] HWND *phwnd);
  62. HRESULT ContextSensitiveHelp(
  63. [in] BOOL fEnterMode);
  64. }
  65. /*****************************************************************************
  66. * IOleInPlaceObject interface
  67. */
  68. [
  69. object,
  70. uuid(00000113-0000-0000-c000-000000000046),
  71. pointer_default(unique)
  72. ]
  73. interface IOleInPlaceObject : IOleWindow
  74. {
  75. typedef [unique] IOleInPlaceObject *LPOLEINPLACEOBJECT;
  76. HRESULT InPlaceDeactivate();
  77. HRESULT UIDeactivate();
  78. HRESULT SetObjectRects(
  79. [in] LPCRECT lprcPosRect,
  80. [in] LPCRECT lprcClipRect);
  81. HRESULT ReactivateAndUndo();
  82. }
  83. /* avoid conflict with Wine Unicode macros */
  84. cpp_quote("#ifdef __WINESRC__")
  85. cpp_quote("#undef TranslateAccelerator")
  86. cpp_quote("#endif")
  87. /*****************************************************************************
  88. * IOleInPlaceActiveObject interface
  89. */
  90. interface IOleInPlaceUIWindow; /* forward declaration */
  91. [
  92. object,
  93. uuid(00000117-0000-0000-c000-000000000046)
  94. ]
  95. interface IOleInPlaceActiveObject : IOleWindow
  96. {
  97. typedef [unique] IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;
  98. [local]
  99. HRESULT TranslateAccelerator(
  100. [in] LPMSG lpmsg);
  101. [call_as(TranslateAccelerator)]
  102. HRESULT RemoteTranslateAccelerator();
  103. HRESULT OnFrameWindowActivate(
  104. [in] BOOL fActivate);
  105. HRESULT OnDocWindowActivate(
  106. [in] BOOL fActivate);
  107. [local]
  108. HRESULT ResizeBorder(
  109. [in] LPCRECT prcBorder,
  110. [in, unique] IOleInPlaceUIWindow *pUIWindow,
  111. [in] BOOL fFrameWindow);
  112. [call_as(ResizeBorder)]
  113. HRESULT RemoteResizeBorder(
  114. [in] LPCRECT prcBorder,
  115. [in] REFIID riid,
  116. [in, unique, iid_is(riid)] IOleInPlaceUIWindow *pUIWindow,
  117. [in] BOOL fFrameWindow);
  118. HRESULT EnableModeless(
  119. [in] BOOL fEnable);
  120. }
  121. /*****************************************************************************
  122. * IOleInPlaceUIWindow interface
  123. */
  124. [
  125. object,
  126. uuid(00000115-0000-0000-c000-000000000046),
  127. pointer_default(unique)
  128. ]
  129. interface IOleInPlaceUIWindow : IOleWindow
  130. {
  131. typedef [unique] IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;
  132. typedef RECT BORDERWIDTHS;
  133. typedef LPRECT LPBORDERWIDTHS;
  134. typedef LPCRECT LPCBORDERWIDTHS;
  135. HRESULT GetBorder(
  136. [out] LPRECT lprectBorder);
  137. HRESULT RequestBorderSpace(
  138. [in, unique] LPCBORDERWIDTHS pborderwidths);
  139. HRESULT SetBorderSpace(
  140. [in, unique] LPCBORDERWIDTHS pborderwidths);
  141. HRESULT SetActiveObject(
  142. [in, unique] IOleInPlaceActiveObject *pActiveObject,
  143. [in, string, unique] LPCOLESTR pszObjName);
  144. }
  145. /*****************************************************************************
  146. * IOleInPlaceFrame interface
  147. */
  148. [
  149. object,
  150. uuid(00000116-0000-0000-c000-000000000046),
  151. pointer_default(unique)
  152. ]
  153. interface IOleInPlaceFrame : IOleInPlaceUIWindow
  154. {
  155. typedef [unique] IOleInPlaceFrame *LPOLEINPLACEFRAME;
  156. typedef struct tagOleInPlaceFrameInfo
  157. {
  158. UINT cb;
  159. BOOL fMDIApp;
  160. HWND hwndFrame;
  161. HACCEL haccel;
  162. UINT cAccelEntries;
  163. } OLEINPLACEFRAMEINFO, *LPOLEINPLACEFRAMEINFO;
  164. typedef struct tagOleMenuGroupWidths
  165. {
  166. LONG width[ 6 ];
  167. } OLEMENUGROUPWIDTHS, *LPOLEMENUGROUPWIDTHS;
  168. typedef HGLOBAL HOLEMENU;
  169. HRESULT InsertMenus(
  170. [in] HMENU hmenuShared,
  171. [in,out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
  172. HRESULT SetMenu(
  173. [in] HMENU hmenuShared,
  174. [in] HOLEMENU holemenu,
  175. [in] HWND hwndActiveObject);
  176. HRESULT RemoveMenus(
  177. [in] HMENU hmenuShared);
  178. HRESULT SetStatusText(
  179. [in, unique] LPCOLESTR pszStatusText);
  180. HRESULT EnableModeless(
  181. [in] BOOL fEnable);
  182. HRESULT TranslateAccelerator(
  183. [in] LPMSG lpmsg,
  184. [in] WORD wID);
  185. }
  186. /*****************************************************************************
  187. * IOleInPlaceSite interface
  188. */
  189. [
  190. object,
  191. uuid(00000119-0000-0000-c000-000000000046),
  192. pointer_default(unique)
  193. ]
  194. interface IOleInPlaceSite : IOleWindow
  195. {
  196. typedef [unique] IOleInPlaceSite *LPOLEINPLACESITE;
  197. HRESULT CanInPlaceActivate();
  198. HRESULT OnInPlaceActivate();
  199. HRESULT OnUIActivate();
  200. HRESULT GetWindowContext(
  201. [out] IOleInPlaceFrame **ppFrame,
  202. [out] IOleInPlaceUIWindow **ppDoc,
  203. [out] LPRECT lprcPosRect,
  204. [out] LPRECT lprcClipRect,
  205. [in, out] LPOLEINPLACEFRAMEINFO lpFrameInfo);
  206. HRESULT Scroll(
  207. [in] SIZE scrollExtant);
  208. HRESULT OnUIDeactivate(
  209. [in] BOOL fUndoable);
  210. HRESULT OnInPlaceDeactivate();
  211. HRESULT DiscardUndoState();
  212. HRESULT DeactivateAndUndo();
  213. HRESULT OnPosRectChange(
  214. [in] LPCRECT lprcPosRect);
  215. }
  216. /*****************************************************************************
  217. * IParseDisplayName interface
  218. */
  219. [
  220. object,
  221. uuid(0000011a-0000-0000-c000-000000000046),
  222. pointer_default(unique)
  223. ]
  224. interface IParseDisplayName : IUnknown
  225. {
  226. typedef [unique] IParseDisplayName *LPPARSEDISPLAYNAME;
  227. HRESULT ParseDisplayName(
  228. [in, unique] IBindCtx *pbc,
  229. [in] LPOLESTR pszDisplayName,
  230. [out] ULONG *pchEaten,
  231. [out] IMoniker **ppmkOut);
  232. }
  233. /*****************************************************************************
  234. * IOleContainer interface
  235. */
  236. [
  237. object,
  238. uuid(0000011b-0000-0000-c000-000000000046),
  239. pointer_default(unique)
  240. ]
  241. interface IOleContainer : IParseDisplayName
  242. {
  243. typedef [unique] IOleContainer *LPOLECONTAINER;
  244. HRESULT EnumObjects(
  245. [in] DWORD grfFlags,
  246. [out] IEnumUnknown **ppenum);
  247. HRESULT LockContainer(
  248. [in] BOOL fLock);
  249. }
  250. /*****************************************************************************
  251. * IOleItemContainer interface
  252. */
  253. [
  254. object,
  255. uuid(0000011c-0000-0000-c000-000000000046),
  256. pointer_default(unique)
  257. ]
  258. interface IOleItemContainer : IOleContainer
  259. {
  260. typedef [unique] IOleItemContainer *LPOLEITEMCONTAINER;
  261. typedef enum tagBINDSPEED
  262. {
  263. BINDSPEED_INDEFINITE = 1,
  264. BINDSPEED_MODERATE = 2,
  265. BINDSPEED_IMMEDIATE = 3
  266. } BINDSPEED;
  267. typedef enum tagOLECONTF
  268. {
  269. OLECONTF_EMBEDDINGS = 1,
  270. OLECONTF_LINKS = 2,
  271. OLECONTF_OTHERS = 4,
  272. OLECONTF_OLNYUSER = 8,
  273. OLECONTF_ONLYIFRUNNING = 16
  274. } OLECONTF;
  275. cpp_quote("#ifdef __WINESRC__")
  276. cpp_quote("#undef GetObject")
  277. cpp_quote("#endif")
  278. HRESULT GetObject(
  279. [in] LPOLESTR pszItem,
  280. [in] DWORD dwSpeedNeeded,
  281. [in, unique] IBindCtx *pbc,
  282. [in] REFIID riid,
  283. [out, iid_is(riid)] void **ppvObject);
  284. HRESULT GetObjectStorage(
  285. [in] LPOLESTR pszItem,
  286. [in, unique] IBindCtx *pbc,
  287. [in] REFIID riid,
  288. [out, iid_is(riid)] void **ppvStorage);
  289. HRESULT IsRunning(
  290. [in] LPOLESTR pszItem);
  291. }
  292. /*****************************************************************************
  293. * IOleLink interface
  294. */
  295. [
  296. object,
  297. uuid(0000011d-0000-0000-c000-000000000046)
  298. ]
  299. interface IOleLink : IUnknown
  300. {
  301. typedef [unique] IOleLink *LPOLELINK;
  302. typedef enum tagOLEUPDATE
  303. {
  304. OLEUPDATE_ALWAYS = 1,
  305. OLEUPDATE_ONCALL = 3
  306. } OLEUPDATE, *POLEUPDATE, *LPOLEUPDATE;
  307. typedef enum tagOLELINKBIND
  308. {
  309. OLELINKBIND_EVENIFCLASSDIFF = 1
  310. } OLELINKBIND;
  311. HRESULT SetUpdateOptions(
  312. [in] DWORD dwUpdateOpt);
  313. HRESULT GetUpdateOptions(
  314. [out] DWORD *pdwUpdateOpt);
  315. HRESULT SetSourceMoniker(
  316. [in, unique] IMoniker *pmk,
  317. [in] REFCLSID rclsid);
  318. HRESULT GetSourceMoniker(
  319. [out] IMoniker **ppmk);
  320. HRESULT SetSourceDisplayName(
  321. [in]LPCOLESTR pszStatusText);
  322. HRESULT GetSourceDisplayName(
  323. [out] LPOLESTR *ppszDisplayName);
  324. HRESULT BindToSource(
  325. [in] DWORD bindflags,
  326. [in, unique] IBindCtx *pbc);
  327. HRESULT BindIfRunning();
  328. HRESULT GetBoundSource(
  329. [out] IUnknown **ppunk);
  330. HRESULT UnbindSource();
  331. HRESULT Update(
  332. [in, unique] IBindCtx *pbc);
  333. }
  334. /*****************************************************************************
  335. * IOleClientSite interface
  336. */
  337. [
  338. object,
  339. uuid(00000118-0000-0000-c000-000000000046),
  340. pointer_default(unique)
  341. ]
  342. interface IOleClientSite : IUnknown
  343. {
  344. typedef [unique] IOleClientSite * LPOLECLIENTSITE;
  345. HRESULT SaveObject();
  346. HRESULT GetMoniker(
  347. [in] DWORD dwAssign,
  348. [in] DWORD dwWhichMoniker,
  349. [out] IMoniker **ppmk);
  350. HRESULT GetContainer(
  351. [out] IOleContainer **ppContainer);
  352. HRESULT ShowObject();
  353. HRESULT OnShowWindow(
  354. [in] BOOL fShow);
  355. HRESULT RequestNewObjectLayout();
  356. }
  357. /*****************************************************************************
  358. * IOleCache interface
  359. */
  360. [
  361. object,
  362. uuid(0000011e-0000-0000-c000-000000000046),
  363. pointer_default(unique)
  364. ]
  365. interface IOleCache : IUnknown
  366. {
  367. typedef [unique] IOleCache *LPOLECACHE;
  368. HRESULT Cache(
  369. [in, unique] FORMATETC *pformatetc,
  370. [in] DWORD advf,
  371. [out] DWORD *pdwConnection);
  372. HRESULT Uncache(
  373. [in] DWORD dwConnection);
  374. HRESULT EnumCache(
  375. [out] IEnumSTATDATA **ppenumSTATDATA);
  376. HRESULT InitCache(
  377. [in, unique] IDataObject *pDataObject);
  378. HRESULT SetData(
  379. [in, unique] FORMATETC *pformatetc,
  380. [in, unique] STGMEDIUM *pmedium,
  381. [in] BOOL fRelease);
  382. }
  383. /*****************************************************************************
  384. * IOleCache2 interface
  385. */
  386. [
  387. object,
  388. uuid(00000128-0000-0000-c000-000000000046),
  389. pointer_default(unique)
  390. ]
  391. interface IOleCache2 : IOleCache
  392. {
  393. typedef [unique] IOleCache2 *LPOLECACHE2;
  394. const DWORD UPDFCACHE_NODATACACHE = 0x00000001;
  395. const DWORD UPDFCACHE_ONSAVECACHE = 0x00000002;
  396. const DWORD UPDFCACHE_ONSTOPCACHE = 0x00000004;
  397. const DWORD UPDFCACHE_NORMALCACHE = 0x00000008;
  398. const DWORD UPDFCACHE_IFBLANK = 0x00000010;
  399. const DWORD UPDFCACHE_ONLYIFBLANK = 0x80000000;
  400. const DWORD UPDFCACHE_IFBLANKORONSAVECACHE = (UPDFCACHE_IFBLANK | UPDFCACHE_ONSAVECACHE);
  401. const DWORD UPDFCACHE_ALL = ((DWORD)(~(UPDFCACHE_ONLYIFBLANK)));
  402. const DWORD UPDFCACHE_ALLBUTNODATACACHE = (UPDFCACHE_ALL & ((DWORD)(~UPDFCACHE_NODATACACHE)));
  403. typedef enum tagDISCARDCACHE
  404. {
  405. DISCARDCACHE_SAVEIFDIRTY = 0,
  406. DISCARDCACHE_NOSAVE = 1
  407. } DISCARDCACHE;
  408. [local]
  409. HRESULT UpdateCache(
  410. [in] LPDATAOBJECT pDataObject,
  411. [in] DWORD grfUpdf,
  412. [in] LPVOID pReserved);
  413. [call_as(UpdateCache)]
  414. HRESULT RemoteUpdateCache(
  415. [in] LPDATAOBJECT pDataObject,
  416. [in] DWORD grfUpdf,
  417. [in] LONG_PTR pReserved);
  418. HRESULT DiscardCache(
  419. [in] DWORD dwDiscardOptions);
  420. }
  421. /*****************************************************************************
  422. * IOleCacheControl interface
  423. */
  424. [
  425. object,
  426. uuid(00000129-0000-0000-c000-000000000046)
  427. ]
  428. interface IOleCacheControl : IUnknown
  429. {
  430. typedef [unique] IOleCacheControl *LPOLECACHECONTROL;
  431. HRESULT OnRun(
  432. LPDATAOBJECT pDataObject);
  433. HRESULT OnStop();
  434. }
  435. /*****************************************************************************
  436. * IEnumOLEVERB interface
  437. */
  438. [
  439. object,
  440. uuid(00000104-0000-0000-c000-000000000046),
  441. pointer_default(unique)
  442. ]
  443. interface IEnumOLEVERB : IUnknown
  444. {
  445. typedef [unique] IEnumOLEVERB *LPENUMOLEVERB;
  446. typedef struct tagOLEVERB
  447. {
  448. LONG lVerb;
  449. LPOLESTR lpszVerbName;
  450. DWORD fuFlags;
  451. DWORD grfAttribs;
  452. } OLEVERB, *LPOLEVERB;
  453. typedef enum tagOLEVERBATTRIB
  454. {
  455. OLEVERBATTRIB_NEVERDIRTIES = 1,
  456. OLEVERBATTRIB_ONCONTAINERMENU = 2
  457. } OLEVERBATTRIB;
  458. [local]
  459. HRESULT Next(
  460. [in] ULONG celt,
  461. [out, size_is(celt), length_is(*pceltFetched)] LPOLEVERB rgelt,
  462. [out] ULONG *pceltFetched);
  463. [call_as(Next)]
  464. HRESULT RemoteNext(
  465. [in] ULONG celt,
  466. [out, size_is(celt), length_is(*pceltFetched)] LPOLEVERB rgelt,
  467. [out] ULONG *pceltFetched);
  468. HRESULT Skip(
  469. [in] ULONG celt);
  470. HRESULT Reset();
  471. HRESULT Clone(
  472. [out] IEnumOLEVERB **ppenum);
  473. }
  474. /*****************************************************************************
  475. * IOleObject interface
  476. */
  477. [
  478. object,
  479. uuid(00000112-0000-0000-c000-000000000046),
  480. pointer_default(unique)
  481. ]
  482. interface IOleObject : IUnknown
  483. {
  484. typedef [unique] IOleObject *LPOLEOBJECT;
  485. typedef enum tagOLEGETMONIKER
  486. {
  487. OLEGETMONIKER_ONLYIFTHERE = 1,
  488. OLEGETMONIKER_FORCEASSIGN = 2,
  489. OLEGETMONIKER_UNASSIGN = 3,
  490. OLEGETMONIKER_TEMPFORUSER = 4
  491. } OLEGETMONIKER;
  492. typedef enum tagOLEWHICHMK
  493. {
  494. OLEWHICHMK_CONTAINER = 1,
  495. OLEWHICHMK_OBJREL = 2,
  496. OLEWHICHMK_OBJFULL = 3
  497. } OLEWHICHMK;
  498. typedef enum tagUSERCLASSTYPE
  499. {
  500. USERCLASSTYPE_FULL = 1,
  501. USERCLASSTYPE_SHORT = 2,
  502. USERCLASSTYPE_APPNAME = 3
  503. } USERCLASSTYPE;
  504. typedef enum tagOLEMISC
  505. {
  506. OLEMISC_RECOMPOSEONRESIZE = 0x1,
  507. OLEMISC_ONLYICONIC = 0x2,
  508. OLEMISC_INSERTNOTREPLACE = 0x4,
  509. OLEMISC_STATIC = 0x8,
  510. OLEMISC_CANTLINKINSIDE = 0x10,
  511. OLEMISC_CANLINKBYOLE1 = 0x20,
  512. OLEMISC_ISLINKOBJECT = 0x40,
  513. OLEMISC_INSIDEOUT = 0x80,
  514. OLEMISC_ACTIVATEWHENVISIBLE = 0x100,
  515. OLEMISC_RENDERINGISDEVICEINDEPENDENT = 0x200,
  516. OLEMISC_INVISIBLEATRUNTIME = 0x400,
  517. OLEMISC_ALWAYSRUN = 0x800,
  518. OLEMISC_ACTSLIKEBUTTON = 0x1000,
  519. OLEMISC_ACTSLIKELABEL = 0x2000,
  520. OLEMISC_NOUIACTIVATE = 0x4000,
  521. OLEMISC_ALIGNABLE = 0x8000,
  522. OLEMISC_SIMPLEFRAME = 0x10000,
  523. OLEMISC_SETCLIENTSITEFIRST = 0x20000,
  524. OLEMISC_IMEMODE = 0x40000,
  525. OLEMISC_IGNOREACTIVATEWHENVISIBLE = 0x80000,
  526. OLEMISC_WANTSTOMENUMERGE = 0x100000,
  527. OLEMISC_SUPPORTSMULTILEVELUNDO = 0x200000
  528. } OLEMISC;
  529. typedef enum tagOLECLOSE
  530. {
  531. OLECLOSE_SAVEIFDIRTY = 0,
  532. OLECLOSE_NOSAVE = 1,
  533. OLECLOSE_PROMPTSAVE = 2
  534. } OLECLOSE;
  535. HRESULT SetClientSite(
  536. [in, unique] IOleClientSite *pClientSite);
  537. HRESULT GetClientSite(
  538. [out] IOleClientSite **ppClientSite);
  539. HRESULT SetHostNames(
  540. [in] LPCOLESTR szContainerApp,
  541. [in, unique] LPCOLESTR szContainerObj);
  542. HRESULT Close(
  543. [in] DWORD dwSaveOption);
  544. HRESULT SetMoniker(
  545. [in] DWORD dwWhichMoniker,
  546. [in, unique] IMoniker *pmk);
  547. HRESULT GetMoniker(
  548. [in] DWORD dwAssign,
  549. [in] DWORD dwWhichMoniker,
  550. [out] IMoniker **ppmk);
  551. HRESULT InitFromData(
  552. [in, unique] IDataObject *pDataObject,
  553. [in] BOOL fCreation,
  554. [in] DWORD dwReserved);
  555. HRESULT GetClipboardData(
  556. [in] DWORD dwReserved,
  557. [out] IDataObject **ppDataObject);
  558. HRESULT DoVerb(
  559. [in] LONG iVerb,
  560. [in, unique] LPMSG lpmsg,
  561. [in, unique] IOleClientSite *pActiveSite,
  562. [in] LONG lindex,
  563. [in] HWND hwndParent,
  564. [in, unique] LPCRECT lprcPosRect);
  565. HRESULT EnumVerbs(
  566. [out] IEnumOLEVERB **ppEnumOleVerb);
  567. HRESULT Update();
  568. HRESULT IsUpToDate();
  569. HRESULT GetUserClassID(
  570. [out] CLSID *pClsid);
  571. HRESULT GetUserType(
  572. [in] DWORD dwFormOfType,
  573. [out] LPOLESTR *pszUserType);
  574. HRESULT SetExtent(
  575. [in] DWORD dwDrawAspect,
  576. [in] SIZEL *psizel);
  577. HRESULT GetExtent(
  578. [in] DWORD dwDrawAspect,
  579. [out] SIZEL *psizel);
  580. HRESULT Advise(
  581. [in, unique] IAdviseSink *pAdvSink,
  582. [out] DWORD *pdwConnection);
  583. HRESULT Unadvise(
  584. [in] DWORD dwConnection);
  585. HRESULT EnumAdvise(
  586. [out] IEnumSTATDATA **ppenumAdvise);
  587. HRESULT GetMiscStatus(
  588. [in] DWORD dwAspect,
  589. [out] DWORD *pdwStatus);
  590. HRESULT SetColorScheme(
  591. [in] LOGPALETTE *pLogpal);
  592. }
  593. /*****************************************************************************
  594. * IOleAdviseHolder interface
  595. */
  596. [
  597. local,
  598. object,
  599. uuid(00000111-0000-0000-c000-000000000046)
  600. ]
  601. interface IOleAdviseHolder : IUnknown
  602. {
  603. typedef [unique] IOleAdviseHolder * LPOLEADVISEHOLDER;
  604. HRESULT Advise(
  605. [in, unique] IAdviseSink *pAdvise,
  606. [out] DWORD *pdwConnection);
  607. HRESULT Unadvise(
  608. [in] DWORD dwConnection);
  609. HRESULT EnumAdvise(
  610. [out] IEnumSTATDATA **ppenumAdvise);
  611. HRESULT SendOnRename(
  612. [in, unique] IMoniker *pmk);
  613. HRESULT SendOnSave();
  614. HRESULT SendOnClose();
  615. }
  616. /*****************************************************************************
  617. * IContinue interface
  618. */
  619. [
  620. object,
  621. uuid(0000012a-0000-0000-c000-000000000046)
  622. ]
  623. interface IContinue : IUnknown
  624. {
  625. HRESULT FContinue();
  626. }
  627. /*****************************************************************************
  628. * IViewObject interface
  629. */
  630. [
  631. object,
  632. uuid(0000010d-0000-0000-c000-000000000046)
  633. ]
  634. interface IViewObject : IUnknown
  635. {
  636. typedef [unique] IViewObject *LPVIEWOBJECT;
  637. [local]
  638. HRESULT Draw(
  639. [in] DWORD dwDrawAspect,
  640. [in] LONG lindex,
  641. [in, unique] void * pvAspect,
  642. [in, unique] DVTARGETDEVICE *ptd,
  643. [in] HDC hdcTargetDev,
  644. [in] HDC hdcDraw,
  645. [in] LPCRECTL lprcBounds,
  646. [in, unique] LPCRECTL lprcWBounds,
  647. [in] BOOL (*pfnContinue)(ULONG_PTR dwContinue),
  648. [in] ULONG_PTR dwContinue);
  649. [call_as(Draw)]
  650. HRESULT RemoteDraw(
  651. [in] DWORD dwDrawAspect,
  652. [in] LONG lindex,
  653. [in] ULONG_PTR pvAspect,
  654. [in, unique] DVTARGETDEVICE *ptd,
  655. [in] ULONG_PTR hdcTargetDev,
  656. [in] ULONG_PTR hdcDraw,
  657. [in] LPCRECTL lprcBounds,
  658. [in, unique] LPCRECTL lprcWBounds,
  659. [in] IContinue *pContinue);
  660. [local]
  661. HRESULT GetColorSet(
  662. [in] DWORD dwDrawAspect,
  663. [in] LONG lindex,
  664. [in, unique] void *pvAspect,
  665. [in, unique] DVTARGETDEVICE *ptd,
  666. [in] HDC hicTargetDev,
  667. [out] LOGPALETTE **ppColorSet);
  668. [call_as(GetColorSet)]
  669. HRESULT RemoteGetColorSet(
  670. [in] DWORD dwDrawAspect,
  671. [in] LONG lindex,
  672. [in] ULONG_PTR pvAspect,
  673. [in, unique] DVTARGETDEVICE *ptd,
  674. [in] ULONG_PTR hicTargetDev,
  675. [out] LOGPALETTE **ppColorSet);
  676. [local]
  677. HRESULT Freeze(
  678. [in] DWORD dwDrawAspect,
  679. [in] LONG lindex,
  680. [in, unique] void *pvAspect,
  681. [out] DWORD *pdwFreeze);
  682. [call_as(Freeze)]
  683. HRESULT RemoteFreeze(
  684. [in] DWORD dwDrawAspect,
  685. [in] LONG lindex,
  686. [in] ULONG_PTR pvAspect,
  687. [out] DWORD *pdwFreeze);
  688. HRESULT Unfreeze(
  689. [in] DWORD dwFreeze);
  690. HRESULT SetAdvise(
  691. [in] DWORD aspects,
  692. [in] DWORD advf,
  693. [in, unique] IAdviseSink *pAdvSink);
  694. [local]
  695. HRESULT GetAdvise(
  696. [out, unique] DWORD *pAspects,
  697. [out, unique] DWORD *pAdvf,
  698. [out] IAdviseSink **ppAdvSink);
  699. [call_as(GetAdvise)]
  700. HRESULT RemoteGetAdvise(
  701. [out] DWORD *pAspects,
  702. [out] DWORD *pAdvf,
  703. [out] IAdviseSink **ppAdvSink);
  704. }
  705. /*****************************************************************************
  706. * IViewObject2 interface
  707. */
  708. [
  709. object,
  710. uuid(00000127-0000-0000-c000-000000000046)
  711. ]
  712. interface IViewObject2 : IViewObject
  713. {
  714. typedef [unique] IViewObject2 *LPVIEWOBJECT2;
  715. HRESULT GetExtent(
  716. [in] DWORD dwDrawAspect,
  717. [in] LONG lindex,
  718. [in, unique] DVTARGETDEVICE* ptd,
  719. [out] LPSIZEL lpsizel);
  720. }
  721. /*****************************************************************************
  722. * IDropSource interface
  723. */
  724. [
  725. local,
  726. object,
  727. uuid(00000121-0000-0000-c000-000000000046)
  728. ]
  729. interface IDropSource : IUnknown
  730. {
  731. typedef [unique] IDropSource *LPDROPSOURCE;
  732. HRESULT QueryContinueDrag(
  733. [in] BOOL fEscapePressed,
  734. [in] DWORD grfKeyState);
  735. HRESULT GiveFeedback(
  736. [in] DWORD dwEffect);
  737. }
  738. /*****************************************************************************
  739. * IDropTarget interface
  740. */
  741. [
  742. object,
  743. uuid(00000122-0000-0000-c000-000000000046),
  744. pointer_default(unique)
  745. ]
  746. interface IDropTarget : IUnknown
  747. {
  748. typedef [unique] IDropTarget *LPDROPTARGET;
  749. const DWORD MK_ALT = 0x20;
  750. const DWORD DROPEFFECT_NONE = 0;
  751. const DWORD DROPEFFECT_COPY = 1;
  752. const DWORD DROPEFFECT_MOVE = 2;
  753. const DWORD DROPEFFECT_LINK = 4;
  754. const DWORD DROPEFFECT_SCROLL = 0x80000000;
  755. const DWORD DD_DEFSCROLLINSET = 11;
  756. const DWORD DD_DEFSCROLLDELAY = 50;
  757. const DWORD DD_DEFSCROLLINTERVAL = 50;
  758. const DWORD DD_DEFDRAGDELAY = 200;
  759. const DWORD DD_DEFDRAGMINDIST = 2;
  760. HRESULT DragEnter(
  761. [in, unique] IDataObject *pDataObj,
  762. [in] DWORD grfKeyState,
  763. [in] POINTL pt,
  764. [in, out] DWORD *pdwEffect);
  765. HRESULT DragOver(
  766. [in] DWORD grfKeyState,
  767. [in] POINTL pt,
  768. [in, out] DWORD *pdwEffect);
  769. HRESULT DragLeave();
  770. HRESULT Drop(
  771. [in, unique] IDataObject *pDataObj,
  772. [in] DWORD grfKeyState,
  773. [in] POINTL pt,
  774. [in, out] DWORD *pdwEffect);
  775. }