From 73276d797c1543542e66270d76ec5206e3f2d52f Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 5 Apr 2021 16:05:27 +0200 Subject: [PATCH] include: Add IHTMLStyleSheet4 and IHTMLCSSRule declarations. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- include/mshtmdid.h | 18 ++++++++ include/mshtml.idl | 100 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/include/mshtmdid.h b/include/mshtmdid.h index 58be0df31a9..28d114da81d 100644 --- a/include/mshtmdid.h +++ b/include/mshtmdid.h @@ -78,6 +78,7 @@ #define DISPID_SCRIPT DISPID_NORMAL_FIRST #define DISPID_STYLESHEET DISPID_NORMAL_FIRST #define DISPID_STYLERULE DISPID_NORMAL_FIRST +#define DISPID_BASE_STYLERULE (DISPID_STYLERULE+100) #define DISPID_STYLEPAGE DISPID_NORMAL_FIRST #define DISPID_STYLESHEETS_COL DISPID_NORMAL_FIRST #define DISPID_STYLERULES_COL DISPID_NORMAL_FIRST @@ -3553,6 +3554,17 @@ #define DISPID_IHTMLSTYLESHEET2_PAGES (DISPID_STYLESHEET+16) #define DISPID_IHTMLSTYLESHEET2_ADDPAGERULE (DISPID_STYLESHEET+17) +/* IHTMLStyleSheet4 */ +#define DISPID_IHTMLSTYLESHEET4_IE9_TYPE (DISPID_IE8_STYLE+3) +#define DISPID_IHTMLSTYLESHEET4_IE9_HREF (DISPID_IE8_STYLE+4) +#define DISPID_IHTMLSTYLESHEET4_IE9_TITLE (DISPID_IE8_STYLE+5) +#define DISPID_IHTMLSTYLESHEET4_OWNERNODE (DISPID_IE8_STYLE+6) +#define DISPID_IHTMLSTYLESHEET4_OWNERRULE (DISPID_IE8_STYLE+7) +#define DISPID_IHTMLSTYLESHEET4_CSSRULES (DISPID_IE8_STYLE+8) +#define DISPID_IHTMLSTYLESHEET4_IE9_MEDIA (DISPID_IE8_STYLE+9) +#define DISPID_IHTMLSTYLESHEET4_INSERTRULE (DISPID_IE8_STYLE+10) +#define DISPID_IHTMLSTYLESHEET4_DELETERULE (DISPID_IE8_STYLE+11) + /* IHTMLStyleSheetRulesCollection */ #define DISPID_IHTMLSTYLESHEETRULESCOLLECTION_LENGTH (DISPID_STYLERULES_COL+1) #define DISPID_IHTMLSTYLESHEETRULESCOLLECTION_ITEM DISPID_VALUE @@ -3655,6 +3667,12 @@ #define DISPID_IHTMLRULESTYLE_TEXTALIGN STDPROPID_XOBJ_BLOCKALIGN #define DISPID_IHTMLRULESTYLE_BACKGROUNDCOLOR DISPID_BACKCOLOR +/* IHTMLCSSRule */ +#define DISPID_IHTMLCSSRULE_TYPE DISPID_BASE_STYLERULE+1 +#define DISPID_IHTMLCSSRULE_CSSTEXT DISPID_BASE_STYLERULE+2 +#define DISPID_IHTMLCSSRULE_PARENTRULE DISPID_BASE_STYLERULE+3 +#define DISPID_IHTMLCSSRULE_PARENTSTYLESHEET DISPID_BASE_STYLERULE+4 + /* IHTMLDOMNode */ #define DISPID_IHTMLDOMNODE_NODETYPE DISPID_ELEMENT+46 #define DISPID_IHTMLDOMNODE_PARENTNODE DISPID_ELEMENT+47 diff --git a/include/mshtml.idl b/include/mshtml.idl index ba2021669c5..ef496b840ea 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -424,6 +424,7 @@ interface IHTMLChangeLog; interface IHTMLChangeSink; interface ISVGSVGElement; interface IHTMLDOMRange; +interface IHTMLStyleSheet; /***************************************************************************** * IHTMLCSSStyleDeclaration interface @@ -5766,6 +5767,33 @@ interface IHTMLRuleStyle : IDispatch [retval, out] VARIANT_BOOL *pfSuccess); } +/***************************************************************************** + * IHTMLCSSRule interface + */ +[ + odl, + oleautomation, + dual, + uuid(305106e9-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLCSSRule : IDispatch +{ + [propget, id(DISPID_IHTMLCSSRULE_TYPE)] + HRESULT type([out, retval] USHORT *p); + + [propput, id(DISPID_IHTMLCSSRULE_CSSTEXT)] + HRESULT cssText([in] BSTR v); + + [propget, id(DISPID_IHTMLCSSRULE_CSSTEXT)] + HRESULT cssText([out, retval] BSTR *p); + + [propget, id(DISPID_IHTMLCSSRULE_PARENTRULE)] + HRESULT parentRule([out, retval] IHTMLCSSRule **p); + + [propget, id(DISPID_IHTMLCSSRULE_PARENTSTYLESHEET)] + HRESULT parentStyleSheet([out, retval] IHTMLStyleSheet **p); +} + /***************************************************************************** * DispHTMLStyle dispinterface */ @@ -12023,6 +12051,48 @@ interface IHTMLStyleSheet2 : IDispatch [retval, out] LONG *plNewIndex); } +/***************************************************************************** + * IHTMLStyleSheet4 interface + */ +[ + odl, + oleautomation, + dual, + uuid(305106f4-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLStyleSheet4 : IDispatch +{ + [propget, id(DISPID_IHTMLSTYLESHEET4_IE9_TYPE)] + HRESULT type([out, retval] BSTR *p); + + [propget, id(DISPID_IHTMLSTYLESHEET4_IE9_HREF)] + HRESULT href([out, retval] VARIANT *p); + + [propget, id(DISPID_IHTMLSTYLESHEET4_IE9_TITLE)] + HRESULT title([out, retval] BSTR *p); + + [propget, id(DISPID_IHTMLSTYLESHEET4_OWNERNODE)] + HRESULT ownerNode([out, retval] IHTMLElement **p); + + [propget, id(DISPID_IHTMLSTYLESHEET4_OWNERRULE)] + HRESULT ownerRule([out, retval] IHTMLCSSRule **p); + + [propget, id(DISPID_IHTMLSTYLESHEET4_CSSRULES)] + HRESULT cssRules([out, retval] IHTMLStyleSheetRulesCollection **p); + + [propget, id(DISPID_IHTMLSTYLESHEET4_IE9_MEDIA)] + HRESULT media([out, retval] VARIANT *p); + + [id(DISPID_IHTMLSTYLESHEET4_INSERTRULE)] + HRESULT insertRule( + [in] BSTR bstrRule, + [in, defaultvalue(-1)] long lIndex, + [out, retval] long *plNewIndex); + + [id(DISPID_IHTMLSTYLESHEET4_DELETERULE)] + HRESULT deleteRule([in, defaultvalue(-1)] long lIndex); +} + [ hidden, uuid(3050f58d-98b5-11cf-bb82-00aa00bdce0b) @@ -12107,6 +12177,35 @@ methods: [in] BSTR bstrSelector, [in] BSTR bstrStyle, [defaultvalue(-1), in] LONG lIndex); + + [propget, id(DISPID_IHTMLSTYLESHEET4_IE9_TYPE)] + BSTR ie9_type(); + + [propget, id(DISPID_IHTMLSTYLESHEET4_IE9_HREF)] + VARIANT ie9_href(); + + [propget, id(DISPID_IHTMLSTYLESHEET4_IE9_TITLE)] + BSTR ie9_title(); + + [propget, id(DISPID_IHTMLSTYLESHEET4_OWNERNODE)] + IHTMLElement *ownerNode(); + + [propget, id(DISPID_IHTMLSTYLESHEET4_OWNERRULE)] + IHTMLCSSRule *ownerRule(); + + [propget, id(DISPID_IHTMLSTYLESHEET4_CSSRULES)] + IHTMLStyleSheetRulesCollection *cssRules(); + + [propget, id(DISPID_IHTMLSTYLESHEET4_IE9_MEDIA)] + VARIANT ie9_media(); + + [id(DISPID_IHTMLSTYLESHEET4_INSERTRULE)] + long insertRule( + [in] BSTR bstrRule, + [in, defaultvalue(-1)] long lIndex); + + [id(DISPID_IHTMLSTYLESHEET4_DELETERULE)] + void deleteRule([in, defaultvalue(-1)] long lIndex); } [ @@ -12118,6 +12217,7 @@ coclass HTMLStyleSheet [default] dispinterface DispHTMLStyleSheet; interface IHTMLStyleSheet; interface IHTMLStyleSheet2; + interface IHTMLStyleSheet4; } /*****************************************************************************