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; + }; +}