Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- 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..0b209da38d --- /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( + DHTMLEDITCMDID cmd_id, + OLECMDEXECOPT options, + VARIANT *code_in, + VARIANT *code_out + ); + + HRESULT QueryStatus( + DHTMLEDITCMDID cmd_id, + DHTMLEDITCMDF *status + ); + + HRESULT SetContextMenu( + VARIANT *strings, + VARIANT *states + ); + + HRESULT NewDocument(); + + HRESULT LoadURL(BSTR url); + + HRESULT FilterSourceCode( + BSTR in, + BSTR *out + ); + + HRESULT Refresh(); + + [propget] HRESULT DOM(IHTMLDocument2 **value); + + [propget] HRESULT DocumentHTML(BSTR *value); + [propput] HRESULT DocumentHTML(BSTR html); + + [propget] HRESULT ActivateApplets(VARIANT_BOOL *value); + [propput] HRESULT ActivateApplets(VARIANT_BOOL value); + + [propget] HRESULT ActivateActiveXControls(VARIANT_BOOL *value); + [propput] HRESULT ActivateActiveXControls(VARIANT_BOOL value); + + [propget] HRESULT ActivateDTCs(VARIANT_BOOL *value); + [propput] HRESULT ActivateDTCs(VARIANT_BOOL value); + + [propget] HRESULT ShowDetails(VARIANT_BOOL *value); + [propput] HRESULT ShowDetails(VARIANT_BOOL value); + + [propget] HRESULT ShowBorders(VARIANT_BOOL *value); + [propput] HRESULT ShowBorders(VARIANT_BOOL value); + + [propget] HRESULT Appearance(DHTMLEDITAPPEARANCE *value); + [propput] HRESULT Appearance(DHTMLEDITAPPEARANCE value); + + [propget] HRESULT Scrollbars(VARIANT_BOOL *value); + [propput] HRESULT Scrollbars(VARIANT_BOOL value); + + [propget] HRESULT ScrollbarAppearance(DHTMLEDITAPPEARANCE *value); + [propput] HRESULT ScrollbarAppearance(DHTMLEDITAPPEARANCE value); + + [propget] HRESULT SourceCodePreservation(VARIANT_BOOL *value); + [propput] HRESULT SourceCodePreservation(VARIANT_BOOL value); + + [propget] HRESULT AbsoluteDropMode(VARIANT_BOOL *value); + [propput] HRESULT AbsoluteDropMode(VARIANT_BOOL value); + + [propget] HRESULT SnapToGridX(long *value); + [propput] HRESULT SnapToGridX(long value); + + [propget] HRESULT SnapToGridY(long *value); + [propput] HRESULT SnapToGridY(long value); + + [propget] HRESULT SnapToGrid(VARIANT_BOOL *value); + [propput] HRESULT SnapToGrid(VARIANT_BOOL value); + + [propget] HRESULT IsDirty(VARIANT_BOOL *value); + + [propget] HRESULT CurrentDocumentPath(BSTR *value); + + [propget] HRESULT BaseURL(BSTR *value); + [propput] HRESULT BaseURL(BSTR value); + + [propget] HRESULT DocumentTitle(BSTR *value); + + [propget] HRESULT UseDivOnCarriageReturn(VARIANT_BOOL *value); + [propput] HRESULT UseDivOnCarriageReturn(VARIANT_BOOL value); + + [propget] HRESULT Busy(VARIANT_BOOL *value); + }; + + [ + uuid(d1fc78e8-b380-11d1-adc5-006008a5848c) + ] + dispinterface _DHTMLSafeEvents + { + properties: + methods: + void DocumentComplete(); + + void DisplayChanged(); + + void ShowContextMenu( + long x, + long y + ); + + void ContextMenuAction(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( + VARIANT *path, + VARIANT *prompt + ); + + HRESULT SaveDocument( + VARIANT *path, + VARIANT *prompt + ); + + HRESULT PrintDocument(VARIANT *prompt); + + [propget] HRESULT BrowseMode(VARIANT_BOOL *value); + + [propput] HRESULT BrowseMode(VARIANT_BOOL value); + }; + + [ + uuid(588d5040-cf28-11d1-8cd3-00a0c959bc0a) + ] + dispinterface _DHTMLEditEvents + { + properties: + methods: + void DocumentComplete(); + + void DisplayChanged(); + + void ShowContextMenu( + long x, + long y + ); + + void ContextMenuAction(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; + }; +}