Home | History | Annotate | Download | only in Interfaces
      1 /*
      2  * Copyright (C) 2006, 2007, 2008 Apple Inc.  All rights reserved.
      3  *
      4  * Redistribution and use in source and binary forms, with or without
      5  * modification, are permitted provided that the following conditions
      6  * are met:
      7  * 1. Redistributions of source code must retain the above copyright
      8  *    notice, this list of conditions and the following disclaimer.
      9  * 2. Redistributions in binary form must reproduce the above copyright
     10  *    notice, this list of conditions and the following disclaimer in the
     11  *    documentation and/or other materials provided with the distribution.
     12  *
     13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
     21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     24  */
     25 
     26 #ifndef DO_NO_IMPORTS
     27 import "oaidl.idl";
     28 import "ocidl.idl";
     29 import "DOMCore.idl";
     30 import "IWebScriptObject.idl";
     31 #endif
     32 
     33 interface IDOMObject;
     34 interface IDOMCSSValue;
     35 interface IDOMCSSStyleDeclaration;
     36 interface IDOMCSSStyleSheet;
     37 interface IDOMCSSRule;
     38 interface IDOMElement;
     39 
     40 /*
     41     @interface DOMDocument (DOMViewCSS)
     42 */
     43 [
     44     object,
     45     oleautomation,
     46     uuid(43EFE238-A4DF-400a-983D-FCE0C0F56BCD),
     47     pointer_default(unique)
     48 ]
     49 interface IDOMViewCSS : IUnknown
     50 {
     51     /*
     52         - (DOMCSSStyleDeclaration *)getComputedStyle:(DOMElement *)elt :(NSString *)pseudoElt;
     53     */
     54     HRESULT getComputedStyle([in] IDOMElement* elt, [in] BSTR pseudoElt, [out, retval] IDOMCSSStyleDeclaration** result);
     55 }
     56 
     57 /*
     58     @interface DOMCSSRuleList : DOMObject
     59 */
     60 [
     61     object,
     62     oleautomation,
     63     uuid(D45DA43D-5EDB-4315-A097-3ED3FA089193),
     64     pointer_default(unique)
     65 ]
     66 interface IDOMCSSRuleList : IDOMObject
     67 {
     68     /*
     69         - (unsigned)length;
     70     */
     71     HRESULT length([out, retval] UINT* result);
     72 
     73     /*
     74         - (DOMCSSRule *)item:(unsigned)index;
     75     */
     76     HRESULT item([in] UINT index, [out, retval] IDOMCSSRule** result);
     77 }
     78 
     79 /*
     80     @interface DOMCSSRule : DOMObject
     81 */
     82 [
     83     object,
     84     oleautomation,
     85     uuid(05947A31-9E1C-4c98-8608-6688959D6542),
     86     pointer_default(unique)
     87 ]
     88 interface IDOMCSSRule : IDOMObject
     89 {
     90     /*
     91         - (unsigned short)type;
     92     */
     93     HRESULT type([out, retval] unsigned short* result);
     94 
     95     /*
     96         - (NSString *)cssText;
     97     */
     98     HRESULT cssText([out, retval] BSTR* text);
     99 
    100     /*
    101         - (void)setCssText:(NSString *)cssText;
    102     */
    103     HRESULT setCssText([in] BSTR cssText);
    104 
    105     /*
    106         - (DOMCSSStyleSheet *)parentStyleSheet;
    107     */
    108     HRESULT parentStyleSheet([out, retval] IDOMCSSStyleSheet** sheet);
    109 
    110     /*
    111         - (DOMCSSRule *)parentRule;
    112     */
    113     HRESULT parentRule([out, retval] IDOMCSSRule** rule);
    114 }
    115 
    116 /*
    117     @interface DOMCSSStyleDeclaration : DOMObject
    118 */
    119 [
    120     object,
    121     oleautomation,
    122     uuid(DBBE9A6B-D505-4647-B4AB-40A7CF3EE63E),
    123     pointer_default(unique)
    124 ]
    125 interface IDOMCSSStyleDeclaration : IDOMObject
    126 {
    127     /*
    128         - (NSString *)cssText;
    129     */
    130     HRESULT cssText([out, retval] BSTR* result);
    131 
    132     /*
    133         - (void)setCssText:(NSString *)cssText;
    134     */
    135     HRESULT setCssText([in] BSTR cssText);
    136 
    137     /*
    138         - (NSString *)getPropertyValue:(NSString *)propertyName;
    139     */
    140     HRESULT getPropertyValue([in] BSTR propertyName, [out, retval] BSTR* result);
    141 
    142     /*
    143         - (DOMCSSValue *)getPropertyCSSValue:(NSString *)propertyName;
    144     */
    145     HRESULT getPropertyCSSValue([in] BSTR propertyName, [out, retval] IDOMCSSValue** result);
    146 
    147     /*
    148         - (NSString *)removeProperty:(NSString *)propertyName;
    149     */
    150     HRESULT removeProperty([in] BSTR propertyName, [out, retval] BSTR* result);
    151 
    152     /*
    153         - (NSString *)getPropertyPriority:(NSString *)propertyName;
    154     */
    155     HRESULT getPropertyPriority([in] BSTR propertyName, [out, retval] BSTR* result);
    156 
    157     /*
    158         - (void)setProperty:(NSString *)propertyName :(NSString *)value :(NSString *)priority;
    159     */
    160     HRESULT setProperty([in] BSTR propertyName, [in] BSTR value, [in] BSTR priority);
    161 
    162     /*
    163         - (unsigned)length;
    164     */
    165     HRESULT length([out, retval] UINT* result);
    166 
    167     /*
    168         - (NSString *)item:(unsigned)index;
    169     */
    170     HRESULT item([in] UINT index, [out, retval] BSTR* result);
    171 
    172     /*
    173         - (DOMCSSRule *)parentRule;
    174     */
    175     HRESULT parentRule([out, retval] IDOMCSSRule** result);
    176 }
    177 
    178 /*
    179     @interface DOMCSSValue : DOMObject
    180 */
    181 [
    182     object,
    183     oleautomation,
    184     uuid(51D29553-2AF7-4f52-AFE6-3C59196A8BAA),
    185     pointer_default(unique)
    186 ]
    187 interface IDOMCSSValue : IDOMObject
    188 {
    189     /*
    190         - (NSString *)cssText;
    191     */
    192     HRESULT cssText([out, retval] BSTR* text);
    193 
    194     /*
    195         - (void)setCssText:(NSString *)cssText;
    196     */
    197     HRESULT setCssText([in] BSTR text);
    198 
    199     /*
    200         - (unsigned short)cssValueType;
    201     */
    202     HRESULT cssValueType([out, retval] unsigned short *valueType);
    203 }
    204 
    205 /*
    206     @interface DOMCSSStyleSheet : DOMStyleSheet
    207 */
    208 [
    209     object,
    210     oleautomation,
    211     uuid(14B1C213-1458-48a1-AD8F-54BFE64F9ECF),
    212     pointer_default(unique)
    213 ]
    214 interface IDOMCSSStyleSheet : IDOMObject
    215 {
    216     /*
    217         - (DOMCSSRule *)ownerRule;
    218     */
    219     HRESULT ownerRule([out, retval] IDOMCSSRule** rule);
    220 
    221     /*
    222         - (DOMCSSRuleList *)cssRules;
    223     */
    224     HRESULT cssRules([out, retval] IDOMCSSRuleList** ruleList);
    225 
    226     /*
    227         - (unsigned)insertRule:(NSString *)rule :(unsigned)index;
    228     */
    229     HRESULT insertRule([in] BSTR rule, [in] UINT index, [out, retval] UINT* result);
    230 
    231     /*
    232         - (void)deleteRule:(unsigned)index;
    233     */
    234     HRESULT deleteRule([in] UINT index);
    235 }
    236 
    237 /*
    238     @interface DOMElement (DOMElementCSSInlineStyle)
    239 */
    240 [
    241     object,
    242     oleautomation,
    243     uuid(585127E2-D698-44c4-83EC-4D1E6E07E90D),
    244     pointer_default(unique)
    245 ]
    246 interface IDOMElementCSSInlineStyle : IUnknown
    247 {
    248     /*
    249         - (DOMCSSStyleDeclaration *)style;
    250     */
    251     HRESULT style([out, retval] IDOMCSSStyleDeclaration** result);
    252 }
    253