winemac.drv: Don't filter non active displays out.
[wine/zf.git] / dlls / dhtmled.ocx / edit.c
blob9e08a4f5c95df160922ff3d51b14d31ae080d46d
1 /*
2 * Copyright 2017 Alex Henrie
3 * Copyright 2021 Vijay Kiran Kamuju
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #define COBJMACROS
22 #include "dhtmled.h"
24 #include "wine/debug.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(dhtmled);
28 typedef enum tid_t {
29 NULL_tid,
30 IDHTMLEdit_tid,
31 LAST_tid
32 } tid_t;
34 static ITypeLib *typelib;
35 static ITypeInfo *typeinfos[LAST_tid];
37 static REFIID tid_ids[] = {
38 &IID_NULL,
39 &IID_IDHTMLEdit
42 static HRESULT load_typelib(void)
44 ITypeLib *tl;
45 HRESULT hr;
47 hr = LoadRegTypeLib(&LIBID_DHTMLEDLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &tl);
48 if (FAILED(hr)) {
49 ERR("LoadRegTypeLib failed: %08x\n", hr);
50 return hr;
53 if (InterlockedCompareExchangePointer((void**)&typelib, tl, NULL))
54 ITypeLib_Release(tl);
55 return hr;
58 void release_typelib(void)
60 unsigned i;
62 if (!typelib)
63 return;
65 for (i = 0; i < ARRAY_SIZE(typeinfos); i++)
66 if (typeinfos[i])
67 ITypeInfo_Release(typeinfos[i]);
69 ITypeLib_Release(typelib);
72 static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
74 HRESULT hr;
76 if (!typelib)
77 hr = load_typelib();
78 if (!typelib)
79 return hr;
81 if (!typeinfos[tid])
83 ITypeInfo *ti;
85 hr = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti);
86 if (FAILED(hr))
88 ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hr);
89 return hr;
92 if (InterlockedCompareExchangePointer((void**)(typeinfos+tid), ti, NULL))
93 ITypeInfo_Release(ti);
96 *typeinfo = typeinfos[tid];
97 return S_OK;
100 typedef struct DHTMLEditImpl DHTMLEditImpl;
101 typedef struct ConnectionPoint ConnectionPoint;
103 struct ConnectionPoint
105 IConnectionPoint IConnectionPoint_iface;
106 DHTMLEditImpl *dhed;
107 const IID *riid;
110 struct DHTMLEditImpl
112 IDHTMLEdit IDHTMLEdit_iface;
113 IOleObject IOleObject_iface;
114 IProvideClassInfo2 IProvideClassInfo2_iface;
115 IPersistStorage IPersistStorage_iface;
116 IPersistStreamInit IPersistStreamInit_iface;
117 IOleControl IOleControl_iface;
118 IViewObjectEx IViewObjectEx_iface;
119 IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
120 IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
121 IConnectionPointContainer IConnectionPointContainer_iface;
122 IDataObject IDataObject_iface;
123 IServiceProvider IServiceProvider_iface;
125 IOleClientSite *client_site;
126 ConnectionPoint conpt;
127 SIZEL extent;
128 LONG ref;
131 static inline DHTMLEditImpl *impl_from_IDHTMLEdit(IDHTMLEdit *iface)
133 return CONTAINING_RECORD(iface, DHTMLEditImpl, IDHTMLEdit_iface);
136 static inline DHTMLEditImpl *impl_from_IOleObject(IOleObject *iface)
138 return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleObject_iface);
141 static inline DHTMLEditImpl *impl_from_IProvideClassInfo2(IProvideClassInfo2 *iface)
143 return CONTAINING_RECORD(iface, DHTMLEditImpl, IProvideClassInfo2_iface);
146 static inline DHTMLEditImpl *impl_from_IPersistStorage(IPersistStorage *iface)
148 return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStorage_iface);
151 static inline DHTMLEditImpl *impl_from_IPersistStreamInit(IPersistStreamInit *iface)
153 return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStreamInit_iface);
156 static inline DHTMLEditImpl *impl_from_IOleControl(IOleControl *iface)
158 return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleControl_iface);
161 static inline DHTMLEditImpl *impl_from_IViewObjectEx(IViewObjectEx *iface)
163 return CONTAINING_RECORD(iface, DHTMLEditImpl, IViewObjectEx_iface);
166 static inline DHTMLEditImpl *impl_from_IOleInPlaceObjectWindowless(IOleInPlaceObjectWindowless *iface)
168 return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleInPlaceObjectWindowless_iface);
171 static inline DHTMLEditImpl *impl_from_IOleInPlaceActiveObject(IOleInPlaceActiveObject *iface)
173 return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleInPlaceActiveObject_iface);
176 static inline DHTMLEditImpl *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
178 return CONTAINING_RECORD(iface, DHTMLEditImpl, IConnectionPointContainer_iface);
181 static inline DHTMLEditImpl *impl_from_IDataObject(IDataObject *iface)
183 return CONTAINING_RECORD(iface, DHTMLEditImpl, IDataObject_iface);
186 static inline DHTMLEditImpl *impl_from_IServiceProvider(IServiceProvider *iface)
188 return CONTAINING_RECORD(iface, DHTMLEditImpl, IServiceProvider_iface);
191 static ULONG dhtml_edit_addref(DHTMLEditImpl *This)
193 LONG ref = InterlockedIncrement(&This->ref);
195 TRACE("(%p) ref=%d\n", This, ref);
197 return ref;
200 static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out)
202 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(iid), out);
204 if (IsEqualGUID(iid, &IID_IUnknown) ||
205 IsEqualGUID(iid, &IID_IDispatch) ||
206 IsEqualGUID(iid, &IID_IDHTMLEdit))
208 dhtml_edit_addref(This);
209 *out = &This->IDHTMLEdit_iface;
210 return S_OK;
212 else if (IsEqualGUID(iid, &IID_IOleObject))
214 dhtml_edit_addref(This);
215 *out = &This->IOleObject_iface;
216 return S_OK;
218 else if (IsEqualGUID(iid, &IID_IProvideClassInfo) ||
219 IsEqualGUID(iid, &IID_IProvideClassInfo2))
221 dhtml_edit_addref(This);
222 *out = &This->IProvideClassInfo2_iface;
223 return S_OK;
225 else if (IsEqualGUID(iid, &IID_IPersistStorage))
227 dhtml_edit_addref(This);
228 *out = &This->IPersistStorage_iface;
229 return S_OK;
231 else if (IsEqualGUID(iid, &IID_IPersistStreamInit))
233 dhtml_edit_addref(This);
234 *out = &This->IPersistStreamInit_iface;
235 return S_OK;
237 else if(IsEqualGUID(iid, &IID_IOleControl))
239 dhtml_edit_addref(This);
240 *out = &This->IOleControl_iface;
241 return S_OK;
243 else if (IsEqualGUID(iid, &IID_IViewObject) ||
244 IsEqualGUID(iid, &IID_IViewObject2) ||
245 IsEqualGUID(iid, &IID_IViewObjectEx))
247 dhtml_edit_addref(This);
248 *out = &This->IViewObjectEx_iface;
249 return S_OK;
251 else if (IsEqualGUID(iid, &IID_IOleWindow) ||
252 IsEqualGUID(iid, &IID_IOleInPlaceObject) ||
253 IsEqualGUID(iid, &IID_IOleInPlaceObjectWindowless))
255 dhtml_edit_addref(This);
256 *out = &This->IOleInPlaceObjectWindowless_iface;
257 return S_OK;
259 else if(IsEqualGUID(iid, &IID_IOleInPlaceActiveObject))
261 dhtml_edit_addref(This);
262 *out = &This->IOleInPlaceActiveObject_iface;
263 return S_OK;
265 else if(IsEqualGUID(iid, &IID_IConnectionPointContainer))
267 dhtml_edit_addref(This);
268 *out = &This->IConnectionPointContainer_iface;
269 return S_OK;
271 else if(IsEqualGUID(iid, &IID_IDataObject))
273 dhtml_edit_addref(This);
274 *out = &This->IDataObject_iface;
275 return S_OK;
277 else if(IsEqualGUID(iid, &IID_IServiceProvider))
279 dhtml_edit_addref(This);
280 *out = &This->IServiceProvider_iface;
281 return S_OK;
285 *out = NULL;
286 ERR("no interface for %s\n", debugstr_guid(iid));
287 return E_NOINTERFACE;
290 static ULONG dhtml_edit_release(DHTMLEditImpl *This)
292 LONG ref = InterlockedDecrement(&This->ref);
294 TRACE("(%p) ref=%d\n", This, ref);
296 if (!ref)
298 if (This->client_site)
299 IOleClientSite_Release(This->client_site);
301 HeapFree(GetProcessHeap(), 0, This);
304 return ref;
307 static HRESULT WINAPI DHTMLEdit_QueryInterface(IDHTMLEdit *iface, REFIID iid, void **out)
309 return dhtml_edit_qi(impl_from_IDHTMLEdit(iface), iid, out);
312 static ULONG WINAPI DHTMLEdit_AddRef(IDHTMLEdit *iface)
314 return dhtml_edit_addref(impl_from_IDHTMLEdit(iface));
317 static ULONG WINAPI DHTMLEdit_Release(IDHTMLEdit *iface)
319 return dhtml_edit_release(impl_from_IDHTMLEdit(iface));
322 static HRESULT WINAPI DHTMLEdit_GetTypeInfoCount(IDHTMLEdit *iface, UINT *count)
324 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
325 TRACE("(%p)->(%p)\n", This, count);
326 *count = 1;
327 return S_OK;
330 static HRESULT WINAPI DHTMLEdit_GetTypeInfo(IDHTMLEdit *iface, UINT type_index, LCID lcid, ITypeInfo **type_info)
332 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
333 HRESULT hr;
335 TRACE("(%p)->(%u, %08x, %p)\n", This, type_index, lcid, type_info);
337 hr = get_typeinfo(IDHTMLEdit_tid, type_info);
338 if (SUCCEEDED(hr))
339 ITypeInfo_AddRef(*type_info);
340 return hr;
343 static HRESULT WINAPI DHTMLEdit_GetIDsOfNames(IDHTMLEdit *iface, REFIID iid, OLECHAR **names, UINT name_count,
344 LCID lcid, DISPID *disp_ids)
346 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
347 ITypeInfo *ti;
348 HRESULT hr;
350 TRACE("(%p)->(%s, %p, %u, %08x, %p)\n", This, debugstr_guid(iid), names, name_count, lcid, disp_ids);
352 hr = get_typeinfo(IDHTMLEdit_tid, &ti);
353 if (FAILED(hr))
354 return hr;
356 return ITypeInfo_GetIDsOfNames(ti, names, name_count, disp_ids);
359 static HRESULT WINAPI DHTMLEdit_Invoke(IDHTMLEdit *iface, DISPID member, REFIID iid, LCID lcid, WORD flags,
360 DISPPARAMS *params, VARIANT *ret, EXCEPINFO *exception_info, UINT *error_index)
362 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
363 ITypeInfo *ti;
364 HRESULT hr;
366 TRACE("(%p)->(%d, %s, %08x, 0x%x, %p, %p, %p, %p)\n",
367 This, member, debugstr_guid(iid), lcid, flags, params, ret, exception_info, error_index);
369 hr = get_typeinfo(IDHTMLEdit_tid, &ti);
370 if (FAILED(hr))
371 return hr;
373 return ITypeInfo_Invoke(ti, iface, member, flags, params, ret, exception_info, error_index);
376 static HRESULT WINAPI DHTMLEdit_ExecCommand(IDHTMLEdit *iface, DHTMLEDITCMDID cmd_id, OLECMDEXECOPT options,
377 VARIANT *code_in, VARIANT *code_out)
379 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
380 FIXME("(%p)->(%u, %u, %s, %p) stub\n", This, cmd_id, options, debugstr_variant(code_in), code_out);
381 return E_NOTIMPL;
384 static HRESULT WINAPI DHTMLEdit_QueryStatus(IDHTMLEdit *iface, DHTMLEDITCMDID cmd_id, DHTMLEDITCMDF *status)
386 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
387 FIXME("(%p)->(%u, %p) stub\n", This, cmd_id, status);
388 return E_NOTIMPL;
391 static HRESULT WINAPI DHTMLEdit_SetContextMenu(IDHTMLEdit *iface, VARIANT *strings, VARIANT *states)
393 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
394 FIXME("(%p)->(%p, %p) stub\n", This, strings, states);
395 return E_NOTIMPL;
398 static HRESULT WINAPI DHTMLEdit_NewDocument(IDHTMLEdit *iface)
400 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
401 FIXME("(%p)->() stub\n", This);
402 return S_OK;
405 static HRESULT WINAPI DHTMLEdit_LoadURL(IDHTMLEdit *iface, BSTR url)
407 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
408 FIXME("(%p)->(%s)\n", This, debugstr_w(url));
409 return E_NOTIMPL;
412 static HRESULT WINAPI DHTMLEdit_FilterSourceCode(IDHTMLEdit *iface, BSTR in, BSTR *out)
414 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
415 FIXME("(%p)->(%s, %p)\n", This, debugstr_w(in), out);
416 return E_NOTIMPL;
419 static HRESULT WINAPI DHTMLEdit_Refresh(IDHTMLEdit *iface)
421 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
422 FIXME("(%p)->() stub\n", This);
423 return E_NOTIMPL;
426 static HRESULT WINAPI DHTMLEdit_get_DOM(IDHTMLEdit *iface, IHTMLDocument2 **value)
428 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
429 FIXME("(%p)->(%p) stub\n", This, value);
430 return E_NOTIMPL;
433 static HRESULT WINAPI DHTMLEdit_get_DocumentHTML(IDHTMLEdit *iface, BSTR *value)
435 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
436 FIXME("(%p)->(%p) stub\n", This, value);
437 return E_NOTIMPL;
440 static HRESULT WINAPI DHTMLEdit_put_DocumentHTML(IDHTMLEdit *iface, BSTR html)
442 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
443 FIXME("(%p)->(%s) stub\n", This, debugstr_w(html));
444 return E_NOTIMPL;
447 static HRESULT WINAPI DHTMLEdit_get_ActivateApplets(IDHTMLEdit *iface, VARIANT_BOOL *value)
449 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
450 FIXME("(%p)->(%p) stub\n", This, value);
451 return E_NOTIMPL;
454 static HRESULT WINAPI DHTMLEdit_put_ActivateApplets(IDHTMLEdit *iface, VARIANT_BOOL value)
456 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
457 FIXME("(%p)->(%04x) stub\n", This, value);
458 return E_NOTIMPL;
461 static HRESULT WINAPI DHTMLEdit_get_ActivateActiveXControls(IDHTMLEdit *iface, VARIANT_BOOL *value)
463 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
464 FIXME("(%p)->(%p) stub\n", This, value);
465 return E_NOTIMPL;
468 static HRESULT WINAPI DHTMLEdit_put_ActivateActiveXControls(IDHTMLEdit *iface, VARIANT_BOOL value)
470 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
471 FIXME("(%p)->(%04x) stub\n", This, value);
472 return E_NOTIMPL;
475 static HRESULT WINAPI DHTMLEdit_get_ActivateDTCs(IDHTMLEdit *iface, VARIANT_BOOL *value)
477 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
478 FIXME("(%p)->(%p) stub\n", This, value);
479 return E_NOTIMPL;
482 static HRESULT WINAPI DHTMLEdit_put_ActivateDTCs(IDHTMLEdit *iface, VARIANT_BOOL value)
484 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
485 FIXME("(%p)->(%04x) stub\n", This, value);
486 return E_NOTIMPL;
489 static HRESULT WINAPI DHTMLEdit_get_ShowDetails(IDHTMLEdit *iface, VARIANT_BOOL *value)
491 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
492 FIXME("(%p)->(%p) stub\n", This, value);
493 return E_NOTIMPL;
496 static HRESULT WINAPI DHTMLEdit_put_ShowDetails(IDHTMLEdit *iface, VARIANT_BOOL value)
498 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
499 FIXME("(%p)->(%04x) stub\n", This, value);
500 return E_NOTIMPL;
503 static HRESULT WINAPI DHTMLEdit_get_ShowBorders(IDHTMLEdit *iface, VARIANT_BOOL *value)
505 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
506 FIXME("(%p)->(%p) stub\n", This, value);
507 return E_NOTIMPL;
510 static HRESULT WINAPI DHTMLEdit_put_ShowBorders(IDHTMLEdit *iface, VARIANT_BOOL value)
512 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
513 FIXME("(%p)->(%04x) stub\n", This, value);
514 return E_NOTIMPL;
517 static HRESULT WINAPI DHTMLEdit_get_Appearance(IDHTMLEdit *iface, DHTMLEDITAPPEARANCE *value)
519 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
520 FIXME("(%p)->(%p) stub\n", This, value);
521 return E_NOTIMPL;
524 static HRESULT WINAPI DHTMLEdit_put_Appearance(IDHTMLEdit *iface, DHTMLEDITAPPEARANCE value)
526 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
527 FIXME("(%p)->(%u) stub\n", This, value);
528 return E_NOTIMPL;
531 static HRESULT WINAPI DHTMLEdit_get_Scrollbars(IDHTMLEdit *iface, VARIANT_BOOL *value)
533 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
534 FIXME("(%p)->(%p) stub\n", This, value);
535 return E_NOTIMPL;
538 static HRESULT WINAPI DHTMLEdit_put_Scrollbars(IDHTMLEdit *iface, VARIANT_BOOL value)
540 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
541 FIXME("(%p)->(%04x) stub\n", This, value);
542 return E_NOTIMPL;
545 static HRESULT WINAPI DHTMLEdit_get_ScrollbarAppearance(IDHTMLEdit *iface, DHTMLEDITAPPEARANCE *value)
547 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
548 FIXME("(%p)->(%p) stub\n", This, value);
549 return E_NOTIMPL;
552 static HRESULT WINAPI DHTMLEdit_put_ScrollbarAppearance(IDHTMLEdit *iface, DHTMLEDITAPPEARANCE value)
554 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
555 FIXME("(%p)->(%u) stub\n", This, value);
556 return E_NOTIMPL;
559 static HRESULT WINAPI DHTMLEdit_get_SourceCodePreservation(IDHTMLEdit *iface, VARIANT_BOOL *value)
561 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
562 FIXME("(%p)->(%p) stub\n", This, value);
563 return E_NOTIMPL;
566 static HRESULT WINAPI DHTMLEdit_put_SourceCodePreservation(IDHTMLEdit *iface, VARIANT_BOOL value)
568 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
569 FIXME("(%p)->(%04x) stub\n", This, value);
570 return E_NOTIMPL;
573 static HRESULT WINAPI DHTMLEdit_get_AbsoluteDropMode(IDHTMLEdit *iface, VARIANT_BOOL *value)
575 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
576 FIXME("(%p)->(%p) stub\n", This, value);
577 return E_NOTIMPL;
580 static HRESULT WINAPI DHTMLEdit_put_AbsoluteDropMode(IDHTMLEdit *iface, VARIANT_BOOL value)
582 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
583 FIXME("(%p)->(%04x) stub\n", This, value);
584 return E_NOTIMPL;
587 static HRESULT WINAPI DHTMLEdit_get_SnapToGridX(IDHTMLEdit *iface, LONG *value)
589 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
590 FIXME("(%p)->(%p) stub\n", This, value);
591 return E_NOTIMPL;
594 static HRESULT WINAPI DHTMLEdit_put_SnapToGridX(IDHTMLEdit *iface, LONG value)
596 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
597 FIXME("(%p)->(%d) stub\n", This, value);
598 return E_NOTIMPL;
601 static HRESULT WINAPI DHTMLEdit_get_SnapToGridY(IDHTMLEdit *iface, LONG *value)
603 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
604 FIXME("(%p)->(%p) stub\n", This, value);
605 return E_NOTIMPL;
608 static HRESULT WINAPI DHTMLEdit_put_SnapToGridY(IDHTMLEdit *iface, LONG value)
610 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
611 FIXME("(%p)->(%d) stub\n", This, value);
612 return E_NOTIMPL;
615 static HRESULT WINAPI DHTMLEdit_get_SnapToGrid(IDHTMLEdit *iface, VARIANT_BOOL *value)
617 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
618 FIXME("(%p)->(%p) stub\n", This, value);
619 return E_NOTIMPL;
622 static HRESULT WINAPI DHTMLEdit_put_SnapToGrid(IDHTMLEdit *iface, VARIANT_BOOL value)
624 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
625 FIXME("(%p)->(%04x) stub\n", This, value);
626 return E_NOTIMPL;
629 static HRESULT WINAPI DHTMLEdit_get_IsDirty(IDHTMLEdit *iface, VARIANT_BOOL *value)
631 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
632 FIXME("(%p)->(%p) stub\n", This, value);
633 return E_NOTIMPL;
636 static HRESULT WINAPI DHTMLEdit_get_CurrentDocumentPath(IDHTMLEdit *iface, BSTR *value)
638 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
639 FIXME("(%p)->(%p) stub\n", This, value);
640 return E_NOTIMPL;
643 static HRESULT WINAPI DHTMLEdit_get_BaseURL(IDHTMLEdit *iface, BSTR *value)
645 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
646 FIXME("(%p)->(%p) stub\n", This, value);
647 return E_NOTIMPL;
650 static HRESULT WINAPI DHTMLEdit_put_BaseURL(IDHTMLEdit *iface, BSTR value)
652 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
653 FIXME("(%p)->(%s) stub\n", This, debugstr_w(value));
654 return E_NOTIMPL;
657 static HRESULT WINAPI DHTMLEdit_get_DocumentTitle(IDHTMLEdit *iface, BSTR *value)
659 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
660 FIXME("(%p)->(%p) stub\n", This, value);
661 return E_NOTIMPL;
664 static HRESULT WINAPI DHTMLEdit_get_UseDivOnCarriageReturn(IDHTMLEdit *iface, VARIANT_BOOL *value)
666 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
667 FIXME("(%p)->(%p) stub\n", This, value);
668 return E_NOTIMPL;
671 static HRESULT WINAPI DHTMLEdit_put_UseDivOnCarriageReturn(IDHTMLEdit *iface, VARIANT_BOOL value)
673 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
674 FIXME("(%p)->(%04x) stub\n", This, value);
675 return E_NOTIMPL;
678 static HRESULT WINAPI DHTMLEdit_get_Busy(IDHTMLEdit *iface, VARIANT_BOOL *value)
680 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
681 FIXME("(%p)->(%p) stub\n", This, value);
682 return E_NOTIMPL;
685 static HRESULT WINAPI DHTMLEdit_LoadDocument(IDHTMLEdit *iface, VARIANT *path, VARIANT *prompt)
687 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
688 FIXME("(%p)->(%s, %s) stub\n", This, debugstr_variant(path), debugstr_variant(prompt));
689 return E_NOTIMPL;
692 static HRESULT WINAPI DHTMLEdit_SaveDocument(IDHTMLEdit *iface, VARIANT *path, VARIANT *prompt)
694 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
695 FIXME("(%p)->(%s, %s) stub\n", This, debugstr_variant(path), debugstr_variant(prompt));
696 return E_NOTIMPL;
699 static HRESULT WINAPI DHTMLEdit_PrintDocument(IDHTMLEdit *iface, VARIANT *prompt)
701 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
702 FIXME("(%p)->(%s) stub\n", This, debugstr_variant(prompt));
703 return E_NOTIMPL;
706 static HRESULT WINAPI DHTMLEdit_get_BrowseMode(IDHTMLEdit *iface, VARIANT_BOOL *value)
708 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
709 FIXME("(%p)->(%p) stub\n", This, value);
710 return E_NOTIMPL;
713 static HRESULT WINAPI DHTMLEdit_put_BrowseMode(IDHTMLEdit *iface, VARIANT_BOOL value)
715 DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface);
716 FIXME("(%p)->(%04x) stub\n", This, value);
717 return E_NOTIMPL;
720 static const IDHTMLEditVtbl DHTMLEditVtbl = {
721 DHTMLEdit_QueryInterface,
722 DHTMLEdit_AddRef,
723 DHTMLEdit_Release,
724 DHTMLEdit_GetTypeInfoCount,
725 DHTMLEdit_GetTypeInfo,
726 DHTMLEdit_GetIDsOfNames,
727 DHTMLEdit_Invoke,
728 DHTMLEdit_ExecCommand,
729 DHTMLEdit_QueryStatus,
730 DHTMLEdit_SetContextMenu,
731 DHTMLEdit_NewDocument,
732 DHTMLEdit_LoadURL,
733 DHTMLEdit_FilterSourceCode,
734 DHTMLEdit_Refresh,
735 DHTMLEdit_get_DOM,
736 DHTMLEdit_get_DocumentHTML,
737 DHTMLEdit_put_DocumentHTML,
738 DHTMLEdit_get_ActivateApplets,
739 DHTMLEdit_put_ActivateApplets,
740 DHTMLEdit_get_ActivateActiveXControls,
741 DHTMLEdit_put_ActivateActiveXControls,
742 DHTMLEdit_get_ActivateDTCs,
743 DHTMLEdit_put_ActivateDTCs,
744 DHTMLEdit_get_ShowDetails,
745 DHTMLEdit_put_ShowDetails,
746 DHTMLEdit_get_ShowBorders,
747 DHTMLEdit_put_ShowBorders,
748 DHTMLEdit_get_Appearance,
749 DHTMLEdit_put_Appearance,
750 DHTMLEdit_get_Scrollbars,
751 DHTMLEdit_put_Scrollbars,
752 DHTMLEdit_get_ScrollbarAppearance,
753 DHTMLEdit_put_ScrollbarAppearance,
754 DHTMLEdit_get_SourceCodePreservation,
755 DHTMLEdit_put_SourceCodePreservation,
756 DHTMLEdit_get_AbsoluteDropMode,
757 DHTMLEdit_put_AbsoluteDropMode,
758 DHTMLEdit_get_SnapToGridX,
759 DHTMLEdit_put_SnapToGridX,
760 DHTMLEdit_get_SnapToGridY,
761 DHTMLEdit_put_SnapToGridY,
762 DHTMLEdit_get_SnapToGrid,
763 DHTMLEdit_put_SnapToGrid,
764 DHTMLEdit_get_IsDirty,
765 DHTMLEdit_get_CurrentDocumentPath,
766 DHTMLEdit_get_BaseURL,
767 DHTMLEdit_put_BaseURL,
768 DHTMLEdit_get_DocumentTitle,
769 DHTMLEdit_get_UseDivOnCarriageReturn,
770 DHTMLEdit_put_UseDivOnCarriageReturn,
771 DHTMLEdit_get_Busy,
772 DHTMLEdit_LoadDocument,
773 DHTMLEdit_SaveDocument,
774 DHTMLEdit_PrintDocument,
775 DHTMLEdit_get_BrowseMode,
776 DHTMLEdit_put_BrowseMode
779 static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID iid, void **out)
781 return dhtml_edit_qi(impl_from_IOleObject(iface), iid, out);
784 static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
786 return dhtml_edit_addref(impl_from_IOleObject(iface));
789 static ULONG WINAPI OleObject_Release(IOleObject *iface)
791 return dhtml_edit_release(impl_from_IOleObject(iface));
794 static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite *value)
796 DHTMLEditImpl *This = impl_from_IOleObject(iface);
798 TRACE("(%p)->(%p)\n", This, value);
800 if (This->client_site)
801 IOleClientSite_Release(This->client_site);
803 if (value)
804 IOleClientSite_AddRef(value);
806 This->client_site = value;
808 return S_OK;
811 static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, IOleClientSite **value)
813 DHTMLEditImpl *This = impl_from_IOleObject(iface);
815 TRACE("(%p)->(%p)\n", This, value);
817 if (This->client_site)
818 IOleClientSite_AddRef(This->client_site);
820 *value = This->client_site;
822 return S_OK;
825 static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface,
826 const OLECHAR *container_app, const OLECHAR *container_obj)
828 DHTMLEditImpl *This = impl_from_IOleObject(iface);
829 FIXME("(%p)->(%p, %p) stub\n", This, container_app, container_obj);
830 return E_NOTIMPL;
833 static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD save)
835 DHTMLEditImpl *This = impl_from_IOleObject(iface);
836 FIXME("(%p)->(%u) stub\n", This, save);
837 return S_OK;
840 static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD moniker_id, IMoniker *value)
842 DHTMLEditImpl *This = impl_from_IOleObject(iface);
843 FIXME("(%p)->(%u, %p) stub\n", This, moniker_id, value);
844 return E_NOTIMPL;
847 static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD assign, DWORD moniker_id, IMoniker **value)
849 DHTMLEditImpl *This = impl_from_IOleObject(iface);
850 FIXME("(%p)->(%u, %p) stub\n", This, moniker_id, value);
851 *value = NULL;
852 return E_NOTIMPL;
855 static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, IDataObject *data_obj, BOOL creation, DWORD reserved)
857 DHTMLEditImpl *This = impl_from_IOleObject(iface);
858 FIXME("(%p)->(%p, %u, %u) stub\n", This, data_obj, creation, reserved);
859 return E_NOTIMPL;
862 static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD reserved, IDataObject **value)
864 DHTMLEditImpl *This = impl_from_IOleObject(iface);
865 FIXME("(%p)->(%u, %p) stub\n", This, reserved, value);
866 *value = NULL;
867 return E_NOTIMPL;
870 static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG verb, MSG *msg, IOleClientSite *active_site,
871 LONG index, HWND parent, const RECT *pos)
873 DHTMLEditImpl *This = impl_from_IOleObject(iface);
874 TRACE("(%p)->(%d, %p, %p, %d, %p, %p) stub\n", This, verb, msg, active_site, index, parent, pos);
876 if (verb == OLEIVERB_INPLACEACTIVATE)
878 IOleClientSite_OnShowWindow(This->client_site, TRUE);
879 return S_OK;
882 return E_NOTIMPL;
885 static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **verb)
887 DHTMLEditImpl *This = impl_from_IOleObject(iface);
888 FIXME("(%p)->(%p) stub\n", This, verb);
889 *verb = NULL;
890 return E_NOTIMPL;
893 static HRESULT WINAPI OleObject_Update(IOleObject *iface)
895 DHTMLEditImpl *This = impl_from_IOleObject(iface);
896 FIXME("(%p) stub\n", This);
897 return E_NOTIMPL;
900 static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
902 DHTMLEditImpl *This = impl_from_IOleObject(iface);
903 FIXME("(%p) stub\n", This);
904 return E_NOTIMPL;
907 static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *clsid)
909 DHTMLEditImpl *This = impl_from_IOleObject(iface);
910 FIXME("(%p)->(%p) stub\n", This, clsid);
911 return E_NOTIMPL;
914 static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD type_type, OLECHAR **type)
916 DHTMLEditImpl *This = impl_from_IOleObject(iface);
917 FIXME("(%p)->(%u, %p) stub\n", This, type_type, type);
918 *type = NULL;
919 return E_NOTIMPL;
922 static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD aspect, SIZEL *size_limit)
924 DHTMLEditImpl *This = impl_from_IOleObject(iface);
925 TRACE("(%p)->(%u, %p)\n", This, aspect, size_limit);
927 if(aspect != DVASPECT_CONTENT)
928 return DV_E_DVASPECT;
930 This->extent = *size_limit;
931 return S_OK;
934 static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD aspect, SIZEL *size_limit)
936 DHTMLEditImpl *This = impl_from_IOleObject(iface);
937 TRACE("(%p)->(%u, %p)\n", This, aspect, size_limit);
939 if(aspect != DVASPECT_CONTENT)
940 return E_FAIL;
942 *size_limit = This->extent;
943 return S_OK;
946 static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *sink, DWORD *conn)
948 DHTMLEditImpl *This = impl_from_IOleObject(iface);
949 FIXME("(%p)->(%p, %p) stub\n", This, sink, conn);
950 *conn = 0;
951 return E_NOTIMPL;
954 static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD conn)
956 DHTMLEditImpl *This = impl_from_IOleObject(iface);
957 FIXME("(%p)->(%u) stub\n", This, conn);
958 return E_NOTIMPL;
961 static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **advise)
963 DHTMLEditImpl *This = impl_from_IOleObject(iface);
964 FIXME("(%p)->(%p) stub\n", This, advise);
965 *advise = NULL;
966 return E_NOTIMPL;
969 static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD aspect, DWORD *status)
971 DHTMLEditImpl *This = impl_from_IOleObject(iface);
972 TRACE("(%p)->(%u, %p)\n", This, aspect, status);
974 return OleRegGetMiscStatus(&CLSID_DHTMLEdit, aspect, status);
977 static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *palette)
979 DHTMLEditImpl *This = impl_from_IOleObject(iface);
980 FIXME("(%p)->(%p) stub\n", This, palette);
981 return E_NOTIMPL;
984 static const IOleObjectVtbl OleObjectVtbl = {
985 OleObject_QueryInterface,
986 OleObject_AddRef,
987 OleObject_Release,
988 OleObject_SetClientSite,
989 OleObject_GetClientSite,
990 OleObject_SetHostNames,
991 OleObject_Close,
992 OleObject_SetMoniker,
993 OleObject_GetMoniker,
994 OleObject_InitFromData,
995 OleObject_GetClipboardData,
996 OleObject_DoVerb,
997 OleObject_EnumVerbs,
998 OleObject_Update,
999 OleObject_IsUpToDate,
1000 OleObject_GetUserClassID,
1001 OleObject_GetUserType,
1002 OleObject_SetExtent,
1003 OleObject_GetExtent,
1004 OleObject_Advise,
1005 OleObject_Unadvise,
1006 OleObject_EnumAdvise,
1007 OleObject_GetMiscStatus,
1008 OleObject_SetColorScheme
1011 static HRESULT WINAPI ProvideClassInfo2_QueryInterface(IProvideClassInfo2 *iface, REFIID iid, LPVOID *out)
1013 return dhtml_edit_qi(impl_from_IProvideClassInfo2(iface), iid, out);
1016 static ULONG WINAPI ProvideClassInfo2_AddRef(IProvideClassInfo2 *iface)
1018 return dhtml_edit_addref(impl_from_IProvideClassInfo2(iface));
1021 static ULONG WINAPI ProvideClassInfo2_Release(IProvideClassInfo2 *iface)
1023 return dhtml_edit_release(impl_from_IProvideClassInfo2(iface));
1026 static HRESULT WINAPI ProvideClassInfo2_GetClassInfo(IProvideClassInfo2 *iface, ITypeInfo **ppTI)
1028 DHTMLEditImpl *This = impl_from_IProvideClassInfo2(iface);
1029 FIXME("(%p)->(%p)\n", This, ppTI);
1030 return E_NOTIMPL;
1033 static HRESULT WINAPI ProvideClassInfo2_GetGUID(IProvideClassInfo2 *iface, DWORD dwGuidKind, GUID *pGUID)
1035 DHTMLEditImpl *This = impl_from_IProvideClassInfo2(iface);
1036 FIXME("(%p)->(%d %p)\n", This, dwGuidKind, pGUID);
1037 return E_NOTIMPL;
1040 static const IProvideClassInfo2Vtbl ProvideClassInfo2Vtbl = {
1041 ProvideClassInfo2_QueryInterface,
1042 ProvideClassInfo2_AddRef,
1043 ProvideClassInfo2_Release,
1044 ProvideClassInfo2_GetClassInfo,
1045 ProvideClassInfo2_GetGUID
1048 static HRESULT WINAPI PersistStorage_QueryInterface(IPersistStorage *iface, REFIID iid, void **out)
1050 return dhtml_edit_qi(impl_from_IPersistStorage(iface), iid, out);
1053 static ULONG WINAPI PersistStorage_AddRef(IPersistStorage *iface)
1055 return dhtml_edit_addref(impl_from_IPersistStorage(iface));
1058 static ULONG WINAPI PersistStorage_Release(IPersistStorage *iface)
1060 return dhtml_edit_release(impl_from_IPersistStorage(iface));
1063 static HRESULT WINAPI PersistStorage_GetClassID(IPersistStorage *iface, CLSID *clsid)
1065 DHTMLEditImpl *This = impl_from_IPersistStorage(iface);
1066 FIXME("(%p)->(%p) stub\n", This, clsid);
1067 return E_NOTIMPL;
1070 static HRESULT WINAPI PersistStorage_IsDirty(IPersistStorage *iface)
1072 DHTMLEditImpl *This = impl_from_IPersistStorage(iface);
1073 FIXME("(%p) stub\n", This);
1074 return E_NOTIMPL;
1077 static HRESULT WINAPI PersistStorage_InitNew(IPersistStorage *iface, LPSTORAGE storage)
1079 DHTMLEditImpl *This = impl_from_IPersistStorage(iface);
1080 FIXME("(%p)->(%p) stub\n", This, storage);
1081 return S_OK;
1084 static HRESULT WINAPI PersistStorage_Load(IPersistStorage *iface, LPSTORAGE storage)
1086 DHTMLEditImpl *This = impl_from_IPersistStorage(iface);
1087 FIXME("(%p)->(%p) stub\n", This, storage);
1088 return E_NOTIMPL;
1091 static HRESULT WINAPI PersistStorage_Save(IPersistStorage *iface, LPSTORAGE storage, BOOL sameasld)
1093 DHTMLEditImpl *This = impl_from_IPersistStorage(iface);
1094 FIXME("(%p)->(%p, %u) stub\n", This, storage, sameasld);
1095 return E_NOTIMPL;
1098 static HRESULT WINAPI PersistStorage_SaveCompleted(IPersistStorage *iface, LPSTORAGE storage)
1100 DHTMLEditImpl *This = impl_from_IPersistStorage(iface);
1101 FIXME("(%p)->(%p)\n", This, storage);
1102 return E_NOTIMPL;
1105 static const IPersistStorageVtbl PersistStorageVtbl =
1107 PersistStorage_QueryInterface,
1108 PersistStorage_AddRef,
1109 PersistStorage_Release,
1110 PersistStorage_GetClassID,
1111 PersistStorage_IsDirty,
1112 PersistStorage_InitNew,
1113 PersistStorage_Load,
1114 PersistStorage_Save,
1115 PersistStorage_SaveCompleted
1118 static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface, REFIID iid, void **out)
1120 return dhtml_edit_qi(impl_from_IPersistStreamInit(iface), iid, out);
1123 static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface)
1125 return dhtml_edit_addref(impl_from_IPersistStreamInit(iface));
1128 static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface)
1130 return dhtml_edit_release(impl_from_IPersistStreamInit(iface));
1133 static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *clsid)
1135 DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface);
1136 FIXME("(%p)->(%p) stub\n", This, clsid);
1137 return E_NOTIMPL;
1140 static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface)
1142 DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface);
1143 FIXME("(%p) stub\n", This);
1144 return E_NOTIMPL;
1147 static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, IStream *stream)
1149 DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface);
1150 FIXME("(%p)->(%p) stub\n", This, stream);
1151 return S_OK;
1154 static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, IStream *stream, BOOL clear_dirty)
1156 DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface);
1157 FIXME("(%p)->(%p, %u) stub\n", This, stream, clear_dirty);
1158 return E_NOTIMPL;
1161 static HRESULT WINAPI PersistStreamInit_GetSizeMax(IPersistStreamInit *iface, ULARGE_INTEGER *value)
1163 DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface);
1164 FIXME("(%p)->(%p) stub\n", This, value);
1165 value->QuadPart = 0;
1166 return E_NOTIMPL;
1169 static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface)
1171 DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface);
1172 FIXME("(%p) stub\n", This);
1173 return E_NOTIMPL;
1176 static const IPersistStreamInitVtbl PersistStreamInitVtbl = {
1177 PersistStreamInit_QueryInterface,
1178 PersistStreamInit_AddRef,
1179 PersistStreamInit_Release,
1180 PersistStreamInit_GetClassID,
1181 PersistStreamInit_IsDirty,
1182 PersistStreamInit_Load,
1183 PersistStreamInit_Save,
1184 PersistStreamInit_GetSizeMax,
1185 PersistStreamInit_InitNew
1188 static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID iid, void **out)
1190 return dhtml_edit_qi(impl_from_IOleControl(iface), iid, out);
1193 static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
1195 return dhtml_edit_addref(impl_from_IOleControl(iface));
1198 static ULONG WINAPI OleControl_Release(IOleControl *iface)
1200 return dhtml_edit_release(impl_from_IOleControl(iface));
1203 static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
1205 DHTMLEditImpl *This = impl_from_IOleControl(iface);
1206 FIXME("(%p)->(%p)\n", This, pCI);
1207 return E_NOTIMPL;
1210 static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *msg)
1212 DHTMLEditImpl *This = impl_from_IOleControl(iface);
1213 FIXME("(%p)->(%p)\n", This, msg);
1214 return E_NOTIMPL;
1217 static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
1219 DHTMLEditImpl *This = impl_from_IOleControl(iface);
1220 FIXME("(%p)->(%d)\n", This, dispID);
1221 return E_NOTIMPL;
1224 static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL freeze)
1226 DHTMLEditImpl *This = impl_from_IOleControl(iface);
1227 FIXME("(%p)->(%x)\n", This, freeze);
1228 return E_NOTIMPL;
1231 static const IOleControlVtbl OleControlVtbl = {
1232 OleControl_QueryInterface,
1233 OleControl_AddRef,
1234 OleControl_Release,
1235 OleControl_GetControlInfo,
1236 OleControl_OnMnemonic,
1237 OleControl_OnAmbientPropertyChange,
1238 OleControl_FreezeEvents
1241 static HRESULT WINAPI ViewObjectEx_QueryInterface(IViewObjectEx *iface, REFIID iid, LPVOID *out)
1243 return dhtml_edit_qi(impl_from_IViewObjectEx(iface), iid, out);
1246 static ULONG WINAPI ViewObjectEx_AddRef(IViewObjectEx *iface)
1248 return dhtml_edit_addref(impl_from_IViewObjectEx(iface));
1251 static ULONG WINAPI ViewObjectEx_Release(IViewObjectEx *iface)
1253 return dhtml_edit_release(impl_from_IViewObjectEx(iface));
1256 static HRESULT WINAPI ViewObjectEx_Draw(IViewObjectEx *iface, DWORD drawaspect, LONG index, void *aspect,
1257 DVTARGETDEVICE *device, HDC target_dev, HDC hdc_draw, const RECTL *bounds, const RECTL *win_bounds,
1258 BOOL (STDMETHODCALLTYPE *fn_continue)(ULONG_PTR cont), ULONG_PTR cont)
1260 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1262 FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %lu)\n", This, drawaspect, index, aspect, device, target_dev,
1263 hdc_draw, bounds, win_bounds, fn_continue, cont);
1265 return E_NOTIMPL;
1268 static HRESULT WINAPI ViewObjectEx_GetColorSet(IViewObjectEx *iface, DWORD drawaspect, LONG index, void *aspect,
1269 DVTARGETDEVICE *device, HDC hic_target, LOGPALETTE **colorset)
1271 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1273 FIXME("(%p)->(%d %d %p %p %p %p)\n", This, drawaspect, index, aspect, device, hic_target,
1274 colorset);
1276 return E_NOTIMPL;
1279 static HRESULT WINAPI ViewObjectEx_Freeze(IViewObjectEx *iface, DWORD drawaspect, LONG index, void *aspect,
1280 DWORD *freeze)
1282 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1284 FIXME("(%p)->(%d %d %p %p)\n", This, drawaspect, index, aspect, freeze);
1286 return E_NOTIMPL;
1289 static HRESULT WINAPI ViewObjectEx_Unfreeze(IViewObjectEx *iface, DWORD freeze)
1291 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1293 FIXME("(%p)->(%d)\n", This, freeze);
1295 return E_NOTIMPL;
1298 static HRESULT WINAPI ViewObjectEx_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *sink)
1300 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1302 FIXME("(%p)->(%d %d %p)\n", This, aspects, advf, sink);
1304 return E_NOTIMPL;
1307 static HRESULT WINAPI ViewObjectEx_GetAdvise(IViewObjectEx *iface, DWORD *aspects, DWORD *advf, IAdviseSink **sink)
1309 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1311 FIXME("(%p)->(%p %p %p)\n", This, aspects, advf, sink);
1313 return E_NOTIMPL;
1316 static HRESULT WINAPI ViewObjectEx_GetExtent(IViewObjectEx *iface, DWORD draw_aspect, LONG index,
1317 DVTARGETDEVICE *device, SIZEL *size)
1319 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1321 FIXME("(%p)->(%d %d %p %p)\n", This, draw_aspect, index, device, size);
1323 return E_NOTIMPL;
1326 static HRESULT WINAPI ViewObjectEx_GetRect(IViewObjectEx *iface, DWORD aspect, RECTL *rect)
1328 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1330 FIXME("(%p)->(%d %p)\n", This, aspect, rect);
1332 return E_NOTIMPL;
1335 static HRESULT WINAPI ViewObjectEx_GetViewStatus(IViewObjectEx *iface, DWORD *status)
1337 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1339 TRACE("(%p)->(%p)\n", This, status);
1341 *status = VIEWSTATUS_OPAQUE | VIEWSTATUS_SOLIDBKGND;
1342 return S_OK;
1345 static HRESULT WINAPI ViewObjectEx_QueryHitPoint(IViewObjectEx *iface, DWORD aspect, const RECT *bounds,
1346 POINT pt, LONG close_hint, DWORD *hit_result)
1348 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1350 FIXME("(%p)->(%d %s %s %d %p)\n", This, aspect, wine_dbgstr_rect(bounds), wine_dbgstr_point(&pt), close_hint, hit_result);
1352 return E_NOTIMPL;
1355 static HRESULT WINAPI ViewObjectEx_QueryHitRect(IViewObjectEx *iface, DWORD aspect, const RECT *bounds,
1356 const RECT *loc, LONG close_hint, DWORD *hit_result)
1358 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1360 FIXME("(%p)->(%d %s %s %d %p)\n", This, aspect, wine_dbgstr_rect(bounds), wine_dbgstr_rect(loc), close_hint, hit_result);
1362 return E_NOTIMPL;
1365 static HRESULT WINAPI ViewObjectEx_GetNaturalExtent(IViewObjectEx *iface, DWORD aspect, LONG index,
1366 DVTARGETDEVICE *device, HDC target_hdc, DVEXTENTINFO *extent_info, SIZEL *size)
1368 DHTMLEditImpl *This = impl_from_IViewObjectEx(iface);
1370 FIXME("(%p)->(%d %d %p %p %p %p)\n", This, aspect, index, device, target_hdc, extent_info, size);
1372 return E_NOTIMPL;
1375 static const IViewObjectExVtbl ViewObjectExVtbl = {
1376 ViewObjectEx_QueryInterface,
1377 ViewObjectEx_AddRef,
1378 ViewObjectEx_Release,
1379 ViewObjectEx_Draw,
1380 ViewObjectEx_GetColorSet,
1381 ViewObjectEx_Freeze,
1382 ViewObjectEx_Unfreeze,
1383 ViewObjectEx_SetAdvise,
1384 ViewObjectEx_GetAdvise,
1385 ViewObjectEx_GetExtent,
1386 ViewObjectEx_GetRect,
1387 ViewObjectEx_GetViewStatus,
1388 ViewObjectEx_QueryHitPoint,
1389 ViewObjectEx_QueryHitRect,
1390 ViewObjectEx_GetNaturalExtent
1393 static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface,
1394 REFIID iid, LPVOID *out)
1396 return dhtml_edit_qi(impl_from_IOleInPlaceObjectWindowless(iface), iid, out);
1399 static ULONG WINAPI OleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless *iface)
1401 return dhtml_edit_addref(impl_from_IOleInPlaceObjectWindowless(iface));
1404 static ULONG WINAPI OleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless *iface)
1406 return dhtml_edit_release(impl_from_IOleInPlaceObjectWindowless(iface));
1409 static HRESULT WINAPI OleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless *iface, HWND *phwnd)
1411 DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface);
1412 FIXME("(%p)->(%p)\n", This, phwnd);
1413 return E_NOTIMPL;
1416 static HRESULT WINAPI OleInPlaceObjectWindowless_ContextSensitiveHelp(IOleInPlaceObjectWindowless *iface,
1417 BOOL fEnterMode)
1419 DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface);
1420 FIXME("(%p)->(%x)\n", This, fEnterMode);
1421 return E_NOTIMPL;
1424 static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless *iface)
1426 DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface);
1427 FIXME("(%p)\n", This);
1428 return E_NOTIMPL;
1431 static HRESULT WINAPI OleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless *iface)
1433 DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface);
1434 FIXME("(%p)\n", This);
1435 return E_NOTIMPL;
1438 static HRESULT WINAPI OleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjectWindowless *iface,
1439 LPCRECT lprcPosRect, LPCRECT lprcClipRect)
1441 DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface);
1442 FIXME("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
1443 return E_NOTIMPL;
1446 static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface)
1448 DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface);
1449 FIXME("(%p)\n", This);
1450 return E_NOTIMPL;
1453 static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless *iface,
1454 UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult)
1456 DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface);
1457 FIXME("(%p)->(%u %lu %lu %p)\n", This, msg, wParam, lParam, lpResult);
1458 return E_NOTIMPL;
1461 static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless *iface,
1462 IDropTarget **ppDropTarget)
1464 DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface);
1465 FIXME("(%p)->(%p)\n", This, ppDropTarget);
1466 return E_NOTIMPL;
1469 static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl = {
1470 OleInPlaceObjectWindowless_QueryInterface,
1471 OleInPlaceObjectWindowless_AddRef,
1472 OleInPlaceObjectWindowless_Release,
1473 OleInPlaceObjectWindowless_GetWindow,
1474 OleInPlaceObjectWindowless_ContextSensitiveHelp,
1475 OleInPlaceObjectWindowless_InPlaceDeactivate,
1476 OleInPlaceObjectWindowless_UIDeactivate,
1477 OleInPlaceObjectWindowless_SetObjectRects,
1478 OleInPlaceObjectWindowless_ReactivateAndUndo,
1479 OleInPlaceObjectWindowless_OnWindowMessage,
1480 OleInPlaceObjectWindowless_GetDropTarget
1483 static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface,
1484 REFIID iid, LPVOID *out)
1486 return dhtml_edit_qi(impl_from_IOleInPlaceActiveObject(iface), iid, out);
1489 static ULONG WINAPI InPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface)
1491 return dhtml_edit_addref(impl_from_IOleInPlaceActiveObject(iface));
1494 static ULONG WINAPI InPlaceActiveObject_Release(IOleInPlaceActiveObject *iface)
1496 return dhtml_edit_release(impl_from_IOleInPlaceActiveObject(iface));
1499 static HRESULT WINAPI InPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface,
1500 HWND *phwnd)
1502 DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface);
1503 return IOleInPlaceObjectWindowless_GetWindow(&This->IOleInPlaceObjectWindowless_iface, phwnd);
1506 static HRESULT WINAPI InPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface,
1507 BOOL fEnterMode)
1509 DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface);
1510 return IOleInPlaceObjectWindowless_ContextSensitiveHelp(&This->IOleInPlaceObjectWindowless_iface, fEnterMode);
1513 static HRESULT WINAPI InPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface,
1514 LPMSG lpmsg)
1516 DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface);
1517 FIXME("(%p)->(%p)\n", This, lpmsg);
1518 return E_NOTIMPL;
1521 static HRESULT WINAPI InPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface,
1522 BOOL fActivate)
1524 DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface);
1525 FIXME("(%p)->(%x)\n", This, fActivate);
1526 return E_NOTIMPL;
1529 static HRESULT WINAPI InPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface,
1530 BOOL fActivate)
1532 DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface);
1533 FIXME("(%p)->(%x)\n", This, fActivate);
1534 return E_NOTIMPL;
1537 static HRESULT WINAPI InPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject *iface,
1538 LPCRECT lprcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
1540 DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface);
1541 FIXME("(%p)->(%p %p %x)\n", This, lprcBorder, pUIWindow, fFrameWindow);
1542 return E_NOTIMPL;
1545 static HRESULT WINAPI InPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject *iface,
1546 BOOL fEnable)
1548 DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface);
1549 FIXME("(%p)->(%x)\n", This, fEnable);
1550 return E_NOTIMPL;
1553 static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
1554 InPlaceActiveObject_QueryInterface,
1555 InPlaceActiveObject_AddRef,
1556 InPlaceActiveObject_Release,
1557 InPlaceActiveObject_GetWindow,
1558 InPlaceActiveObject_ContextSensitiveHelp,
1559 InPlaceActiveObject_TranslateAccelerator,
1560 InPlaceActiveObject_OnFrameWindowActivate,
1561 InPlaceActiveObject_OnDocWindowActivate,
1562 InPlaceActiveObject_ResizeBorder,
1563 InPlaceActiveObject_EnableModeless
1566 static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface,
1567 REFIID iid, LPVOID *out)
1569 return dhtml_edit_qi(impl_from_IConnectionPointContainer(iface), iid, out);
1572 static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
1574 return dhtml_edit_addref(impl_from_IConnectionPointContainer(iface));
1577 static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface)
1579 return dhtml_edit_release(impl_from_IConnectionPointContainer(iface));
1582 static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface,
1583 IEnumConnectionPoints **ppEnum)
1585 DHTMLEditImpl *This = impl_from_IConnectionPointContainer(iface);
1586 FIXME("(%p)->(%p)\n", This, ppEnum);
1587 return E_NOTIMPL;
1590 static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface,
1591 REFIID riid, IConnectionPoint **point)
1593 DHTMLEditImpl *This = impl_from_IConnectionPointContainer(iface);
1595 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), point);
1597 if (!point)
1598 return E_POINTER;
1600 if (IsEqualGUID(riid, This->conpt.riid))
1602 *point = &This->conpt.IConnectionPoint_iface;
1603 IConnectionPoint_AddRef(*point);
1604 return S_OK;
1607 FIXME("unsupported connection point %s\n", debugstr_guid(riid));
1608 return CONNECT_E_NOCONNECTION;
1611 static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl =
1613 ConnectionPointContainer_QueryInterface,
1614 ConnectionPointContainer_AddRef,
1615 ConnectionPointContainer_Release,
1616 ConnectionPointContainer_EnumConnectionPoints,
1617 ConnectionPointContainer_FindConnectionPoint
1620 static inline ConnectionPoint *impl_from_IConnectionPoint(IConnectionPoint *iface)
1622 return CONTAINING_RECORD(iface, ConnectionPoint, IConnectionPoint_iface);
1625 static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface, REFIID iid, LPVOID *out)
1627 ConnectionPoint *This = impl_from_IConnectionPoint(iface);
1629 if (IsEqualGUID(&IID_IUnknown, iid) || IsEqualGUID(&IID_IConnectionPoint, iid))
1631 *out = &This->IConnectionPoint_iface;
1632 DHTMLEdit_AddRef(&This->dhed->IDHTMLEdit_iface);
1633 return S_OK;
1636 *out = NULL;
1637 WARN("Unsupported interface %s\n", debugstr_guid(iid));
1638 return E_NOINTERFACE;
1641 static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface)
1643 ConnectionPoint *This = impl_from_IConnectionPoint(iface);
1644 return IConnectionPointContainer_AddRef(&This->dhed->IConnectionPointContainer_iface);
1647 static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface)
1649 ConnectionPoint *This = impl_from_IConnectionPoint(iface);
1650 return IConnectionPointContainer_AddRef(&This->dhed->IConnectionPointContainer_iface);
1653 static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *iid)
1655 ConnectionPoint *This = impl_from_IConnectionPoint(iface);
1656 FIXME("%p, %p\n", This, iid);
1657 return E_NOTIMPL;
1660 static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface,
1661 IConnectionPointContainer **container)
1663 ConnectionPoint *This = impl_from_IConnectionPoint(iface);
1664 FIXME("%p, %p\n", This, container);
1665 return E_NOTIMPL;
1668 static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *unk_sink,
1669 DWORD *cookie)
1671 ConnectionPoint *This = impl_from_IConnectionPoint(iface);
1672 FIXME("%p, %p, %p\n", This, unk_sink, cookie);
1673 return E_NOTIMPL;
1676 static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD cookie)
1678 ConnectionPoint *This = impl_from_IConnectionPoint(iface);
1679 FIXME("%p, %d\n", This, cookie);
1680 return E_NOTIMPL;
1683 static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface,
1684 IEnumConnections **points)
1686 ConnectionPoint *This = impl_from_IConnectionPoint(iface);
1687 FIXME("%p, %p\n", This, points);
1688 return E_NOTIMPL;
1691 static const IConnectionPointVtbl ConnectionPointVtbl = {
1692 ConnectionPoint_QueryInterface,
1693 ConnectionPoint_AddRef,
1694 ConnectionPoint_Release,
1695 ConnectionPoint_GetConnectionInterface,
1696 ConnectionPoint_GetConnectionPointContainer,
1697 ConnectionPoint_Advise,
1698 ConnectionPoint_Unadvise,
1699 ConnectionPoint_EnumConnections
1702 static HRESULT WINAPI DataObject_QueryInterface(IDataObject *iface, REFIID iid, LPVOID *out)
1704 return dhtml_edit_qi(impl_from_IDataObject(iface), iid, out);
1707 static ULONG WINAPI DataObject_AddRef(IDataObject *iface)
1709 return dhtml_edit_addref(impl_from_IDataObject(iface));
1712 static ULONG WINAPI DataObject_Release(IDataObject *iface)
1714 return dhtml_edit_release(impl_from_IDataObject(iface));
1717 static HRESULT WINAPI DataObject_GetData(IDataObject *iface, LPFORMATETC pformatetcIn,
1718 STGMEDIUM *pmedium)
1720 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1721 FIXME("(%p)->()\n", This);
1722 return E_NOTIMPL;
1725 static HRESULT WINAPI DataObject_GetDataHere(IDataObject *iface, LPFORMATETC pformatetc,
1726 STGMEDIUM *pmedium)
1728 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1729 FIXME("(%p)->()\n", This);
1730 return E_NOTIMPL;
1733 static HRESULT WINAPI DataObject_QueryGetData(IDataObject *iface, LPFORMATETC pformatetc)
1735 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1736 FIXME("(%p)->()\n", This);
1737 return E_NOTIMPL;
1740 static HRESULT WINAPI DataObject_GetCanonicalFormatEtc(IDataObject *iface,
1741 LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut)
1743 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1744 FIXME("(%p)->()\n", This);
1745 return E_NOTIMPL;
1748 static HRESULT WINAPI DataObject_SetData(IDataObject *iface, LPFORMATETC pformatetc,
1749 STGMEDIUM *pmedium, BOOL fRelease)
1751 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1752 FIXME("(%p)->()\n", This);
1753 return E_NOTIMPL;
1756 static HRESULT WINAPI DataObject_EnumFormatEtc(IDataObject *iface, DWORD dwDirection,
1757 IEnumFORMATETC **ppenumFormatEtc)
1759 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1760 FIXME("(%p)->()\n", This);
1761 return E_NOTIMPL;
1764 static HRESULT WINAPI DataObject_DAdvise(IDataObject *iface, FORMATETC *pformatetc,
1765 DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
1767 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1768 FIXME("(%p)->()\n", This);
1769 return E_NOTIMPL;
1772 static HRESULT WINAPI DataObject_DUnadvise(IDataObject *iface, DWORD dwConnection)
1774 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1775 FIXME("(%p)->()\n", This);
1776 return E_NOTIMPL;
1779 static HRESULT WINAPI DataObject_EnumDAdvise(IDataObject *iface, IEnumSTATDATA **ppenumAdvise)
1781 DHTMLEditImpl *This = impl_from_IDataObject(iface);
1782 FIXME("(%p)->()\n", This);
1783 return E_NOTIMPL;
1786 static const IDataObjectVtbl DataObjectVtbl = {
1787 DataObject_QueryInterface,
1788 DataObject_AddRef,
1789 DataObject_Release,
1790 DataObject_GetData,
1791 DataObject_GetDataHere,
1792 DataObject_QueryGetData,
1793 DataObject_GetCanonicalFormatEtc,
1794 DataObject_SetData,
1795 DataObject_EnumFormatEtc,
1796 DataObject_DAdvise,
1797 DataObject_DUnadvise,
1798 DataObject_EnumDAdvise
1801 static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID iid,
1802 LPVOID *out)
1804 return dhtml_edit_qi(impl_from_IServiceProvider(iface), iid, out);
1807 static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
1809 return dhtml_edit_addref(impl_from_IServiceProvider(iface));
1812 static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
1814 return dhtml_edit_release(impl_from_IServiceProvider(iface));
1817 static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,
1818 REFIID riid, void **ppv)
1820 DHTMLEditImpl *This = impl_from_IServiceProvider(iface);
1821 FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
1822 return E_NOINTERFACE;
1825 static const IServiceProviderVtbl ServiceProviderVtbl = {
1826 ServiceProvider_QueryInterface,
1827 ServiceProvider_AddRef,
1828 ServiceProvider_Release,
1829 ServiceProvider_QueryService
1832 HRESULT dhtml_edit_create(REFIID iid, void **out)
1834 DHTMLEditImpl *This;
1835 DWORD dpi_x, dpi_y;
1836 HDC hdc;
1837 HRESULT ret;
1839 TRACE("(%s, %p)\n", debugstr_guid(iid), out);
1841 This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
1842 if (!This)
1843 return E_OUTOFMEMORY;
1845 This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl;
1846 This->IOleObject_iface.lpVtbl = &OleObjectVtbl;
1847 This->IProvideClassInfo2_iface.lpVtbl = &ProvideClassInfo2Vtbl;
1848 This->IPersistStorage_iface.lpVtbl = &PersistStorageVtbl;
1849 This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl;
1850 This->IOleControl_iface.lpVtbl = &OleControlVtbl;
1851 This->IViewObjectEx_iface.lpVtbl = &ViewObjectExVtbl;
1852 This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl;
1853 This->IOleInPlaceActiveObject_iface.lpVtbl = &OleInPlaceActiveObjectVtbl;
1854 This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl;
1855 This->IDataObject_iface.lpVtbl = &DataObjectVtbl;
1856 This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
1858 This->client_site = NULL;
1859 This->ref = 1;
1861 This->conpt.dhed = This;
1862 This->conpt.riid = &DIID__DHTMLEditEvents;
1863 This->conpt.IConnectionPoint_iface.lpVtbl = &ConnectionPointVtbl;
1865 hdc = GetDC(0);
1866 dpi_x = GetDeviceCaps(hdc, LOGPIXELSX);
1867 dpi_y = GetDeviceCaps(hdc, LOGPIXELSY);
1868 ReleaseDC(0, hdc);
1870 This->extent.cx = MulDiv(192, 2540, dpi_x);
1871 This->extent.cy = MulDiv(192, 2540, dpi_y);
1873 ret = IDHTMLEdit_QueryInterface(&This->IDHTMLEdit_iface, iid, out);
1874 IDHTMLEdit_Release(&This->IDHTMLEdit_iface);
1875 return ret;