2 * Copyright (C) 1999 Paul Quinn
3 * Copyright (C) 1999 Francis Beaudet
4 * Copyright (C) 2003 Alexandre Julliard
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.
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.
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
23 interface IOleInPlaceActiveObject;
25 /*****************************************************************************
29 uuid(b0916c84-7416-101a-bcea-08002b2b79ef)
33 typedef enum tagOLERENDER
39 } OLERENDER, *LPOLERENDER;
41 typedef struct tagOBJECTDESCRIPTOR
49 DWORD dwFullUserTypeName;
51 } OBJECTDESCRIPTOR, *POBJECTDESCRIPTOR, *LPOBJECTDESCRIPTOR,
52 LINKSRCDESCRIPTOR, *PLINKSRCDESCRIPTOR, *LPLINKSRCDESCRIPTOR;
56 /*****************************************************************************
57 * IOleWindow interface
61 uuid(00000114-0000-0000-c000-000000000046),
62 pointer_default(unique)
64 interface IOleWindow : IUnknown
66 typedef [unique] IOleWindow *LPOLEWINDOW;
71 HRESULT ContextSensitiveHelp(
72 [in] BOOL fEnterMode);
76 /*****************************************************************************
77 * IOleInPlaceObject interface
81 uuid(00000113-0000-0000-c000-000000000046),
82 pointer_default(unique)
84 interface IOleInPlaceObject : IOleWindow
86 typedef [unique] IOleInPlaceObject *LPOLEINPLACEOBJECT;
88 HRESULT InPlaceDeactivate();
90 HRESULT UIDeactivate();
92 HRESULT SetObjectRects(
93 [in] LPCRECT lprcPosRect,
94 [in] LPCRECT lprcClipRect);
96 HRESULT ReactivateAndUndo();
100 /*****************************************************************************
101 * IOleInPlaceUIWindow interface
105 uuid(00000115-0000-0000-c000-000000000046),
106 pointer_default(unique)
109 interface IOleInPlaceUIWindow : IOleWindow
111 typedef [unique] IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;
113 typedef RECT BORDERWIDTHS;
114 typedef LPRECT LPBORDERWIDTHS;
115 typedef LPCRECT LPCBORDERWIDTHS;
118 [out] LPRECT lprectBorder);
120 HRESULT RequestBorderSpace(
121 [in, unique] LPCBORDERWIDTHS pborderwidths);
123 HRESULT SetBorderSpace(
124 [in, unique] LPCBORDERWIDTHS pborderwidths);
126 HRESULT SetActiveObject(
127 [in, unique] IOleInPlaceActiveObject *pActiveObject,
128 [in, string, unique] LPCOLESTR pszObjName);
132 /* avoid conflict with Wine Unicode macros */
133 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
134 cpp_quote("#undef TranslateAccelerator")
137 /*****************************************************************************
138 * IOleInPlaceFrame interface
142 uuid(00000116-0000-0000-c000-000000000046),
143 pointer_default(unique)
145 interface IOleInPlaceFrame : IOleInPlaceUIWindow
147 typedef [unique] IOleInPlaceFrame *LPOLEINPLACEFRAME;
149 typedef struct tagOleInPlaceFrameInfo
156 } OLEINPLACEFRAMEINFO, *LPOLEINPLACEFRAMEINFO;
158 typedef struct tagOleMenuGroupWidths
161 } OLEMENUGROUPWIDTHS, *LPOLEMENUGROUPWIDTHS;
163 typedef HGLOBAL HOLEMENU;
166 [in] HMENU hmenuShared,
167 [in,out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
170 [in] HMENU hmenuShared,
171 [in] HOLEMENU holemenu,
172 [in] HWND hwndActiveObject);
175 [in] HMENU hmenuShared);
177 HRESULT SetStatusText(
178 [in, unique] LPCOLESTR pszStatusText);
180 HRESULT EnableModeless(
183 HRESULT TranslateAccelerator(
189 /*****************************************************************************
190 * IOleInPlaceActiveObject interface
194 uuid(00000117-0000-0000-c000-000000000046)
196 interface IOleInPlaceActiveObject : IOleWindow
198 typedef [unique] IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;
201 HRESULT TranslateAccelerator(
204 [call_as(TranslateAccelerator)]
205 HRESULT RemoteTranslateAccelerator();
207 HRESULT OnFrameWindowActivate(
208 [in] BOOL fActivate);
210 HRESULT OnDocWindowActivate(
211 [in] BOOL fActivate);
214 HRESULT ResizeBorder(
215 [in] LPCRECT prcBorder,
216 [in, unique] IOleInPlaceUIWindow *pUIWindow,
217 [in] BOOL fFrameWindow);
219 [call_as(ResizeBorder)]
220 HRESULT RemoteResizeBorder(
221 [in] LPCRECT prcBorder,
223 [in, unique, iid_is(riid)] IOleInPlaceUIWindow *pUIWindow,
224 [in] BOOL fFrameWindow);
226 HRESULT EnableModeless(
231 /*****************************************************************************
232 * IOleInPlaceSite interface
236 uuid(00000119-0000-0000-c000-000000000046),
237 pointer_default(unique)
239 interface IOleInPlaceSite : IOleWindow
241 typedef [unique] IOleInPlaceSite *LPOLEINPLACESITE;
243 HRESULT CanInPlaceActivate();
244 HRESULT OnInPlaceActivate();
245 HRESULT OnUIActivate();
247 HRESULT GetWindowContext(
248 [out] IOleInPlaceFrame **ppFrame,
249 [out] IOleInPlaceUIWindow **ppDoc,
250 [out] LPRECT lprcPosRect,
251 [out] LPRECT lprcClipRect,
252 [in, out] LPOLEINPLACEFRAMEINFO lpFrameInfo);
255 [in] SIZE scrollExtant);
257 HRESULT OnUIDeactivate(
258 [in] BOOL fUndoable);
260 HRESULT OnInPlaceDeactivate();
261 HRESULT DiscardUndoState();
262 HRESULT DeactivateAndUndo();
264 HRESULT OnPosRectChange(
265 [in] LPCRECT lprcPosRect);
269 /*****************************************************************************
270 * IParseDisplayName interface
274 uuid(0000011a-0000-0000-c000-000000000046),
275 pointer_default(unique)
277 interface IParseDisplayName : IUnknown
279 typedef [unique] IParseDisplayName *LPPARSEDISPLAYNAME;
281 HRESULT ParseDisplayName(
282 [in, unique] IBindCtx *pbc,
283 [in] LPOLESTR pszDisplayName,
284 [out] ULONG *pchEaten,
285 [out] IMoniker **ppmkOut);
289 /*****************************************************************************
290 * IOleContainer interface
294 uuid(0000011b-0000-0000-c000-000000000046),
295 pointer_default(unique)
297 interface IOleContainer : IParseDisplayName
299 typedef [unique] IOleContainer *LPOLECONTAINER;
303 [out] IEnumUnknown **ppenum);
305 HRESULT LockContainer(
310 /*****************************************************************************
311 * IOleItemContainer interface
315 uuid(0000011c-0000-0000-c000-000000000046),
316 pointer_default(unique)
318 interface IOleItemContainer : IOleContainer
320 typedef [unique] IOleItemContainer *LPOLEITEMCONTAINER;
322 typedef enum tagBINDSPEED
324 BINDSPEED_INDEFINITE = 1,
325 BINDSPEED_MODERATE = 2,
326 BINDSPEED_IMMEDIATE = 3
329 typedef enum tagOLECONTF
331 OLECONTF_EMBEDDINGS = 1,
334 OLECONTF_OLNYUSER = 8,
335 OLECONTF_ONLYIFRUNNING = 16
338 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
339 cpp_quote("#undef GetObject")
342 [in] LPOLESTR pszItem,
343 [in] DWORD dwSpeedNeeded,
344 [in, unique] IBindCtx *pbc,
346 [out, iid_is(riid)] void **ppvObject);
348 HRESULT GetObjectStorage(
349 [in] LPOLESTR pszItem,
350 [in, unique] IBindCtx *pbc,
352 [out, iid_is(riid)] void **ppvStorage);
355 [in] LPOLESTR pszItem);
359 /*****************************************************************************
364 uuid(0000011d-0000-0000-c000-000000000046)
366 interface IOleLink : IUnknown
368 typedef [unique] IOleLink *LPOLELINK;
370 typedef enum tagOLEUPDATE
372 OLEUPDATE_ALWAYS = 1,
374 } OLEUPDATE, *POLEUPDATE, *LPOLEUPDATE;
376 typedef enum tagOLELINKBIND
378 OLELINKBIND_EVENIFCLASSDIFF = 1
381 HRESULT SetUpdateOptions(
382 [in] DWORD dwUpdateOpt);
384 HRESULT GetUpdateOptions(
385 [out] DWORD *pdwUpdateOpt);
387 HRESULT SetSourceMoniker(
388 [in, unique] IMoniker *pmk,
389 [in] REFCLSID rclsid);
391 HRESULT GetSourceMoniker(
392 [out] IMoniker **ppmk);
394 HRESULT SetSourceDisplayName(
395 [in]LPCOLESTR pszStatusText);
397 HRESULT GetSourceDisplayName(
398 [out] LPOLESTR *ppszDisplayName);
400 HRESULT BindToSource(
401 [in] DWORD bindflags,
402 [in, unique] IBindCtx *pbc);
404 HRESULT BindIfRunning();
406 HRESULT GetBoundSource(
407 [out] IUnknown **ppunk);
409 HRESULT UnbindSource();
412 [in, unique] IBindCtx *pbc);
416 /*****************************************************************************
417 * IOleClientSite interface
421 uuid(00000118-0000-0000-c000-000000000046),
422 pointer_default(unique)
424 interface IOleClientSite : IUnknown
426 typedef [unique] IOleClientSite * LPOLECLIENTSITE;
428 HRESULT SaveObject();
432 [in] DWORD dwWhichMoniker,
433 [out] IMoniker **ppmk);
435 HRESULT GetContainer(
436 [out] IOleContainer **ppContainer);
438 HRESULT ShowObject();
440 HRESULT OnShowWindow(
443 HRESULT RequestNewObjectLayout();
447 /*****************************************************************************
448 * IOleCache interface
452 uuid(0000011e-0000-0000-c000-000000000046),
453 pointer_default(unique)
455 interface IOleCache : IUnknown
457 typedef [unique] IOleCache *LPOLECACHE;
460 [in, unique] FORMATETC *pformatetc,
462 [out] DWORD *pdwConnection);
465 [in] DWORD dwConnection);
468 [out] IEnumSTATDATA **ppenumSTATDATA);
471 [in, unique] IDataObject *pDataObject);
474 [in, unique] FORMATETC *pformatetc,
475 [in, unique] STGMEDIUM *pmedium,
480 /*****************************************************************************
481 * IOleCache2 interface
485 uuid(00000128-0000-0000-c000-000000000046),
486 pointer_default(unique)
488 interface IOleCache2 : IOleCache
490 typedef [unique] IOleCache2 *LPOLECACHE2;
492 const DWORD UPDFCACHE_NODATACACHE = 0x00000001;
493 const DWORD UPDFCACHE_ONSAVECACHE = 0x00000002;
494 const DWORD UPDFCACHE_ONSTOPCACHE = 0x00000004;
495 const DWORD UPDFCACHE_NORMALCACHE = 0x00000008;
496 const DWORD UPDFCACHE_IFBLANK = 0x00000010;
497 const DWORD UPDFCACHE_ONLYIFBLANK = 0x80000000;
499 const DWORD UPDFCACHE_IFBLANKORONSAVECACHE = (UPDFCACHE_IFBLANK | UPDFCACHE_ONSAVECACHE);
500 const DWORD UPDFCACHE_ALL = ((DWORD)(~(UPDFCACHE_ONLYIFBLANK)));
501 const DWORD UPDFCACHE_ALLBUTNODATACACHE = (UPDFCACHE_ALL & ((DWORD)(~UPDFCACHE_NODATACACHE)));
503 typedef enum tagDISCARDCACHE
505 DISCARDCACHE_SAVEIFDIRTY = 0,
506 DISCARDCACHE_NOSAVE = 1
511 [in] LPDATAOBJECT pDataObject,
513 [in] LPVOID pReserved);
515 [call_as(UpdateCache)]
516 HRESULT RemoteUpdateCache(
517 [in] LPDATAOBJECT pDataObject,
519 [in] LONG_PTR pReserved);
521 HRESULT DiscardCache(
522 [in] DWORD dwDiscardOptions);
526 /*****************************************************************************
527 * IOleCacheControl interface
531 uuid(00000129-0000-0000-c000-000000000046)
533 interface IOleCacheControl : IUnknown
535 typedef [unique] IOleCacheControl *LPOLECACHECONTROL;
538 LPDATAOBJECT pDataObject);
544 /*****************************************************************************
545 * IEnumOLEVERB interface
549 uuid(00000104-0000-0000-c000-000000000046),
550 pointer_default(unique)
552 interface IEnumOLEVERB : IUnknown
554 typedef [unique] IEnumOLEVERB *LPENUMOLEVERB;
556 typedef struct tagOLEVERB
559 LPOLESTR lpszVerbName;
562 } OLEVERB, *LPOLEVERB;
564 typedef enum tagOLEVERBATTRIB
566 OLEVERBATTRIB_NEVERDIRTIES = 1,
567 OLEVERBATTRIB_ONCONTAINERMENU = 2
573 [out, size_is(celt), length_is(*pceltFetched)] LPOLEVERB rgelt,
574 [out] ULONG *pceltFetched);
579 [out, size_is(celt), length_is(*pceltFetched)] LPOLEVERB rgelt,
580 [out] ULONG *pceltFetched);
588 [out] IEnumOLEVERB **ppenum);
592 /*****************************************************************************
593 * IOleObject interface
597 uuid(00000112-0000-0000-c000-000000000046),
598 pointer_default(unique)
600 interface IOleObject : IUnknown
602 typedef [unique] IOleObject *LPOLEOBJECT;
604 typedef enum tagOLEGETMONIKER
606 OLEGETMONIKER_ONLYIFTHERE = 1,
607 OLEGETMONIKER_FORCEASSIGN = 2,
608 OLEGETMONIKER_UNASSIGN = 3,
609 OLEGETMONIKER_TEMPFORUSER = 4
612 typedef enum tagOLEWHICHMK
614 OLEWHICHMK_CONTAINER = 1,
615 OLEWHICHMK_OBJREL = 2,
616 OLEWHICHMK_OBJFULL = 3
619 typedef enum tagUSERCLASSTYPE
621 USERCLASSTYPE_FULL = 1,
622 USERCLASSTYPE_SHORT = 2,
623 USERCLASSTYPE_APPNAME = 3
626 typedef enum tagOLEMISC
628 OLEMISC_RECOMPOSEONRESIZE = 0x1,
629 OLEMISC_ONLYICONIC = 0x2,
630 OLEMISC_INSERTNOTREPLACE = 0x4,
631 OLEMISC_STATIC = 0x8,
632 OLEMISC_CANTLINKINSIDE = 0x10,
633 OLEMISC_CANLINKBYOLE1 = 0x20,
634 OLEMISC_ISLINKOBJECT = 0x40,
635 OLEMISC_INSIDEOUT = 0x80,
636 OLEMISC_ACTIVATEWHENVISIBLE = 0x100,
637 OLEMISC_RENDERINGISDEVICEINDEPENDENT = 0x200,
638 OLEMISC_INVISIBLEATRUNTIME = 0x400,
639 OLEMISC_ALWAYSRUN = 0x800,
640 OLEMISC_ACTSLIKEBUTTON = 0x1000,
641 OLEMISC_ACTSLIKELABEL = 0x2000,
642 OLEMISC_NOUIACTIVATE = 0x4000,
643 OLEMISC_ALIGNABLE = 0x8000,
644 OLEMISC_SIMPLEFRAME = 0x10000,
645 OLEMISC_SETCLIENTSITEFIRST = 0x20000,
646 OLEMISC_IMEMODE = 0x40000,
647 OLEMISC_IGNOREACTIVATEWHENVISIBLE = 0x80000,
648 OLEMISC_WANTSTOMENUMERGE = 0x100000,
649 OLEMISC_SUPPORTSMULTILEVELUNDO = 0x200000
652 typedef enum tagOLECLOSE
654 OLECLOSE_SAVEIFDIRTY = 0,
656 OLECLOSE_PROMPTSAVE = 2
659 HRESULT SetClientSite(
660 [in, unique] IOleClientSite *pClientSite);
662 HRESULT GetClientSite(
663 [out] IOleClientSite **ppClientSite);
665 HRESULT SetHostNames(
666 [in] LPCOLESTR szContainerApp,
667 [in, unique] LPCOLESTR szContainerObj);
670 [in] DWORD dwSaveOption);
673 [in] DWORD dwWhichMoniker,
674 [in, unique] IMoniker *pmk);
678 [in] DWORD dwWhichMoniker,
679 [out] IMoniker **ppmk);
681 HRESULT InitFromData(
682 [in, unique] IDataObject *pDataObject,
684 [in] DWORD dwReserved);
686 HRESULT GetClipboardData(
687 [in] DWORD dwReserved,
688 [out] IDataObject **ppDataObject);
692 [in, unique] LPMSG lpmsg,
693 [in, unique] IOleClientSite *pActiveSite,
695 [in] HWND hwndParent,
696 [in, unique] LPCRECT lprcPosRect);
699 [out] IEnumOLEVERB **ppEnumOleVerb);
703 HRESULT IsUpToDate();
705 HRESULT GetUserClassID(
706 [out] CLSID *pClsid);
709 [in] DWORD dwFormOfType,
710 [out] LPOLESTR *pszUserType);
713 [in] DWORD dwDrawAspect,
717 [in] DWORD dwDrawAspect,
718 [out] SIZEL *psizel);
721 [in, unique] IAdviseSink *pAdvSink,
722 [out] DWORD *pdwConnection);
725 [in] DWORD dwConnection);
728 [out] IEnumSTATDATA **ppenumAdvise);
730 HRESULT GetMiscStatus(
732 [out] DWORD *pdwStatus);
734 HRESULT SetColorScheme(
735 [in] LOGPALETTE *pLogpal);
739 /*****************************************************************************
740 * IOleAdviseHolder interface
745 uuid(00000111-0000-0000-c000-000000000046)
747 interface IOleAdviseHolder : IUnknown
749 typedef [unique] IOleAdviseHolder * LPOLEADVISEHOLDER;
752 [in, unique] IAdviseSink *pAdvise,
753 [out] DWORD *pdwConnection);
756 [in] DWORD dwConnection);
759 [out] IEnumSTATDATA **ppenumAdvise);
761 HRESULT SendOnRename(
762 [in, unique] IMoniker *pmk);
764 HRESULT SendOnSave();
765 HRESULT SendOnClose();
769 /*****************************************************************************
770 * IContinue interface
774 uuid(0000012a-0000-0000-c000-000000000046)
776 interface IContinue : IUnknown
782 /*****************************************************************************
783 * IViewObject interface
787 uuid(0000010d-0000-0000-c000-000000000046)
789 interface IViewObject : IUnknown
791 typedef [unique] IViewObject *LPVIEWOBJECT;
795 [in] DWORD dwDrawAspect,
797 [in, unique] void * pvAspect,
798 [in, unique] DVTARGETDEVICE *ptd,
799 [in] HDC hdcTargetDev,
801 [in] LPCRECTL lprcBounds,
802 [in, unique] LPCRECTL lprcWBounds,
803 [in] BOOL (*pfnContinue)(ULONG_PTR dwContinue),
804 [in] ULONG_PTR dwContinue);
808 [in] DWORD dwDrawAspect,
810 [in] ULONG_PTR pvAspect,
811 [in, unique] DVTARGETDEVICE *ptd,
812 [in] ULONG_PTR hdcTargetDev,
813 [in] ULONG_PTR hdcDraw,
814 [in] LPCRECTL lprcBounds,
815 [in, unique] LPCRECTL lprcWBounds,
816 [in] IContinue *pContinue);
820 [in] DWORD dwDrawAspect,
822 [in, unique] void *pvAspect,
823 [in, unique] DVTARGETDEVICE *ptd,
824 [in] HDC hicTargetDev,
825 [out] LOGPALETTE **ppColorSet);
827 [call_as(GetColorSet)]
828 HRESULT RemoteGetColorSet(
829 [in] DWORD dwDrawAspect,
831 [in] ULONG_PTR pvAspect,
832 [in, unique] DVTARGETDEVICE *ptd,
833 [in] ULONG_PTR hicTargetDev,
834 [out] LOGPALETTE **ppColorSet);
838 [in] DWORD dwDrawAspect,
840 [in, unique] void *pvAspect,
841 [out] DWORD *pdwFreeze);
844 HRESULT RemoteFreeze(
845 [in] DWORD dwDrawAspect,
847 [in] ULONG_PTR pvAspect,
848 [out] DWORD *pdwFreeze);
851 [in] DWORD dwFreeze);
856 [in, unique] IAdviseSink *pAdvSink);
860 [out, unique] DWORD *pAspects,
861 [out, unique] DWORD *pAdvf,
862 [out] IAdviseSink **ppAdvSink);
865 HRESULT RemoteGetAdvise(
866 [out] DWORD *pAspects,
868 [out] IAdviseSink **ppAdvSink);
872 /*****************************************************************************
873 * IViewObject2 interface
877 uuid(00000127-0000-0000-c000-000000000046)
879 interface IViewObject2 : IViewObject
881 typedef [unique] IViewObject2 *LPVIEWOBJECT2;
884 [in] DWORD dwDrawAspect,
886 [in, unique] DVTARGETDEVICE* ptd,
887 [out] LPSIZEL lpsizel);
891 /*****************************************************************************
892 * IDropSource interface
897 uuid(00000121-0000-0000-c000-000000000046)
899 interface IDropSource : IUnknown
901 typedef [unique] IDropSource *LPDROPSOURCE;
903 HRESULT QueryContinueDrag(
904 [in] BOOL fEscapePressed,
905 [in] DWORD grfKeyState);
907 HRESULT GiveFeedback(
908 [in] DWORD dwEffect);
912 /*****************************************************************************
913 * IDropTarget interface
917 uuid(00000122-0000-0000-c000-000000000046),
918 pointer_default(unique)
920 interface IDropTarget : IUnknown
922 typedef [unique] IDropTarget *LPDROPTARGET;
924 const DWORD MK_ALT = 0x20;
925 const DWORD DROPEFFECT_NONE = 0;
926 const DWORD DROPEFFECT_COPY = 1;
927 const DWORD DROPEFFECT_MOVE = 2;
928 const DWORD DROPEFFECT_LINK = 4;
929 const DWORD DROPEFFECT_SCROLL = 0x80000000;
930 const DWORD DD_DEFSCROLLINSET = 11;
931 const DWORD DD_DEFSCROLLDELAY = 50;
932 const DWORD DD_DEFSCROLLINTERVAL = 50;
933 const DWORD DD_DEFDRAGDELAY = 200;
934 const DWORD DD_DEFDRAGMINDIST = 2;
937 [in, unique] IDataObject *pDataObj,
938 [in] DWORD grfKeyState,
940 [in, out] DWORD *pdwEffect);
943 [in] DWORD grfKeyState,
945 [in, out] DWORD *pdwEffect);
950 [in, unique] IDataObject *pDataObj,
951 [in] DWORD grfKeyState,
953 [in, out] DWORD *pdwEffect);