OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ocbocole.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectComponents
3// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
4/// \file
5/// ObjectComponents BOcOle engine linking & embedding interfaces
6//----------------------------------------------------------------------------
7
8#if !defined(OCF_OCBOCOLE_H)
9#define OCF_OCBOCOLE_H
10
11#include <owl/private/defs.h>
12#if defined(BI_HAS_PRAGMA_ONCE)
13# pragma once
14#endif
15
16#include <owl/geometry.h> // TPoint, TSize & TRect
17
18#include <ocf/ocobject.h> // Get ocf structs & enums
19
20
21
22namespace ocf {
23
24# include <pshpack8.h>
25
26//
27// BOcOle DLL name, entry point and version resource
28//
29#if _WIN64
30# define BOLEDLL _T("BOCOF64.DLL")
31# define BOLEDLLW _T("BOCOFW64.DLL")
32#elif _WIN32
33# define BOLEDLL _T("BOCOF.DLL")
34# define BOLEDLLW _T("BOCOFW.DLL")
35#elif __APPLE__
36 // Mac OS X (or iOS, requires more detection)
37#else
38 //#error Not a supported platform
39# define BOLEDLL _T("BOCOF.so")
40# define BOLEDLLW _T("BOCOFW.so")
41#endif
42
43#define BOLEBIND "CreateClassMgr"
44#define BOLE_FILEVER_LS 0x00010054L
45#define BOLE_FILEVER_MS 0x00010001L
46
47//
48// GUIDs exported by the BOcOle DLL
49//
50#if defined(INIT_BGUID)
51# define DEFINE_BOLEGUID(name, l) \
52 EXTERN_C __declspec(dllexport) const GUID CDECL name = \
53 { l, 0, 0, {0xC0,0,0,0,0,0,0,0x46} }
54#else
55# if defined(_OCFDLL)
56# if defined(_BUILDOCFDLL)
57# define DEFINE_BOLEGUID(name, l) EXTERN_C const GUID CDECL name
58# else
59# define DEFINE_BOLEGUID(name, l) EXTERN_C __declspec(dllimport) const GUID CDECL name
60# endif
61# else // !defined(_OCFDLL)
62# define DEFINE_BOLEGUID(name, l) EXTERN_C const GUID CDECL name
63# endif
64#endif
65
66DEFINE_BOLEGUID(IID_IBPart, 0x02A104L);
67DEFINE_BOLEGUID(IID_IBSite, 0x02A105L);
68DEFINE_BOLEGUID(IID_IBContainer, 0x02A106L);
69DEFINE_BOLEGUID(IID_IBDocument, 0x02A107L);
70DEFINE_BOLEGUID(IID_IBService, 0x02A108L);
71DEFINE_BOLEGUID(IID_IBApplication, 0x02A109L);
72DEFINE_BOLEGUID(IID_IBClassMgr, 0x02A10AL);
73DEFINE_BOLEGUID(IID_IBLinkInfo, 0x02A10BL);
74DEFINE_BOLEGUID(IID_IBLinkable, 0x02A10CL);
75DEFINE_BOLEGUID(IID_IBRootLinkable, 0x02A10DL);
76DEFINE_BOLEGUID(IID_IBContains, 0x02A10EL);
77DEFINE_BOLEGUID(IID_BOleDocument, 0x02A10FL);
78DEFINE_BOLEGUID(IID_BOlePart, 0x02A110L);
79DEFINE_BOLEGUID(IID_IBDataConsumer, 0x02A111L);
80DEFINE_BOLEGUID(IID_IBDataProvider, 0x02A112L);
81DEFINE_BOLEGUID(IID_IBWindow, 0x02A113L);
82DEFINE_BOLEGUID(IID_IBDataNegotiator,0x02A114L);
83DEFINE_BOLEGUID(IID_IBDropDest, 0x02A115L);
84DEFINE_BOLEGUID(IID_BOleShadowData, 0x02A116L);
85DEFINE_BOLEGUID(IID_IBClass, 0x02A117L);
86DEFINE_BOLEGUID(IID_IBOverrideBrowseLinks, 0x02A118L);
87DEFINE_BOLEGUID(IID_BOleSite, 0x02A119L);
88DEFINE_BOLEGUID(IID_IBSite2, 0x02A11AL);
89DEFINE_BOLEGUID(IID_IBOverrideHelpButton, 0x02A11BL);
90DEFINE_BOLEGUID(IID_IBDataProvider2, 0x02A11CL);
91DEFINE_BOLEGUID(IID_IBPart2, 0x02A11DL);
92DEFINE_BOLEGUID(IID_IBService2, 0x02A11EL);
93DEFINE_BOLEGUID(IID_BOleControl, 0x02A11FL);
94DEFINE_BOLEGUID(IID_IBControl, 0x02A120L);
95DEFINE_BOLEGUID(IID_IBControlSite, 0x02A121L);
96DEFINE_BOLEGUID(IID_BOleFont, 0x02A122L);
97DEFINE_BOLEGUID(IID_BOleControlSite, 0x02A123L);
98DEFINE_BOLEGUID(IID_IBEventsHandler, 0x02A124L);
99DEFINE_BOLEGUID(IID_IBEventClass, 0x02A125L);
100DEFINE_BOLEGUID(IID_IBSinkList, 0x02A126L);
101DEFINE_BOLEGUID(IID_BOlePicture, 0x02A127L);
102//DEFINE_BOLEGUID(IID_BOlePart2, 0x02A127L);
103DEFINE_BOLEGUID(IID_IBPicture, 0x02A128L);
104DEFINE_BOLEGUID(IID_IBDataState, 0x02A129L);
105
106//
107// BOle Class ids for instantiating BOle objects (helpers)
108//
110const BCID cidBOleService = 1L; //
111const BCID cidBOleDocument = 2L; // helper for containers
112const BCID cidBOlePart = 3L; // helper for sites
113const BCID cidBOleSite = 4L; // helper for parts
114const BCID cidBOleInProcSite = 5L; // helper for parts
115const BCID cidBOleContainer = 6L; // helper for part documents
116const BCID cidBOleData = 7L; // helper for data transfer
117const BCID cidBOleFactory = 8L; // helper for class factory
118const BCID cidBOleShadowData = 9L; // helper for non delayed rendering
119const BCID cidBOleInProcHandler= 10L; // helper for dll handler parts
120const BCID cidBOleControl = 11L; // helper for controls
121const BCID cidBOleFont = 12L; // IBFont implementation
122const BCID cidBOleControlSite = 13L; // helper for controls
123const BCID cidBOleControlFactory = 14L;// helper for control class factory
124const BCID cidBOlePicture = 15L; // IBPicture implementation
125
126//
127// Forward declarations
128//
158
159
160// MAP_PIX_TO_LOGHIM / MAP_LOGHIM_TO_PIX --
161//
162// The OLE2-defined macros for these guys don't round. Our versions
163// add half the denominator so that the truncated result of the integer
164// division is rounded to the nearest integer.
165//
166#define HIMETRIC_PER_INCH 2540 // number HIMETRIC units per inch
167
168#ifdef MAP_PIX_TO_LOGHIM
169#undef MAP_PIX_TO_LOGHIM
170#endif
171#define MAP_PIX_TO_LOGHIM(pixel, pixelsPerInch) \
172 ((ULONG) ((((ULONG)HIMETRIC_PER_INCH) * pixel + (pixelsPerInch >> 1)) / pixelsPerInch))
173
174#ifdef MAP_LOGHIM_TO_PIX
175#undef MAP_LOGHIM_TO_PIX
176#endif
177#define MAP_LOGHIM_TO_PIX(hiMetric, pixelsPerInch) \
178 (UINT) ((((double) hiMetric) * pixelsPerInch + (HIMETRIC_PER_INCH >> 1)) / HIMETRIC_PER_INCH)
179
180
181//
182/// IClassMgr abstract base class
183//
184class _ICLASS IBClassMgr : public IUnknown {
185 public:
186 virtual HRESULT _IFUNC ComponentCreate(
187 IUnknown * * ppRet,
188 IUnknown * pAggregator,
189 BCID classId
190 ) = 0;
191 virtual HRESULT _IFUNC ComponentInfoGet(
192 IUnknown * * ppInfo,
193 IUnknown * pAggregator,
194 BCID classId
195 ) = 0;
196};
197
198//
199/// IBDataNegotiator -- Enumerats formats for drag/drop and paste
200//
201class _ICLASS IBDataNegotiator : public IUnknown {
202 public:
204 virtual HRESULT _IFUNC GetFormat(owl::uint, TOcFormatInfo *) = 0;
205};
206
207//
208/// IBDataConsumer -- Supported by containers who want to accept drag/drop
209/// and paste. No new methods over the negotiator, so
210/// this is just a placeholder for the consumer name.
211//
214
215//
216/// IBDataProvider -- Supported by parts and/or sites which can be
217/// copied to the OLE2 clipboard
218//
220 public:
221 virtual HANDLE _IFUNC GetFormatData(TOcFormatInfo *) = 0;
222 virtual HRESULT _IFUNC Draw(HDC, const RECTL *,
223 const RECTL *, TOcAspect,
224 TOcDraw bd = drNone) = 0;
225 virtual HRESULT _IFUNC GetPartSize(owl::TSize *) = 0;
226 virtual HRESULT _IFUNC Save(IStorage *, BOOL fSamAsLoad,
227 BOOL fRemember) = 0;
228};
229
230//
231/// IBDataProvider2 -- new version of IBDataProvider
232//
234 public:
235 virtual HRESULT _IFUNC SetFormatData(TOcFormatInfo * fmt, HANDLE data, BOOL release) = 0;
236};
237
238//
239/// IBPart -- Supported by server objects
240//
242 public:
243 virtual HRESULT _IFUNC Init(IBSite *, TOcInitInfo *) = 0;
244 virtual HRESULT _IFUNC Close() = 0;
245 virtual HRESULT _IFUNC CanOpenInPlace() = 0;
246 virtual HRESULT _IFUNC SetPartSize(owl::TSize *) = 0;
247 virtual HRESULT _IFUNC SetPartPos(owl::TRect *) = 0;
248 virtual HRESULT _IFUNC Activate(BOOL) = 0;
249 virtual HRESULT _IFUNC Show(BOOL) = 0;
250 virtual HRESULT _IFUNC Open(BOOL) = 0;
251 virtual HRESULT _IFUNC EnumVerbs(TOcVerb *) = 0;
252 virtual HRESULT _IFUNC DoVerb(owl::uint) = 0;
253 virtual HWND _IFUNC OpenInPlace(HWND) = 0;
254 virtual HRESULT _IFUNC InsertMenus(HMENU, TOcMenuWidths *) = 0;
255 virtual HRESULT _IFUNC ShowTools(BOOL) = 0;
256 virtual void _IFUNC FrameResized(const owl::TRect *, BOOL) = 0;
257 virtual HRESULT _IFUNC DragFeedback(owl::TPoint *, BOOL) = 0;
258 virtual HRESULT _IFUNC GetPalette(LOGPALETTE * *) = 0;
259 virtual HRESULT _IFUNC SetHost(IBContainer * pObjContainer) = 0;
260 virtual HRESULT _IFUNC DoQueryInterface(const IID & iid, void * * pif)= 0;
261
262 virtual LPOLESTR _IFUNC GetName(TOcPartName) = 0;
263};
264
265//
266/// IBPart2 -- Supported by server objects
267//
268class _ICLASS IBPart2 : public IBPart,
269 public IBDataProvider2 {
270};
271
272//
273/// IService abstract base class
274//
275class _ICLASS IBService : public IUnknown {
276 public:
277 virtual void _IFUNC OnResize() = 0;
278 virtual void _IFUNC OnActivate(BOOL) = 0;
279 virtual HRESULT _IFUNC OnModalDialog(BOOL) = 0;
280 virtual HRESULT _IFUNC OnSetFocus(BOOL) = 0;
281
282 virtual HRESULT _IFUNC Init(IBApplication *) = 0;
283 virtual HRESULT _IFUNC RegisterClass(LPCOLESTR, IBClassMgr *,
284 BCID, BOOL embedInSelf,
285 BOOL singleUse) = 0;
286 virtual HRESULT _IFUNC UnregisterClass(LPCOLESTR) = 0;
287 virtual HRESULT _IFUNC TranslateAccel(MSG *) = 0;
289 virtual HRESULT _IFUNC CanClose() = 0;
290
291 virtual HRESULT _IFUNC BrowseClipboard(TOcInitInfo *) = 0;
292 virtual HRESULT _IFUNC Browse(TOcInitInfo *) = 0;
293
294 virtual HRESULT _IFUNC Paste(TOcInitInfo *) = 0;
295 virtual HRESULT _IFUNC Clip(IBDataProvider *, BOOL, BOOL,
296 BOOL) = 0;
298 TOcDropAction *) = 0;
300 BOOL) = 0;
301 virtual HRESULT _IFUNC ConvertUI(IBPart *, BOOL,
302 TOcConvertInfo *) = 0;
303 virtual HRESULT _IFUNC ConvertGuts(IBPart *, BOOL,
304 TOcConvertInfo *) = 0;
306 IBDataConsumer *)= 0;
307};
308
310 public:
311 virtual HRESULT _IFUNC BrowseControls(TOcInitInfo *) = 0;
312 virtual HRESULT _IFUNC RegisterControlClass(LPCOLESTR, IBClassMgr *,
313 BCID, BOOL embedInSelf,
314 BOOL singleUse) = 0;
315 virtual HRESULT _IFUNC UnregisterControlClass(LPCOLESTR) = 0;
316};
317
318//
319/// ILinkable abstract base class
320//
321class _ICLASS IBLinkable : public IUnknown {
322 public:
323 virtual HRESULT _IFUNC GetMoniker(IMoniker * * ppMon) = 0;
324 virtual HRESULT _IFUNC OnRename(IBLinkable * pContainer,
325 LPCOLESTR name) = 0;
326 // pass 0 name when Doc closes
327 // pass boledoc for pContainer if root part(file)
328};
329
330//
331//
332//
334 public:
335 virtual HRESULT _IFUNC Init(IBContains * pC, LPCOLESTR szProgId) = 0;
336 virtual HRESULT _IFUNC SetMoniker(IMoniker * pMon) = 0;
337};
338//
339// on BOleLinkDoc used by Part servers and Linking Containers
340// on BOleSite used by parts
341//
342
343//
344/// IContains abstract base class
345//
346class _ICLASS IBContains : public IUnknown {
347 public:
348 virtual HRESULT _IFUNC Init(LPCOLESTR) = 0;
349 virtual HRESULT _IFUNC GetPart(IBPart * *, LPCOLESTR) = 0;
350};
351//
352// on linkable containers (all Containers with BOleLinkDoc helper)
353// on linkable server documents (with BOleLinkDoc helper)
354// on intermediate parts (in addition to IPart)
355//
356
357//
358/// IBDocument -- Supported by BOleDocument one per container child window
359//
360class _ICLASS IBDocument : public IUnknown {
361 public:
362 virtual HRESULT _IFUNC Init(IBContainer *) = 0;
363 virtual void _IFUNC OnResize() = 0;
364 virtual void _IFUNC OnActivate(BOOL) = 0;
365 virtual void _IFUNC OnClose() = 0;
366 virtual HRESULT _IFUNC OnSetFocus(BOOL) = 0;
367
368 virtual HRESULT _IFUNC EnumLinks(IBLinkInfo * *) = 0;
369 virtual HRESULT _IFUNC BrowseLinks() = 0;
370 virtual HRESULT _IFUNC UpdateLinks() = 0;
371};
372
373//
374/// IBWindow -- Supported on child window *and* frame window of container apps
375//
376class _ICLASS IBWindow : public IUnknown {
377 public:
378 virtual HWND _IFUNC GetWindow() = 0;
379 virtual HRESULT _IFUNC GetWindowRect(owl::TRect *) = 0;
380 virtual LPCOLESTR _IFUNC GetWindowTitle() = 0;
381 virtual void _IFUNC AppendWindowTitle(LPCOLESTR) = 0;
382 virtual HRESULT _IFUNC SetStatusText(LPCOLESTR) = 0;
383
384 virtual HRESULT _IFUNC RequestBorderSpace(const owl::TRect *) = 0;
385 virtual HRESULT _IFUNC SetBorderSpace(const owl::TRect *) = 0;
386
387 virtual HRESULT _IFUNC InsertContainerMenus(HMENU,
388 TOcMenuWidths *) = 0;
389 virtual HRESULT _IFUNC SetFrameMenu(HMENU) = 0;
390 virtual void _IFUNC RestoreUI() = 0;
391 virtual HRESULT _IFUNC Accelerator(MSG *) = 0;
392 virtual HRESULT _IFUNC GetAccelerators(HACCEL *, int *) = 0;
393};
394
395//
396/// IBContainer -- Supported by container app's document window
397//
399 public:
400 virtual HRESULT _IFUNC FindDropDest(owl::TPoint *, IBDropDest * *)=0;
401 virtual HRESULT _IFUNC AllowInPlace() = 0;
402 virtual HRESULT _IFUNC BringToFront() = 0;
403};
404
405//
406/// IBDropDest -- Supported by container app's document window and/or other
407/// areas inside the window.
408//
410 public:
411 virtual HRESULT _IFUNC Drop(TOcInitInfo *, owl::TPoint *,
412 const owl::TRect *) = 0;
413 virtual void _IFUNC DragFeedback(owl::TPoint *, const owl::TRect *,
414 TOcMouseAction, owl::uint, HRESULT&) = 0;
415 virtual HRESULT _IFUNC Scroll(TOcScrollDir scrollDir) = 0;
416 virtual HRESULT _IFUNC GetScrollRect(owl::TRect *) = 0;
417};
418
419//
420/// IBApplication -- Supported at frame window/app object of container apps
421//
423 public:
424 virtual LPCOLESTR _IFUNC GetAppName() = 0;
426 virtual HRESULT _IFUNC CanLink() = 0;
427 virtual HRESULT _IFUNC CanEmbed() = 0;
428 virtual HRESULT _IFUNC IsMDI() = 0;
429 virtual HRESULT _IFUNC OnModalDialog(BOOL) = 0;
431 virtual void _IFUNC ShutdownMaybe() = 0;
432};
433
434//
435/// IBSite -- Supported by container apps for each linked/embedded object
436//
437class _ICLASS IBSite : public IUnknown {
438 public:
439 virtual HRESULT _IFUNC SiteShow(BOOL) = 0;
440 virtual HRESULT _IFUNC DiscardUndo() = 0;
441 virtual HRESULT _IFUNC GetSiteRect(owl::TRect *, owl::TRect *) = 0;
442 virtual HRESULT _IFUNC SetSiteRect(const owl::TRect *) = 0;
443 virtual HRESULT _IFUNC SetSiteExtent(const owl::TSize *) = 0;
444 virtual HRESULT _IFUNC GetZoom(TOcScaleInfo * pScale) = 0;
445 virtual void _IFUNC Invalidate(TOcInvalidate) = 0;
446 virtual void _IFUNC OnSetFocus(BOOL) = 0;
447 virtual HRESULT _IFUNC Init(IBDataProvider *, IBPart *,
448 LPCOLESTR, BOOL) = 0;
449 virtual void _IFUNC Disconnect() = 0;
450};
451
452/// IBSite2 -- Add flexibility to have parent of site not be container
453//
454class _ICLASS IBSite2 : public IBSite {
455 public:
456 virtual HRESULT _IFUNC GetParentWindow(HWND *) = 0;
457};
458
459// IBDataState
460//
461class _ICLASS IBDataState: public IUnknown {
462 public:
463 virtual void _IFUNC SetDirty (BOOL) = 0;
464 virtual HRESULT _IFUNC IsDirty () = 0;
465 virtual HRESULT _IFUNC GetClassID (LPCLSID) = 0;
466};
467
468//
469// IBControlSite
470//
471class _ICLASS IBControlSite : public IUnknown
472{
473 public:
474 virtual HRESULT _IFUNC Init(UINT, IBControl*, UINT) = 0;
475 virtual HRESULT _IFUNC OnPropertyChanged(DISPID dispid) = 0;
476 virtual HRESULT _IFUNC OnPropertyRequestEdit(DISPID dispid) = 0;
477 virtual HRESULT _IFUNC OnControlFocus(BOOL fGotFocus) = 0;
478 virtual HRESULT _IFUNC TransformCoords(owl::TPointL * lpptlHimetric,
479 owl::TPointF * lpptfContainer, DWORD flags) = 0;
480};
481
482//
483// IBControl
484//
485class _ICLASS IBControl : public IBPart //, public IBDataProvider2
486{
487 public:
488 virtual HRESULT _IFUNC GetEventIID (IID *iidEvent) = 0;
489 virtual HRESULT _IFUNC GetEventTypeInfo (ITypeInfo * * ppTypeInfo) = 0;
490 virtual HRESULT _IFUNC GetCtrlDispatch (IDispatch * * ppDispatch) = 0;
491 virtual HRESULT _IFUNC SetEventDispatch (IDispatch *) = 0;
492 virtual HRESULT _IFUNC SetAmbientDispatch (IDispatch *) = 0;
493
494 // standard control methods - other methods access thru GetCtrlDispatch ()
495 virtual HRESULT _IFUNC Refresh () = 0;
496 virtual HRESULT _IFUNC DoClick () = 0;
497 virtual HRESULT _IFUNC AboutBox () = 0;
498
499 virtual HRESULT _IFUNC AmbientChanged (DISPID dispid) = 0;
500
501 // function passed down by BOleControlSite
502 virtual HRESULT _IFUNC GetControlInfo (LPCONTROLINFO) = 0;
503 virtual HRESULT _IFUNC OnMnemonic (LPMSG) = 0;
504 virtual HRESULT _IFUNC FreezeEvents (BOOL) = 0;
505 virtual HRESULT _IFUNC GetClassInfo (LPTYPEINFO *) = 0;
506 virtual HRESULT _IFUNC GetSizeMax (ULARGE_INTEGER *) = 0;
507 virtual HRESULT _IFUNC Save (LPSTREAM) = 0;
508};
509
510//
511// IBSinkList
512//
513class _ICLASS IBSinkList : public IUnknown {
514 public:
515 virtual HRESULT _IFUNC NextSink(LPVOID *) = 0;
516 virtual HRESULT _IFUNC GetSinkAt(int, LPVOID *) = 0;
517 virtual HRESULT _IFUNC Reset() = 0;
518};
519
520//
521// IBEventsHandler
522//
523class _ICLASS IBEventsHandler : public IUnknown {
524 public:
525 virtual HRESULT _IFUNC RegisterEventsSet(REFIID, UINT) = 0;
526 virtual HRESULT _IFUNC RegisterConnectionPoint(LPCONNECTIONPOINT) = 0;
527 virtual HRESULT _IFUNC GetSinkListForIID(REFIID, IBSinkList**) = 0;
528};
529
530//
531// IBEventClass
532//
533class _ICLASS IBEventClass : public IUnknown {
534 public:
535 virtual HRESULT _IFUNC GetSinkList(IBSinkList **) = 0;
536 virtual HRESULT _IFUNC FreezeEvents (BOOL) = 0;
537
538};
539
540//
541/// IBLinkInfo -- Supported by BOleParts which are link objects
542//
543class _ICLASS IBLinkInfo : public IUnknown {
544 public:
545 virtual HRESULT _IFUNC SourceBreak() = 0;
546 virtual HRESULT _IFUNC SourceGet(LPOLESTR, owl::uint count) = 0;
547 virtual HRESULT _IFUNC SourceSet(LPOLESTR) = 0;
548 virtual HRESULT _IFUNC SourceOpen() = 0;
549 virtual HRESULT _IFUNC UpdateGet(TOcLinkUpdate *) = 0;
550 virtual HRESULT _IFUNC UpdateSet(TOcLinkUpdate) = 0;
551 virtual HRESULT _IFUNC UpdateNow() = 0;
552};
553
554//
555/// IBClass -- Supported by BOleFactory
556//
557class _ICLASS IBClass : public IClassFactory {
558 public:
559 virtual HRESULT _IFUNC Init(BOOL selfEmbed, LPCOLESTR pszProgId,
560 IBClassMgr* pCM, BCID rid) = 0;
561 virtual HRESULT _IFUNC Register(BOOL singleUse) = 0;
562 virtual HRESULT _IFUNC Revoke() = 0;
563 virtual HRESULT _IFUNC GetClassID(CLSID * pOut) = 0;
564 virtual BOOL _IFUNC IsA(CLSID & pOut) = 0;
565 virtual BOOL _IFUNC AllowEmbedFromSelf() = 0;
566 virtual HRESULT _IFUNC GetEmbeddingHelperFactory(LPUNKNOWN *ppF) = 0;
567};
568
569//
570/// IBOverrideBrowseLinks -- Supported by containers(who aggregate BOleDoc)
571/// who want to override our BrowseLinks dialog.
572//
573class _ICLASS IBOverrideBrowseLinks : public IUnknown {
574 public:
575 virtual HRESULT _IFUNC BrowseLinks() = 0;
576};
577
578/// IBOverrideHelpButton -- Supported by container apps (who aggregate
579/// BOleService) who want to suppress the help
580/// button in our dialogs.
581//
582class _ICLASS IBOverrideHelpButton : public IUnknown {
583 public:
584 virtual HRESULT _IFUNC ShowHelpButton(TOcDialogHelp) = 0;
585};
586
587//----------------------------------------------------------------------------
588// Will eliminate this inline QI in favor of TUnknown version next rev.
589//
590inline HRESULT _IFUNC IUnknown_QueryInterface(IUnknown *, REFIID iid, LPVOID * pif)
591{
592 // To avoid handing out different IUnknown pointers for
593 // the same Windows Object don't match here.
594 // Only match in the main IUnknown in the outermost aggregator.
595 //
596 return ResultFromScode(E_NOINTERFACE);
597}
598
599#define DEFINE_INLINE_QI(I, P) \
600inline HRESULT _IFUNC I##_QueryInterface(I * This, REFIID iid, LPVOID * pif) \
601{ \
602 return (iid == IID_##I) ? \
603 (*pif = This), This->AddRef(), HR_OK : \
604 P##_QueryInterface(This, iid, pif); \
605}
606
607#define DEFINE_INLINE_QI2(I, P1, P2) \
608inline HRESULT _IFUNC I##_QueryInterface(I * This, REFIID iid, LPVOID * pif) \
609{ \
610 return (iid == IID_##I) ? \
611 (*pif = This), ((P1*)This)->AddRef(), HR_OK : \
612 SUCCEEDED(P1##_QueryInterface(This, iid, pif))? HR_OK :\
613 P2##_QueryInterface(This, iid, pif); \
614}
615
621
622DEFINE_INLINE_QI(IBWindow, IUnknown)
625
630DEFINE_INLINE_QI(IBSite, IUnknown)
633
636DEFINE_INLINE_QI(IClassFactory, IUnknown)
637DEFINE_INLINE_QI(IBClass, IClassFactory)
638
643
651
652//----------------------------------------------------------------------------
653
654# include <poppack.h>
655
656} // OCF namespace
657
658#endif // OCF_OCBOCOLE_H
IBApplication – Supported at frame window/app object of container apps.
Definition ocbocole.h:422
virtual void _IFUNC ShutdownMaybe()=0
virtual TOcHelp _IFUNC HelpMode(TOcHelp)=0
virtual HRESULT _IFUNC IsMDI()=0
virtual HRESULT _IFUNC OnModalDialog(BOOL)=0
virtual LPCOLESTR _IFUNC GetAppName()=0
virtual void _IFUNC DialogHelpNotify(TOcDialogHelp)=0
virtual HRESULT _IFUNC CanEmbed()=0
virtual HRESULT _IFUNC CanLink()=0
IBClass – Supported by BOleFactory.
Definition ocbocole.h:557
virtual BOOL _IFUNC AllowEmbedFromSelf()=0
virtual HRESULT _IFUNC GetClassID(CLSID *pOut)=0
virtual BOOL _IFUNC IsA(CLSID &pOut)=0
virtual HRESULT _IFUNC Init(BOOL selfEmbed, LPCOLESTR pszProgId, IBClassMgr *pCM, BCID rid)=0
virtual HRESULT _IFUNC GetEmbeddingHelperFactory(LPUNKNOWN *ppF)=0
virtual HRESULT _IFUNC Revoke()=0
virtual HRESULT _IFUNC Register(BOOL singleUse)=0
IClassMgr abstract base class.
Definition ocbocole.h:184
virtual HRESULT _IFUNC ComponentInfoGet(IUnknown **ppInfo, IUnknown *pAggregator, BCID classId)=0
virtual HRESULT _IFUNC ComponentCreate(IUnknown **ppRet, IUnknown *pAggregator, BCID classId)=0
IBContainer – Supported by container app's document window.
Definition ocbocole.h:398
virtual HRESULT _IFUNC FindDropDest(owl::TPoint *, IBDropDest **)=0
virtual HRESULT _IFUNC AllowInPlace()=0
virtual HRESULT _IFUNC BringToFront()=0
IContains abstract base class.
Definition ocbocole.h:346
virtual HRESULT _IFUNC Init(LPCOLESTR)=0
virtual HRESULT _IFUNC GetPart(IBPart **, LPCOLESTR)=0
virtual HRESULT _IFUNC GetSizeMax(ULARGE_INTEGER *)=0
virtual HRESULT _IFUNC GetEventTypeInfo(ITypeInfo **ppTypeInfo)=0
virtual HRESULT _IFUNC GetCtrlDispatch(IDispatch **ppDispatch)=0
virtual HRESULT _IFUNC AboutBox()=0
virtual HRESULT _IFUNC Save(LPSTREAM)=0
virtual HRESULT _IFUNC AmbientChanged(DISPID dispid)=0
virtual HRESULT _IFUNC Refresh()=0
virtual HRESULT _IFUNC OnMnemonic(LPMSG)=0
virtual HRESULT _IFUNC FreezeEvents(BOOL)=0
virtual HRESULT _IFUNC SetAmbientDispatch(IDispatch *)=0
virtual HRESULT _IFUNC DoClick()=0
virtual HRESULT _IFUNC GetClassInfo(LPTYPEINFO *)=0
virtual HRESULT _IFUNC SetEventDispatch(IDispatch *)=0
virtual HRESULT _IFUNC GetEventIID(IID *iidEvent)=0
virtual HRESULT _IFUNC GetControlInfo(LPCONTROLINFO)=0
virtual HRESULT _IFUNC TransformCoords(owl::TPointL *lpptlHimetric, owl::TPointF *lpptfContainer, DWORD flags)=0
virtual HRESULT _IFUNC Init(UINT, IBControl *, UINT)=0
virtual HRESULT _IFUNC OnControlFocus(BOOL fGotFocus)=0
virtual HRESULT _IFUNC OnPropertyChanged(DISPID dispid)=0
virtual HRESULT _IFUNC OnPropertyRequestEdit(DISPID dispid)=0
IBDataConsumer – Supported by containers who want to accept drag/drop and paste.
Definition ocbocole.h:212
IBDataNegotiator – Enumerats formats for drag/drop and paste.
Definition ocbocole.h:201
virtual owl::uint _IFUNC CountFormats()=0
virtual HRESULT _IFUNC GetFormat(owl::uint, TOcFormatInfo *)=0
IBDataProvider2 – new version of IBDataProvider.
Definition ocbocole.h:233
virtual HRESULT _IFUNC SetFormatData(TOcFormatInfo *fmt, HANDLE data, BOOL release)=0
IBDataProvider – Supported by parts and/or sites which can be copied to the OLE2 clipboard.
Definition ocbocole.h:219
virtual HRESULT _IFUNC Save(IStorage *, BOOL fSamAsLoad, BOOL fRemember)=0
virtual HRESULT _IFUNC Draw(HDC, const RECTL *, const RECTL *, TOcAspect, TOcDraw bd=drNone)=0
virtual HRESULT _IFUNC GetPartSize(owl::TSize *)=0
virtual HANDLE _IFUNC GetFormatData(TOcFormatInfo *)=0
virtual HRESULT _IFUNC IsDirty()=0
virtual HRESULT _IFUNC GetClassID(LPCLSID)=0
virtual void _IFUNC SetDirty(BOOL)=0
IBDocument – Supported by BOleDocument one per container child window.
Definition ocbocole.h:360
virtual HRESULT _IFUNC Init(IBContainer *)=0
virtual HRESULT _IFUNC EnumLinks(IBLinkInfo **)=0
virtual HRESULT _IFUNC OnSetFocus(BOOL)=0
virtual void _IFUNC OnClose()=0
virtual HRESULT _IFUNC BrowseLinks()=0
virtual void _IFUNC OnResize()=0
virtual HRESULT _IFUNC UpdateLinks()=0
virtual void _IFUNC OnActivate(BOOL)=0
IBDropDest – Supported by container app's document window and/or other areas inside the window.
Definition ocbocole.h:409
virtual HRESULT _IFUNC Drop(TOcInitInfo *, owl::TPoint *, const owl::TRect *)=0
virtual HRESULT _IFUNC GetScrollRect(owl::TRect *)=0
virtual HRESULT _IFUNC Scroll(TOcScrollDir scrollDir)=0
virtual void _IFUNC DragFeedback(owl::TPoint *, const owl::TRect *, TOcMouseAction, owl::uint, HRESULT &)=0
virtual HRESULT _IFUNC FreezeEvents(BOOL)=0
virtual HRESULT _IFUNC GetSinkList(IBSinkList **)=0
virtual HRESULT _IFUNC RegisterConnectionPoint(LPCONNECTIONPOINT)=0
virtual HRESULT _IFUNC RegisterEventsSet(REFIID, UINT)=0
virtual HRESULT _IFUNC GetSinkListForIID(REFIID, IBSinkList **)=0
ILinkable abstract base class.
Definition ocbocole.h:321
virtual HRESULT _IFUNC OnRename(IBLinkable *pContainer, LPCOLESTR name)=0
virtual HRESULT _IFUNC GetMoniker(IMoniker **ppMon)=0
IBOverrideHelpButton – Supported by container apps (who aggregate BOleService) who want to suppress t...
Definition ocbocole.h:582
virtual HRESULT _IFUNC ShowHelpButton(TOcDialogHelp)=0
IBPart2 – Supported by server objects.
Definition ocbocole.h:269
IBPart – Supported by server objects.
Definition ocbocole.h:241
virtual HRESULT _IFUNC ShowTools(BOOL)=0
virtual HRESULT _IFUNC Open(BOOL)=0
virtual HRESULT _IFUNC InsertMenus(HMENU, TOcMenuWidths *)=0
virtual LPOLESTR _IFUNC GetName(TOcPartName)=0
virtual HRESULT _IFUNC Activate(BOOL)=0
virtual HRESULT _IFUNC Close()=0
virtual void _IFUNC FrameResized(const owl::TRect *, BOOL)=0
virtual HRESULT _IFUNC DragFeedback(owl::TPoint *, BOOL)=0
virtual HRESULT _IFUNC SetHost(IBContainer *pObjContainer)=0
virtual HWND _IFUNC OpenInPlace(HWND)=0
virtual HRESULT _IFUNC CanOpenInPlace()=0
virtual HRESULT _IFUNC SetPartPos(owl::TRect *)=0
virtual HRESULT _IFUNC Show(BOOL)=0
virtual HRESULT _IFUNC GetPalette(LOGPALETTE **)=0
virtual HRESULT _IFUNC SetPartSize(owl::TSize *)=0
virtual HRESULT _IFUNC DoVerb(owl::uint)=0
virtual HRESULT _IFUNC Init(IBSite *, TOcInitInfo *)=0
virtual HRESULT _IFUNC EnumVerbs(TOcVerb *)=0
virtual HRESULT _IFUNC DoQueryInterface(const IID &iid, void **pif)=0
virtual HRESULT _IFUNC Init(IBContains *pC, LPCOLESTR szProgId)=0
virtual HRESULT _IFUNC SetMoniker(IMoniker *pMon)=0
virtual HRESULT _IFUNC UnregisterControlClass(LPCOLESTR)=0
virtual HRESULT _IFUNC RegisterControlClass(LPCOLESTR, IBClassMgr *, BCID, BOOL embedInSelf, BOOL singleUse)=0
virtual HRESULT _IFUNC BrowseControls(TOcInitInfo *)=0
IService abstract base class.
Definition ocbocole.h:275
virtual HRESULT _IFUNC OnModalDialog(BOOL)=0
virtual HRESULT _IFUNC BrowseClipboard(TOcInitInfo *)=0
virtual TOcHelp _IFUNC HelpMode(TOcHelp)=0
virtual void _IFUNC OnResize()=0
virtual HRESULT _IFUNC Clip(IBDataProvider *, BOOL, BOOL, BOOL)=0
virtual HRESULT _IFUNC ConvertUI(IBPart *, BOOL, TOcConvertInfo *)=0
virtual TOcMenuEnable _IFUNC EnableEditMenu(TOcMenuEnable, IBDataConsumer *)=0
virtual HRESULT _IFUNC UnregisterClass(LPCOLESTR)=0
virtual HRESULT _IFUNC ConvertGuts(IBPart *, BOOL, TOcConvertInfo *)=0
virtual HRESULT _IFUNC Paste(TOcInitInfo *)=0
virtual HRESULT _IFUNC Init(IBApplication *)=0
virtual HRESULT _IFUNC TranslateAccel(MSG *)=0
virtual HRESULT _IFUNC CanClose()=0
virtual void _IFUNC OnActivate(BOOL)=0
virtual IStorage *_IFUNC CreateStorageOnFile(LPCOLESTR, BOOL)=0
virtual HRESULT _IFUNC RegisterClass(LPCOLESTR, IBClassMgr *, BCID, BOOL embedInSelf, BOOL singleUse)=0
virtual HRESULT _IFUNC Drag(IBDataProvider *, TOcDropAction, TOcDropAction *)=0
virtual HRESULT _IFUNC OnSetFocus(BOOL)=0
virtual HRESULT _IFUNC Browse(TOcInitInfo *)=0
virtual HRESULT _IFUNC NextSink(LPVOID *)=0
virtual HRESULT _IFUNC GetSinkAt(int, LPVOID *)=0
virtual HRESULT _IFUNC Reset()=0
IBSite2 – Add flexibility to have parent of site not be container.
Definition ocbocole.h:454
virtual HRESULT _IFUNC GetParentWindow(HWND *)=0
IBSite – Supported by container apps for each linked/embedded object.
Definition ocbocole.h:437
virtual HRESULT _IFUNC GetSiteRect(owl::TRect *, owl::TRect *)=0
virtual HRESULT _IFUNC DiscardUndo()=0
virtual void _IFUNC OnSetFocus(BOOL)=0
virtual void _IFUNC Invalidate(TOcInvalidate)=0
virtual HRESULT _IFUNC GetZoom(TOcScaleInfo *pScale)=0
virtual HRESULT _IFUNC SiteShow(BOOL)=0
virtual HRESULT _IFUNC Init(IBDataProvider *, IBPart *, LPCOLESTR, BOOL)=0
virtual HRESULT _IFUNC SetSiteExtent(const owl::TSize *)=0
virtual HRESULT _IFUNC SetSiteRect(const owl::TRect *)=0
virtual void _IFUNC Disconnect()=0
IBWindow – Supported on child window and frame window of container apps.
Definition ocbocole.h:376
virtual HRESULT _IFUNC SetBorderSpace(const owl::TRect *)=0
virtual LPCOLESTR _IFUNC GetWindowTitle()=0
virtual HRESULT _IFUNC InsertContainerMenus(HMENU, TOcMenuWidths *)=0
virtual HRESULT _IFUNC Accelerator(MSG *)=0
virtual void _IFUNC RestoreUI()=0
virtual HRESULT _IFUNC RequestBorderSpace(const owl::TRect *)=0
virtual HWND _IFUNC GetWindow()=0
virtual void _IFUNC AppendWindowTitle(LPCOLESTR)=0
virtual HRESULT _IFUNC SetStatusText(LPCOLESTR)=0
virtual HRESULT _IFUNC GetWindowRect(owl::TRect *)=0
virtual HRESULT _IFUNC SetFrameMenu(HMENU)=0
virtual HRESULT _IFUNC GetAccelerators(HACCEL *, int *)=0
TPointF is similar to TPoint, but uses floating variables rather than integers.
Definition geometry.h:181
TPoint is a support class, derived from tagPOINT.
Definition geometry.h:87
TPointL is similar to TPoint, but uses long rather than int variables.
Definition geometry.h:132
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
The tagSIZE struct is defined as.
Definition geometry.h:234
Classes for window system geometry.
Object Component Framework (COM encapsulation)
Definition appdesc.h:22
TOcAspect
Definition ocobject.h:64
class _ICLASS IBEventClass
Definition ocbocole.h:155
const BCID cidBOleControlFactory
Definition ocbocole.h:123
TOcDialogHelp
Definition ocobject.h:27
TOcMenuEnable
Definition ocobject.h:145
owl::uint32 BCID
Definition ocbocole.h:109
const BCID cidBOleInProcHandler
Definition ocbocole.h:119
const BCID cidBOleInProcSite
Definition ocbocole.h:114
class _ICLASS IBEventsHandler
Definition ocbocole.h:154
const BCID cidBOleSite
Definition ocbocole.h:113
class _ICLASS IBClass
Definition ocbocole.h:145
class _ICLASS IBOverrideBrowseLinks
Definition ocbocole.h:146
class _ICLASS IBSinkList
Definition ocbocole.h:156
const BCID cidBOleContainer
Definition ocbocole.h:115
TOcInvalidate
Definition ocobject.h:59
class _ICLASS IBClassMgr
Definition ocbocole.h:129
class _ICLASS IBDocument
Definition ocbocole.h:135
const BCID cidBOlePart
Definition ocbocole.h:112
const BCID cidBOleControlSite
Definition ocbocole.h:122
const BCID cidBOleFactory
Definition ocbocole.h:117
TOcMouseAction
Definition ocobject.h:46
class _ICLASS IBContainer
Definition ocbocole.h:136
class _ICLASS IBControl
Definition ocbocole.h:153
const BCID cidBOlePicture
Definition ocbocole.h:124
class _ICLASS IBDataState
Definition ocbocole.h:157
class _ICLASS IBSite
Definition ocbocole.h:137
class _ICLASS IBSite2
Definition ocbocole.h:147
const BCID cidBOleFont
Definition ocbocole.h:121
class _ICLASS IBDataConsumer
Definition ocbocole.h:142
const GUID & iid
Definition appdesc.h:328
class _ICLASS IBControlSite
Definition ocbocole.h:152
class _ICLASS IBLinkInfo
Definition ocbocole.h:139
class _ICLASS IBService2
Definition ocbocole.h:151
const BCID cidBOleControl
Definition ocbocole.h:120
class _ICLASS IBDataProvider2
Definition ocbocole.h:150
const BCID cidBOleShadowData
Definition ocbocole.h:118
HRESULT _IFUNC IUnknown_QueryInterface(IUnknown *, REFIID iid, LPVOID *pif)
Definition ocbocole.h:590
class _ICLASS IBOverrideHelpButton
Definition ocbocole.h:148
class _ICLASS IBContains
Definition ocbocole.h:134
TOcHelp
Definition ocobject.h:152
class _ICLASS IBLinkable
Definition ocbocole.h:132
class _ICLASS IBDataProvider
Definition ocbocole.h:141
class _ICLASS IBService
Definition ocbocole.h:131
class _ICLASS IBDropDest
Definition ocbocole.h:144
class _ICLASS IBApplication
Definition ocbocole.h:138
TOcDropAction
Definition ocobject.h:39
TOcScrollDir
Definition ocobject.h:52
const BCID cidBOleService
Definition ocbocole.h:110
class _ICLASS IBRootLinkable
Definition ocbocole.h:133
class _ICLASS IBDataNegotiator
Definition ocbocole.h:140
TOcPartName
Definition ocobject.h:87
class _ICLASS IBPart2
Definition ocbocole.h:149
TOcDraw
Definition ocobject.h:81
TOcLinkUpdate
Definition ocobject.h:182
class _ICLASS IBWindow
Definition ocbocole.h:143
const BCID cidBOleData
Definition ocbocole.h:116
class _ICLASS IBPart
Definition ocbocole.h:130
const BCID cidBOleDocument
Definition ocbocole.h:111
unsigned long uint32
Definition number.h:34
unsigned int uint
Definition number.h:25
#define DEFINE_INLINE_QI2(I, P1, P2)
Definition ocbocole.h:607
#define DEFINE_BOLEGUID(name, l)
Definition ocbocole.h:62
#define DEFINE_INLINE_QI(I, P)
Definition ocbocole.h:599
interface _ICLASS IStorage
Definition ocdoc.h:25
Various general OC enums and structs.
#define _IFUNC
Definition oleutil.h:28
#define _ICLASS
Definition oleutil.h:25