webengine/osswebengine/DerivedSources/WebCore/JSDocument.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2     This file is part of the WebKit open source project.
       
     3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
       
     4 
       
     5     This library is free software; you can redistribute it and/or
       
     6     modify it under the terms of the GNU Library General Public
       
     7     License as published by the Free Software Foundation; either
       
     8     version 2 of the License, or (at your option) any later version.
       
     9 
       
    10     This library is distributed in the hope that it will be useful,
       
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13     Library General Public License for more details.
       
    14 
       
    15     You should have received a copy of the GNU Library General Public License
       
    16     along with this library; see the file COPYING.LIB.  If not, write to
       
    17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    18     Boston, MA 02110-1301, USA.
       
    19 */
       
    20 
       
    21 #ifndef JSDocument_H
       
    22 #define JSDocument_H
       
    23 
       
    24 #include "JSEventTargetNode.h"
       
    25 
       
    26 namespace WebCore {
       
    27 
       
    28 class Document;
       
    29 
       
    30 class JSDocument : public JSEventTargetNode {
       
    31 public:
       
    32     JSDocument(KJS::ExecState*, Document*);
       
    33     virtual ~JSDocument();
       
    34     virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    35     KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
       
    36     virtual void put(KJS::ExecState*, const KJS::Identifier&, KJS::JSValue*, int attr = KJS::None);
       
    37     void putValueProperty(KJS::ExecState*, int, KJS::JSValue*, int attr);
       
    38     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    39     static const KJS::ClassInfo info;
       
    40 
       
    41     virtual void mark();
       
    42 
       
    43     static KJS::JSValue* getConstructor(KJS::ExecState*);
       
    44     enum {
       
    45         // Attributes
       
    46         DoctypeAttrNum, ImplementationAttrNum, DocumentElementAttrNum, InputEncodingAttrNum, 
       
    47         XMLEncodingAttrNum, XMLVersionAttrNum, XMLStandaloneAttrNum, DocumentURIAttrNum, 
       
    48         DefaultViewAttrNum, StyleSheetsAttrNum, URLAttrNum, CharsetAttrNum, 
       
    49         DefaultCharsetAttrNum, ReadyStateAttrNum, CharacterSetAttrNum, PreferredStylesheetSetAttrNum, 
       
    50         SelectedStylesheetSetAttrNum, 
       
    51 
       
    52         // The Constructor Attribute
       
    53         ConstructorAttrNum, 
       
    54 
       
    55         // Functions
       
    56         CreateElementFuncNum, CreateDocumentFragmentFuncNum, CreateTextNodeFuncNum, CreateCommentFuncNum, 
       
    57         CreateCDATASectionFuncNum, CreateProcessingInstructionFuncNum, CreateAttributeFuncNum, CreateEntityReferenceFuncNum, 
       
    58         GetElementsByTagNameFuncNum, ImportNodeFuncNum, CreateElementNSFuncNum, CreateAttributeNSFuncNum, 
       
    59         GetElementsByTagNameNSFuncNum, GetElementByIdFuncNum, AdoptNodeFuncNum, CreateEventFuncNum, 
       
    60         CreateRangeFuncNum, CreateNodeIteratorFuncNum, CreateTreeWalkerFuncNum, GetOverrideStyleFuncNum, 
       
    61         ExecCommandFuncNum, QueryCommandEnabledFuncNum, QueryCommandIndetermFuncNum, QueryCommandStateFuncNum, 
       
    62         QueryCommandSupportedFuncNum, QueryCommandValueFuncNum, ElementFromPointFuncNum
       
    63     };
       
    64 };
       
    65 
       
    66 KJS::JSValue* toJS(KJS::ExecState*, Document*);
       
    67 
       
    68 class JSDocumentPrototype : public KJS::JSObject {
       
    69 public:
       
    70     static KJS::JSObject* self(KJS::ExecState* exec);
       
    71     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    72     static const KJS::ClassInfo info;
       
    73     bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    74     JSDocumentPrototype(KJS::ExecState* exec)
       
    75         : KJS::JSObject(JSEventTargetNodePrototype::self(exec)) { }
       
    76 };
       
    77 
       
    78 class JSDocumentPrototypeFunction : public KJS::InternalFunctionImp {
       
    79 public:
       
    80     JSDocumentPrototypeFunction(KJS::ExecState* exec, int i, int len, const KJS::Identifier& name)
       
    81         : KJS::InternalFunctionImp(static_cast<KJS::FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)
       
    82         , id(i)
       
    83     {
       
    84         put(exec, exec->propertyNames().length, KJS::jsNumber(len), KJS::DontDelete|KJS::ReadOnly|KJS::DontEnum);
       
    85     }
       
    86     virtual KJS::JSValue* callAsFunction(KJS::ExecState*, KJS::JSObject*, const KJS::List&);
       
    87 
       
    88 private:
       
    89     int id;
       
    90 };
       
    91 
       
    92 } // namespace WebCore
       
    93 
       
    94 #endif