comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/ole/win32/OLEIDL.d @ 0:6dd524f61e62

add dwt win and basic java stuff
author Frank Benoit <benoit@tionex.de>
date Mon, 02 Mar 2009 14:44:16 +0100
parents
children 2e09b0e6857a
comparison
equal deleted inserted replaced
-1:000000000000 0:6dd524f61e62
1 module org.eclipse.swt.internal.ole.win32.OLEIDL;
2 //+-------------------------------------------------------------------------
3 //
4 // Microsoft Windows
5 // Copyright (C) Microsoft Corporation, 1992-1997.
6 //
7 // File: oadvhr.idl
8 //
9 //--------------------------------------------------------------------------
10 private import org.eclipse.swt.internal.win32.WINTYPES;
11 private import org.eclipse.swt.internal.ole.win32.extras;
12 private import org.eclipse.swt.internal.ole.win32.OBJIDL;
13 //private import std.c.windows.windows;
14 //private import std.c.windows.com;
15
16 extern( Windows ) {
17 //interface IOleInPlaceActiveObject;
18 //interface IEnumOLEVERB;
19
20 interface IOleAdviseHolder : IUnknown
21 {
22 HRESULT Advise( IAdviseSink pAdvise, DWORD * pdwConnection );
23 HRESULT Unadvise( DWORD dwConnection );
24 HRESULT EnumAdvise ( IEnumSTATDATA ppenumAdvise );
25 HRESULT SendOnRename( IMoniker pmk );
26 HRESULT SendOnSave();
27 HRESULT SendOnClose();
28 }
29 alias IOleAdviseHolder LPOLEADVISEHOLDER;
30
31 interface IOleCache : IUnknown
32 {
33 HRESULT Cache( FORMATETC *pformatetc, DWORD advf, DWORD * pdwConnection );
34 HRESULT Uncache( DWORD dwConnection );
35 HRESULT EnumCache( IEnumSTATDATA * ppenumSTATDATA );
36 HRESULT InitCache( IDataObject pDataObject );
37 HRESULT SetData( FORMATETC * pformatetc, STGMEDIUM * pmedium, BOOL fRelease );
38 }
39 alias IOleCache LPOLECACHE;
40
41 interface IOleCache2 : IOleCache
42 {
43 // Cache update Flags
44 /*
45 const DWORD UPDFCACHE_NODATACACHE = 0x00000001;
46 const DWORD UPDFCACHE_ONSAVECACHE = 0x00000002;
47 const DWORD UPDFCACHE_ONSTOPCACHE = 0x00000004;
48 const DWORD UPDFCACHE_NORMALCACHE = 0x00000008;
49 const DWORD UPDFCACHE_IFBLANK = 0x00000010;
50 const DWORD UPDFCACHE_ONLYIFBLANK = 0x80000000;
51
52 const DWORD UPDFCACHE_IFBLANKORONSAVECACHE =
53 (UPDFCACHE_IFBLANK | UPDFCACHE_ONSAVECACHE);
54 const DWORD UPDFCACHE_ALL =
55 ((DWORD)(~(UPDFCACHE_ONLYIFBLANK)));
56 const DWORD UPDFCACHE_ALLBUTNODATACACHE =
57 (UPDFCACHE_ALL & ((DWORD)(~UPDFCACHE_NODATACACHE)));
58
59
60 // IOleCache2::DiscardCache options
61 typedef [v1_enum] enum tagDISCARDCACHE
62 {
63 DISCARDCACHE_SAVEIFDIRTY = 0, // Save all dirty cache before discarding
64 DISCARDCACHE_NOSAVE = 1 // Don't save dirty caches before
65 // discarding
66 } DISCARDCACHE;
67 */
68
69 HRESULT UpdateCache( LPDATAOBJECT pDataObject, DWORD grfUpdf, LPVOID pReserved );
70
71 // [call_as(UpdateCache)]
72 // HRESULT RemoteUpdateCache( LPDATAOBJECT pDataObject, DWORD grfUpdf, DWORD pReserved );
73 HRESULT DiscardCache( DWORD dwDiscardOptions );
74 }
75 alias IOleCache2 LPOLECACHE2;
76
77 interface IOleCacheControl : IUnknown
78 {
79 HRESULT OnRun( LPDATAOBJECT pDataObject );
80 HRESULT OnStop();
81 }
82 alias IOleCacheControl LPOLECACHECONTROL;
83
84 interface IParseDisplayName : IUnknown
85 {
86 HRESULT ParseDisplayName( IBindCtx pbc, LPOLESTR pszDisplayName, ULONG * pchEaten, IMoniker * ppmkOut );
87 }
88 alias IParseDisplayName LPPARSEDISPLAYNAME;
89
90 interface IOleContainer : IParseDisplayName
91 {
92 HRESULT EnumObjects( DWORD grfFlags, IEnumUnknown * ppenum );
93 HRESULT LockContainer( BOOL fLock );
94 }
95 alias IOleContainer LPOLECONTAINER;
96
97
98 interface IOleClientSite : IUnknown
99 {
100 HRESULT SaveObject();
101 HRESULT GetMoniker( DWORD dwAssign, DWORD dwWhichMoniker, IMoniker * ppmk );
102 HRESULT GetContainer( IOleContainer * ppContainer );
103 HRESULT ShowObject();
104 HRESULT OnShowWindow( BOOL fShow );
105 HRESULT RequestNewObjectLayout();
106 }
107 alias IOleClientSite LPOLECLIENTSITE;
108
109 enum OLEGETMONIKER
110 {
111 OLEGETMONIKER_ONLYIFTHERE = 1,
112 OLEGETMONIKER_FORCEASSIGN = 2,
113 OLEGETMONIKER_UNASSIGN = 3,
114 OLEGETMONIKER_TEMPFORUSER = 4
115 }
116
117 enum OLEWHICHMK
118 {
119 OLEWHICHMK_CONTAINER = 1,
120 OLEWHICHMK_OBJREL = 2,
121 OLEWHICHMK_OBJFULL = 3
122 }
123
124 enum USERCLASSTYPE
125 {
126 USERCLASSTYPE_FULL = 1,
127 USERCLASSTYPE_SHORT = 2,
128 USERCLASSTYPE_APPNAME = 3,
129 }
130
131 enum OLEMISC
132 {
133 OLEMISC_RECOMPOSEONRESIZE = 0x00000001,
134 OLEMISC_ONLYICONIC = 0x00000002,
135 OLEMISC_INSERTNOTREPLACE = 0x00000004,
136 OLEMISC_STATIC = 0x00000008,
137 OLEMISC_CANTLINKINSIDE = 0x00000010,
138 OLEMISC_CANLINKBYOLE1 = 0x00000020,
139 OLEMISC_ISLINKOBJECT = 0x00000040,
140 OLEMISC_INSIDEOUT = 0x00000080,
141 OLEMISC_ACTIVATEWHENVISIBLE = 0x00000100,
142 OLEMISC_RENDERINGISDEVICEINDEPENDENT= 0x00000200,
143 OLEMISC_INVISIBLEATRUNTIME = 0x00000400,
144 OLEMISC_ALWAYSRUN = 0x00000800,
145 OLEMISC_ACTSLIKEBUTTON = 0x00001000,
146 OLEMISC_ACTSLIKELABEL = 0x00002000,
147 OLEMISC_NOUIACTIVATE = 0x00004000,
148 OLEMISC_ALIGNABLE = 0x00008000,
149 OLEMISC_SIMPLEFRAME = 0x00010000,
150 OLEMISC_SETCLIENTSITEFIRST = 0x00020000,
151 OLEMISC_IMEMODE = 0x00040000,
152 OLEMISC_IGNOREACTIVATEWHENVISIBLE = 0x00080000,
153 OLEMISC_WANTSTOMENUMERGE = 0x00100000,
154 OLEMISC_SUPPORTSMULTILEVELUNDO = 0x00200000
155 }
156
157 enum OLECLOSE
158 {
159 OLECLOSE_SAVEIFDIRTY = 0,
160 OLECLOSE_NOSAVE = 1,
161 OLECLOSE_PROMPTSAVE = 2,
162 SAVEIFDIRTY = 0,
163 NOSAVE = 1,
164 PROMPTSAVE = 2
165 }
166
167 interface IOleObject : IUnknown
168 {
169 HRESULT SetClientSite( IOleClientSite pClientSite );
170 HRESULT GetClientSite( IOleClientSite * ppClientSite );
171 HRESULT SetHostNames( LPCOLESTR szContainerApp, LPCOLESTR szContainerObj );
172 HRESULT Close( DWORD dwSaveOption );
173 HRESULT SetMoniker( DWORD dwWhichMoniker, IMoniker pmk );
174 HRESULT GetMoniker( DWORD dwAssign, DWORD dwWhichMoniker, IMoniker * ppmk );
175 HRESULT InitFromData( IDataObject pDataObject, BOOL fCreation, DWORD dwReserved );
176 HRESULT GetClipboardData( DWORD dwReserved, IDataObject * ppDataObject );
177 HRESULT DoVerb( LONG iVerb, LPMSG lpmsg, IOleClientSite pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect );
178 HRESULT EnumVerbs( IEnumOLEVERB * ppEnumOleVerb );
179 HRESULT Update();
180 HRESULT IsUpToDate();
181 HRESULT GetUserClassID( CLSID * pClsid );
182 HRESULT GetUserType( DWORD dwFormOfType, LPOLESTR * pszUserType );
183 HRESULT SetExtent( DWORD dwDrawAspect, SIZEL * psizel );
184 HRESULT GetExtent( DWORD dwDrawAspect, SIZEL * psizel );
185 HRESULT Advise( IAdviseSink pAdvSink, DWORD * pdwConnection );
186 HRESULT Unadvise( DWORD dwConnection );
187 HRESULT EnumAdvise( IEnumSTATDATA * ppenumAdvise );
188 HRESULT GetMiscStatus( DWORD dwAspect, DWORD *pdwStatus );
189 HRESULT SetColorScheme( LOGPALETTE *pLogpal );
190 }
191 alias IOleObject LPOLEOBJECT;
192
193 enum OLERENDER
194 {
195 OLERENDER_NONE = 0,
196 OLERENDER_DRAW = 1,
197 OLERENDER_FORMAT = 2,
198 OLERENDER_ASIS = 3,
199 NONE = 0,
200 DRAW = 1,
201 FORMAT = 2,
202 ASIS = 3
203 }
204 alias OLERENDER * LPOLERENDER;
205
206 interface IOLETypes
207 {
208 }
209 /****** OLE value types ***********************************************/
210 /* rendering options */
211 /****** Clipboard Data structures *****************************************/
212 struct OBJECTDESCRIPTOR
213 {
214 ULONG cbSize; // Size of structure in bytes
215 CLSID clsid; // CLSID of data being transferred
216 DWORD dwDrawAspect; // Display aspect of the object
217 // normally DVASPECT_CONTENT or ICON.
218 // dwDrawAspect will be 0 (which is NOT
219 // DVASPECT_CONTENT) if the copier or
220 // dragsource didn't draw the object to
221 // begin with.
222 SIZEL sizel; // size of the object in HIMETRIC
223 // sizel is opt.: will be (0,0) for apps
224 // which don't draw the object being
225 // transferred
226 POINTL pointl; // Offset in HIMETRIC units from the
227 // upper-left corner of the obj where the
228 // mouse went down for the drag.
229 // NOTE: y coordinates increase downward.
230 // x coordinates increase to right
231 // pointl is opt.; it is only meaningful
232 // if object is transfered via drag/drop.
233 // (0, 0) if mouse position is unspecified
234 // (eg. when obj transfered via clipboard)
235 DWORD dwStatus; // Misc. status flags for object. Flags are
236 // defined by OLEMISC enum. these flags
237 // are as would be returned
238 // by IOleObject::GetMiscStatus.
239 DWORD dwFullUserTypeName; // Offset from beginning of structure to
240 // null-terminated string that specifies
241 // Full User Type Name of the object.
242 // 0 indicates string not present.
243 DWORD dwSrcOfCopy; // Offset from beginning of structure to
244 // null-terminated string that specifies
245 // source of the transfer.
246 // dwSrcOfCOpy is normally implemented as
247 // the display name of the temp-for-user
248 // moniker which identifies the source of
249 // the data.
250 // 0 indicates string not present.
251 // NOTE: moniker assignment is NOT forced.
252 // see IOleObject::GetMoniker(
253 // OLEGETMONIKER_TEMPFORUSER)
254
255 /* variable sized string data may appear here */
256
257 }
258 alias OBJECTDESCRIPTOR LINKSRCDESCRIPTOR;
259 alias OBJECTDESCRIPTOR * POBJECTDESCRIPTOR;
260 alias OBJECTDESCRIPTOR * LPOBJECTDESCRIPTOR;
261 alias OBJECTDESCRIPTOR * PLINKSRCDESCRIPTOR;
262 alias OBJECTDESCRIPTOR * LPLINKSRCDESCRIPTOR;
263
264
265 interface IOleWindow : IUnknown
266 {
267 HRESULT GetWindow( HWND * phwnd );
268 HRESULT ContextSensitiveHelp( BOOL fEnterMode );
269 }
270 alias IOleWindow LPOLEWINDOW;
271 enum OLEUPDATE
272 {
273 OLEUPDATE_ALWAYS=1,
274 OLEUPDATE_ONCALL=3
275 }
276 alias OLEUPDATE * LPOLEUPDATE;
277 alias OLEUPDATE * POLEUPDATE;
278
279 // for IOleLink::BindToSource
280 enum OLELINKBIND
281 {
282 OLELINKBIND_EVENIFCLASSDIFF = 1,
283 }
284
285 interface IOleLink : IUnknown
286 {
287 /* Link update options */
288 HRESULT SetUpdateOptions( DWORD dwUpdateOpt );
289 HRESULT GetUpdateOptions( DWORD * pdwUpdateOpt );
290 HRESULT SetSourceMoniker( IMoniker pmk, REFCLSID rclsid );
291 HRESULT GetSourceMoniker( IMoniker * ppmk );
292 HRESULT SetSourceDisplayName( LPCOLESTR pszStatusText );
293 HRESULT GetSourceDisplayName( LPOLESTR * ppszDisplayName );
294 HRESULT BindToSource( DWORD bindflags, IBindCtx pbc );
295 HRESULT BindIfRunning();
296 HRESULT GetBoundSource( IUnknown * ppunk );
297 HRESULT UnbindSource();
298 HRESULT Update( IBindCtx pbc );
299 }
300 alias IOleLink LPOLELINK;
301
302 enum BINDSPEED
303 {
304 BINDSPEED_INDEFINITE = 1,
305 BINDSPEED_MODERATE = 2,
306 BINDSPEED_IMMEDIATE = 3
307 }
308
309 enum OLECONTF
310 {
311 OLECONTF_EMBEDDINGS = 1,
312 OLECONTF_LINKS = 2,
313 OLECONTF_OTHERS = 4,
314 OLECONTF_ONLYUSER = 8,
315 OLECONTF_ONLYIFRUNNING = 16
316 }
317
318 interface IOleItemContainer : IOleContainer
319 {
320 HRESULT GetObject( LPOLESTR pszItem, DWORD dwSpeedNeeded, IBindCtx pbc, REFIID riid, void **ppvObject);
321 HRESULT GetObjectStorage( LPOLESTR pszItem, IBindCtx pbc, REFIID riid, void **ppvStorage);
322 HRESULT IsRunning(LPOLESTR pszItem);
323 }
324 alias IOleItemContainer LPOLEITEMCONTAINER;
325
326 alias RECT BORDERWIDTHS;
327 alias LPRECT LPBORDERWIDTHS;
328 alias LPCRECT LPCBORDERWIDTHS;
329
330 interface IOleInPlaceUIWindow : IOleWindow
331 {
332 HRESULT GetBorder( LPRECT lprectBorder );
333 HRESULT RequestBorderSpace( LPCBORDERWIDTHS pborderwidths );
334 HRESULT SetBorderSpace( LPCBORDERWIDTHS pborderwidths );
335 HRESULT SetActiveObject( LPOLEINPLACEACTIVEOBJECT pActiveObject, LPCOLESTR pszObjName );
336 }
337 alias IOleInPlaceUIWindow LPOLEINPLACEUIWINDOW;
338
339 interface IOleInPlaceActiveObject : IOleWindow
340 {
341 HRESULT TranslateAccelerator( LPMSG lpmsg );
342 HRESULT OnFrameWindowActivate( BOOL fActivate );
343 HRESULT OnDocWindowActivate( BOOL fActivate );
344 HRESULT ResizeBorder( LPCRECT prcBorder, IOleInPlaceUIWindow pUIWindow, BOOL fFrameWindow );
345 HRESULT EnableModeless ( BOOL fEnable );
346 }
347 alias IOleInPlaceActiveObject LPOLEINPLACEACTIVEOBJECT;
348
349 struct OLEINPLACEFRAMEINFO // OleInPlaceFrameInfo
350 {
351 UINT cb;
352 BOOL fMDIApp;
353 HWND hwndFrame;
354 HACCEL haccel;
355 UINT cAccelEntries;
356 }
357 alias OLEINPLACEFRAMEINFO * LPOLEINPLACEFRAMEINFO;
358
359
360 struct OLEMENUGROUPWIDTHS
361 {
362 LONG width[6];
363 }
364 alias OLEMENUGROUPWIDTHS * LPOLEMENUGROUPWIDTHS;
365
366 alias HGLOBAL HOLEMENU;
367
368 interface IOleInPlaceFrame : IOleInPlaceUIWindow
369 {
370 HRESULT InsertMenus( HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths );
371 HRESULT SetMenu( HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject );
372 HRESULT RemoveMenus( HMENU hmenuShared );
373 HRESULT SetStatusText( LPCOLESTR pszStatusText );
374 HRESULT EnableModeless( BOOL fEnable );
375 HRESULT TranslateAccelerator( LPMSG lpmsg, WORD wID );
376 }
377 alias IOleInPlaceFrame LPOLEINPLACEFRAME;
378
379 interface IOleInPlaceObject : IOleWindow
380 {
381 HRESULT InPlaceDeactivate();
382 HRESULT UIDeactivate();
383 HRESULT SetObjectRects( LPCRECT lprcPosRect, LPCRECT lprcClipRect );
384 HRESULT ReactivateAndUndo();
385 }
386 alias IOleInPlaceObject LPOLEINPLACEOBJECT;
387
388 interface IOleInPlaceSite : IOleWindow
389 {
390 HRESULT CanInPlaceActivate();
391 HRESULT OnInPlaceActivate();
392 HRESULT OnUIActivate();
393 HRESULT GetWindowContext( IOleInPlaceFrame * ppFrame, IOleInPlaceUIWindow * ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo );
394 HRESULT Scroll( SIZE scrollExtant );
395 HRESULT OnUIDeactivate( BOOL fUndoable );
396 HRESULT OnInPlaceDeactivate();
397 HRESULT DiscardUndoState();
398 HRESULT DeactivateAndUndo();
399 HRESULT OnPosRectChange( LPCRECT lprcPosRect );
400 }
401 alias IOleInPlaceSite LPOLEINPLACESITE;
402
403 interface IContinue : IUnknown
404 {
405 HRESULT FContinue();
406 }
407
408 interface IViewObject : IUnknown
409 {
410 HRESULT Draw( DWORD dwDrawAspect, LONG lindex, void * pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL (*pfnContinue)(DWORD dwContinue), DWORD dwContinue );
411 HRESULT GetColorSet( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet );
412 HRESULT Freeze( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze );
413 HRESULT Unfreeze( DWORD dwFreeze );
414 HRESULT SetAdvise( DWORD aspects, DWORD advf, IAdviseSink pAdvSink );
415 HRESULT GetAdvise( DWORD * pAspects, DWORD * pAdvf, IAdviseSink * ppAdvSink );
416 }
417 alias IViewObject LPVIEWOBJECT;
418
419 interface IViewObject2 : IViewObject
420 {
421 HRESULT GetExtent( DWORD dwDrawAspect, LONG lindex, DVTARGETDEVICE* ptd, LPSIZEL lpsizel );
422 }
423 alias IViewObject2 LPVIEWOBJECT2;
424
425 interface IDropSource : IUnknown
426 {
427 HRESULT QueryContinueDrag( BOOL fEscapePressed, DWORD grfKeyState );
428 HRESULT GiveFeedback( DWORD dwEffect );
429 }
430 alias IDropSource LPDROPSOURCE;
431
432 const DWORD MK_ALT = 0x0020;
433 const DWORD DROPEFFECT_NONE = 0;
434 const DWORD DROPEFFECT_COPY = 1;
435 const DWORD DROPEFFECT_MOVE = 2;
436 const DWORD DROPEFFECT_LINK = 4;
437 const DWORD DROPEFFECT_SCROLL = 0x80000000;
438 const DWORD DD_DEFSCROLLINSET = 11;
439 const DWORD DD_DEFSCROLLDELAY = 50;
440 const DWORD DD_DEFSCROLLINTERVAL = 50;
441 const DWORD DD_DEFDRAGDELAY = 200;
442 const DWORD DD_DEFDRAGMINDIST = 2;
443
444 interface IDropTarget : IUnknown
445 {
446 HRESULT DragEnter( IDataObject pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect );
447 HRESULT DragOver( DWORD grfKeyState, POINTL pt, DWORD *pdwEffect );
448 HRESULT DragLeave();
449 HRESULT Drop(IDataObject pDataObj,DWORD grfKeyState,POINTL pt,DWORD *pdwEffect);
450 }
451 alias IDropTarget LPDROPTARGET;
452
453 struct OLEVERB {
454 LONG lVerb;
455 LPOLESTR lpszVerbName;
456 DWORD fuFlags;
457 DWORD grfAttribs;
458 }
459 alias OLEVERB * LPOLEVERB;
460
461 // Bitwise verb attributes used in OLEVERB.grfAttribs
462 enum OLEVERBATTRIB // bitwise
463 {
464 OLEVERBATTRIB_NEVERDIRTIES = 1,
465 OLEVERBATTRIB_ONCONTAINERMENU = 2,
466 NEVERDIRTIES = 1,
467 ONCONTAINERMENU = 2
468 }
469
470 interface IEnumOLEVERB : IUnknown
471 {
472 HRESULT Next( ULONG celt, LPOLEVERB rgelt, ULONG * pceltFetched );
473 HRESULT Skip( ULONG celt );
474 HRESULT Reset();
475 HRESULT Clone( IEnumOLEVERB * ppenum );
476 }
477 alias IEnumOLEVERB LPENUMOLEVERB;
478
479 } /* extern(Windows) */