libwine: Added a wine_call_on_stack function.
[wine] / include / oleidl.idl
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #ifndef DO_NO_IMPORTS
22 import "objidl.idl";
23 #endif
24
25 interface IOleInPlaceActiveObject;
26
27 /*****************************************************************************
28  * IOleTypes interface
29  */
30 [
31     uuid(b0916c84-7416-101a-bcea-08002b2b79ef)
32 ]
33 interface IOLETypes
34 {
35     typedef enum tagOLERENDER
36     {
37         OLERENDER_NONE = 0,
38         OLERENDER_DRAW = 1,
39         OLERENDER_FORMAT = 2,
40         OLERENDER_ASIS = 3
41     } OLERENDER, *LPOLERENDER;
42
43     typedef struct tagOBJECTDESCRIPTOR
44     {
45         ULONG cbSize;
46         CLSID clsid;
47         DWORD dwDrawAspect;
48         SIZEL sizel;
49         POINTL pointl;
50         DWORD dwStatus;
51         DWORD dwFullUserTypeName;
52         DWORD dwSrcOfCopy;
53     } OBJECTDESCRIPTOR,  *POBJECTDESCRIPTOR,   *LPOBJECTDESCRIPTOR,
54       LINKSRCDESCRIPTOR, *PLINKSRCDESCRIPTOR,  *LPLINKSRCDESCRIPTOR;
55 }
56
57
58 /*****************************************************************************
59  * IOleWindow interface
60  */
61 [
62     object,
63     uuid(00000114-0000-0000-c000-000000000046),
64     pointer_default(unique)
65 ]
66 interface IOleWindow : IUnknown
67 {
68     typedef [unique] IOleWindow *LPOLEWINDOW;
69
70     HRESULT GetWindow(
71         [out] HWND *phwnd);
72
73     HRESULT ContextSensitiveHelp(
74         [in] BOOL fEnterMode);
75 }
76
77
78 /*****************************************************************************
79  * IOleInPlaceObject interface
80  */
81 [
82     object,
83     uuid(00000113-0000-0000-c000-000000000046),
84     pointer_default(unique)
85 ]
86 interface IOleInPlaceObject : IOleWindow
87 {
88     typedef [unique] IOleInPlaceObject *LPOLEINPLACEOBJECT;
89
90     HRESULT InPlaceDeactivate();
91
92     HRESULT UIDeactivate();
93
94     HRESULT SetObjectRects(
95         [in] LPCRECT lprcPosRect,
96         [in] LPCRECT lprcClipRect);
97
98     HRESULT ReactivateAndUndo();
99 }
100
101
102 /*****************************************************************************
103  * IOleInPlaceUIWindow interface
104  */
105 [
106     object,
107     uuid(00000115-0000-0000-c000-000000000046),
108     pointer_default(unique)
109 ]
110
111 interface IOleInPlaceUIWindow : IOleWindow
112 {
113     typedef [unique] IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;
114
115     typedef RECT BORDERWIDTHS;
116     typedef LPRECT LPBORDERWIDTHS;
117     typedef LPCRECT LPCBORDERWIDTHS;
118
119     HRESULT GetBorder(
120         [out] LPRECT lprectBorder);
121
122     HRESULT RequestBorderSpace(
123         [in, unique] LPCBORDERWIDTHS pborderwidths);
124
125     HRESULT SetBorderSpace(
126         [in, unique] LPCBORDERWIDTHS pborderwidths);
127
128     HRESULT SetActiveObject(
129         [in, unique] IOleInPlaceActiveObject *pActiveObject,
130         [in, string, unique] LPCOLESTR pszObjName);
131 }
132
133
134 /* avoid conflict with Wine Unicode macros */
135 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
136 cpp_quote("#undef TranslateAccelerator")
137 cpp_quote("#endif")
138
139 /*****************************************************************************
140  * IOleInPlaceFrame interface
141  */
142 [
143     object,
144     uuid(00000116-0000-0000-c000-000000000046),
145     pointer_default(unique)
146 ]
147 interface IOleInPlaceFrame : IOleInPlaceUIWindow
148 {
149     typedef [unique] IOleInPlaceFrame *LPOLEINPLACEFRAME;
150
151     typedef struct tagOleInPlaceFrameInfo
152     {
153         UINT cb;
154         BOOL fMDIApp;
155         HWND hwndFrame;
156         HACCEL haccel;
157         UINT cAccelEntries;
158     } OLEINPLACEFRAMEINFO, *LPOLEINPLACEFRAMEINFO;
159
160     typedef struct  tagOleMenuGroupWidths
161     {
162         LONG width[ 6 ];
163     } OLEMENUGROUPWIDTHS, *LPOLEMENUGROUPWIDTHS;
164
165     typedef HGLOBAL HOLEMENU;
166
167     HRESULT InsertMenus(
168         [in] HMENU hmenuShared,
169         [in,out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
170
171     HRESULT SetMenu(
172         [in] HMENU hmenuShared,
173         [in] HOLEMENU holemenu,
174         [in] HWND hwndActiveObject);
175
176     HRESULT RemoveMenus(
177         [in] HMENU hmenuShared);
178
179     HRESULT SetStatusText(
180         [in, unique] LPCOLESTR pszStatusText);
181
182     HRESULT EnableModeless(
183         [in] BOOL fEnable);
184
185     HRESULT TranslateAccelerator(
186         [in] LPMSG lpmsg,
187         [in] WORD wID);
188 }
189
190
191 /*****************************************************************************
192  * IOleInPlaceActiveObject interface
193  */
194 [
195     object,
196     uuid(00000117-0000-0000-c000-000000000046)
197 ]
198 interface IOleInPlaceActiveObject : IOleWindow
199 {
200     typedef [unique] IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;
201
202     [local]
203     HRESULT TranslateAccelerator(
204         [in] LPMSG lpmsg);
205
206     [call_as(TranslateAccelerator)]
207     HRESULT RemoteTranslateAccelerator();
208
209     HRESULT OnFrameWindowActivate(
210         [in] BOOL fActivate);
211
212     HRESULT OnDocWindowActivate(
213         [in] BOOL fActivate);
214
215     [local]
216     HRESULT ResizeBorder(
217         [in] LPCRECT prcBorder,
218         [in, unique] IOleInPlaceUIWindow *pUIWindow,
219         [in] BOOL fFrameWindow);
220
221     [call_as(ResizeBorder)]
222     HRESULT RemoteResizeBorder(
223         [in] LPCRECT prcBorder,
224         [in] REFIID riid,
225         [in, unique, iid_is(riid)] IOleInPlaceUIWindow *pUIWindow,
226         [in] BOOL fFrameWindow);
227
228     HRESULT EnableModeless(
229         [in] BOOL fEnable);
230 }
231
232
233 /*****************************************************************************
234  * IOleInPlaceSite interface
235  */
236 [
237     object,
238     uuid(00000119-0000-0000-c000-000000000046),
239     pointer_default(unique)
240 ]
241 interface IOleInPlaceSite : IOleWindow
242 {
243     typedef [unique] IOleInPlaceSite *LPOLEINPLACESITE;
244
245     HRESULT CanInPlaceActivate();
246     HRESULT OnInPlaceActivate();
247     HRESULT OnUIActivate();
248
249     HRESULT GetWindowContext(
250         [out] IOleInPlaceFrame **ppFrame,
251         [out] IOleInPlaceUIWindow **ppDoc,
252         [out] LPRECT lprcPosRect,
253         [out] LPRECT lprcClipRect,
254         [in, out] LPOLEINPLACEFRAMEINFO lpFrameInfo);
255
256     HRESULT Scroll(
257         [in] SIZE scrollExtent);
258
259     HRESULT OnUIDeactivate(
260         [in] BOOL fUndoable);
261
262     HRESULT OnInPlaceDeactivate();
263     HRESULT DiscardUndoState();
264     HRESULT DeactivateAndUndo();
265
266     HRESULT OnPosRectChange(
267         [in] LPCRECT lprcPosRect);
268 }
269
270
271 /*****************************************************************************
272  * IParseDisplayName interface
273  */
274 [
275     object,
276     uuid(0000011a-0000-0000-c000-000000000046),
277     pointer_default(unique)
278 ]
279 interface IParseDisplayName : IUnknown
280 {
281     typedef [unique] IParseDisplayName *LPPARSEDISPLAYNAME;
282
283     HRESULT ParseDisplayName(
284         [in, unique] IBindCtx *pbc,
285         [in] LPOLESTR pszDisplayName,
286         [out] ULONG *pchEaten,
287         [out] IMoniker **ppmkOut);
288 }
289
290
291 /*****************************************************************************
292  * IOleContainer interface
293  */
294 [
295     object,
296     uuid(0000011b-0000-0000-c000-000000000046),
297     pointer_default(unique)
298 ]
299 interface IOleContainer : IParseDisplayName
300 {
301     typedef [unique] IOleContainer *LPOLECONTAINER;
302
303     HRESULT EnumObjects(
304         [in] DWORD grfFlags,
305         [out] IEnumUnknown **ppenum);
306
307     HRESULT LockContainer(
308         [in] BOOL fLock);
309 }
310
311
312 /*****************************************************************************
313  * IOleItemContainer interface
314  */
315 [
316     object,
317     uuid(0000011c-0000-0000-c000-000000000046),
318     pointer_default(unique)
319 ]
320 interface IOleItemContainer : IOleContainer
321 {
322     typedef [unique] IOleItemContainer *LPOLEITEMCONTAINER;
323
324     typedef enum tagBINDSPEED
325     {
326         BINDSPEED_INDEFINITE = 1,
327         BINDSPEED_MODERATE = 2,
328         BINDSPEED_IMMEDIATE = 3
329     } BINDSPEED;
330
331     typedef enum tagOLECONTF
332     {
333         OLECONTF_EMBEDDINGS = 1,
334         OLECONTF_LINKS = 2,
335         OLECONTF_OTHERS = 4,
336         OLECONTF_OLNYUSER = 8,
337         OLECONTF_ONLYIFRUNNING = 16
338     } OLECONTF;
339
340 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
341 cpp_quote("#undef GetObject")
342 cpp_quote("#endif")
343     HRESULT GetObject(
344         [in] LPOLESTR pszItem,
345         [in] DWORD dwSpeedNeeded,
346         [in, unique] IBindCtx *pbc,
347         [in] REFIID riid,
348         [out, iid_is(riid)] void **ppvObject);
349
350     HRESULT GetObjectStorage(
351         [in] LPOLESTR pszItem,
352         [in, unique] IBindCtx *pbc,
353         [in] REFIID riid,
354         [out, iid_is(riid)] void **ppvStorage);
355
356     HRESULT IsRunning(
357         [in] LPOLESTR pszItem);
358 }
359
360
361 /*****************************************************************************
362  * IOleLink interface
363  */
364 [
365     object,
366     uuid(0000011d-0000-0000-c000-000000000046)
367 ]
368 interface IOleLink : IUnknown
369 {
370     typedef [unique] IOleLink *LPOLELINK;
371
372     typedef enum tagOLEUPDATE
373     {
374         OLEUPDATE_ALWAYS = 1,
375         OLEUPDATE_ONCALL = 3
376     } OLEUPDATE, *POLEUPDATE, *LPOLEUPDATE;
377
378     typedef enum tagOLELINKBIND
379     {
380         OLELINKBIND_EVENIFCLASSDIFF = 1
381     } OLELINKBIND;
382
383     HRESULT SetUpdateOptions(
384         [in] DWORD dwUpdateOpt);
385
386     HRESULT GetUpdateOptions(
387         [out] DWORD *pdwUpdateOpt);
388
389     HRESULT SetSourceMoniker(
390         [in, unique] IMoniker *pmk,
391         [in] REFCLSID rclsid);
392
393     HRESULT GetSourceMoniker(
394         [out] IMoniker **ppmk);
395
396     HRESULT SetSourceDisplayName(
397         [in]LPCOLESTR pszStatusText);
398
399     HRESULT GetSourceDisplayName(
400         [out] LPOLESTR *ppszDisplayName);
401
402     HRESULT BindToSource(
403         [in] DWORD bindflags,
404         [in, unique] IBindCtx *pbc);
405
406     HRESULT BindIfRunning();
407
408     HRESULT GetBoundSource(
409         [out] IUnknown **ppunk);
410
411     HRESULT UnbindSource();
412
413     HRESULT Update(
414         [in, unique] IBindCtx *pbc);
415 }
416
417
418 /*****************************************************************************
419  * IOleClientSite interface
420  */
421 [
422     object,
423     uuid(00000118-0000-0000-c000-000000000046),
424     pointer_default(unique)
425 ]
426 interface IOleClientSite : IUnknown
427 {
428     typedef [unique] IOleClientSite * LPOLECLIENTSITE;
429
430     HRESULT SaveObject();
431
432     HRESULT GetMoniker(
433         [in] DWORD dwAssign,
434         [in] DWORD dwWhichMoniker,
435         [out] IMoniker **ppmk);
436
437     HRESULT GetContainer(
438         [out] IOleContainer **ppContainer);
439
440     HRESULT ShowObject();
441
442     HRESULT OnShowWindow(
443         [in] BOOL fShow);
444
445     HRESULT RequestNewObjectLayout();
446 }
447
448
449 /*****************************************************************************
450  * IOleCache interface
451  */
452 [
453     object,
454     uuid(0000011e-0000-0000-c000-000000000046),
455     pointer_default(unique)
456 ]
457 interface IOleCache : IUnknown
458 {
459     typedef [unique] IOleCache *LPOLECACHE;
460
461     HRESULT Cache(
462         [in, unique] FORMATETC *pformatetc,
463         [in] DWORD advf,
464         [out] DWORD *pdwConnection);
465
466     HRESULT Uncache(
467         [in] DWORD dwConnection);
468
469     HRESULT EnumCache(
470         [out] IEnumSTATDATA **ppenumSTATDATA);
471
472     HRESULT InitCache(
473         [in, unique] IDataObject *pDataObject);
474
475     HRESULT SetData(
476         [in, unique] FORMATETC *pformatetc,
477         [in, unique] STGMEDIUM *pmedium,
478         [in] BOOL fRelease);
479 }
480
481
482 /*****************************************************************************
483  * IOleCache2 interface
484  */
485 [
486     object,
487     uuid(00000128-0000-0000-c000-000000000046),
488     pointer_default(unique)
489 ]
490 interface IOleCache2 : IOleCache
491 {
492     typedef [unique] IOleCache2 *LPOLECACHE2;
493
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;
500
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)));
504
505     typedef enum tagDISCARDCACHE
506     {
507         DISCARDCACHE_SAVEIFDIRTY = 0,
508         DISCARDCACHE_NOSAVE =  1
509     } DISCARDCACHE;
510
511     [local]
512     HRESULT UpdateCache(
513         [in] LPDATAOBJECT pDataObject,
514         [in] DWORD grfUpdf,
515         [in] LPVOID pReserved);
516
517     [call_as(UpdateCache)]
518     HRESULT RemoteUpdateCache(
519         [in] LPDATAOBJECT pDataObject,
520         [in] DWORD grfUpdf,
521         [in] LONG_PTR pReserved);
522
523     HRESULT DiscardCache(
524         [in] DWORD dwDiscardOptions);
525 }
526
527
528 /*****************************************************************************
529  * IOleCacheControl interface
530  */
531 [
532     object,
533     uuid(00000129-0000-0000-c000-000000000046)
534 ]
535 interface IOleCacheControl : IUnknown
536 {
537     typedef [unique] IOleCacheControl *LPOLECACHECONTROL;
538
539     HRESULT OnRun(
540         LPDATAOBJECT pDataObject);
541
542     HRESULT OnStop();
543 }
544
545
546 /*****************************************************************************
547  *  IEnumOLEVERB interface
548  */
549 [
550     object,
551     uuid(00000104-0000-0000-c000-000000000046),
552     pointer_default(unique)
553 ]
554 interface IEnumOLEVERB : IUnknown
555 {
556     typedef [unique] IEnumOLEVERB *LPENUMOLEVERB;
557
558     typedef struct tagOLEVERB
559     {
560         LONG lVerb;
561         LPOLESTR lpszVerbName;
562         DWORD fuFlags;
563         DWORD grfAttribs;
564     } OLEVERB, *LPOLEVERB;
565
566     typedef enum tagOLEVERBATTRIB
567     {
568         OLEVERBATTRIB_NEVERDIRTIES = 1,
569         OLEVERBATTRIB_ONCONTAINERMENU = 2
570     } OLEVERBATTRIB;
571
572     [local]
573     HRESULT Next(
574         [in] ULONG celt,
575         [out, size_is(celt), length_is(*pceltFetched)] LPOLEVERB rgelt,
576         [out] ULONG *pceltFetched);
577
578     [call_as(Next)]
579     HRESULT RemoteNext(
580         [in] ULONG celt,
581         [out, size_is(celt), length_is(*pceltFetched)] LPOLEVERB rgelt,
582         [out] ULONG *pceltFetched);
583
584     HRESULT Skip(
585         [in] ULONG celt);
586
587     HRESULT Reset();
588
589     HRESULT Clone(
590         [out] IEnumOLEVERB **ppenum);
591 }
592
593
594 /*****************************************************************************
595  * IOleObject interface
596  */
597 [
598     object,
599     uuid(00000112-0000-0000-c000-000000000046),
600     pointer_default(unique)
601 ]
602 interface IOleObject : IUnknown
603 {
604     typedef [unique] IOleObject *LPOLEOBJECT;
605
606     typedef enum tagOLEGETMONIKER
607     {
608         OLEGETMONIKER_ONLYIFTHERE = 1,
609         OLEGETMONIKER_FORCEASSIGN = 2,
610         OLEGETMONIKER_UNASSIGN = 3,
611         OLEGETMONIKER_TEMPFORUSER = 4
612     } OLEGETMONIKER;
613
614     typedef enum tagOLEWHICHMK
615     {
616         OLEWHICHMK_CONTAINER = 1,
617         OLEWHICHMK_OBJREL = 2,
618         OLEWHICHMK_OBJFULL = 3
619     } OLEWHICHMK;
620
621     typedef enum tagUSERCLASSTYPE
622     {
623         USERCLASSTYPE_FULL = 1,
624         USERCLASSTYPE_SHORT = 2,
625         USERCLASSTYPE_APPNAME = 3
626     } USERCLASSTYPE;
627
628     typedef enum tagOLEMISC
629     {
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
652     } OLEMISC;
653
654     typedef enum tagOLECLOSE
655     {
656         OLECLOSE_SAVEIFDIRTY = 0,
657         OLECLOSE_NOSAVE = 1,
658         OLECLOSE_PROMPTSAVE = 2
659     } OLECLOSE;
660
661     HRESULT SetClientSite(
662         [in, unique] IOleClientSite *pClientSite);
663
664     HRESULT GetClientSite(
665         [out] IOleClientSite **ppClientSite);
666
667     HRESULT SetHostNames(
668         [in] LPCOLESTR szContainerApp,
669         [in, unique] LPCOLESTR szContainerObj);
670
671     HRESULT Close(
672         [in] DWORD dwSaveOption);
673
674     HRESULT SetMoniker(
675         [in] DWORD dwWhichMoniker,
676         [in, unique] IMoniker *pmk);
677
678     HRESULT GetMoniker(
679         [in] DWORD dwAssign,
680         [in] DWORD dwWhichMoniker,
681         [out] IMoniker **ppmk);
682
683     HRESULT InitFromData(
684         [in, unique] IDataObject *pDataObject,
685         [in] BOOL fCreation,
686         [in] DWORD dwReserved);
687
688     HRESULT GetClipboardData(
689         [in] DWORD dwReserved,
690         [out] IDataObject **ppDataObject);
691
692     HRESULT DoVerb(
693         [in] LONG iVerb,
694         [in, unique] LPMSG lpmsg,
695         [in, unique] IOleClientSite *pActiveSite,
696         [in] LONG lindex,
697         [in] HWND hwndParent,
698         [in, unique] LPCRECT lprcPosRect);
699
700     HRESULT EnumVerbs(
701         [out] IEnumOLEVERB **ppEnumOleVerb);
702
703     HRESULT Update();
704
705     HRESULT IsUpToDate();
706
707     HRESULT GetUserClassID(
708         [out] CLSID *pClsid);
709
710     HRESULT GetUserType(
711         [in] DWORD dwFormOfType,
712         [out] LPOLESTR *pszUserType);
713
714     HRESULT SetExtent(
715         [in] DWORD dwDrawAspect,
716         [in] SIZEL *psizel);
717
718     HRESULT GetExtent(
719         [in] DWORD dwDrawAspect,
720         [out] SIZEL *psizel);
721
722     HRESULT Advise(
723         [in, unique] IAdviseSink *pAdvSink,
724         [out] DWORD *pdwConnection);
725
726     HRESULT Unadvise(
727         [in] DWORD dwConnection);
728
729     HRESULT EnumAdvise(
730         [out] IEnumSTATDATA **ppenumAdvise);
731
732     HRESULT GetMiscStatus(
733         [in] DWORD dwAspect,
734         [out] DWORD *pdwStatus);
735
736     HRESULT SetColorScheme(
737         [in] LOGPALETTE *pLogpal);
738 }
739
740
741 /*****************************************************************************
742  * IOleAdviseHolder interface
743  */
744 [
745     local,
746     object,
747     uuid(00000111-0000-0000-c000-000000000046)
748 ]
749 interface IOleAdviseHolder : IUnknown
750 {
751     typedef [unique] IOleAdviseHolder * LPOLEADVISEHOLDER;
752
753     HRESULT Advise(
754         [in, unique] IAdviseSink *pAdvise,
755         [out] DWORD *pdwConnection);
756
757     HRESULT Unadvise(
758         [in] DWORD dwConnection);
759
760     HRESULT EnumAdvise(
761         [out] IEnumSTATDATA **ppenumAdvise);
762
763     HRESULT SendOnRename(
764         [in, unique] IMoniker *pmk);
765
766     HRESULT SendOnSave();
767     HRESULT SendOnClose();
768 }
769
770
771 /*****************************************************************************
772  * IContinue interface
773  */
774 [
775     object,
776     uuid(0000012a-0000-0000-c000-000000000046)
777 ]
778 interface IContinue : IUnknown
779 {
780     HRESULT FContinue();
781 }
782
783
784 /*****************************************************************************
785  * IViewObject interface
786  */
787 [
788     object,
789     uuid(0000010d-0000-0000-c000-000000000046)
790 ]
791 interface IViewObject : IUnknown
792 {
793     typedef [unique] IViewObject *LPVIEWOBJECT;
794
795     [local]
796     HRESULT Draw(
797         [in] DWORD dwDrawAspect,
798         [in] LONG lindex,
799         [in, unique] void * pvAspect,
800         [in, unique] DVTARGETDEVICE *ptd,
801         [in] HDC hdcTargetDev,
802         [in] HDC hdcDraw,
803         [in] LPCRECTL lprcBounds,
804         [in, unique] LPCRECTL lprcWBounds,
805         [in] BOOL (*pfnContinue)(ULONG_PTR dwContinue),
806         [in] ULONG_PTR dwContinue);
807
808     [call_as(Draw)]
809     HRESULT RemoteDraw(
810         [in] DWORD dwDrawAspect,
811         [in] LONG lindex,
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);
819
820     [local]
821     HRESULT GetColorSet(
822         [in] DWORD dwDrawAspect,
823         [in] LONG lindex,
824         [in, unique] void *pvAspect,
825         [in, unique] DVTARGETDEVICE *ptd,
826         [in] HDC hicTargetDev,
827         [out] LOGPALETTE **ppColorSet);
828
829     [call_as(GetColorSet)]
830     HRESULT RemoteGetColorSet(
831         [in] DWORD dwDrawAspect,
832         [in] LONG lindex,
833         [in] ULONG_PTR pvAspect,
834         [in, unique] DVTARGETDEVICE *ptd,
835         [in] ULONG_PTR hicTargetDev,
836         [out] LOGPALETTE **ppColorSet);
837
838     [local]
839     HRESULT Freeze(
840         [in] DWORD dwDrawAspect,
841         [in] LONG lindex,
842         [in, unique] void *pvAspect,
843         [out] DWORD *pdwFreeze);
844
845     [call_as(Freeze)]
846     HRESULT RemoteFreeze(
847         [in] DWORD dwDrawAspect,
848         [in] LONG lindex,
849         [in] ULONG_PTR pvAspect,
850         [out] DWORD *pdwFreeze);
851
852     HRESULT Unfreeze(
853         [in] DWORD dwFreeze);
854
855     HRESULT SetAdvise(
856         [in] DWORD aspects,
857         [in] DWORD advf,
858         [in, unique] IAdviseSink *pAdvSink);
859
860     [local]
861     HRESULT GetAdvise(
862         [out, unique] DWORD *pAspects,
863         [out, unique] DWORD *pAdvf,
864         [out] IAdviseSink **ppAdvSink);
865
866     [call_as(GetAdvise)]
867     HRESULT RemoteGetAdvise(
868         [out] DWORD *pAspects,
869         [out] DWORD *pAdvf,
870         [out] IAdviseSink **ppAdvSink);
871 }
872
873
874 /*****************************************************************************
875  * IViewObject2 interface
876  */
877 [
878     object,
879     uuid(00000127-0000-0000-c000-000000000046)
880 ]
881 interface IViewObject2 : IViewObject
882 {
883     typedef [unique] IViewObject2 *LPVIEWOBJECT2;
884
885     HRESULT GetExtent(
886         [in]  DWORD dwDrawAspect,
887         [in]  LONG lindex,
888         [in, unique]  DVTARGETDEVICE* ptd,
889         [out] LPSIZEL lpsizel);
890 }
891
892
893 /*****************************************************************************
894  * IDropSource interface
895  */
896 [
897     local,
898     object,
899     uuid(00000121-0000-0000-c000-000000000046)
900 ]
901 interface IDropSource : IUnknown
902 {
903     typedef [unique] IDropSource *LPDROPSOURCE;
904
905     HRESULT QueryContinueDrag(
906         [in] BOOL fEscapePressed,
907         [in] DWORD grfKeyState);
908
909     HRESULT GiveFeedback(
910         [in] DWORD dwEffect);
911 }
912
913
914 /*****************************************************************************
915  * IDropTarget interface
916  */
917 [
918     object,
919     uuid(00000122-0000-0000-c000-000000000046),
920     pointer_default(unique)
921 ]
922 interface IDropTarget : IUnknown
923 {
924     typedef [unique] IDropTarget *LPDROPTARGET;
925
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;
937
938     HRESULT DragEnter(
939         [in, unique] IDataObject *pDataObj,
940         [in] DWORD grfKeyState,
941         [in] POINTL pt,
942         [in, out] DWORD *pdwEffect);
943
944     HRESULT DragOver(
945         [in] DWORD grfKeyState,
946         [in] POINTL pt,
947         [in, out] DWORD *pdwEffect);
948
949     HRESULT DragLeave();
950
951     HRESULT Drop(
952         [in, unique] IDataObject *pDataObj,
953         [in] DWORD grfKeyState,
954         [in] POINTL pt,
955         [in, out] DWORD *pdwEffect);
956 }