WebCore/generated/JSNode.h
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     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 JSNode_h
       
    22 #define JSNode_h
       
    23 
       
    24 #include "JSDOMBinding.h"
       
    25 #include <runtime/JSGlobalObject.h>
       
    26 #include <runtime/JSObjectWithGlobalObject.h>
       
    27 #include <runtime/Lookup.h>
       
    28 #include <runtime/ObjectPrototype.h>
       
    29 #include <wtf/AlwaysInline.h>
       
    30 
       
    31 namespace WebCore {
       
    32 
       
    33 class Node;
       
    34 
       
    35 class JSNode : public DOMObjectWithGlobalPointer {
       
    36     typedef DOMObjectWithGlobalPointer Base;
       
    37 public:
       
    38     JSNode(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Node>);
       
    39     virtual ~JSNode();
       
    40     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
       
    41     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
       
    42     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
       
    43     virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
       
    44     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    45     static const JSC::ClassInfo s_info;
       
    46 
       
    47     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    48     {
       
    49         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    50     }
       
    51 
       
    52     virtual void markChildren(JSC::MarkStack&);
       
    53 
       
    54     virtual void pushEventHandlerScope(JSC::ExecState*, JSC::ScopeChain&) const;
       
    55 
       
    56     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
       
    57 
       
    58     // Custom functions
       
    59     JSC::JSValue insertBefore(JSC::ExecState*);
       
    60     JSC::JSValue replaceChild(JSC::ExecState*);
       
    61     JSC::JSValue removeChild(JSC::ExecState*);
       
    62     JSC::JSValue appendChild(JSC::ExecState*);
       
    63     Node* impl() const { return m_impl.get(); }
       
    64 
       
    65 private:
       
    66     RefPtr<Node> m_impl;
       
    67 protected:
       
    68     static const unsigned StructureFlags = JSC::OverridesMarkChildren | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    69 };
       
    70 
       
    71 ALWAYS_INLINE bool JSNode::getOwnPropertySlot(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::PropertySlot& slot)
       
    72 {
       
    73     return JSC::getStaticValueSlot<JSNode, Base>(exec, s_info.staticPropHashTable, this, propertyName, slot);
       
    74 }
       
    75 
       
    76 ALWAYS_INLINE bool JSNode::getOwnPropertyDescriptor(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::PropertyDescriptor& descriptor)
       
    77 {
       
    78     return JSC::getStaticValueDescriptor<JSNode, Base>(exec, s_info.staticPropHashTable, this, propertyName, descriptor);
       
    79 }
       
    80 
       
    81 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Node*);
       
    82 Node* toNode(JSC::JSValue);
       
    83 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Node*);
       
    84 
       
    85 class JSNodePrototype : public JSC::JSObjectWithGlobalObject {
       
    86     typedef JSC::JSObjectWithGlobalObject Base;
       
    87 public:
       
    88     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
       
    89     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    90     static const JSC::ClassInfo s_info;
       
    91     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    92     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    93     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    94     {
       
    95         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    96     }
       
    97     JSNodePrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
       
    98 protected:
       
    99     static const unsigned StructureFlags = JSC::OverridesMarkChildren | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
   100 };
       
   101 
       
   102 // Functions
       
   103 
       
   104 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionInsertBefore(JSC::ExecState*);
       
   105 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionReplaceChild(JSC::ExecState*);
       
   106 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionRemoveChild(JSC::ExecState*);
       
   107 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionAppendChild(JSC::ExecState*);
       
   108 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionHasChildNodes(JSC::ExecState*);
       
   109 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionCloneNode(JSC::ExecState*);
       
   110 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionNormalize(JSC::ExecState*);
       
   111 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionIsSupported(JSC::ExecState*);
       
   112 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionHasAttributes(JSC::ExecState*);
       
   113 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionIsSameNode(JSC::ExecState*);
       
   114 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionIsEqualNode(JSC::ExecState*);
       
   115 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionLookupPrefix(JSC::ExecState*);
       
   116 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionIsDefaultNamespace(JSC::ExecState*);
       
   117 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionLookupNamespaceURI(JSC::ExecState*);
       
   118 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionCompareDocumentPosition(JSC::ExecState*);
       
   119 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionAddEventListener(JSC::ExecState*);
       
   120 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionRemoveEventListener(JSC::ExecState*);
       
   121 JSC::EncodedJSValue JSC_HOST_CALL jsNodePrototypeFunctionDispatchEvent(JSC::ExecState*);
       
   122 // Attributes
       
   123 
       
   124 JSC::JSValue jsNodeNodeName(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   125 JSC::JSValue jsNodeNodeValue(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   126 void setJSNodeNodeValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   127 JSC::JSValue jsNodeNodeType(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   128 JSC::JSValue jsNodeParentNode(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   129 JSC::JSValue jsNodeChildNodes(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   130 JSC::JSValue jsNodeFirstChild(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   131 JSC::JSValue jsNodeLastChild(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   132 JSC::JSValue jsNodePreviousSibling(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   133 JSC::JSValue jsNodeNextSibling(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   134 JSC::JSValue jsNodeAttributes(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   135 JSC::JSValue jsNodeOwnerDocument(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   136 JSC::JSValue jsNodeNamespaceURI(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   137 JSC::JSValue jsNodePrefix(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   138 void setJSNodePrefix(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   139 JSC::JSValue jsNodeLocalName(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   140 JSC::JSValue jsNodeBaseURI(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   141 JSC::JSValue jsNodeTextContent(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   142 void setJSNodeTextContent(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   143 JSC::JSValue jsNodeParentElement(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   144 JSC::JSValue jsNodeConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   145 // Constants
       
   146 
       
   147 JSC::JSValue jsNodeELEMENT_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   148 JSC::JSValue jsNodeATTRIBUTE_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   149 JSC::JSValue jsNodeTEXT_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   150 JSC::JSValue jsNodeCDATA_SECTION_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   151 JSC::JSValue jsNodeENTITY_REFERENCE_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   152 JSC::JSValue jsNodeENTITY_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   153 JSC::JSValue jsNodePROCESSING_INSTRUCTION_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   154 JSC::JSValue jsNodeCOMMENT_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   155 JSC::JSValue jsNodeDOCUMENT_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   156 JSC::JSValue jsNodeDOCUMENT_TYPE_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   157 JSC::JSValue jsNodeDOCUMENT_FRAGMENT_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   158 JSC::JSValue jsNodeNOTATION_NODE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   159 JSC::JSValue jsNodeDOCUMENT_POSITION_DISCONNECTED(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   160 JSC::JSValue jsNodeDOCUMENT_POSITION_PRECEDING(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   161 JSC::JSValue jsNodeDOCUMENT_POSITION_FOLLOWING(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   162 JSC::JSValue jsNodeDOCUMENT_POSITION_CONTAINS(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   163 JSC::JSValue jsNodeDOCUMENT_POSITION_CONTAINED_BY(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   164 JSC::JSValue jsNodeDOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   165 
       
   166 } // namespace WebCore
       
   167 
       
   168 #endif
       
   169 #include "JSNodeCustom.h"