webengine/osswebengine/WebCore/page/DOMWindow.idl
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2  * Copyright (C) 2006, 2007 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 module window {
       
    27 
       
    28     interface [LegacyParent=KJS::Window, DoNotCache, CheckDomainSecurity, GenerateNativeConverter, CustomGetOwnPropertySlot, CustomPutFunction] DOMWindow {
       
    29         // DOM Level 0
       
    30         readonly attribute Screen screen;
       
    31         readonly attribute [DoNotCheckDomainSecurity] History history;
       
    32         readonly attribute BarInfo locationbar;
       
    33         readonly attribute BarInfo menubar;
       
    34         readonly attribute BarInfo personalbar;
       
    35         readonly attribute BarInfo scrollbars;
       
    36         readonly attribute BarInfo statusbar;
       
    37         readonly attribute BarInfo toolbar;
       
    38 
       
    39         DOMSelection getSelection();
       
    40 
       
    41         readonly attribute [CheckNodeSecurity] Element frameElement;
       
    42 
       
    43         [DoNotCheckDomainSecurity] void focus();
       
    44         [DoNotCheckDomainSecurity] void blur();
       
    45         [DoNotCheckDomainSecurity] void close();
       
    46 
       
    47         void print();
       
    48         void stop();
       
    49 
       
    50         void alert(in [ConvertUndefinedOrNullToNullString] DOMString message);
       
    51         boolean confirm(in [ConvertUndefinedOrNullToNullString] DOMString message);
       
    52         [ConvertNullStringTo=Null] DOMString prompt(in [ConvertUndefinedOrNullToNullString] DOMString message,
       
    53                                                     in [ConvertUndefinedOrNullToNullString] DOMString defaultValue);
       
    54 
       
    55         boolean find(in DOMString string,
       
    56                      in boolean caseSensitive,
       
    57                      in boolean backwards,
       
    58                      in boolean wrap,
       
    59                      in boolean wholeWord,
       
    60                      in boolean searchInFrames,
       
    61                      in boolean showDialog);
       
    62 
       
    63         readonly attribute boolean offscreenBuffering;
       
    64 
       
    65         readonly attribute long outerHeight;
       
    66         readonly attribute long outerWidth;
       
    67         readonly attribute long innerHeight;
       
    68         readonly attribute long innerWidth;
       
    69         readonly attribute long screenX;
       
    70         readonly attribute long screenY;
       
    71         readonly attribute long screenLeft;
       
    72         readonly attribute long screenTop;
       
    73         readonly attribute long scrollX;
       
    74         readonly attribute long scrollY;
       
    75         readonly attribute long pageXOffset;
       
    76         readonly attribute long pageYOffset;
       
    77 
       
    78         readonly attribute [DoNotCheckDomainSecurity] boolean closed;
       
    79 
       
    80         readonly attribute [DoNotCheckDomainSecurity] unsigned long length;
       
    81 
       
    82                  attribute DOMString name;
       
    83 
       
    84                  attribute DOMString status;
       
    85                  attribute DOMString defaultStatus;
       
    86 #if defined(LANGUAGE_JAVASCRIPT)
       
    87                  // This attribute is an alias of defaultStatus and is necessary for legacy uses.
       
    88                  attribute DOMString defaultstatus;
       
    89 #endif
       
    90 
       
    91         // Self referential attributes
       
    92         readonly attribute [DoNotCheckDomainSecurity] DOMWindow self;
       
    93         readonly attribute [DoNotCheckDomainSecurity] DOMWindow window;
       
    94         readonly attribute [DoNotCheckDomainSecurity] DOMWindow frames;
       
    95 
       
    96         readonly attribute [DoNotCheckDomainSecurity] DOMWindow opener;
       
    97         readonly attribute [DoNotCheckDomainSecurity] DOMWindow parent;
       
    98         readonly attribute [DoNotCheckDomainSecurity] DOMWindow top;
       
    99 
       
   100         // DOM Level 2 AbstractView Interface
       
   101         readonly attribute Document document;
       
   102 
       
   103         // DOM Level 2 Style Interface
       
   104         CSSStyleDeclaration getComputedStyle(in Element element,
       
   105                                              in DOMString pseudoElement);
       
   106 
       
   107         // WebKit extensions
       
   108         CSSRuleList getMatchedCSSRules(in Element element,
       
   109                                        in DOMString pseudoElement,
       
   110                                        in [Optional] boolean authorOnly);
       
   111         readonly attribute double devicePixelRatio;
       
   112 
       
   113 #if defined(LANGUAGE_JAVASCRIPT)
       
   114         // Global constructors
       
   115         attribute StyleSheetConstructor StyleSheet;
       
   116         attribute CSSStyleSheetConstructor CSSStyleSheet;
       
   117 
       
   118         attribute CSSValueConstructor CSSValue;
       
   119         attribute CSSPrimitiveValueConstructor CSSPrimitiveValue;
       
   120         attribute CSSValueListConstructor CSSValueList;
       
   121 
       
   122         attribute CSSRuleConstructor CSSRule;
       
   123         attribute CSSCharsetRuleConstructor CSSCharsetRule;
       
   124         attribute CSSFontFaceRuleConstructor CSSFontFaceRule;
       
   125         attribute CSSImportRuleConstructor CSSImportRule;
       
   126         attribute CSSMediaRuleConstructor CSSMediaRule;
       
   127         attribute CSSPageRuleConstructor CSSPageRule;
       
   128         attribute CSSStyleRuleConstructor CSSStyleRule;
       
   129 
       
   130         attribute CSSStyleDeclarationConstructor CSSStyleDeclaration;
       
   131         attribute MediaListConstructor MediaList;
       
   132         attribute CounterConstructor Counter;
       
   133         attribute CSSRuleListConstructor CSSRuleList;
       
   134         attribute RectConstructor Rect;
       
   135 
       
   136         // FIXME: Implement the commented-out global constructors for interfaces listed in DOM Level 3 Core specification.
       
   137 //        attribute DOMExceptionConstructor DOMException;
       
   138 //        attribute DOMStringListConstructor DOMStringList;
       
   139 //        attribute NameListConstructor NameList;
       
   140 //        attribute DOMImplementationListConstructor DOMImplementationList;
       
   141 //        attribute DOMImplementationSourceConstructor DOMImplementationSource;
       
   142         attribute DOMImplementationConstructor DOMImplementation;
       
   143         attribute DocumentFragmentConstructor DocumentFragment;
       
   144         attribute DocumentConstructor Document;
       
   145         attribute NodeConstructor Node;
       
   146         attribute NodeListConstructor NodeList;
       
   147         attribute NamedNodeMapConstructor NamedNodeMap;
       
   148         attribute CharacterDataConstructor CharacterData;
       
   149         attribute AttrConstructor Attr;
       
   150         attribute ElementConstructor Element;
       
   151         attribute TextConstructor Text;
       
   152         attribute CommentConstructor Comment;
       
   153 //        attribute TypeInfoConstructor TypeInfo;
       
   154 //        attribute UserDataHandlerConstructor UserDataHandler;
       
   155 //        attribute DOMErrorConstructor DOMError;
       
   156 //        attribute DOMErrorHandlerConstructor DOMErrorHandler
       
   157 //        attribute DOMLocatorConstructor DOMLocator;
       
   158 //        attribute DOMConfigurationConstructor DOMConfiguration;
       
   159         attribute CDATASectionConstructor CDATASection;
       
   160         attribute DocumentTypeConstructor DocumentType;
       
   161         attribute NotationConstructor Notation;
       
   162         attribute EntityConstructor Entity;
       
   163         attribute EntityReferenceConstructor EntityReference;
       
   164         attribute ProcessingInstructionConstructor ProcessingInstruction;
       
   165 
       
   166         attribute HTMLDocumentConstructor HTMLDocument;
       
   167 
       
   168         attribute HTMLElementConstructor HTMLElement;
       
   169         attribute HTMLAnchorElementConstructor HTMLAnchorElement;
       
   170         attribute HTMLAppletElementConstructor HTMLAppletElement;
       
   171         attribute HTMLAreaElementConstructor HTMLAreaElement;
       
   172         attribute HTMLBRElementConstructor HTMLBRElement;
       
   173         attribute HTMLBaseElementConstructor HTMLBaseElement;
       
   174         attribute HTMLBaseFontElementConstructor HTMLBaseFontElement;
       
   175         attribute HTMLBlockquoteElementConstructor HTMLBlockquoteElement;
       
   176         attribute HTMLBodyElementConstructor HTMLBodyElement;
       
   177         attribute HTMLButtonElementConstructor HTMLButtonElement;
       
   178         attribute HTMLCanvasElementConstructor HTMLCanvasElement;
       
   179         attribute HTMLDListElementConstructor HTMLDListElement;
       
   180         attribute HTMLDirectoryElementConstructor HTMLDirectoryElement;
       
   181         attribute HTMLDivElementConstructor HTMLDivElement;
       
   182         attribute HTMLEmbedElementConstructor HTMLEmbedElement;
       
   183         attribute HTMLFieldSetElementConstructor HTMLFieldSetElement;
       
   184         attribute HTMLFontElementConstructor HTMLFontElement;
       
   185         attribute HTMLFormElementConstructor HTMLFormElement;
       
   186         attribute HTMLFrameElementConstructor HTMLFrameElement;
       
   187         attribute HTMLFrameSetElementConstructor HTMLFrameSetElement;
       
   188         attribute HTMLHRElementConstructor HTMLHRElement;
       
   189         attribute HTMLHeadElementConstructor HTMLHeadElement;
       
   190         attribute HTMLHeadingElementConstructor HTMLHeadingElement;
       
   191         attribute HTMLHtmlElementConstructor HTMLHtmlElement;
       
   192         attribute HTMLIFrameElementConstructor HTMLIFrameElement;
       
   193         attribute HTMLImageElementConstructor HTMLImageElement;
       
   194         attribute HTMLInputElementConstructor HTMLInputElement;
       
   195         attribute HTMLIsIndexElementConstructor HTMLIsIndexElement;
       
   196         attribute HTMLLIElementConstructor HTMLLIElement;
       
   197         attribute HTMLLabelElementConstructor HTMLLabelElement;
       
   198         attribute HTMLLegendElementConstructor HTMLLegendElement;
       
   199         attribute HTMLLinkElementConstructor HTMLLinkElement;
       
   200         attribute HTMLMapElementConstructor HTMLMapElement;
       
   201         attribute HTMLMarqueeElementConstructor HTMLMarqueeElement;
       
   202         attribute HTMLMenuElementConstructor HTMLMenuElement;
       
   203         attribute HTMLMetaElementConstructor HTMLMetaElement;
       
   204         attribute HTMLModElementConstructor HTMLModElement;
       
   205         attribute HTMLOListElementConstructor HTMLOListElement;
       
   206         attribute HTMLObjectElementConstructor HTMLObjectElement;
       
   207         attribute HTMLOptGroupElementConstructor HTMLOptGroupElement;
       
   208         attribute HTMLOptionElementConstructor HTMLOptionElement;
       
   209         attribute HTMLParagraphElementConstructor HTMLParagraphElement;
       
   210         attribute HTMLParamElementConstructor HTMLParamElement;
       
   211         attribute HTMLPreElementConstructor HTMLPreElement;
       
   212         attribute HTMLQuoteElementConstructor HTMLQuoteElement;
       
   213         attribute HTMLScriptElementConstructor HTMLScriptElement;
       
   214         attribute HTMLSelectElementConstructor HTMLSelectElement;
       
   215         attribute HTMLStyleElementConstructor HTMLStyleElement;
       
   216         attribute HTMLTableCaptionElementConstructor HTMLTableCaptionElement;
       
   217         attribute HTMLTableCellElementConstructor HTMLTableCellElement;
       
   218         attribute HTMLTableColElementConstructor HTMLTableColElement;
       
   219         attribute HTMLTableElementConstructor HTMLTableElement;
       
   220         attribute HTMLTableRowElementConstructor HTMLTableRowElement;
       
   221         attribute HTMLTableSectionElementConstructor HTMLTableSectionElement;
       
   222         attribute HTMLTextAreaElementConstructor HTMLTextAreaElement;
       
   223         attribute HTMLTitleElementConstructor HTMLTitleElement;
       
   224         attribute HTMLUListElementConstructor HTMLUListElement;
       
   225 
       
   226         attribute EventConstructor Event;
       
   227         attribute MutationEventConstructor MutationEvent;
       
   228 
       
   229         attribute NodeFilterConstructor NodeFilter;
       
   230         attribute RangeConstructor Range;
       
   231         attribute RangeExceptionConstructor RangeException;
       
   232 
       
   233         // Mozilla has a separate XMLDocument object for XML documents. 
       
   234         // We just use Document for this.
       
   235         attribute DocumentConstructor XMLDocument;
       
   236 
       
   237         attribute DOMParserConstructor DOMParser;
       
   238         attribute XMLSerializerConstructor XMLSerializer;
       
   239 
       
   240 #if ENABLE_XPATH
       
   241         attribute XPathEvaluatorConstructor XPathEvaluator;
       
   242         attribute XPathResultConstructor XPathResult;
       
   243 #endif
       
   244 #endif // defined(LANGUAGE_JAVASCRIPT)
       
   245     };
       
   246 
       
   247 }