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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 interface IOleInPlaceActiveObject;
27 /*****************************************************************************
31 uuid(b0916c84-7416-101a-bcea-08002b2b79ef)
35 typedef enum tagOLERENDER
41 } OLERENDER, *LPOLERENDER;
43 typedef struct tagOBJECTDESCRIPTOR
51 DWORD dwFullUserTypeName;
53 } OBJECTDESCRIPTOR, *POBJECTDESCRIPTOR, *LPOBJECTDESCRIPTOR,
54 LINKSRCDESCRIPTOR, *PLINKSRCDESCRIPTOR, *LPLINKSRCDESCRIPTOR;
58 /*****************************************************************************
59 * IOleWindow interface
63 uuid(00000114-0000-0000-c000-000000000046),
64 pointer_default(unique)
66 interface IOleWindow : IUnknown
68 typedef [unique] IOleWindow *LPOLEWINDOW;
73 HRESULT ContextSensitiveHelp(
74 [in] BOOL fEnterMode);
78 /*****************************************************************************
79 * IOleInPlaceObject interface
83 uuid(00000113-0000-0000-c000-000000000046),
84 pointer_default(unique)
86 interface IOleInPlaceObject : IOleWindow
88 typedef [unique] IOleInPlaceObject *LPOLEINPLACEOBJECT;
90 HRESULT InPlaceDeactivate();
92 HRESULT UIDeactivate();
94 HRESULT SetObjectRects(
95 [in] LPCRECT lprcPosRect,
96 [in] LPCRECT lprcClipRect);
98 HRESULT ReactivateAndUndo();
102 /*****************************************************************************
103 * IOleInPlaceUIWindow interface
107 uuid(00000115-0000-0000-c000-000000000046),
108 pointer_default(unique)
111 interface IOleInPlaceUIWindow : IOleWindow
113 typedef [unique] IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;
115 typedef RECT BORDERWIDTHS;
116 typedef LPRECT LPBORDERWIDTHS;
117 typedef LPCRECT LPCBORDERWIDTHS;
120 [out] LPRECT lprectBorder);
122 HRESULT RequestBorderSpace(
123 [in, unique] LPCBORDERWIDTHS pborderwidths);
125 HRESULT SetBorderSpace(
126 [in, unique] LPCBORDERWIDTHS pborderwidths);
128 HRESULT SetActiveObject(
129 [in, unique] IOleInPlaceActiveObject *pActiveObject,
130 [in, string, unique] LPCOLESTR pszObjName);
134 /* avoid conflict with Wine Unicode macros */
135 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
136 cpp_quote("#undef TranslateAccelerator")
139 /*****************************************************************************
140 * IOleInPlaceFrame interface
144 uuid(00000116-0000-0000-c000-000000000046),
145 pointer_default(unique)
147 interface IOleInPlaceFrame : IOleInPlaceUIWindow
149 typedef [unique] IOleInPlaceFrame *LPOLEINPLACEFRAME;
151 typedef struct tagOleInPlaceFrameInfo
158 } OLEINPLACEFRAMEINFO, *LPOLEINPLACEFRAMEINFO;
160 typedef struct tagOleMenuGroupWidths
163 } OLEMENUGROUPWIDTHS, *LPOLEMENUGROUPWIDTHS;
165 typedef HGLOBAL HOLEMENU;
168 [in] HMENU hmenuShared,
169 [in,out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
172 [in] HMENU hmenuShared,
173 [in] HOLEMENU holemenu,
174 [in] HWND hwndActiveObject);
177 [in] HMENU hmenuShared);
179 HRESULT SetStatusText(
180 [in, unique] LPCOLESTR pszStatusText);
182 HRESULT EnableModeless(
185 HRESULT TranslateAccelerator(
191 /*****************************************************************************
192 * IOleInPlaceActiveObject interface
196 uuid(00000117-0000-0000-c000-000000000046)
198 interface IOleInPlaceActiveObject : IOleWindow
200 typedef [unique] IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;
203 HRESULT TranslateAccelerator(
206 [call_as(TranslateAccelerator)]
207 HRESULT RemoteTranslateAccelerator();
209 HRESULT OnFrameWindowActivate(
210 [in] BOOL fActivate);
212 HRESULT OnDocWindowActivate(
213 [in] BOOL fActivate);
216 HRESULT ResizeBorder(
217 [in] LPCRECT prcBorder,
218 [in, unique] IOleInPlaceUIWindow *pUIWindow,
219 [in] BOOL fFrameWindow);
221 [call_as(ResizeBorder)]
222 HRESULT RemoteResizeBorder(
223 [in] LPCRECT prcBorder,
225 [in, unique, iid_is(riid)] IOleInPlaceUIWindow *pUIWindow,
226 [in] BOOL fFrameWindow);
228 HRESULT EnableModeless(
233 /*****************************************************************************
234 * IOleInPlaceSite interface
238 uuid(00000119-0000-0000-c000-000000000046),
239 pointer_default(unique)
241 interface IOleInPlaceSite : IOleWindow
243 typedef [unique] IOleInPlaceSite *LPOLEINPLACESITE;
245 HRESULT CanInPlaceActivate();
246 HRESULT OnInPlaceActivate();
247 HRESULT OnUIActivate();
249 HRESULT GetWindowContext(
250 [out] IOleInPlaceFrame **ppFrame,
251 [out] IOleInPlaceUIWindow **ppDoc,
252 [out] LPRECT lprcPosRect,
253 [out] LPRECT lprcClipRect,
254 [in, out] LPOLEINPLACEFRAMEINFO lpFrameInfo);
257 [in] SIZE scrollExtent);
259 HRESULT OnUIDeactivate(
260 [in] BOOL fUndoable);
262 HRESULT OnInPlaceDeactivate();
263 HRESULT DiscardUndoState();
264 HRESULT DeactivateAndUndo();
266 HRESULT OnPosRectChange(
267 [in] LPCRECT lprcPosRect);
271 /*****************************************************************************
272 * IParseDisplayName interface
276 uuid(0000011a-0000-0000-c000-000000000046),
277 pointer_default(unique)
279 interface IParseDisplayName : IUnknown
281 typedef [unique] IParseDisplayName *LPPARSEDISPLAYNAME;
283 HRESULT ParseDisplayName(
284 [in, unique] IBindCtx *pbc,
285 [in] LPOLESTR pszDisplayName,
286 [out] ULONG *pchEaten,
287 [out] IMoniker **ppmkOut);
291 /*****************************************************************************
292 * IOleContainer interface
296 uuid(0000011b-0000-0000-c000-000000000046),
297 pointer_default(unique)
299 interface IOleContainer : IParseDisplayName
301 typedef [unique] IOleContainer *LPOLECONTAINER;
305 [out] IEnumUnknown **ppenum);
307 HRESULT LockContainer(
312 /*****************************************************************************
313 * IOleItemContainer interface
317 uuid(0000011c-0000-0000-c000-000000000046),
318 pointer_default(unique)
320 interface IOleItemContainer : IOleContainer
322 typedef [unique] IOleItemContainer *LPOLEITEMCONTAINER;
324 typedef enum tagBINDSPEED
326 BINDSPEED_INDEFINITE = 1,
327 BINDSPEED_MODERATE = 2,
328 BINDSPEED_IMMEDIATE = 3
331 typedef enum tagOLECONTF
333 OLECONTF_EMBEDDINGS = 1,
336 OLECONTF_ONLYUSER = 8,
337 OLECONTF_ONLYIFRUNNING = 16
340 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
341 cpp_quote("#undef GetObject")
344 [in] LPOLESTR pszItem,
345 [in] DWORD dwSpeedNeeded,
346 [in, unique] IBindCtx *pbc,
348 [out, iid_is(riid)] void **ppvObject);
350 HRESULT GetObjectStorage(
351 [in] LPOLESTR pszItem,
352 [in, unique] IBindCtx *pbc,
354 [out, iid_is(riid)] void **ppvStorage);
357 [in] LPOLESTR pszItem);
361 /*****************************************************************************
366 uuid(0000011d-0000-0000-c000-000000000046)
368 interface IOleLink : IUnknown
370 typedef [unique] IOleLink *LPOLELINK;
372 typedef enum tagOLEUPDATE
374 OLEUPDATE_ALWAYS = 1,
376 } OLEUPDATE, *POLEUPDATE, *LPOLEUPDATE;
378 typedef enum tagOLELINKBIND
380 OLELINKBIND_EVENIFCLASSDIFF = 1
383 HRESULT SetUpdateOptions(
384 [in] DWORD dwUpdateOpt);
386 HRESULT GetUpdateOptions(
387 [out] DWORD *pdwUpdateOpt);
389 HRESULT SetSourceMoniker(
390 [in, unique] IMoniker *pmk,
391 [in] REFCLSID rclsid);
393 HRESULT GetSourceMoniker(
394 [out] IMoniker **ppmk);
396 HRESULT SetSourceDisplayName(
397 [in]LPCOLESTR pszStatusText);
399 HRESULT GetSourceDisplayName(
400 [out] LPOLESTR *ppszDisplayName);
402 HRESULT BindToSource(
403 [in] DWORD bindflags,
404 [in, unique] IBindCtx *pbc);
406 HRESULT BindIfRunning();
408 HRESULT GetBoundSource(
409 [out] IUnknown **ppunk);
411 HRESULT UnbindSource();
414 [in, unique] IBindCtx *pbc);
418 /*****************************************************************************
419 * IOleClientSite interface
423 uuid(00000118-0000-0000-c000-000000000046),
424 pointer_default(unique)
426 interface IOleClientSite : IUnknown
428 typedef [unique] IOleClientSite * LPOLECLIENTSITE;
430 HRESULT SaveObject();
434 [in] DWORD dwWhichMoniker,
435 [out] IMoniker **ppmk);
437 HRESULT GetContainer(
438 [out] IOleContainer **ppContainer);
440 HRESULT ShowObject();
442 HRESULT OnShowWindow(
445 HRESULT RequestNewObjectLayout();
449 /*****************************************************************************
450 * IOleCache interface
454 uuid(0000011e-0000-0000-c000-000000000046),
455 pointer_default(unique)
457 interface IOleCache : IUnknown
459 typedef [unique] IOleCache *LPOLECACHE;
462 [in, unique] FORMATETC *pformatetc,
464 [out] DWORD *pdwConnection);
467 [in] DWORD dwConnection);
470 [out] IEnumSTATDATA **ppenumSTATDATA);
473 [in, unique] IDataObject *pDataObject);
476 [in, unique] FORMATETC *pformatetc,
477 [in, unique] STGMEDIUM *pmedium,
482 /*****************************************************************************
483 * IOleCache2 interface
487 uuid(00000128-0000-0000-c000-000000000046),
488 pointer_default(unique)
490 interface IOleCache2 : IOleCache
492 typedef [unique] IOleCache2 *LPOLECACHE2;
494 const DWORD UPDFCACHE_NODATACACHE = 0x00000001;
495 const DWORD UPDFCACHE_ONSAVECACHE = 0x00000002;
496 const DWORD UPDFCACHE_ONSTOPCACHE = 0x00000004;
497 const DWORD UPDFCACHE_NORMALCACHE = 0x00000008;
498 const DWORD UPDFCACHE_IFBLANK = 0x00000010;
499 const DWORD UPDFCACHE_ONLYIFBLANK = 0x80000000;
501 const DWORD UPDFCACHE_IFBLANKORONSAVECACHE = (UPDFCACHE_IFBLANK | UPDFCACHE_ONSAVECACHE);
502 const DWORD UPDFCACHE_ALL = ((DWORD)(~(UPDFCACHE_ONLYIFBLANK)));
503 const DWORD UPDFCACHE_ALLBUTNODATACACHE = (UPDFCACHE_ALL & ((DWORD)(~UPDFCACHE_NODATACACHE)));
505 typedef enum tagDISCARDCACHE
507 DISCARDCACHE_SAVEIFDIRTY = 0,
508 DISCARDCACHE_NOSAVE = 1
513 [in] LPDATAOBJECT pDataObject,
515 [in] LPVOID pReserved);
517 [call_as(UpdateCache)]
518 HRESULT RemoteUpdateCache(
519 [in] LPDATAOBJECT pDataObject,
521 [in] LONG_PTR pReserved);
523 HRESULT DiscardCache(
524 [in] DWORD dwDiscardOptions);
528 /*****************************************************************************
529 * IOleCacheControl interface
533 uuid(00000129-0000-0000-c000-000000000046)
535 interface IOleCacheControl : IUnknown
537 typedef [unique] IOleCacheControl *LPOLECACHECONTROL;
540 LPDATAOBJECT pDataObject);
546 /*****************************************************************************
547 * IEnumOLEVERB interface
551 uuid(00000104-0000-0000-c000-000000000046),
552 pointer_default(unique)
554 interface IEnumOLEVERB : IUnknown
556 typedef [unique] IEnumOLEVERB *LPENUMOLEVERB;
558 typedef struct tagOLEVERB
561 LPOLESTR lpszVerbName;
564 } OLEVERB, *LPOLEVERB;
566 typedef enum tagOLEVERBATTRIB
568 OLEVERBATTRIB_NEVERDIRTIES = 1,
569 OLEVERBATTRIB_ONCONTAINERMENU = 2
575 [out, size_is(celt), length_is(*pceltFetched)] LPOLEVERB rgelt,
576 [out] ULONG *pceltFetched);
581 [out, size_is(celt), length_is(*pceltFetched)] LPOLEVERB rgelt,
582 [out] ULONG *pceltFetched);
590 [out] IEnumOLEVERB **ppenum);
594 /*****************************************************************************
595 * IOleObject interface
599 uuid(00000112-0000-0000-c000-000000000046),
600 pointer_default(unique)
602 interface IOleObject : IUnknown
604 typedef [unique] IOleObject *LPOLEOBJECT;
606 typedef enum tagOLEGETMONIKER
608 OLEGETMONIKER_ONLYIFTHERE = 1,
609 OLEGETMONIKER_FORCEASSIGN = 2,
610 OLEGETMONIKER_UNASSIGN = 3,
611 OLEGETMONIKER_TEMPFORUSER = 4
614 typedef enum tagOLEWHICHMK
616 OLEWHICHMK_CONTAINER = 1,
617 OLEWHICHMK_OBJREL = 2,
618 OLEWHICHMK_OBJFULL = 3
621 typedef enum tagUSERCLASSTYPE
623 USERCLASSTYPE_FULL = 1,
624 USERCLASSTYPE_SHORT = 2,
625 USERCLASSTYPE_APPNAME = 3
628 typedef enum tagOLEMISC
630 OLEMISC_RECOMPOSEONRESIZE = 0x1,
631 OLEMISC_ONLYICONIC = 0x2,
632 OLEMISC_INSERTNOTREPLACE = 0x4,
633 OLEMISC_STATIC = 0x8,
634 OLEMISC_CANTLINKINSIDE = 0x10,
635 OLEMISC_CANLINKBYOLE1 = 0x20,
636 OLEMISC_ISLINKOBJECT = 0x40,
637 OLEMISC_INSIDEOUT = 0x80,
638 OLEMISC_ACTIVATEWHENVISIBLE = 0x100,
639 OLEMISC_RENDERINGISDEVICEINDEPENDENT = 0x200,
640 OLEMISC_INVISIBLEATRUNTIME = 0x400,
641 OLEMISC_ALWAYSRUN = 0x800,
642 OLEMISC_ACTSLIKEBUTTON = 0x1000,
643 OLEMISC_ACTSLIKELABEL = 0x2000,
644 OLEMISC_NOUIACTIVATE = 0x4000,
645 OLEMISC_ALIGNABLE = 0x8000,
646 OLEMISC_SIMPLEFRAME = 0x10000,
647 OLEMISC_SETCLIENTSITEFIRST = 0x20000,
648 OLEMISC_IMEMODE = 0x40000,
649 OLEMISC_IGNOREACTIVATEWHENVISIBLE = 0x80000,
650 OLEMISC_WANTSTOMENUMERGE = 0x100000,
651 OLEMISC_SUPPORTSMULTILEVELUNDO = 0x200000
654 typedef enum tagOLECLOSE
656 OLECLOSE_SAVEIFDIRTY = 0,
658 OLECLOSE_PROMPTSAVE = 2
661 HRESULT SetClientSite(
662 [in, unique] IOleClientSite *pClientSite);
664 HRESULT GetClientSite(
665 [out] IOleClientSite **ppClientSite);
667 HRESULT SetHostNames(
668 [in] LPCOLESTR szContainerApp,
669 [in, unique] LPCOLESTR szContainerObj);
672 [in] DWORD dwSaveOption);
675 [in] DWORD dwWhichMoniker,
676 [in, unique] IMoniker *pmk);
680 [in] DWORD dwWhichMoniker,
681 [out] IMoniker **ppmk);
683 HRESULT InitFromData(
684 [in, unique] IDataObject *pDataObject,
686 [in] DWORD dwReserved);
688 HRESULT GetClipboardData(
689 [in] DWORD dwReserved,
690 [out] IDataObject **ppDataObject);
694 [in, unique] LPMSG lpmsg,
695 [in, unique] IOleClientSite *pActiveSite,
697 [in] HWND hwndParent,
698 [in, unique] LPCRECT lprcPosRect);
701 [out] IEnumOLEVERB **ppEnumOleVerb);
705 HRESULT IsUpToDate();
707 HRESULT GetUserClassID(
708 [out] CLSID *pClsid);
711 [in] DWORD dwFormOfType,
712 [out] LPOLESTR *pszUserType);
715 [in] DWORD dwDrawAspect,
719 [in] DWORD dwDrawAspect,
720 [out] SIZEL *psizel);
723 [in, unique] IAdviseSink *pAdvSink,
724 [out] DWORD *pdwConnection);
727 [in] DWORD dwConnection);
730 [out] IEnumSTATDATA **ppenumAdvise);
732 HRESULT GetMiscStatus(
734 [out] DWORD *pdwStatus);
736 HRESULT SetColorScheme(
737 [in] LOGPALETTE *pLogpal);
741 /*****************************************************************************
742 * IOleAdviseHolder interface
747 uuid(00000111-0000-0000-c000-000000000046)
749 interface IOleAdviseHolder : IUnknown
751 typedef [unique] IOleAdviseHolder * LPOLEADVISEHOLDER;
754 [in, unique] IAdviseSink *pAdvise,
755 [out] DWORD *pdwConnection);
758 [in] DWORD dwConnection);
761 [out] IEnumSTATDATA **ppenumAdvise);
763 HRESULT SendOnRename(
764 [in, unique] IMoniker *pmk);
766 HRESULT SendOnSave();
767 HRESULT SendOnClose();
771 /*****************************************************************************
772 * IContinue interface
776 uuid(0000012a-0000-0000-c000-000000000046)
778 interface IContinue : IUnknown
784 /*****************************************************************************
785 * IViewObject interface
789 uuid(0000010d-0000-0000-c000-000000000046)
791 interface IViewObject : IUnknown
793 typedef [unique] IViewObject *LPVIEWOBJECT;
797 [in] DWORD dwDrawAspect,
799 [in, unique] void * pvAspect,
800 [in, unique] DVTARGETDEVICE *ptd,
801 [in] HDC hdcTargetDev,
803 [in] LPCRECTL lprcBounds,
804 [in, unique] LPCRECTL lprcWBounds,
805 [in] BOOL (*pfnContinue)(ULONG_PTR dwContinue),
806 [in] ULONG_PTR dwContinue);
810 [in] DWORD dwDrawAspect,
812 [in] ULONG_PTR pvAspect,
813 [in, unique] DVTARGETDEVICE *ptd,
814 [in] ULONG_PTR hdcTargetDev,
815 [in] ULONG_PTR hdcDraw,
816 [in] LPCRECTL lprcBounds,
817 [in, unique] LPCRECTL lprcWBounds,
818 [in] IContinue *pContinue);
822 [in] DWORD dwDrawAspect,
824 [in, unique] void *pvAspect,
825 [in, unique] DVTARGETDEVICE *ptd,
826 [in] HDC hicTargetDev,
827 [out] LOGPALETTE **ppColorSet);
829 [call_as(GetColorSet)]
830 HRESULT RemoteGetColorSet(
831 [in] DWORD dwDrawAspect,
833 [in] ULONG_PTR pvAspect,
834 [in, unique] DVTARGETDEVICE *ptd,
835 [in] ULONG_PTR hicTargetDev,
836 [out] LOGPALETTE **ppColorSet);
840 [in] DWORD dwDrawAspect,
842 [in, unique] void *pvAspect,
843 [out] DWORD *pdwFreeze);
846 HRESULT RemoteFreeze(
847 [in] DWORD dwDrawAspect,
849 [in] ULONG_PTR pvAspect,
850 [out] DWORD *pdwFreeze);
853 [in] DWORD dwFreeze);
858 [in, unique] IAdviseSink *pAdvSink);
862 [out, unique] DWORD *pAspects,
863 [out, unique] DWORD *pAdvf,
864 [out] IAdviseSink **ppAdvSink);
867 HRESULT RemoteGetAdvise(
868 [out] DWORD *pAspects,
870 [out] IAdviseSink **ppAdvSink);
874 /*****************************************************************************
875 * IViewObject2 interface
879 uuid(00000127-0000-0000-c000-000000000046)
881 interface IViewObject2 : IViewObject
883 typedef [unique] IViewObject2 *LPVIEWOBJECT2;
886 [in] DWORD dwDrawAspect,
888 [in, unique] DVTARGETDEVICE* ptd,
889 [out] LPSIZEL lpsizel);
893 /*****************************************************************************
894 * IDropSource interface
899 uuid(00000121-0000-0000-c000-000000000046)
901 interface IDropSource : IUnknown
903 typedef [unique] IDropSource *LPDROPSOURCE;
905 HRESULT QueryContinueDrag(
906 [in] BOOL fEscapePressed,
907 [in] DWORD grfKeyState);
909 HRESULT GiveFeedback(
910 [in] DWORD dwEffect);
914 /*****************************************************************************
915 * IDropTarget interface
919 uuid(00000122-0000-0000-c000-000000000046),
920 pointer_default(unique)
922 interface IDropTarget : IUnknown
924 typedef [unique] IDropTarget *LPDROPTARGET;
926 const DWORD MK_ALT = 0x20;
927 const DWORD DROPEFFECT_NONE = 0;
928 const DWORD DROPEFFECT_COPY = 1;
929 const DWORD DROPEFFECT_MOVE = 2;
930 const DWORD DROPEFFECT_LINK = 4;
931 const DWORD DROPEFFECT_SCROLL = 0x80000000;
932 const DWORD DD_DEFSCROLLINSET = 11;
933 const DWORD DD_DEFSCROLLDELAY = 50;
934 const DWORD DD_DEFSCROLLINTERVAL = 50;
935 const DWORD DD_DEFDRAGDELAY = 200;
936 const DWORD DD_DEFDRAGMINDIST = 2;
939 [in, unique] IDataObject *pDataObj,
940 [in] DWORD grfKeyState,
942 [in, out] DWORD *pdwEffect);
945 [in] DWORD grfKeyState,
947 [in, out] DWORD *pdwEffect);
952 [in, unique] IDataObject *pDataObj,
953 [in] DWORD grfKeyState,
955 [in, out] DWORD *pdwEffect);