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