2 * Copyright 2017 Alex Henrie
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "wine/debug.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(dhtmled
);
29 IDHTMLEdit IDHTMLEdit_iface
;
30 IOleObject IOleObject_iface
;
31 IPersistStreamInit IPersistStreamInit_iface
;
32 IOleClientSite
*client_site
;
36 static inline DHTMLEditImpl
*impl_from_IDHTMLEdit(IDHTMLEdit
*iface
)
38 return CONTAINING_RECORD(iface
, DHTMLEditImpl
, IDHTMLEdit_iface
);
41 static inline DHTMLEditImpl
*impl_from_IOleObject(IOleObject
*iface
)
43 return CONTAINING_RECORD(iface
, DHTMLEditImpl
, IOleObject_iface
);
46 static inline DHTMLEditImpl
*impl_from_IPersistStreamInit(IPersistStreamInit
*iface
)
48 return CONTAINING_RECORD(iface
, DHTMLEditImpl
, IPersistStreamInit_iface
);
51 static ULONG
dhtml_edit_addref(DHTMLEditImpl
*This
)
53 LONG ref
= InterlockedIncrement(&This
->ref
);
55 TRACE("(%p) ref=%d\n", This
, ref
);
60 static HRESULT
dhtml_edit_qi(DHTMLEditImpl
*This
, REFIID iid
, void **out
)
62 TRACE("(%p)->(%s, %p)\n", This
, debugstr_guid(iid
), out
);
64 if (IsEqualGUID(iid
, &IID_IUnknown
) ||
65 IsEqualGUID(iid
, &IID_IDispatch
) ||
66 IsEqualGUID(iid
, &IID_IDHTMLEdit
))
68 dhtml_edit_addref(This
);
69 *out
= &This
->IDHTMLEdit_iface
;
72 else if (IsEqualGUID(iid
, &IID_IOleObject
))
74 dhtml_edit_addref(This
);
75 *out
= &This
->IOleObject_iface
;
78 else if (IsEqualGUID(iid
, &IID_IPersistStreamInit
))
80 dhtml_edit_addref(This
);
81 *out
= &This
->IPersistStreamInit_iface
;
86 ERR("no interface for %s\n", debugstr_guid(iid
));
90 static ULONG
dhtml_edit_release(DHTMLEditImpl
*This
)
92 LONG ref
= InterlockedDecrement(&This
->ref
);
94 TRACE("(%p) ref=%d\n", This
, ref
);
98 if (This
->client_site
)
99 IOleClientSite_Release(This
->client_site
);
101 HeapFree(GetProcessHeap(), 0, This
);
107 static HRESULT WINAPI
DHTMLEdit_QueryInterface(IDHTMLEdit
*iface
, REFIID iid
, void **out
)
109 return dhtml_edit_qi(impl_from_IDHTMLEdit(iface
), iid
, out
);
112 static ULONG WINAPI
DHTMLEdit_AddRef(IDHTMLEdit
*iface
)
114 return dhtml_edit_addref(impl_from_IDHTMLEdit(iface
));
117 static ULONG WINAPI
DHTMLEdit_Release(IDHTMLEdit
*iface
)
119 return dhtml_edit_release(impl_from_IDHTMLEdit(iface
));
122 static HRESULT WINAPI
DHTMLEdit_GetTypeInfoCount(IDHTMLEdit
*iface
, UINT
*count
)
124 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
125 FIXME("(%p)->(%p) stub\n", This
, count
);
130 static HRESULT WINAPI
DHTMLEdit_GetTypeInfo(IDHTMLEdit
*iface
, UINT type_index
, LCID lcid
, ITypeInfo
**type_info
)
132 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
133 FIXME("(%p)->(%u, %08x, %p) stub\n", This
, type_index
, lcid
, type_info
);
137 static HRESULT WINAPI
DHTMLEdit_GetIDsOfNames(IDHTMLEdit
*iface
, REFIID iid
, OLECHAR
**names
, UINT name_count
,
138 LCID lcid
, DISPID
*disp_ids
)
140 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
141 FIXME("(%p)->(%s, %p, %u, %08x, %p) stub\n", This
, debugstr_guid(iid
), names
, name_count
, lcid
, disp_ids
);
145 static HRESULT WINAPI
DHTMLEdit_Invoke(IDHTMLEdit
*iface
, DISPID member
, REFIID iid
, LCID lcid
, WORD flags
,
146 DISPPARAMS
*params
, VARIANT
*ret
, EXCEPINFO
*exception_info
, UINT
*error_index
)
148 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
149 FIXME("(%p)->(%d, %s, %08x, 0x%x, %p, %p, %p, %p) stub\n",
150 This
, member
, debugstr_guid(iid
), lcid
, flags
, params
, ret
, exception_info
, error_index
);
154 static HRESULT WINAPI
DHTMLEdit_ExecCommand(IDHTMLEdit
*iface
, DHTMLEDITCMDID cmd_id
, OLECMDEXECOPT options
,
155 VARIANT
*code_in
, VARIANT
*code_out
)
157 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
158 FIXME("(%p)->(%u, %u, %s, %p) stub\n", This
, cmd_id
, options
, debugstr_variant(code_in
), code_out
);
162 static HRESULT WINAPI
DHTMLEdit_QueryStatus(IDHTMLEdit
*iface
, DHTMLEDITCMDID cmd_id
, DHTMLEDITCMDF
*status
)
164 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
165 FIXME("(%p)->(%u, %p) stub\n", This
, cmd_id
, status
);
169 static HRESULT WINAPI
DHTMLEdit_SetContextMenu(IDHTMLEdit
*iface
, VARIANT
*strings
, VARIANT
*states
)
171 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
172 FIXME("(%p)->(%p, %p) stub\n", This
, strings
, states
);
176 static HRESULT WINAPI
DHTMLEdit_NewDocument(IDHTMLEdit
*iface
)
178 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
179 FIXME("(%p)->() stub\n", This
);
183 static HRESULT WINAPI
DHTMLEdit_LoadURL(IDHTMLEdit
*iface
, BSTR url
)
185 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
186 FIXME("(%p)->(%s)\n", This
, debugstr_w(url
));
190 static HRESULT WINAPI
DHTMLEdit_FilterSourceCode(IDHTMLEdit
*iface
, BSTR in
, BSTR
*out
)
192 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
193 FIXME("(%p)->(%s, %p)\n", This
, debugstr_w(in
), out
);
197 static HRESULT WINAPI
DHTMLEdit_Refresh(IDHTMLEdit
*iface
)
199 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
200 FIXME("(%p)->() stub\n", This
);
204 static HRESULT WINAPI
DHTMLEdit_get_DOM(IDHTMLEdit
*iface
, IHTMLDocument2
**value
)
206 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
207 FIXME("(%p)->(%p) stub\n", This
, value
);
211 static HRESULT WINAPI
DHTMLEdit_get_DocumentHTML(IDHTMLEdit
*iface
, BSTR
*value
)
213 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
214 FIXME("(%p)->(%p) stub\n", This
, value
);
218 static HRESULT WINAPI
DHTMLEdit_put_DocumentHTML(IDHTMLEdit
*iface
, BSTR html
)
220 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
221 FIXME("(%p)->(%s) stub\n", This
, debugstr_w(html
));
225 static HRESULT WINAPI
DHTMLEdit_get_ActivateApplets(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
227 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
228 FIXME("(%p)->(%p) stub\n", This
, value
);
232 static HRESULT WINAPI
DHTMLEdit_put_ActivateApplets(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
234 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
235 FIXME("(%p)->(%04x) stub\n", This
, value
);
239 static HRESULT WINAPI
DHTMLEdit_get_ActivateActiveXControls(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
241 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
242 FIXME("(%p)->(%p) stub\n", This
, value
);
246 static HRESULT WINAPI
DHTMLEdit_put_ActivateActiveXControls(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
248 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
249 FIXME("(%p)->(%04x) stub\n", This
, value
);
253 static HRESULT WINAPI
DHTMLEdit_get_ActivateDTCs(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
255 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
256 FIXME("(%p)->(%p) stub\n", This
, value
);
260 static HRESULT WINAPI
DHTMLEdit_put_ActivateDTCs(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
262 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
263 FIXME("(%p)->(%04x) stub\n", This
, value
);
267 static HRESULT WINAPI
DHTMLEdit_get_ShowDetails(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
269 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
270 FIXME("(%p)->(%p) stub\n", This
, value
);
274 static HRESULT WINAPI
DHTMLEdit_put_ShowDetails(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
276 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
277 FIXME("(%p)->(%04x) stub\n", This
, value
);
281 static HRESULT WINAPI
DHTMLEdit_get_ShowBorders(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
283 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
284 FIXME("(%p)->(%p) stub\n", This
, value
);
288 static HRESULT WINAPI
DHTMLEdit_put_ShowBorders(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
290 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
291 FIXME("(%p)->(%04x) stub\n", This
, value
);
295 static HRESULT WINAPI
DHTMLEdit_get_Appearance(IDHTMLEdit
*iface
, DHTMLEDITAPPEARANCE
*value
)
297 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
298 FIXME("(%p)->(%p) stub\n", This
, value
);
302 static HRESULT WINAPI
DHTMLEdit_put_Appearance(IDHTMLEdit
*iface
, DHTMLEDITAPPEARANCE value
)
304 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
305 FIXME("(%p)->(%u) stub\n", This
, value
);
309 static HRESULT WINAPI
DHTMLEdit_get_Scrollbars(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
311 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
312 FIXME("(%p)->(%p) stub\n", This
, value
);
316 static HRESULT WINAPI
DHTMLEdit_put_Scrollbars(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
318 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
319 FIXME("(%p)->(%04x) stub\n", This
, value
);
323 static HRESULT WINAPI
DHTMLEdit_get_ScrollbarAppearance(IDHTMLEdit
*iface
, DHTMLEDITAPPEARANCE
*value
)
325 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
326 FIXME("(%p)->(%p) stub\n", This
, value
);
330 static HRESULT WINAPI
DHTMLEdit_put_ScrollbarAppearance(IDHTMLEdit
*iface
, DHTMLEDITAPPEARANCE value
)
332 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
333 FIXME("(%p)->(%u) stub\n", This
, value
);
337 static HRESULT WINAPI
DHTMLEdit_get_SourceCodePreservation(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
339 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
340 FIXME("(%p)->(%p) stub\n", This
, value
);
344 static HRESULT WINAPI
DHTMLEdit_put_SourceCodePreservation(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
346 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
347 FIXME("(%p)->(%04x) stub\n", This
, value
);
351 static HRESULT WINAPI
DHTMLEdit_get_AbsoluteDropMode(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
353 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
354 FIXME("(%p)->(%p) stub\n", This
, value
);
358 static HRESULT WINAPI
DHTMLEdit_put_AbsoluteDropMode(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
360 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
361 FIXME("(%p)->(%04x) stub\n", This
, value
);
365 static HRESULT WINAPI
DHTMLEdit_get_SnapToGridX(IDHTMLEdit
*iface
, LONG
*value
)
367 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
368 FIXME("(%p)->(%p) stub\n", This
, value
);
372 static HRESULT WINAPI
DHTMLEdit_put_SnapToGridX(IDHTMLEdit
*iface
, LONG value
)
374 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
375 FIXME("(%p)->(%d) stub\n", This
, value
);
379 static HRESULT WINAPI
DHTMLEdit_get_SnapToGridY(IDHTMLEdit
*iface
, LONG
*value
)
381 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
382 FIXME("(%p)->(%p) stub\n", This
, value
);
386 static HRESULT WINAPI
DHTMLEdit_put_SnapToGridY(IDHTMLEdit
*iface
, LONG value
)
388 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
389 FIXME("(%p)->(%d) stub\n", This
, value
);
393 static HRESULT WINAPI
DHTMLEdit_get_SnapToGrid(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
395 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
396 FIXME("(%p)->(%p) stub\n", This
, value
);
400 static HRESULT WINAPI
DHTMLEdit_put_SnapToGrid(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
402 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
403 FIXME("(%p)->(%04x) stub\n", This
, value
);
407 static HRESULT WINAPI
DHTMLEdit_get_IsDirty(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
409 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
410 FIXME("(%p)->(%p) stub\n", This
, value
);
414 static HRESULT WINAPI
DHTMLEdit_get_CurrentDocumentPath(IDHTMLEdit
*iface
, BSTR
*value
)
416 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
417 FIXME("(%p)->(%p) stub\n", This
, value
);
421 static HRESULT WINAPI
DHTMLEdit_get_BaseURL(IDHTMLEdit
*iface
, BSTR
*value
)
423 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
424 FIXME("(%p)->(%p) stub\n", This
, value
);
428 static HRESULT WINAPI
DHTMLEdit_put_BaseURL(IDHTMLEdit
*iface
, BSTR value
)
430 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
431 FIXME("(%p)->(%s) stub\n", This
, debugstr_w(value
));
435 static HRESULT WINAPI
DHTMLEdit_get_DocumentTitle(IDHTMLEdit
*iface
, BSTR
*value
)
437 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
438 FIXME("(%p)->(%p) stub\n", This
, value
);
442 static HRESULT WINAPI
DHTMLEdit_get_UseDivOnCarriageReturn(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
444 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
445 FIXME("(%p)->(%p) stub\n", This
, value
);
449 static HRESULT WINAPI
DHTMLEdit_put_UseDivOnCarriageReturn(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
451 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
452 FIXME("(%p)->(%04x) stub\n", This
, value
);
456 static HRESULT WINAPI
DHTMLEdit_get_Busy(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
458 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
459 FIXME("(%p)->(%p) stub\n", This
, value
);
463 static HRESULT WINAPI
DHTMLEdit_LoadDocument(IDHTMLEdit
*iface
, VARIANT
*path
, VARIANT
*prompt
)
465 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
466 FIXME("(%p)->(%s, %s) stub\n", This
, debugstr_variant(path
), debugstr_variant(prompt
));
470 static HRESULT WINAPI
DHTMLEdit_SaveDocument(IDHTMLEdit
*iface
, VARIANT
*path
, VARIANT
*prompt
)
472 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
473 FIXME("(%p)->(%s, %s) stub\n", This
, debugstr_variant(path
), debugstr_variant(prompt
));
477 static HRESULT WINAPI
DHTMLEdit_PrintDocument(IDHTMLEdit
*iface
, VARIANT
*prompt
)
479 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
480 FIXME("(%p)->(%s) stub\n", This
, debugstr_variant(prompt
));
484 static HRESULT WINAPI
DHTMLEdit_get_BrowseMode(IDHTMLEdit
*iface
, VARIANT_BOOL
*value
)
486 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
487 FIXME("(%p)->(%p) stub\n", This
, value
);
491 static HRESULT WINAPI
DHTMLEdit_put_BrowseMode(IDHTMLEdit
*iface
, VARIANT_BOOL value
)
493 DHTMLEditImpl
*This
= impl_from_IDHTMLEdit(iface
);
494 FIXME("(%p)->(%04x) stub\n", This
, value
);
498 static const IDHTMLEditVtbl DHTMLEditVtbl
= {
499 DHTMLEdit_QueryInterface
,
502 DHTMLEdit_GetTypeInfoCount
,
503 DHTMLEdit_GetTypeInfo
,
504 DHTMLEdit_GetIDsOfNames
,
506 DHTMLEdit_ExecCommand
,
507 DHTMLEdit_QueryStatus
,
508 DHTMLEdit_SetContextMenu
,
509 DHTMLEdit_NewDocument
,
511 DHTMLEdit_FilterSourceCode
,
514 DHTMLEdit_get_DocumentHTML
,
515 DHTMLEdit_put_DocumentHTML
,
516 DHTMLEdit_get_ActivateApplets
,
517 DHTMLEdit_put_ActivateApplets
,
518 DHTMLEdit_get_ActivateActiveXControls
,
519 DHTMLEdit_put_ActivateActiveXControls
,
520 DHTMLEdit_get_ActivateDTCs
,
521 DHTMLEdit_put_ActivateDTCs
,
522 DHTMLEdit_get_ShowDetails
,
523 DHTMLEdit_put_ShowDetails
,
524 DHTMLEdit_get_ShowBorders
,
525 DHTMLEdit_put_ShowBorders
,
526 DHTMLEdit_get_Appearance
,
527 DHTMLEdit_put_Appearance
,
528 DHTMLEdit_get_Scrollbars
,
529 DHTMLEdit_put_Scrollbars
,
530 DHTMLEdit_get_ScrollbarAppearance
,
531 DHTMLEdit_put_ScrollbarAppearance
,
532 DHTMLEdit_get_SourceCodePreservation
,
533 DHTMLEdit_put_SourceCodePreservation
,
534 DHTMLEdit_get_AbsoluteDropMode
,
535 DHTMLEdit_put_AbsoluteDropMode
,
536 DHTMLEdit_get_SnapToGridX
,
537 DHTMLEdit_put_SnapToGridX
,
538 DHTMLEdit_get_SnapToGridY
,
539 DHTMLEdit_put_SnapToGridY
,
540 DHTMLEdit_get_SnapToGrid
,
541 DHTMLEdit_put_SnapToGrid
,
542 DHTMLEdit_get_IsDirty
,
543 DHTMLEdit_get_CurrentDocumentPath
,
544 DHTMLEdit_get_BaseURL
,
545 DHTMLEdit_put_BaseURL
,
546 DHTMLEdit_get_DocumentTitle
,
547 DHTMLEdit_get_UseDivOnCarriageReturn
,
548 DHTMLEdit_put_UseDivOnCarriageReturn
,
550 DHTMLEdit_LoadDocument
,
551 DHTMLEdit_SaveDocument
,
552 DHTMLEdit_PrintDocument
,
553 DHTMLEdit_get_BrowseMode
,
554 DHTMLEdit_put_BrowseMode
557 static HRESULT WINAPI
OleObject_QueryInterface(IOleObject
*iface
, REFIID iid
, void **out
)
559 return dhtml_edit_qi(impl_from_IOleObject(iface
), iid
, out
);
562 static ULONG WINAPI
OleObject_AddRef(IOleObject
*iface
)
564 return dhtml_edit_addref(impl_from_IOleObject(iface
));
567 static ULONG WINAPI
OleObject_Release(IOleObject
*iface
)
569 return dhtml_edit_release(impl_from_IOleObject(iface
));
572 static HRESULT WINAPI
OleObject_SetClientSite(IOleObject
*iface
, IOleClientSite
*value
)
574 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
576 TRACE("(%p)->(%p)\n", This
, value
);
578 if (This
->client_site
)
579 IOleClientSite_Release(This
->client_site
);
582 IOleClientSite_AddRef(value
);
584 This
->client_site
= value
;
589 static HRESULT WINAPI
OleObject_GetClientSite(IOleObject
*iface
, IOleClientSite
**value
)
591 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
593 TRACE("(%p)->(%p)\n", This
, value
);
595 if (This
->client_site
)
596 IOleClientSite_AddRef(This
->client_site
);
598 *value
= This
->client_site
;
603 static HRESULT WINAPI
OleObject_SetHostNames(IOleObject
*iface
,
604 const OLECHAR
*container_app
, const OLECHAR
*container_obj
)
606 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
607 FIXME("(%p)->(%p, %p) stub\n", This
, container_app
, container_obj
);
611 static HRESULT WINAPI
OleObject_Close(IOleObject
*iface
, DWORD save
)
613 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
614 FIXME("(%p)->(%u) stub\n", This
, save
);
618 static HRESULT WINAPI
OleObject_SetMoniker(IOleObject
*iface
, DWORD moniker_id
, IMoniker
*value
)
620 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
621 FIXME("(%p)->(%u, %p) stub\n", This
, moniker_id
, value
);
625 static HRESULT WINAPI
OleObject_GetMoniker(IOleObject
*iface
, DWORD assign
, DWORD moniker_id
, IMoniker
**value
)
627 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
628 FIXME("(%p)->(%u, %p) stub\n", This
, moniker_id
, value
);
633 static HRESULT WINAPI
OleObject_InitFromData(IOleObject
*iface
, IDataObject
*data_obj
, BOOL creation
, DWORD reserved
)
635 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
636 FIXME("(%p)->(%p, %u, %u) stub\n", This
, data_obj
, creation
, reserved
);
640 static HRESULT WINAPI
OleObject_GetClipboardData(IOleObject
*iface
, DWORD reserved
, IDataObject
**value
)
642 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
643 FIXME("(%p)->(%u, %p) stub\n", This
, reserved
, value
);
648 static HRESULT WINAPI
OleObject_DoVerb(IOleObject
*iface
, LONG verb
, MSG
*msg
, IOleClientSite
*active_site
,
649 LONG index
, HWND parent
, const RECT
*pos
)
651 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
652 TRACE("(%p)->(%d, %p, %p, %d, %p, %p) stub\n", This
, verb
, msg
, active_site
, index
, parent
, pos
);
654 if (verb
== OLEIVERB_INPLACEACTIVATE
)
656 IOleClientSite_OnShowWindow(This
->client_site
, TRUE
);
663 static HRESULT WINAPI
OleObject_EnumVerbs(IOleObject
*iface
, IEnumOLEVERB
**verb
)
665 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
666 FIXME("(%p)->(%p) stub\n", This
, verb
);
671 static HRESULT WINAPI
OleObject_Update(IOleObject
*iface
)
673 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
674 FIXME("(%p) stub\n", This
);
678 static HRESULT WINAPI
OleObject_IsUpToDate(IOleObject
*iface
)
680 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
681 FIXME("(%p) stub\n", This
);
685 static HRESULT WINAPI
OleObject_GetUserClassID(IOleObject
*iface
, CLSID
*clsid
)
687 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
688 FIXME("(%p)->(%p) stub\n", This
, clsid
);
692 static HRESULT WINAPI
OleObject_GetUserType(IOleObject
*iface
, DWORD type_type
, OLECHAR
**type
)
694 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
695 FIXME("(%p)->(%u, %p) stub\n", This
, type_type
, type
);
700 static HRESULT WINAPI
OleObject_SetExtent(IOleObject
*iface
, DWORD aspect
, SIZEL
*size_limit
)
702 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
703 FIXME("(%p)->(%u, %p) stub\n", This
, aspect
, size_limit
);
707 static HRESULT WINAPI
OleObject_GetExtent(IOleObject
*iface
, DWORD aspect
, SIZEL
*size_limit
)
709 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
710 FIXME("(%p)->(%u, %p) stub\n", This
, aspect
, size_limit
);
714 static HRESULT WINAPI
OleObject_Advise(IOleObject
*iface
, IAdviseSink
*sink
, DWORD
*conn
)
716 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
717 FIXME("(%p)->(%p, %p) stub\n", This
, sink
, conn
);
722 static HRESULT WINAPI
OleObject_Unadvise(IOleObject
*iface
, DWORD conn
)
724 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
725 FIXME("(%p)->(%u) stub\n", This
, conn
);
729 static HRESULT WINAPI
OleObject_EnumAdvise(IOleObject
*iface
, IEnumSTATDATA
**advise
)
731 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
732 FIXME("(%p)->(%p) stub\n", This
, advise
);
737 static HRESULT WINAPI
OleObject_GetMiscStatus(IOleObject
*iface
, DWORD aspect
, DWORD
*status
)
739 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
740 FIXME("(%p)->(%u, %p) stub\n", This
, aspect
, status
);
745 static HRESULT WINAPI
OleObject_SetColorScheme(IOleObject
*iface
, LOGPALETTE
*palette
)
747 DHTMLEditImpl
*This
= impl_from_IOleObject(iface
);
748 FIXME("(%p)->(%p) stub\n", This
, palette
);
752 static const IOleObjectVtbl OleObjectVtbl
= {
753 OleObject_QueryInterface
,
756 OleObject_SetClientSite
,
757 OleObject_GetClientSite
,
758 OleObject_SetHostNames
,
760 OleObject_SetMoniker
,
761 OleObject_GetMoniker
,
762 OleObject_InitFromData
,
763 OleObject_GetClipboardData
,
767 OleObject_IsUpToDate
,
768 OleObject_GetUserClassID
,
769 OleObject_GetUserType
,
774 OleObject_EnumAdvise
,
775 OleObject_GetMiscStatus
,
776 OleObject_SetColorScheme
779 static HRESULT WINAPI
PersistStreamInit_QueryInterface(IPersistStreamInit
*iface
, REFIID iid
, void **out
)
781 return dhtml_edit_qi(impl_from_IPersistStreamInit(iface
), iid
, out
);
784 static ULONG WINAPI
PersistStreamInit_AddRef(IPersistStreamInit
*iface
)
786 return dhtml_edit_addref(impl_from_IPersistStreamInit(iface
));
789 static ULONG WINAPI
PersistStreamInit_Release(IPersistStreamInit
*iface
)
791 return dhtml_edit_release(impl_from_IPersistStreamInit(iface
));
794 static HRESULT WINAPI
PersistStreamInit_GetClassID(IPersistStreamInit
*iface
, CLSID
*clsid
)
796 DHTMLEditImpl
*This
= impl_from_IPersistStreamInit(iface
);
797 FIXME("(%p)->(%p) stub\n", This
, clsid
);
801 static HRESULT WINAPI
PersistStreamInit_IsDirty(IPersistStreamInit
*iface
)
803 DHTMLEditImpl
*This
= impl_from_IPersistStreamInit(iface
);
804 FIXME("(%p) stub\n", This
);
808 static HRESULT WINAPI
PersistStreamInit_Load(IPersistStreamInit
*iface
, IStream
*stream
)
810 DHTMLEditImpl
*This
= impl_from_IPersistStreamInit(iface
);
811 FIXME("(%p)->(%p) stub\n", This
, stream
);
815 static HRESULT WINAPI
PersistStreamInit_Save(IPersistStreamInit
*iface
, IStream
*stream
, BOOL clear_dirty
)
817 DHTMLEditImpl
*This
= impl_from_IPersistStreamInit(iface
);
818 FIXME("(%p)->(%p, %u) stub\n", This
, stream
, clear_dirty
);
822 static HRESULT WINAPI
PersistStreamInit_GetSizeMax(IPersistStreamInit
*iface
, ULARGE_INTEGER
*value
)
824 DHTMLEditImpl
*This
= impl_from_IPersistStreamInit(iface
);
825 FIXME("(%p)->(%p) stub\n", This
, value
);
830 static HRESULT WINAPI
PersistStreamInit_InitNew(IPersistStreamInit
*iface
)
832 DHTMLEditImpl
*This
= impl_from_IPersistStreamInit(iface
);
833 FIXME("(%p) stub\n", This
);
837 static const IPersistStreamInitVtbl PersistStreamInitVtbl
= {
838 PersistStreamInit_QueryInterface
,
839 PersistStreamInit_AddRef
,
840 PersistStreamInit_Release
,
841 PersistStreamInit_GetClassID
,
842 PersistStreamInit_IsDirty
,
843 PersistStreamInit_Load
,
844 PersistStreamInit_Save
,
845 PersistStreamInit_GetSizeMax
,
846 PersistStreamInit_InitNew
849 HRESULT
dhtml_edit_create(REFIID iid
, void **out
)
854 TRACE("(%s, %p)\n", debugstr_guid(iid
), out
);
856 This
= HeapAlloc(GetProcessHeap(), 0, sizeof(*This
));
858 return E_OUTOFMEMORY
;
860 This
->IDHTMLEdit_iface
.lpVtbl
= &DHTMLEditVtbl
;
861 This
->IOleObject_iface
.lpVtbl
= &OleObjectVtbl
;
862 This
->IPersistStreamInit_iface
.lpVtbl
= &PersistStreamInitVtbl
;
863 This
->client_site
= NULL
;
866 ret
= IDHTMLEdit_QueryInterface(&This
->IDHTMLEdit_iface
, iid
, out
);
867 IDHTMLEdit_Release(&This
->IDHTMLEdit_iface
);