Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- v2: Added argument attributes --- include/Makefile.in | 1 + include/dhtmled.idl | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 331 insertions(+) create mode 100644 include/dhtmled.idl
diff --git a/include/Makefile.in b/include/Makefile.in index fa1e42738b..a08c8084c1 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -58,6 +58,7 @@ IDL_SRCS = \ ddstream.idl \ devenum.idl \ devicetopology.idl \ + dhtmled.idl \ dimm.idl \ dispex.idl \ docobj.idl \ diff --git a/include/dhtmled.idl b/include/dhtmled.idl new file mode 100644 index 0000000000..0c3e38c08e --- /dev/null +++ b/include/dhtmled.idl @@ -0,0 +1,330 @@ +/* + * Copyright 2017 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "oaidl.idl"; +import "ocidl.idl"; +import "docobj.idl"; +import "mshtml.idl"; + +[ + uuid(683364a1-b37d-11d1-adc5-006008a5848c), + version(1.0) +] +library DHTMLEDLib +{ + importlib("stdole2.tlb"); + + typedef + [ + uuid(7179FC44-B2E4-11d1-ADC5-006008A5848C) + ] + enum DHTMLEDITAPPEARANCE { + DEAPPEARANCE_FLAT, + DEAPPEARANCE_3D + } DHTMLEDITAPPEARANCE; + + typedef + [ + uuid(bf82426a-b961-11d1-adc5-006008a5848c) + ] + enum DHTMLEDITCMDF { + DECMDF_NOTSUPPORTED = 0, + DECMDF_DISABLED = 1, + DECMDF_ENABLED = 3, + DECMDF_LATCHED = 7, + DECMDF_NINCHED = 11 + } DHTMLEDITCMDF; + + typedef enum DHTMLEDITCMDID { + DECMD_BOLD = 5000, + DECMD_COPY = 5002, + DECMD_CUT, + DECMD_DELETE, + DECMD_DELETECELLS, + DECMD_DELETECOLS, + DECMD_DELETEROWS, + DECMD_FINDTEXT, + DECMD_FONT, + DECMD_GETBACKCOLOR, + DECMD_GETBLOCKFMT, + DECMD_GETBLOCKFMTNAMES, + DECMD_GETFONTNAME, + DECMD_GETFONTSIZE, + DECMD_GETFORECOLOR, + DECMD_HYPERLINK, + DECMD_IMAGE, + DECMD_INDENT, + DECMD_INSERTCELL, + DECMD_INSERTCOL, + DECMD_INSERTROW, + DECMD_INSERTTABLE, + DECMD_ITALIC, + DECMD_JUSTIFYCENTER, + DECMD_JUSTIFYLEFT, + DECMD_JUSTIFYRIGHT, + DECMD_LOCK_ELEMENT, + DECMD_MAKE_ABSOLUTE, + DECMD_MERGECELLS, + DECMD_ORDERLIST, + DECMD_OUTDENT, + DECMD_PASTE, + DECMD_REDO, + DECMD_REMOVEFORMAT, + DECMD_SELECTALL, + DECMD_SEND_BACKWARD, + DECMD_BRING_FORWARD, + DECMD_SEND_BELOW_TEXT, + DECMD_BRING_ABOVE_TEXT, + DECMD_SEND_TO_BACK, + DECMD_BRING_TO_FRONT, + DECMD_SETBACKCOLOR, + DECMD_SETBLOCKFMT, + DECMD_SETFONTNAME, + DECMD_SETFONTSIZE, + DECMD_SETFORECOLOR, + DECMD_SPLITCELL, + DECMD_UNDERLINE, + DECMD_UNDO, + DECMD_UNLINK, + DECMD_UNORDERLIST, + DECMD_PROPERTIES + } DHTMLEDITCMDID; + + [ + object, + uuid(ce04b590-2b1f-11d2-8d1e-00a0c959bc0a), + dual, + pointer_default(unique) + ] + interface IDHTMLSafe : IDispatch + { + HRESULT ExecCommand( + [in] DHTMLEDITCMDID cmd_id, + [in, defaultvalue(OLECMDEXECOPT_DODEFAULT)] OLECMDEXECOPT options, + [in, optional] VARIANT *code_in, + [out, retval] VARIANT *code_out + ); + + HRESULT QueryStatus( + [in] DHTMLEDITCMDID cmd_id, + [out, retval] DHTMLEDITCMDF *status + ); + + HRESULT SetContextMenu( + [in] VARIANT *strings, + [in] VARIANT *states + ); + + HRESULT NewDocument(); + + HRESULT LoadURL([in] BSTR url); + + HRESULT FilterSourceCode( + [in] BSTR in, + [out, retval] BSTR *out + ); + + HRESULT Refresh(); + + [propget] HRESULT DOM([out, retval] IHTMLDocument2 **value); + + [propget] HRESULT DocumentHTML([out, retval] BSTR *value); + [propput] HRESULT DocumentHTML([in] BSTR html); + + [propget] HRESULT ActivateApplets([out, retval] VARIANT_BOOL *value); + [propput] HRESULT ActivateApplets([in] VARIANT_BOOL value); + + [propget] HRESULT ActivateActiveXControls([out, retval] VARIANT_BOOL *value); + [propput] HRESULT ActivateActiveXControls([in] VARIANT_BOOL value); + + [propget] HRESULT ActivateDTCs([out, retval] VARIANT_BOOL *value); + [propput] HRESULT ActivateDTCs([in] VARIANT_BOOL value); + + [propget] HRESULT ShowDetails([out, retval] VARIANT_BOOL *value); + [propput] HRESULT ShowDetails([in] VARIANT_BOOL value); + + [propget] HRESULT ShowBorders([out, retval] VARIANT_BOOL *value); + [propput] HRESULT ShowBorders([in] VARIANT_BOOL value); + + [propget] HRESULT Appearance([out, retval] DHTMLEDITAPPEARANCE *value); + [propput] HRESULT Appearance([in] DHTMLEDITAPPEARANCE value); + + [propget] HRESULT Scrollbars([out, retval] VARIANT_BOOL *value); + [propput] HRESULT Scrollbars([in] VARIANT_BOOL value); + + [propget] HRESULT ScrollbarAppearance([out, retval] DHTMLEDITAPPEARANCE *value); + [propput] HRESULT ScrollbarAppearance([in] DHTMLEDITAPPEARANCE value); + + [propget] HRESULT SourceCodePreservation([out, retval] VARIANT_BOOL *value); + [propput] HRESULT SourceCodePreservation([in] VARIANT_BOOL value); + + [propget] HRESULT AbsoluteDropMode([out, retval] VARIANT_BOOL *value); + [propput] HRESULT AbsoluteDropMode([in] VARIANT_BOOL value); + + [propget] HRESULT SnapToGridX([out, retval] long *value); + [propput] HRESULT SnapToGridX([in] long value); + + [propget] HRESULT SnapToGridY([out, retval] long *value); + [propput] HRESULT SnapToGridY([in] long value); + + [propget] HRESULT SnapToGrid([out, retval] VARIANT_BOOL *value); + [propput] HRESULT SnapToGrid([in] VARIANT_BOOL value); + + [propget] HRESULT IsDirty([out, retval] VARIANT_BOOL *value); + + [propget] HRESULT CurrentDocumentPath([out, retval] BSTR *value); + + [propget] HRESULT BaseURL([out, retval] BSTR *value); + [propput] HRESULT BaseURL([in] BSTR value); + + [propget] HRESULT DocumentTitle([out, retval] BSTR *value); + + [propget] HRESULT UseDivOnCarriageReturn([out, retval] VARIANT_BOOL *value); + [propput] HRESULT UseDivOnCarriageReturn([in] VARIANT_BOOL value); + + [propget] HRESULT Busy([out, retval] VARIANT_BOOL *value); + }; + + [ + uuid(d1fc78e8-b380-11d1-adc5-006008a5848c) + ] + dispinterface _DHTMLSafeEvents + { + properties: + methods: + void DocumentComplete(); + + void DisplayChanged(); + + void ShowContextMenu( + [in] long x, + [in] long y + ); + + void ContextMenuAction([in] long index); + + void onmousedown(); + + void onmousemove(); + + void onmouseup(); + + void onmouseout(); + + void onmouseover(); + + void onclick(); + + void ondblclick(); + + void onkeydown(); + + void onkeypress(); + + void onkeyup(); + + void onblur(); + + void onreadystatechange(); + }; + + [ + uuid(2d360201-fff5-11d1-8d03-00a0c959bc0a) + ] + coclass DHTMLSafe + { + interface IDHTMLSafe; + interface _DHTMLSafeEvents; + }; + + [ + uuid(ce04b591-2b1f-11d2-8d1e-00a0c959bc0a), + dual, + pointer_default(unique) + ] + interface IDHTMLEdit : IDHTMLSafe + { + HRESULT LoadDocument( + [in] VARIANT *path, + [in, optional] VARIANT *prompt + ); + + HRESULT SaveDocument( + [in] VARIANT *path, + [in, optional] VARIANT *prompt + ); + + HRESULT PrintDocument([in, optional] VARIANT *prompt); + + [propget] HRESULT BrowseMode([out, retval] VARIANT_BOOL *value); + + [propput] HRESULT BrowseMode([in] VARIANT_BOOL value); + }; + + [ + uuid(588d5040-cf28-11d1-8cd3-00a0c959bc0a) + ] + dispinterface _DHTMLEditEvents + { + properties: + methods: + void DocumentComplete(); + + void DisplayChanged(); + + void ShowContextMenu( + [in] long x, + [in] long y + ); + + void ContextMenuAction([in] long index); + + void onmousedown(); + + void onmousemove(); + + void onmouseup(); + + void onmouseout(); + + void onmouseover(); + + void onclick(); + + void ondblclick(); + + void onkeydown(); + + void onkeypress(); + + void onkeyup(); + + void onblur(); + + void onreadystatechange(); + }; + + [ + uuid(2d360200-fff5-11d1-8d03-00a0c959bc0a) + ] + coclass DHTMLEdit + { + interface IDHTMLEdit; + interface _DHTMLEditEvents; + }; +}
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- configure.ac | 1 + dlls/dhtmled.ocx/Makefile.in | 8 + dlls/dhtmled.ocx/dhtmled.ocx.spec | 4 + dlls/dhtmled.ocx/dhtmled_classes.idl | 39 +++ dlls/dhtmled.ocx/dhtmled_private.h | 19 ++ dlls/dhtmled.ocx/dhtmled_tlb.idl | 21 ++ dlls/dhtmled.ocx/edit.c | 534 +++++++++++++++++++++++++++++++++++ dlls/dhtmled.ocx/main.c | 162 +++++++++++ 8 files changed, 788 insertions(+) create mode 100644 dlls/dhtmled.ocx/Makefile.in create mode 100644 dlls/dhtmled.ocx/dhtmled.ocx.spec create mode 100644 dlls/dhtmled.ocx/dhtmled_classes.idl create mode 100644 dlls/dhtmled.ocx/dhtmled_private.h create mode 100644 dlls/dhtmled.ocx/dhtmled_tlb.idl create mode 100644 dlls/dhtmled.ocx/edit.c create mode 100644 dlls/dhtmled.ocx/main.c
diff --git a/configure.ac b/configure.ac index 6cba83b16d..6e4b277e16 100644 --- a/configure.ac +++ b/configure.ac @@ -3091,6 +3091,7 @@ WINE_CONFIG_TEST(dlls/ddrawex/tests) WINE_CONFIG_DLL(devenum,,[clean]) WINE_CONFIG_TEST(dlls/devenum/tests) WINE_CONFIG_DLL(dhcpcsvc) +WINE_CONFIG_DLL(dhtmled.ocx) WINE_CONFIG_DLL(difxapi) WINE_CONFIG_DLL(dinput,,[clean,implib,staticimplib]) WINE_CONFIG_TEST(dlls/dinput/tests) diff --git a/dlls/dhtmled.ocx/Makefile.in b/dlls/dhtmled.ocx/Makefile.in new file mode 100644 index 0000000000..848ac13a84 --- /dev/null +++ b/dlls/dhtmled.ocx/Makefile.in @@ -0,0 +1,8 @@ +MODULE = dhtmled.ocx +IMPORTS = uuid + +C_SRCS = \ + edit.c \ + main.c + +IDL_SRCS = dhtmled_classes.idl dhtmled_tlb.idl diff --git a/dlls/dhtmled.ocx/dhtmled.ocx.spec b/dlls/dhtmled.ocx/dhtmled.ocx.spec new file mode 100644 index 0000000000..b16365d0c9 --- /dev/null +++ b/dlls/dhtmled.ocx/dhtmled.ocx.spec @@ -0,0 +1,4 @@ +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/dhtmled.ocx/dhtmled_classes.idl b/dlls/dhtmled.ocx/dhtmled_classes.idl new file mode 100644 index 0000000000..ae27c7c14a --- /dev/null +++ b/dlls/dhtmled.ocx/dhtmled_classes.idl @@ -0,0 +1,39 @@ +/* + * Copyright 2017 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma makedep register + +[ + uuid(2d360201-fff5-11d1-8d03-00a0c959bc0a), + threading(apartment) +] +coclass DHTMLSafe +{ + interface IDHTMLSafe; + interface _DHTMLSafeEvents; +}; + +[ + uuid(2d360200-fff5-11d1-8d03-00a0c959bc0a), + threading(apartment) +] +coclass DHTMLEdit +{ + interface IDHTMLEdit; + interface _DHTMLEditEvents; +}; diff --git a/dlls/dhtmled.ocx/dhtmled_private.h b/dlls/dhtmled.ocx/dhtmled_private.h new file mode 100644 index 0000000000..5a9e89b997 --- /dev/null +++ b/dlls/dhtmled.ocx/dhtmled_private.h @@ -0,0 +1,19 @@ +/* + * Copyright 2017 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +extern HRESULT dhtml_edit_create(REFIID iid, void **out); diff --git a/dlls/dhtmled.ocx/dhtmled_tlb.idl b/dlls/dhtmled.ocx/dhtmled_tlb.idl new file mode 100644 index 0000000000..52bbb5bbfc --- /dev/null +++ b/dlls/dhtmled.ocx/dhtmled_tlb.idl @@ -0,0 +1,21 @@ +/* + * Copyright 2017 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma makedep regtypelib + +#include "dhtmled.idl" diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c new file mode 100644 index 0000000000..6e37554119 --- /dev/null +++ b/dlls/dhtmled.ocx/edit.c @@ -0,0 +1,534 @@ +/* + * Copyright 2017 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "dhtmled.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dhtmled); + +typedef struct +{ + IDHTMLEdit IDHTMLEdit_iface; + LONG ref; +} DHTMLEditImpl; + +static inline DHTMLEditImpl *impl_from_IDHTMLEdit(IDHTMLEdit *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IDHTMLEdit_iface); +} + +static HRESULT WINAPI DHTMLEdit_QueryInterface(IDHTMLEdit *iface, REFIID iid, void **out) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_IUnknown) || + IsEqualGUID(iid, &IID_IDispatch) || + IsEqualGUID(iid, &IID_IDHTMLSafe) || + IsEqualGUID(iid, &IID_IDHTMLEdit)) + { + IUnknown_AddRef(iface); + *out = iface; + return S_OK; + } + + *out = NULL; + ERR("no interface for %s\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI DHTMLEdit_AddRef(IDHTMLEdit *iface) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static ULONG WINAPI DHTMLEdit_Release(IDHTMLEdit *iface) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI DHTMLEdit_GetTypeInfoCount(IDHTMLEdit *iface, UINT *count) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, count); + *count = 0; + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_GetTypeInfo(IDHTMLEdit *iface, UINT type_index, LCID lcid, ITypeInfo **type_info) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%u, %08x, %p) stub\n", This, type_index, lcid, type_info); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_GetIDsOfNames(IDHTMLEdit *iface, REFIID iid, OLECHAR **names, UINT name_count, + LCID lcid, DISPID *disp_ids) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%s, %p, %u, %08x, %p) stub\n", This, debugstr_guid(iid), names, name_count, lcid, disp_ids); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_Invoke(IDHTMLEdit *iface, DISPID member, REFIID iid, LCID lcid, WORD flags, + DISPPARAMS *params, VARIANT *ret, EXCEPINFO *exception_info, UINT *error_index) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%d, %s, %08x, 0x%x, %p, %p, %p, %p) stub\n", + This, member, debugstr_guid(iid), lcid, flags, params, ret, exception_info, error_index); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_ExecCommand(IDHTMLEdit *iface, DHTMLEDITCMDID cmd_id, OLECMDEXECOPT options, + VARIANT *code_in, VARIANT *code_out) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%u, %u, %s, %p) stub\n", This, cmd_id, options, debugstr_variant(code_in), code_out); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_QueryStatus(IDHTMLEdit *iface, DHTMLEDITCMDID cmd_id, DHTMLEDITCMDF *status) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%u, %p) stub\n", This, cmd_id, status); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_SetContextMenu(IDHTMLEdit *iface, VARIANT *strings, VARIANT *states) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p, %p) stub\n", This, strings, states); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_NewDocument(IDHTMLEdit *iface) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->() stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_LoadURL(IDHTMLEdit *iface, BSTR url) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%s)\n", This, debugstr_w(url)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_FilterSourceCode(IDHTMLEdit *iface, BSTR in, BSTR *out) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%s, %p)\n", This, debugstr_w(in), out); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_Refresh(IDHTMLEdit *iface) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->() stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_DOM(IDHTMLEdit *iface, IHTMLDocument2 **value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_DocumentHTML(IDHTMLEdit *iface, BSTR *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_DocumentHTML(IDHTMLEdit *iface, BSTR html) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%s) stub\n", This, debugstr_w(html)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_ActivateApplets(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_ActivateApplets(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_ActivateActiveXControls(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_ActivateActiveXControls(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_ActivateDTCs(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_ActivateDTCs(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_ShowDetails(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_ShowDetails(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_ShowBorders(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_ShowBorders(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_Appearance(IDHTMLEdit *iface, DHTMLEDITAPPEARANCE *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_Appearance(IDHTMLEdit *iface, DHTMLEDITAPPEARANCE value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%u) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_Scrollbars(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_Scrollbars(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_ScrollbarAppearance(IDHTMLEdit *iface, DHTMLEDITAPPEARANCE *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_ScrollbarAppearance(IDHTMLEdit *iface, DHTMLEDITAPPEARANCE value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%u) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_SourceCodePreservation(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_SourceCodePreservation(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_AbsoluteDropMode(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_AbsoluteDropMode(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_SnapToGridX(IDHTMLEdit *iface, LONG *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_SnapToGridX(IDHTMLEdit *iface, LONG value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%d) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_SnapToGridY(IDHTMLEdit *iface, LONG *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_SnapToGridY(IDHTMLEdit *iface, LONG value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%d) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_SnapToGrid(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_SnapToGrid(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_IsDirty(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_CurrentDocumentPath(IDHTMLEdit *iface, BSTR *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_BaseURL(IDHTMLEdit *iface, BSTR *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_BaseURL(IDHTMLEdit *iface, BSTR value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%s) stub\n", This, debugstr_w(value)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_DocumentTitle(IDHTMLEdit *iface, BSTR *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_UseDivOnCarriageReturn(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_UseDivOnCarriageReturn(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_Busy(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_LoadDocument(IDHTMLEdit *iface, VARIANT *path, VARIANT *prompt) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%s, %s) stub\n", This, debugstr_variant(path), debugstr_variant(prompt)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_SaveDocument(IDHTMLEdit *iface, VARIANT *path, VARIANT *prompt) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%s, %s) stub\n", This, debugstr_variant(path), debugstr_variant(prompt)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_PrintDocument(IDHTMLEdit *iface, VARIANT *prompt) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%s) stub\n", This, debugstr_variant(prompt)); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_get_BrowseMode(IDHTMLEdit *iface, VARIANT_BOOL *value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI DHTMLEdit_put_BrowseMode(IDHTMLEdit *iface, VARIANT_BOOL value) +{ + DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + FIXME("(%p)->(%04x) stub\n", This, value); + return E_NOTIMPL; +} + +static const IDHTMLEditVtbl DHTMLEditVtbl = { + DHTMLEdit_QueryInterface, + DHTMLEdit_AddRef, + DHTMLEdit_Release, + DHTMLEdit_GetTypeInfoCount, + DHTMLEdit_GetTypeInfo, + DHTMLEdit_GetIDsOfNames, + DHTMLEdit_Invoke, + DHTMLEdit_ExecCommand, + DHTMLEdit_QueryStatus, + DHTMLEdit_SetContextMenu, + DHTMLEdit_NewDocument, + DHTMLEdit_LoadURL, + DHTMLEdit_FilterSourceCode, + DHTMLEdit_Refresh, + DHTMLEdit_get_DOM, + DHTMLEdit_get_DocumentHTML, + DHTMLEdit_put_DocumentHTML, + DHTMLEdit_get_ActivateApplets, + DHTMLEdit_put_ActivateApplets, + DHTMLEdit_get_ActivateActiveXControls, + DHTMLEdit_put_ActivateActiveXControls, + DHTMLEdit_get_ActivateDTCs, + DHTMLEdit_put_ActivateDTCs, + DHTMLEdit_get_ShowDetails, + DHTMLEdit_put_ShowDetails, + DHTMLEdit_get_ShowBorders, + DHTMLEdit_put_ShowBorders, + DHTMLEdit_get_Appearance, + DHTMLEdit_put_Appearance, + DHTMLEdit_get_Scrollbars, + DHTMLEdit_put_Scrollbars, + DHTMLEdit_get_ScrollbarAppearance, + DHTMLEdit_put_ScrollbarAppearance, + DHTMLEdit_get_SourceCodePreservation, + DHTMLEdit_put_SourceCodePreservation, + DHTMLEdit_get_AbsoluteDropMode, + DHTMLEdit_put_AbsoluteDropMode, + DHTMLEdit_get_SnapToGridX, + DHTMLEdit_put_SnapToGridX, + DHTMLEdit_get_SnapToGridY, + DHTMLEdit_put_SnapToGridY, + DHTMLEdit_get_SnapToGrid, + DHTMLEdit_put_SnapToGrid, + DHTMLEdit_get_IsDirty, + DHTMLEdit_get_CurrentDocumentPath, + DHTMLEdit_get_BaseURL, + DHTMLEdit_put_BaseURL, + DHTMLEdit_get_DocumentTitle, + DHTMLEdit_get_UseDivOnCarriageReturn, + DHTMLEdit_put_UseDivOnCarriageReturn, + DHTMLEdit_get_Busy, + DHTMLEdit_LoadDocument, + DHTMLEdit_SaveDocument, + DHTMLEdit_PrintDocument, + DHTMLEdit_get_BrowseMode, + DHTMLEdit_put_BrowseMode +}; + +HRESULT dhtml_edit_create(REFIID iid, void **out) +{ + DHTMLEditImpl *This; + + TRACE("(%s, %p)\n", debugstr_guid(iid), out); + + *out = NULL; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + if (!This) + return E_OUTOFMEMORY; + + This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl; + This->ref = 1; + + *out = &This->IDHTMLEdit_iface; + return S_OK; +} diff --git a/dlls/dhtmled.ocx/main.c b/dlls/dhtmled.ocx/main.c new file mode 100644 index 0000000000..4640884934 --- /dev/null +++ b/dlls/dhtmled.ocx/main.c @@ -0,0 +1,162 @@ +/* + * Dynamic HyperText Markup Language Editing Control + * + * Copyright 2017 Alex Henrie + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "initguid.h" +#include "dhtmled.h" +#include "dhtmled_private.h" +#include "rpcproxy.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dhtmled); + +typedef struct +{ + IClassFactory IClassFactory_iface; + HRESULT (*create)(REFIID iid, void **out); +} ClassFactoryImpl; + +static inline ClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, ClassFactoryImpl, IClassFactory_iface); +} + +static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID iid, void **out) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(&IID_IUnknown, iid) || IsEqualGUID(&IID_IClassFactory, iid)) + { + *out = iface; + IClassFactory_AddRef(iface); + return S_OK; + } + + *out = NULL; + WARN("no interface for %s\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) +{ + return 2; /* non-heap based object */ +} + +static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) +{ + return 1; /* non-heap based object */ +} + +static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID iid, void **out) +{ + ClassFactoryImpl *This = impl_from_IClassFactory(iface); + + TRACE("(%p)->(%p, %s, %p)\n", iface, outer, debugstr_guid(iid), out); + + if (outer) + return CLASS_E_NOAGGREGATION; + + return This->create(iid, out); +} + +static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL lock) +{ + TRACE("(%p)->(%x)\n", iface, lock); + return S_OK; +} + +static const IClassFactoryVtbl ClassFactoryVtbl = { + ClassFactory_QueryInterface, + ClassFactory_AddRef, + ClassFactory_Release, + ClassFactory_CreateInstance, + ClassFactory_LockServer +}; + +static HINSTANCE dhtmled_instance; + +/****************************************************************** + * DllMain (dhtmled.ocx.@) + */ +BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, VOID *reserved) +{ + TRACE("(%p, %u, %p)\n", instance, reason, reserved); + + switch (reason) + { + case DLL_WINE_PREATTACH: + /* Applications that use dhtmled.ocx usually install and register it + * themselves, but do not install its dependency triedit.dll. + * Because Wine's (currently nonexistent) triedit.dll implementation + * is not sufficient for native dhtmled.ocx, prefer our own. */ + return TRUE; + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(instance); + dhtmled_instance = instance; + break; + } + + return TRUE; +} + +/*********************************************************************** + * DllGetClassObject (dhtmled.ocx.@) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *out) +{ + static ClassFactoryImpl dhtml_edit_cf = { {&ClassFactoryVtbl}, dhtml_edit_create }; + + TRACE("(%s, %s, %p)\n", debugstr_guid(clsid), debugstr_guid(iid), out); + + if (IsEqualGUID(clsid, &CLSID_DHTMLEdit)) + return IClassFactory_QueryInterface(&dhtml_edit_cf.IClassFactory_iface, iid, out); + + FIXME("no class for %s\n", debugstr_guid(clsid)); + return CLASS_E_CLASSNOTAVAILABLE; +} + +/*********************************************************************** + * DllCanUnloadNow (dhtmled.ocx.@) + */ +HRESULT WINAPI DllCanUnloadNow(void) +{ + TRACE("()\n"); + return S_FALSE; +} + +/*********************************************************************** + * DllRegisterServer (dhtmled.ocx.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + TRACE("()\n"); + return __wine_register_resources(dhtmled_instance); +} + +/*********************************************************************** + * DllUnregisterServer (dhtmled.ocx.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + TRACE("()\n"); + return __wine_unregister_resources(dhtmled_instance); +}
Hi Alex,
On 05.12.2017 10:09, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
configure.ac | 1 + dlls/dhtmled.ocx/Makefile.in | 8 + dlls/dhtmled.ocx/dhtmled.ocx.spec | 4 + dlls/dhtmled.ocx/dhtmled_classes.idl | 39 +++ dlls/dhtmled.ocx/dhtmled_private.h | 19 ++ dlls/dhtmled.ocx/dhtmled_tlb.idl | 21 ++ dlls/dhtmled.ocx/edit.c | 534 +++++++++++++++++++++++++++++++++++ dlls/dhtmled.ocx/main.c | 162 +++++++++++ 8 files changed, 788 insertions(+) create mode 100644 dlls/dhtmled.ocx/Makefile.in create mode 100644 dlls/dhtmled.ocx/dhtmled.ocx.spec create mode 100644 dlls/dhtmled.ocx/dhtmled_classes.idl create mode 100644 dlls/dhtmled.ocx/dhtmled_private.h create mode 100644 dlls/dhtmled.ocx/dhtmled_tlb.idl create mode 100644 dlls/dhtmled.ocx/edit.c create mode 100644 dlls/dhtmled.ocx/main.c
It would be nice to split it a bit. For example separated patches for stub dll, adding .idl file and adding DHTMLEdit stub.
diff --git a/dlls/dhtmled.ocx/dhtmled_classes.idl b/dlls/dhtmled.ocx/dhtmled_classes.idl new file mode 100644 index 0000000000..ae27c7c14a --- /dev/null +++ b/dlls/dhtmled.ocx/dhtmled_classes.idl @@ -0,0 +1,39 @@ +/*
- Copyright 2017 Alex Henrie
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
+#pragma makedep register
I think we also want typelib.
+[
- uuid(2d360201-fff5-11d1-8d03-00a0c959bc0a),
- threading(apartment)
+] +coclass DHTMLSafe +{
- interface IDHTMLSafe;
- interface _DHTMLSafeEvents;
+};
+[
- uuid(2d360200-fff5-11d1-8d03-00a0c959bc0a),
- threading(apartment)
+] +coclass DHTMLEdit +{
- interface IDHTMLEdit;
- interface _DHTMLEditEvents;
+};
Ideally it would just #include dhtmled.idl (see mshtml.tlb for an example).
Thanks, Jacek
2017-12-05 6:45 GMT-07:00 Jacek Caban jacek@codeweavers.com:
On 05.12.2017 10:09, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
configure.ac | 1 + dlls/dhtmled.ocx/Makefile.in | 8 + dlls/dhtmled.ocx/dhtmled.ocx.spec | 4 + dlls/dhtmled.ocx/dhtmled_classes.idl | 39 +++ dlls/dhtmled.ocx/dhtmled_private.h | 19 ++ dlls/dhtmled.ocx/dhtmled_tlb.idl | 21 ++ dlls/dhtmled.ocx/edit.c | 534 +++++++++++++++++++++++++++++++++++ dlls/dhtmled.ocx/main.c | 162 +++++++++++ 8 files changed, 788 insertions(+) create mode 100644 dlls/dhtmled.ocx/Makefile.in create mode 100644 dlls/dhtmled.ocx/dhtmled.ocx.spec create mode 100644 dlls/dhtmled.ocx/dhtmled_classes.idl create mode 100644 dlls/dhtmled.ocx/dhtmled_private.h create mode 100644 dlls/dhtmled.ocx/dhtmled_tlb.idl create mode 100644 dlls/dhtmled.ocx/edit.c create mode 100644 dlls/dhtmled.ocx/main.c
It would be nice to split it a bit. For example separated patches for stub dll, adding .idl file and adding DHTMLEdit stub.
I don't think it makes sense to stub the DLL, then add an IDL, then add the object implementation, because the DLL is worthless without the IDL and the IDL is worthless without the object implementation. I have taken care to only add the most basic features, and even that is already divided across 8 patches. Nonetheless, if you feel strongly that this patch should be split into three, I'll do it.
diff --git a/dlls/dhtmled.ocx/dhtmled_classes.idl b/dlls/dhtmled.ocx/dhtmled_classes.idl new file mode 100644 index 0000000000..ae27c7c14a --- /dev/null +++ b/dlls/dhtmled.ocx/dhtmled_classes.idl @@ -0,0 +1,39 @@ +/*
- Copyright 2017 Alex Henrie
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
USA
- */
+#pragma makedep register
I think we also want typelib.
dhtmled_tlb.idl already has "#pragma makedep regtypelib". Are you saying that it needs "#pragma makedep typelib" too?
+[
- uuid(2d360201-fff5-11d1-8d03-00a0c959bc0a),
- threading(apartment)
+] +coclass DHTMLSafe +{
- interface IDHTMLSafe;
- interface _DHTMLSafeEvents;
+};
+[
- uuid(2d360200-fff5-11d1-8d03-00a0c959bc0a),
- threading(apartment)
+] +coclass DHTMLEdit +{
- interface IDHTMLEdit;
- interface _DHTMLEditEvents;
+};
Ideally it would just #include dhtmled.idl (see mshtml.tlb for an example).
I did that for dhtmled_classes.idl. Can I combine dhtmled_classes.idl and dhtmled_tlb.idl into one file with both pragmas?
Your feedback is much appreciated, thank you!
-Alex
Hi Alex,
On 06.12.2017 06:32, Alex Henrie wrote:
2017-12-05 6:45 GMT-07:00 Jacek Caban jacek@codeweavers.com:
On 05.12.2017 10:09, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
configure.ac | 1 + dlls/dhtmled.ocx/Makefile.in | 8 + dlls/dhtmled.ocx/dhtmled.ocx.spec | 4 + dlls/dhtmled.ocx/dhtmled_classes.idl | 39 +++ dlls/dhtmled.ocx/dhtmled_private.h | 19 ++ dlls/dhtmled.ocx/dhtmled_tlb.idl | 21 ++ dlls/dhtmled.ocx/edit.c | 534 +++++++++++++++++++++++++++++++++++ dlls/dhtmled.ocx/main.c | 162 +++++++++++ 8 files changed, 788 insertions(+) create mode 100644 dlls/dhtmled.ocx/Makefile.in create mode 100644 dlls/dhtmled.ocx/dhtmled.ocx.spec create mode 100644 dlls/dhtmled.ocx/dhtmled_classes.idl create mode 100644 dlls/dhtmled.ocx/dhtmled_private.h create mode 100644 dlls/dhtmled.ocx/dhtmled_tlb.idl create mode 100644 dlls/dhtmled.ocx/edit.c create mode 100644 dlls/dhtmled.ocx/main.c
It would be nice to split it a bit. For example separated patches for stub dll, adding .idl file and adding DHTMLEdit stub.
I don't think it makes sense to stub the DLL, then add an IDL, then add the object implementation, because the DLL is worthless without the IDL and the IDL is worthless without the object implementation. I have taken care to only add the most basic features, and even that is already divided across 8 patches. Nonetheless, if you feel strongly that this patch should be split into three, I'll do it.
No, in this case I don't feel strongly about it. It just makes the whole process easier (for example, I could have already signed off stub dll part yesterday if it was a separated patch) and is trivial to do with git. I also don't really agree it's about your justifications about separated things being worthless. A new DLL is always a functional change visible to applications. Also a new IDL adds and registers a new typelib, which is useful even without corresponding implementation.
Anyway, in this case, one patch is fine with me.
diff --git a/dlls/dhtmled.ocx/dhtmled_classes.idl b/dlls/dhtmled.ocx/dhtmled_classes.idl new file mode 100644 index 0000000000..ae27c7c14a --- /dev/null +++ b/dlls/dhtmled.ocx/dhtmled_classes.idl @@ -0,0 +1,39 @@ +/*
- Copyright 2017 Alex Henrie
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
USA
- */
+#pragma makedep register
I think we also want typelib.
dhtmled_tlb.idl already has "#pragma makedep regtypelib". Are you saying that it needs "#pragma makedep typelib" too?
That's fine, I missed that.
+[
- uuid(2d360201-fff5-11d1-8d03-00a0c959bc0a),
- threading(apartment)
+] +coclass DHTMLSafe +{
- interface IDHTMLSafe;
- interface _DHTMLSafeEvents;
+};
+[
- uuid(2d360200-fff5-11d1-8d03-00a0c959bc0a),
- threading(apartment)
+] +coclass DHTMLEdit +{
- interface IDHTMLEdit;
- interface _DHTMLEditEvents;
+};
Ideally it would just #include dhtmled.idl (see mshtml.tlb for an example).
I did that for dhtmled_classes.idl. Can I combine dhtmled_classes.idl and dhtmled_tlb.idl into one file with both pragmas?
Yes, that would be better.
Thanks, Jacek
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/dhtmled.ocx/edit.c | 100 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 85 insertions(+), 15 deletions(-)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 6e37554119..49580f3840 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -27,6 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dhtmled); typedef struct { IDHTMLEdit IDHTMLEdit_iface; + IQuickActivate IQuickActivate_iface; LONG ref; } DHTMLEditImpl;
@@ -35,10 +36,22 @@ static inline DHTMLEditImpl *impl_from_IDHTMLEdit(IDHTMLEdit *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IDHTMLEdit_iface); }
-static HRESULT WINAPI DHTMLEdit_QueryInterface(IDHTMLEdit *iface, REFIID iid, void **out) +static inline DHTMLEditImpl *impl_from_IQuickActivate(IQuickActivate *iface) { - DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); + return CONTAINING_RECORD(iface, DHTMLEditImpl, IQuickActivate_iface); +} + +static HRESULT dhtml_edit_addref(DHTMLEditImpl *This) +{ + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref);
+ return ref; +} + +static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) +{ TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(iid), out);
if (IsEqualGUID(iid, &IID_IUnknown) || @@ -46,8 +59,14 @@ static HRESULT WINAPI DHTMLEdit_QueryInterface(IDHTMLEdit *iface, REFIID iid, vo IsEqualGUID(iid, &IID_IDHTMLSafe) || IsEqualGUID(iid, &IID_IDHTMLEdit)) { - IUnknown_AddRef(iface); - *out = iface; + dhtml_edit_addref(This); + *out = &This->IDHTMLEdit_iface; + return S_OK; + } + else if (IsEqualGUID(iid, &IID_IQuickActivate)) + { + dhtml_edit_addref(This); + *out = &This->IQuickActivate_iface; return S_OK; }
@@ -56,27 +75,31 @@ static HRESULT WINAPI DHTMLEdit_QueryInterface(IDHTMLEdit *iface, REFIID iid, vo return E_NOINTERFACE; }
-static ULONG WINAPI DHTMLEdit_AddRef(IDHTMLEdit *iface) +static HRESULT dhtml_edit_release(DHTMLEditImpl *This) { - DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); - LONG ref = InterlockedIncrement(&This->ref); + LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
+ if (!ref) + HeapFree(GetProcessHeap(), 0, This); + return ref; }
-static ULONG WINAPI DHTMLEdit_Release(IDHTMLEdit *iface) +static HRESULT WINAPI DHTMLEdit_QueryInterface(IDHTMLEdit *iface, REFIID iid, void **out) { - DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); - LONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p) ref=%d\n", This, ref); + return dhtml_edit_qi(impl_from_IDHTMLEdit(iface), iid, out); +}
- if (!ref) - HeapFree(GetProcessHeap(), 0, This); +static ULONG WINAPI DHTMLEdit_AddRef(IDHTMLEdit *iface) +{ + return dhtml_edit_addref(impl_from_IDHTMLEdit(iface)); +}
- return ref; +static ULONG WINAPI DHTMLEdit_Release(IDHTMLEdit *iface) +{ + return dhtml_edit_release(impl_from_IDHTMLEdit(iface)); }
static HRESULT WINAPI DHTMLEdit_GetTypeInfoCount(IDHTMLEdit *iface, UINT *count) @@ -514,6 +537,52 @@ static const IDHTMLEditVtbl DHTMLEditVtbl = { DHTMLEdit_put_BrowseMode };
+static HRESULT WINAPI QuickActivate_QueryInterface(IQuickActivate *iface, REFIID iid, void **out) +{ + return dhtml_edit_qi(impl_from_IQuickActivate(iface), iid, out); +} + +static ULONG WINAPI QuickActivate_AddRef(IQuickActivate *iface) +{ + return dhtml_edit_addref(impl_from_IQuickActivate(iface)); +} + +static ULONG WINAPI QuickActivate_Release(IQuickActivate *iface) +{ + return dhtml_edit_release(impl_from_IQuickActivate(iface)); +} + +static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, + QACONTAINER *container_info, QACONTROL *control_info) +{ + DHTMLEditImpl *This = impl_from_IQuickActivate(iface); + FIXME("(%p)->(%p, %p) stub\n", This, container_info, control_info); + return S_OK; +} + +static HRESULT WINAPI QuickActivate_GetContentExtent(IQuickActivate *iface, SIZEL *value) +{ + DHTMLEditImpl *This = impl_from_IQuickActivate(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI QuickActivate_SetContentExtent(IQuickActivate *iface, SIZEL *value) +{ + DHTMLEditImpl *This = impl_from_IQuickActivate(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static const IQuickActivateVtbl QuickActivateVtbl = { + QuickActivate_QueryInterface, + QuickActivate_AddRef, + QuickActivate_Release, + QuickActivate_QuickActivate, + QuickActivate_GetContentExtent, + QuickActivate_SetContentExtent +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -527,6 +596,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) return E_OUTOFMEMORY;
This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl; + This->IQuickActivate_iface.lpVtbl = &QuickActivateVtbl; This->ref = 1;
*out = &This->IDHTMLEdit_iface;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/dhtmled.ocx/edit.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 49580f3840..e2a1c38ee7 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -28,6 +28,7 @@ typedef struct { IDHTMLEdit IDHTMLEdit_iface; IQuickActivate IQuickActivate_iface; + IViewObject IViewObject_iface; LONG ref; } DHTMLEditImpl;
@@ -41,6 +42,11 @@ static inline DHTMLEditImpl *impl_from_IQuickActivate(IQuickActivate *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IQuickActivate_iface); }
+static inline DHTMLEditImpl *impl_from_IViewObject(IViewObject *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IViewObject_iface); +} + static HRESULT dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -69,6 +75,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IQuickActivate_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IViewObject)) + { + dhtml_edit_addref(This); + *out = &This->IViewObject_iface; + return S_OK; + }
*out = NULL; ERR("no interface for %s\n", debugstr_guid(iid)); @@ -583,6 +595,85 @@ static const IQuickActivateVtbl QuickActivateVtbl = { QuickActivate_SetContentExtent };
+static HRESULT WINAPI ViewObject_QueryInterface(IViewObject *iface, REFIID iid, void **out) +{ + return dhtml_edit_qi(impl_from_IViewObject(iface), iid, out); +} + +static ULONG WINAPI ViewObject_AddRef(IViewObject *iface) +{ + return dhtml_edit_addref(impl_from_IViewObject(iface)); +} + +static ULONG WINAPI ViewObject_Release(IViewObject *iface) +{ + return dhtml_edit_release(impl_from_IViewObject(iface)); +} + +static HRESULT WINAPI ViewObject_Draw(IViewObject *iface, DWORD aspect, LONG index, void *aspect_info, + DVTARGETDEVICE *target, HDC target_context, HDC draw_context, + const RECTL *bounds, const RECTL *metabounds, + BOOL WINAPI (*callback)(ULONG_PTR), ULONG_PTR callback_arg) +{ + DHTMLEditImpl *This = impl_from_IViewObject(iface); + FIXME("(%p)->(%u, %d, %p, %p, %p, %p, %p, %p, %p, %lu) stub\n", This, aspect, index, aspect_info, + target, target_context, draw_context, bounds, metabounds, callback, callback_arg); + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObject_GetColorSet(IViewObject *iface, DWORD aspect, LONG index, void *aspect_info, + DVTARGETDEVICE *target, HDC target_context, LOGPALETTE **value) +{ + DHTMLEditImpl *This = impl_from_IViewObject(iface); + FIXME("(%p)->(%u, %d, %p, %p, %p, %p) stub\n", This, aspect, index, aspect_info, target, target_context, value); + *value = NULL; + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObject_Freeze(IViewObject *iface, DWORD aspect, LONG index, void *aspect_info, DWORD *token) +{ + DHTMLEditImpl *This = impl_from_IViewObject(iface); + FIXME("(%p)->(%u, %d, %p, %p) stub\n", This, aspect, index, aspect_info, token); + *token = 0; + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObject_Unfreeze(IViewObject *iface, DWORD token) +{ + DHTMLEditImpl *This = impl_from_IViewObject(iface); + FIXME("(%p)->(%u) stub\n", This, token); + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObject_SetAdvise(IViewObject *iface, DWORD aspects, DWORD flags, IAdviseSink *value) +{ + DHTMLEditImpl *This = impl_from_IViewObject(iface); + FIXME("(%p)->(%u, %u, %p) stub\n", This, aspects, flags, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObject_GetAdvise(IViewObject *iface, DWORD *aspects, DWORD *flags, IAdviseSink **value) +{ + DHTMLEditImpl *This = impl_from_IViewObject(iface); + FIXME("(%p)->(%p, %p, %p) stub\n", This, aspects, flags, value); + if (aspects) *aspects = 0; + if (flags) *flags = 0; + *value = NULL; + return E_NOTIMPL; +} + +static const IViewObjectVtbl ViewObjectVtbl = { + ViewObject_QueryInterface, + ViewObject_AddRef, + ViewObject_Release, + ViewObject_Draw, + ViewObject_GetColorSet, + ViewObject_Freeze, + ViewObject_Unfreeze, + ViewObject_SetAdvise, + ViewObject_GetAdvise +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -597,6 +688,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out)
This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl; This->IQuickActivate_iface.lpVtbl = &QuickActivateVtbl; + This->IViewObject_iface.lpVtbl = &ViewObjectVtbl; This->ref = 1;
*out = &This->IDHTMLEdit_iface;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/dhtmled.ocx/edit.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 225 insertions(+), 1 deletion(-)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index e2a1c38ee7..804c32dfb7 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -29,6 +29,8 @@ typedef struct IDHTMLEdit IDHTMLEdit_iface; IQuickActivate IQuickActivate_iface; IViewObject IViewObject_iface; + IOleObject IOleObject_iface; + IOleClientSite *client_site; LONG ref; } DHTMLEditImpl;
@@ -47,6 +49,11 @@ static inline DHTMLEditImpl *impl_from_IViewObject(IViewObject *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IViewObject_iface); }
+static inline DHTMLEditImpl *impl_from_IOleObject(IOleObject *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleObject_iface); +} + static HRESULT dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -81,6 +88,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IViewObject_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IOleObject)) + { + dhtml_edit_addref(This); + *out = &This->IOleObject_iface; + return S_OK; + }
*out = NULL; ERR("no interface for %s\n", debugstr_guid(iid)); @@ -568,7 +581,11 @@ static HRESULT WINAPI QuickActivate_QuickActivate(IQuickActivate *iface, QACONTAINER *container_info, QACONTROL *control_info) { DHTMLEditImpl *This = impl_from_IQuickActivate(iface); - FIXME("(%p)->(%p, %p) stub\n", This, container_info, control_info); + + FIXME("(%p)->(%p, %p) semi-stub\n", This, container_info, control_info); + + This->client_site = container_info->pClientSite; + return S_OK; }
@@ -674,6 +691,212 @@ static const IViewObjectVtbl ViewObjectVtbl = { ViewObject_GetAdvise };
+static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID iid, void **out) +{ + return dhtml_edit_qi(impl_from_IOleObject(iface), iid, out); +} + +static ULONG WINAPI OleObject_AddRef(IOleObject *iface) +{ + return dhtml_edit_addref(impl_from_IOleObject(iface)); +} + +static ULONG WINAPI OleObject_Release(IOleObject *iface) +{ + return dhtml_edit_release(impl_from_IOleObject(iface)); +} + +static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite *value) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return S_OK; +} + +static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, IOleClientSite **value) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p) stub\n", This, value); + *value = NULL; + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, + const OLECHAR *container_app, const OLECHAR *container_obj) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p, %p) stub\n", This, container_app, container_obj); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD save) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u) stub\n", This, save); + return S_OK; +} + +static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD moniker_id, IMoniker *value) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u, %p) stub\n", This, moniker_id, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD assign, DWORD moniker_id, IMoniker **value) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u, %p) stub\n", This, moniker_id, value); + *value = NULL; + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, IDataObject *data_obj, BOOL creation, DWORD reserved) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p, %u, %u) stub\n", This, data_obj, creation, reserved); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD reserved, IDataObject **value) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u, %p) stub\n", This, reserved, value); + *value = NULL; + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG verb, MSG *msg, IOleClientSite *active_site, + LONG index, HWND parent, const RECT *pos) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + TRACE("(%p)->(%d, %p, %p, %d, %p, %p) stub\n", This, verb, msg, active_site, index, parent, pos); + + if (verb == OLEIVERB_INPLACEACTIVATE) + { + IOleClientSite_OnShowWindow(This->client_site, TRUE); + return S_OK; + } + + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **verb) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p) stub\n", This, verb); + *verb = NULL; + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_Update(IOleObject *iface) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p) stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p) stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *clsid) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p) stub\n", This, clsid); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD type_type, OLECHAR **type) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u, %p) stub\n", This, type_type, type); + *type = NULL; + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD aspect, SIZEL *size_limit) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u, %p) stub\n", This, aspect, size_limit); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD aspect, SIZEL *size_limit) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u, %p) stub\n", This, aspect, size_limit); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *sink, DWORD *conn) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p, %p) stub\n", This, sink, conn); + *conn = 0; + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD conn) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u) stub\n", This, conn); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **advise) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p) stub\n", This, advise); + *advise = NULL; + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD aspect, DWORD *status) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%u, %p) stub\n", This, aspect, status); + *status = 0; + return E_NOTIMPL; +} + +static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *palette) +{ + DHTMLEditImpl *This = impl_from_IOleObject(iface); + FIXME("(%p)->(%p) stub\n", This, palette); + return E_NOTIMPL; +} + +static const IOleObjectVtbl OleObjectVtbl = { + OleObject_QueryInterface, + OleObject_AddRef, + OleObject_Release, + OleObject_SetClientSite, + OleObject_GetClientSite, + OleObject_SetHostNames, + OleObject_Close, + OleObject_SetMoniker, + OleObject_GetMoniker, + OleObject_InitFromData, + OleObject_GetClipboardData, + OleObject_DoVerb, + OleObject_EnumVerbs, + OleObject_Update, + OleObject_IsUpToDate, + OleObject_GetUserClassID, + OleObject_GetUserType, + OleObject_SetExtent, + OleObject_GetExtent, + OleObject_Advise, + OleObject_Unadvise, + OleObject_EnumAdvise, + OleObject_GetMiscStatus, + OleObject_SetColorScheme +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -689,6 +912,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl; This->IQuickActivate_iface.lpVtbl = &QuickActivateVtbl; This->IViewObject_iface.lpVtbl = &ViewObjectVtbl; + This->IOleObject_iface.lpVtbl = &OleObjectVtbl; This->ref = 1;
*out = &This->IDHTMLEdit_iface;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- v2: Fixed typo in commit message --- dlls/dhtmled.ocx/edit.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 804c32dfb7..80ec00614d 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -30,6 +30,7 @@ typedef struct IQuickActivate IQuickActivate_iface; IViewObject IViewObject_iface; IOleObject IOleObject_iface; + IOleControl IOleControl_iface; IOleClientSite *client_site; LONG ref; } DHTMLEditImpl; @@ -54,6 +55,11 @@ static inline DHTMLEditImpl *impl_from_IOleObject(IOleObject *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleObject_iface); }
+static inline DHTMLEditImpl *impl_from_IOleControl(IOleControl *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleControl_iface); +} + static HRESULT dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -94,6 +100,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IOleObject_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IOleControl)) + { + dhtml_edit_addref(This); + *out = &This->IOleControl_iface; + return S_OK; + }
*out = NULL; ERR("no interface for %s\n", debugstr_guid(iid)); @@ -897,6 +909,59 @@ static const IOleObjectVtbl OleObjectVtbl = { OleObject_SetColorScheme };
+static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID iid, void **out) +{ + return dhtml_edit_qi(impl_from_IOleControl(iface), iid, out); +} + +static ULONG WINAPI OleControl_AddRef(IOleControl *iface) +{ + return dhtml_edit_addref(impl_from_IOleControl(iface)); +} + +static ULONG WINAPI OleControl_Release(IOleControl *iface) +{ + return dhtml_edit_release(impl_from_IOleControl(iface)); +} + +static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL freeze) +{ + DHTMLEditImpl *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%u) stub\n", This, freeze); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *value) +{ + DHTMLEditImpl *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%p) stub\n", This, value); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID disp_id) +{ + DHTMLEditImpl *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%d) stub\n", This, disp_id); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *msg) +{ + DHTMLEditImpl *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%p) stub\n", This, msg); + return E_NOTIMPL; +} + +static const IOleControlVtbl OleControlVtbl = { + OleControl_QueryInterface, + OleControl_AddRef, + OleControl_Release, + OleControl_GetControlInfo, + OleControl_OnMnemonic, + OleControl_FreezeEvents, + OleControl_OnAmbientPropertyChange +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -913,6 +978,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IQuickActivate_iface.lpVtbl = &QuickActivateVtbl; This->IViewObject_iface.lpVtbl = &ViewObjectVtbl; This->IOleObject_iface.lpVtbl = &OleObjectVtbl; + This->IOleControl_iface.lpVtbl = &OleControlVtbl; This->ref = 1;
*out = &This->IDHTMLEdit_iface;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- v2: Fixed typo in commit message --- dlls/dhtmled.ocx/edit.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 80ec00614d..c68e9d62fd 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -31,6 +31,7 @@ typedef struct IViewObject IViewObject_iface; IOleObject IOleObject_iface; IOleControl IOleControl_iface; + IPersistStreamInit IPersistStreamInit_iface; IOleClientSite *client_site; LONG ref; } DHTMLEditImpl; @@ -60,6 +61,11 @@ static inline DHTMLEditImpl *impl_from_IOleControl(IOleControl *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleControl_iface); }
+static inline DHTMLEditImpl *impl_from_IPersistStreamInit(IPersistStreamInit *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStreamInit_iface); +} + static HRESULT dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -106,6 +112,13 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IOleControl_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IPersistStreamInit) || + IsEqualGUID(iid, &IID_IPersistStream)) + { + dhtml_edit_addref(This); + *out = &This->IPersistStreamInit_iface; + return S_OK; + }
*out = NULL; ERR("no interface for %s\n", debugstr_guid(iid)); @@ -962,6 +975,76 @@ static const IOleControlVtbl OleControlVtbl = { OleControl_OnAmbientPropertyChange };
+static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface, REFIID iid, void **out) +{ + return dhtml_edit_qi(impl_from_IPersistStreamInit(iface), iid, out); +} + +static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface) +{ + return dhtml_edit_addref(impl_from_IPersistStreamInit(iface)); +} + +static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface) +{ + return dhtml_edit_release(impl_from_IPersistStreamInit(iface)); +} + +static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *clsid) +{ + DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface); + FIXME("(%p)->(%p) stub\n", This, clsid); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface) +{ + DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface); + FIXME("(%p) stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, IStream *stream) +{ + DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface); + FIXME("(%p)->(%p) stub\n", This, stream); + return S_OK; +} + +static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, IStream *stream, BOOL clear_dirty) +{ + DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface); + FIXME("(%p)->(%p, %u) stub\n", This, stream, clear_dirty); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStreamInit_GetSizeMax(IPersistStreamInit *iface, ULARGE_INTEGER *value) +{ + DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface); + FIXME("(%p)->(%p) stub\n", This, value); + value->QuadPart = 0; + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface) +{ + DHTMLEditImpl *This = impl_from_IPersistStreamInit(iface); + FIXME("(%p) stub\n", This); + return E_NOTIMPL; +} + +static const IPersistStreamInitVtbl PersistStreamInitVtbl = { + PersistStreamInit_QueryInterface, + PersistStreamInit_AddRef, + PersistStreamInit_Release, + PersistStreamInit_GetClassID, + PersistStreamInit_IsDirty, + PersistStreamInit_Load, + PersistStreamInit_Save, + PersistStreamInit_GetSizeMax, + PersistStreamInit_InitNew +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -979,6 +1062,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IViewObject_iface.lpVtbl = &ViewObjectVtbl; This->IOleObject_iface.lpVtbl = &OleObjectVtbl; This->IOleControl_iface.lpVtbl = &OleControlVtbl; + This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; This->ref = 1;
*out = &This->IDHTMLEdit_iface;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- v2: Fixed typo in commit message --- dlls/dhtmled.ocx/edit.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index c68e9d62fd..a929b4c4e9 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -32,6 +32,7 @@ typedef struct IOleObject IOleObject_iface; IOleControl IOleControl_iface; IPersistStreamInit IPersistStreamInit_iface; + IConnectionPointContainer IConnectionPointContainer_iface; IOleClientSite *client_site; LONG ref; } DHTMLEditImpl; @@ -66,6 +67,11 @@ static inline DHTMLEditImpl *impl_from_IPersistStreamInit(IPersistStreamInit *if return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStreamInit_iface); }
+static inline DHTMLEditImpl *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IConnectionPointContainer_iface); +} + static HRESULT dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -119,6 +125,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IPersistStreamInit_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IConnectionPointContainer)) + { + dhtml_edit_addref(This); + *out = &This->IConnectionPointContainer_iface; + return S_OK; + }
*out = NULL; ERR("no interface for %s\n", debugstr_guid(iid)); @@ -1045,6 +1057,47 @@ static const IPersistStreamInitVtbl PersistStreamInitVtbl = { PersistStreamInit_InitNew };
+static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID iid, void **out) +{ + return dhtml_edit_qi(impl_from_IConnectionPointContainer(iface), iid, out); +} + +static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface) +{ + return dhtml_edit_addref(impl_from_IConnectionPointContainer(iface)); +} + +static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface) +{ + return dhtml_edit_release(impl_from_IConnectionPointContainer(iface)); +} + +static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface, + IEnumConnectionPoints **conn_points) +{ + DHTMLEditImpl *This = impl_from_IConnectionPointContainer(iface); + FIXME("(%p)->(%p) stub\n", This, conn_points); + *conn_points = NULL; + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface, REFIID iid, + IConnectionPoint **out) +{ + DHTMLEditImpl *This = impl_from_IConnectionPointContainer(iface); + FIXME("(%p)->(%s, %p) stub\n", This, debugstr_guid(iid), out); + *out = NULL; + return CONNECT_E_NOCONNECTION; +} + +static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = { + ConnectionPointContainer_QueryInterface, + ConnectionPointContainer_AddRef, + ConnectionPointContainer_Release, + ConnectionPointContainer_EnumConnectionPoints, + ConnectionPointContainer_FindConnectionPoint +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -1063,6 +1116,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IOleObject_iface.lpVtbl = &OleObjectVtbl; This->IOleControl_iface.lpVtbl = &OleControlVtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; + This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; This->ref = 1;
*out = &This->IDHTMLEdit_iface;
On 05.12.2017 10:09, Alex Henrie wrote:
- [
object,
uuid(ce04b590-2b1f-11d2-8d1e-00a0c959bc0a),
dual,
pointer_default(unique)
- ]
- interface IDHTMLSafe : IDispatch
- {
HRESULT ExecCommand(
[in] DHTMLEDITCMDID cmd_id,
[in, defaultvalue(OLECMDEXECOPT_DODEFAULT)] OLECMDEXECOPT options,
[in, optional] VARIANT *code_in,
[out, retval] VARIANT *code_out
);
HRESULT QueryStatus(
[in] DHTMLEDITCMDID cmd_id,
[out, retval] DHTMLEDITCMDF *status
);
HRESULT SetContextMenu(
[in] VARIANT *strings,
[in] VARIANT *states
);
HRESULT NewDocument();
HRESULT LoadURL([in] BSTR url);
HRESULT FilterSourceCode(
[in] BSTR in,
[out, retval] BSTR *out
);
HRESULT Refresh();
[propget] HRESULT DOM([out, retval] IHTMLDocument2 **value);
[propget] HRESULT DocumentHTML([out, retval] BSTR *value);
[propput] HRESULT DocumentHTML([in] BSTR html);
[propget] HRESULT ActivateApplets([out, retval] VARIANT_BOOL *value);
[propput] HRESULT ActivateApplets([in] VARIANT_BOOL value);
[propget] HRESULT ActivateActiveXControls([out, retval] VARIANT_BOOL *value);
[propput] HRESULT ActivateActiveXControls([in] VARIANT_BOOL value);
[propget] HRESULT ActivateDTCs([out, retval] VARIANT_BOOL *value);
[propput] HRESULT ActivateDTCs([in] VARIANT_BOOL value);
[propget] HRESULT ShowDetails([out, retval] VARIANT_BOOL *value);
[propput] HRESULT ShowDetails([in] VARIANT_BOOL value);
[propget] HRESULT ShowBorders([out, retval] VARIANT_BOOL *value);
[propput] HRESULT ShowBorders([in] VARIANT_BOOL value);
[propget] HRESULT Appearance([out, retval] DHTMLEDITAPPEARANCE *value);
[propput] HRESULT Appearance([in] DHTMLEDITAPPEARANCE value);
[propget] HRESULT Scrollbars([out, retval] VARIANT_BOOL *value);
[propput] HRESULT Scrollbars([in] VARIANT_BOOL value);
[propget] HRESULT ScrollbarAppearance([out, retval] DHTMLEDITAPPEARANCE *value);
[propput] HRESULT ScrollbarAppearance([in] DHTMLEDITAPPEARANCE value);
[propget] HRESULT SourceCodePreservation([out, retval] VARIANT_BOOL *value);
[propput] HRESULT SourceCodePreservation([in] VARIANT_BOOL value);
[propget] HRESULT AbsoluteDropMode([out, retval] VARIANT_BOOL *value);
[propput] HRESULT AbsoluteDropMode([in] VARIANT_BOOL value);
[propget] HRESULT SnapToGridX([out, retval] long *value);
[propput] HRESULT SnapToGridX([in] long value);
[propget] HRESULT SnapToGridY([out, retval] long *value);
[propput] HRESULT SnapToGridY([in] long value);
[propget] HRESULT SnapToGrid([out, retval] VARIANT_BOOL *value);
[propput] HRESULT SnapToGrid([in] VARIANT_BOOL value);
[propget] HRESULT IsDirty([out, retval] VARIANT_BOOL *value);
[propget] HRESULT CurrentDocumentPath([out, retval] BSTR *value);
[propget] HRESULT BaseURL([out, retval] BSTR *value);
[propput] HRESULT BaseURL([in] BSTR value);
[propget] HRESULT DocumentTitle([out, retval] BSTR *value);
[propget] HRESULT UseDivOnCarriageReturn([out, retval] VARIANT_BOOL *value);
[propput] HRESULT UseDivOnCarriageReturn([in] VARIANT_BOOL value);
[propget] HRESULT Busy([out, retval] VARIANT_BOOL *value);
- };
- [
uuid(d1fc78e8-b380-11d1-adc5-006008a5848c)
- ]
- dispinterface _DHTMLSafeEvents
- {
- properties:
- methods:
void DocumentComplete();
void DisplayChanged();
void ShowContextMenu(
[in] long x,
[in] long y
);
void ContextMenuAction([in] long index);
void onmousedown();
void onmousemove();
void onmouseup();
void onmouseout();
void onmouseover();
void onclick();
void ondblclick();
void onkeydown();
void onkeypress();
void onkeyup();
void onblur();
void onreadystatechange();
- };
- [
uuid(2d360201-fff5-11d1-8d03-00a0c959bc0a)
- ]
- coclass DHTMLSafe
- {
interface IDHTMLSafe;
interface _DHTMLSafeEvents;
- };
- [
uuid(ce04b591-2b1f-11d2-8d1e-00a0c959bc0a),
dual,
pointer_default(unique)
- ]
- interface IDHTMLEdit : IDHTMLSafe
- {
HRESULT LoadDocument(
[in] VARIANT *path,
[in, optional] VARIANT *prompt
);
HRESULT SaveDocument(
[in] VARIANT *path,
[in, optional] VARIANT *prompt
);
HRESULT PrintDocument([in, optional] VARIANT *prompt);
[propget] HRESULT BrowseMode([out, retval] VARIANT_BOOL *value);
[propput] HRESULT BrowseMode([in] VARIANT_BOOL value);
- };
- [
uuid(588d5040-cf28-11d1-8cd3-00a0c959bc0a)
- ]
- dispinterface _DHTMLEditEvents
- {
- properties:
- methods:
void DocumentComplete();
void DisplayChanged();
void ShowContextMenu(
[in] long x,
[in] long y
);
void ContextMenuAction([in] long index);
void onmousedown();
void onmousemove();
void onmouseup();
void onmouseout();
void onmouseover();
void onclick();
void ondblclick();
void onkeydown();
void onkeypress();
void onkeyup();
void onblur();
void onreadystatechange();
- };
You're missind [id()] attributes. Those are important doe IDispatch-based interfaces.
- [
uuid(2d360200-fff5-11d1-8d03-00a0c959bc0a)
- ]
- coclass DHTMLEdit
- {
interface IDHTMLEdit;
[default]
interface _DHTMLEditEvents;
[default, source]
Thanks, Jacek
2017-12-05 6:30 GMT-07:00 Jacek Caban jacek@codeweavers.com:
You're missind [id()] attributes. Those are important doe IDispatch-based interfaces.
- [
uuid(2d360200-fff5-11d1-8d03-00a0c959bc0a)
- ]
- coclass DHTMLEdit
- {
interface IDHTMLEdit;
[default]
interface _DHTMLEditEvents;
[default, source]
Thanks for the review. I will make those changes.
-Alex
On 07.12.2017 20:10, Jacek Caban wrote:
Signed-off-by: Jacek Caban jacek@codeweavers.com
That was meant to the other version.