2 * RichEdit GUIDs and OLE interface
4 * Copyright 2004 by Krzysztof Foltman
5 * Copyright 2004 Aric Stewart
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #define NONAMELESSUNION
25 #define NONAMELESSSTRUCT
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(richedit
);
38 typedef struct IRichEditOleImpl
{
39 IRichEditOleVtbl
*lpVtbl
;
43 /* there is no way to be consistent across different sets of headers - mingw, Wine, Win32 SDK*/
45 /* FIXME: the next 6 lines should be in textserv.h */
46 #define TEXTSERV_GUID(name, l, w1, w2, b1, b2) \
47 GUID name = { l, w1, w2, {b1, b2, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5}}
49 TEXTSERV_GUID(IID_ITextServices
, 0x8d33f740, 0xcf58, 0x11ce, 0xa8, 0x9d);
50 TEXTSERV_GUID(IID_ITextHost
, 0xc5bdd8d0, 0xd26e, 0x11ce, 0xa8, 0x9e);
51 TEXTSERV_GUID(IID_ITextHost2
, 0xc5bdd8d0, 0xd26e, 0x11ce, 0xa8, 0x9e);
54 IRichEditOle_fnQueryInterface(IRichEditOle
*me
, REFIID riid
, LPVOID
*ppvObj
)
56 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
58 TRACE("%p %s\n", This
, debugstr_guid(riid
) );
60 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
61 IsEqualGUID(riid
, &IID_IRichEditOle
))
63 IRichEditOle_AddRef(me
);
64 *ppvObj
= (LPVOID
) This
;
72 IRichEditOle_fnAddRef(IRichEditOle
*me
)
74 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
75 ULONG ref
= InterlockedIncrement( &This
->ref
);
77 TRACE("%p ref = %lu\n", This
, ref
);
83 IRichEditOle_fnRelease(IRichEditOle
*me
)
85 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
86 ULONG ref
= InterlockedDecrement(&This
->ref
);
88 TRACE ("%p ref=%lu\n", This
, ref
);
92 TRACE ("Destroying %p\n", This
);
93 HeapFree(GetProcessHeap(),0,This
);
99 IRichEditOle_fnActivateAs(IRichEditOle
*me
, REFCLSID rclsid
, REFCLSID rclsidAs
)
101 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
102 FIXME("stub %p\n",This
);
106 static HRESULT WINAPI
107 IRichEditOle_fnContextSensitiveHelp(IRichEditOle
*me
, BOOL fEnterMode
)
109 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
110 FIXME("stub %p\n",This
);
114 static HRESULT WINAPI
115 IRichEditOle_fnConvertObject(IRichEditOle
*me
, LONG iob
,
116 REFCLSID rclsidNew
, LPCSTR lpstrUserTypeNew
)
118 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
119 FIXME("stub %p\n",This
);
123 static HRESULT WINAPI
124 IRichEditOle_fnGetClientSite(IRichEditOle
*me
,
125 LPOLECLIENTSITE
*lplpolesite
)
127 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
128 FIXME("stub %p\n",This
);
132 static HRESULT WINAPI
133 IRichEditOle_fnGetClipboardData(IRichEditOle
*me
, CHARRANGE
*lpchrg
,
134 DWORD reco
, LPDATAOBJECT
*lplpdataobj
)
136 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
137 FIXME("stub %p\n",This
);
141 static LONG WINAPI
IRichEditOle_fnGetLinkCount(IRichEditOle
*me
)
143 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
144 FIXME("stub %p\n",This
);
148 static HRESULT WINAPI
149 IRichEditOle_fnGetObject(IRichEditOle
*me
, LONG iob
,
150 REOBJECT
*lpreobject
, DWORD dwFlags
)
152 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
153 FIXME("stub %p\n",This
);
158 IRichEditOle_fnGetObjectCount(IRichEditOle
*me
)
160 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
161 FIXME("stub %p\n",This
);
165 static HRESULT WINAPI
166 IRichEditOle_fnHandsOffStorage(IRichEditOle
*me
, LONG iob
)
168 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
169 FIXME("stub %p\n",This
);
173 static HRESULT WINAPI
174 IRichEditOle_fnImportDataObject(IRichEditOle
*me
, LPDATAOBJECT lpdataobj
,
175 CLIPFORMAT cf
, HGLOBAL hMetaPict
)
177 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
178 FIXME("stub %p\n",This
);
182 static HRESULT WINAPI
183 IRichEditOle_fnInPlaceDeactivate(IRichEditOle
*me
)
185 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
186 FIXME("stub %p\n",This
);
190 static HRESULT WINAPI
191 IRichEditOle_fnInsertObject(IRichEditOle
*me
, REOBJECT
*lpreobject
)
193 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
194 FIXME("stub %p\n",This
);
198 static HRESULT WINAPI
IRichEditOle_fnSaveCompleted(IRichEditOle
*me
, LONG iob
,
201 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
202 FIXME("stub %p\n",This
);
206 static HRESULT WINAPI
207 IRichEditOle_fnSetDvaspect(IRichEditOle
*me
, LONG iob
, DWORD dvaspect
)
209 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
210 FIXME("stub %p\n",This
);
214 static HRESULT WINAPI
IRichEditOle_fnSetHostNames(IRichEditOle
*me
,
215 LPCSTR lpstrContainerApp
, LPCSTR lpstrContainerObj
)
217 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
218 FIXME("stub %p\n",This
);
222 static HRESULT WINAPI
223 IRichEditOle_fnSetLinkAvailable(IRichEditOle
*me
, LONG iob
, BOOL fAvailable
)
225 IRichEditOleImpl
*This
= (IRichEditOleImpl
*)me
;
226 FIXME("stub %p\n",This
);
230 static IRichEditOleVtbl revt
= {
231 IRichEditOle_fnQueryInterface
,
232 IRichEditOle_fnAddRef
,
233 IRichEditOle_fnRelease
,
234 IRichEditOle_fnGetClientSite
,
235 IRichEditOle_fnGetObjectCount
,
236 IRichEditOle_fnGetLinkCount
,
237 IRichEditOle_fnGetObject
,
238 IRichEditOle_fnInsertObject
,
239 IRichEditOle_fnConvertObject
,
240 IRichEditOle_fnActivateAs
,
241 IRichEditOle_fnSetHostNames
,
242 IRichEditOle_fnSetLinkAvailable
,
243 IRichEditOle_fnSetDvaspect
,
244 IRichEditOle_fnHandsOffStorage
,
245 IRichEditOle_fnSaveCompleted
,
246 IRichEditOle_fnInPlaceDeactivate
,
247 IRichEditOle_fnContextSensitiveHelp
,
248 IRichEditOle_fnGetClipboardData
,
249 IRichEditOle_fnImportDataObject
252 LRESULT
CreateIRichEditOle(LPVOID
*ppObj
)
254 IRichEditOleImpl
*reo
;
256 reo
= HeapAlloc(GetProcessHeap(), 0, sizeof(IRichEditOleImpl
));
262 TRACE("Created %p\n",reo
);
263 *ppObj
= (LPVOID
) reo
;