1#define CALLCONV __stdcall
2[
3    //Regenerate this, stolen from GetObj.odl
4    uuid(99AB80C4-5E19-4fd5-B3CA-5EF62FC3F765),
5    helpstring("My Ole Guid and interface definitions"),
6    lcid(0x0),
7    version(1.0)
8    ]
9
10library myole4ax
11{
12
13    importlib("stdole2.tlb");
14    interface IOleInPlaceUIWindow;
15
16//     typedef struct
17//     {
18//         LONG    Left;
19//         LONG    Top;
20//         LONG    Right;
21//         LONG    Bottom;
22//     }RECT;
23
24//     typedef struct
25//     {
26//         LONG  x;
27//         LONG  y;
28//     }POINT;
29
30//     typedef struct
31//     {
32//         float  x;
33//         float  y;
34//     }POINTF;
35
36//     typedef struct {
37//         long hWnd;
38//         long message;
39//         long wParam;
40//         long lParam;
41//         long time;
42//         POINT pt;
43//     }MSG;
44
45//     typedef [public] RECT BORDERWIDTHS;
46//     typedef [public] long StructPtr;
47
48//     typedef struct
49//     {
50//         LONG        cx;
51//         LONG        cy;
52//     }SIZE;
53
54    typedef struct
55    {
56        long cb;
57        long fMDIApp;
58        OLE_HANDLE hwndFrame;
59        OLE_HANDLE haccel;
60        LONG cAccelEntries;
61    }   OLEINPLACEFRAMEINFO;
62
63
64//      [
65//              uuid(00000000-0000-0000-C000-000000000046),
66//              odl,
67//              hidden
68//      ]
69//      interface IUnknownUnrestricted
70//      {
71//                 long QueryInterface([in] long priid, [out,in] long* pvObj);
72//                 long AddRef();
73//                 long Release();
74//      };
75
76
77    [
78        uuid(00000114-0000-0000-C000-000000000046),
79        odl
80    ]
81    interface IOleWindow : IUnknown
82    {
83        HRESULT GetWindow([out,retval] long *phwnd);
84        HRESULT ContextSensitiveHelp([in] long fEnterMode);
85    };
86
87    [
88        uuid(00000118-0000-0000-C000-000000000046),
89        odl
90    ]
91    interface IOleClientSite : IUnknown
92    {
93    };
94
95    [
96        uuid(00000112-0000-0000-C000-000000000046),
97        odl
98    ]
99    interface IOleObject : IUnknown
100    {
101        HRESULT SetClientSite([in] IOleClientSite *pClientSite);
102        HRESULT GetClientSite([out,retval] IOleClientSite **ppClientSite);
103        //Lots more.
104    };
105
106    [
107        uuid(B196B289-BAB4-101A-B69C-00AA00341D07),
108        odl
109    ]
110    interface IOleControlSite : IUnknown
111    {
112        HRESULT OnControlInfoChanged();
113        HRESULT LockInPlaceActive([in] long fLock);
114        HRESULT GetExtendedControl([out,retval] IDispatch** ppDisp);
115        HRESULT TransformCoords([in] StructPtr pPtlHimetric, [in] StructPtr pPtfContainer, [in] long dwFlags);
116        long TranslateAccelerator([in] StructPtr lpmsg, [in] long grfModifiers);
117        HRESULT OnFocus([in] long fGotFocus);
118        HRESULT ShowPropertyFrame();
119    };
120
121    [
122        uuid(00000117-0000-0000-C000-000000000046),
123        odl
124    ]
125    interface IOleInPlaceActiveObject : IOleWindow
126    {
127        long TranslateAccelerator([in] long lpmsg);
128        long OnFrameWindowActivate([in] long fActivate);
129        long OnDocWindowActivate([in] long fActivate);
130        long ResizeBorder([in] StructPtr prcBorder,
131                          [in] IOleInPlaceUIWindow* pUIWindow,
132                          [in] long fFrameWindow);
133        long EnableModeless([in] long fEnable);
134    };
135
136    [
137        uuid(00000115-0000-0000-C000-000000000046),
138        odl
139    ]
140    interface IOleInPlaceUIWindow : IOleWindow
141    {
142        HRESULT GetBorder([in] StructPtr lprectBorder);
143        HRESULT RequestBorderSpace([in] StructPtr pborderwidths);
144        HRESULT SetBorderSpace([in] StructPtr pborderwidths);
145        HRESULT SetActiveObject([in] IOleInPlaceActiveObject *pActiveObject, [in] LPWSTR pszObjName);
146    };
147
148    [
149        uuid(00000116-0000-0000-C000-000000000046),
150        odl
151    ]
152    interface IOleInPlaceFrame : IOleInPlaceUIWindow
153    {
154        //Not done, placeholder only
155    };
156
157    [
158        uuid(00000119-0000-0000-C000-000000000046),
159        odl
160    ]
161    interface IOleInPlaceSite : IOleWindow
162    {
163        long CanInPlaceActivate();
164        HRESULT OnInPlaceActivate();
165        HRESULT OnUIActivate();
166        HRESULT GetWindowContext([out] IOleInPlaceFrame** ppFrame,
167                                 [out] IOleInPlaceUIWindow** ppDoc,
168                                 [in] StructPtr lprcPosRect,
169                                 [in] StructPtr lprcClipRect,
170                                 [in] StructPtr lpFrameInfo);
171        HRESULT Scroll([in] CURRENCY scrollExtant);
172        HRESULT OnUIDeactivate([in] long fUndoable);
173        HRESULT OnInPlaceDeactivate();
174        HRESULT DiscardUndoState();
175        HRESULT DeactivateAndUndo();
176        HRESULT OnPosRectChange([in] long lprcPosRect);
177    }
178}
179