tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSNodeFilter.h
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 JSNodeFilter_h
22 #define JSNodeFilter_h
23
24 #include "JSDOMBinding.h"
25 #include "NodeFilter.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
29
30 namespace WebCore {
31
32 class JSNodeFilter : public JSDOMWrapper {
33 public:
34     typedef JSDOMWrapper Base;
35     static JSNodeFilter* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<NodeFilter> impl)
36     {
37         JSNodeFilter* ptr = new (JSC::allocateCell<JSNodeFilter>(globalObject->globalData().heap)) JSNodeFilter(structure, globalObject, impl);
38         ptr->finishCreation(globalObject->globalData());
39         return ptr;
40     }
41
42     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
43     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
44     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
45     static const JSC::ClassInfo s_info;
46
47     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
48     {
49         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
50     }
51
52     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
53     static void visitChildren(JSCell*, JSC::SlotVisitor&);
54
55     NodeFilter* impl() const { return m_impl; }
56     void releaseImpl() { m_impl->deref(); m_impl = 0; }
57
58 private:
59     NodeFilter* m_impl;
60 protected:
61     JSNodeFilter(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<NodeFilter>);
62     void finishCreation(JSC::JSGlobalData&);
63     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
64 };
65
66 class JSNodeFilterOwner : public JSC::WeakHandleOwner {
67     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
68     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
69 };
70
71 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, NodeFilter*)
72 {
73     DEFINE_STATIC_LOCAL(JSNodeFilterOwner, jsNodeFilterOwner, ());
74     return &jsNodeFilterOwner;
75 }
76
77 inline void* wrapperContext(DOMWrapperWorld* world, NodeFilter*)
78 {
79     return world;
80 }
81
82 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, NodeFilter*);
83 PassRefPtr<NodeFilter> toNodeFilter(JSC::JSGlobalData&, JSC::JSValue);
84
85 class JSNodeFilterPrototype : public JSC::JSNonFinalObject {
86 public:
87     typedef JSC::JSNonFinalObject Base;
88     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
89     static JSNodeFilterPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
90     {
91         JSNodeFilterPrototype* ptr = new (JSC::allocateCell<JSNodeFilterPrototype>(globalData.heap)) JSNodeFilterPrototype(globalData, globalObject, structure);
92         ptr->finishCreation(globalData);
93         return ptr;
94     }
95
96     static const JSC::ClassInfo s_info;
97     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
98     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
99     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
100     {
101         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
102     }
103
104 private:
105     JSNodeFilterPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
106 protected:
107     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
108 };
109
110 class JSNodeFilterConstructor : public DOMConstructorObject {
111 private:
112     JSNodeFilterConstructor(JSC::Structure*, JSDOMGlobalObject*);
113     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
114
115 public:
116     typedef DOMConstructorObject Base;
117     static JSNodeFilterConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
118     {
119         JSNodeFilterConstructor* ptr = new (JSC::allocateCell<JSNodeFilterConstructor>(*exec->heap())) JSNodeFilterConstructor(structure, globalObject);
120         ptr->finishCreation(exec, globalObject);
121         return ptr;
122     }
123
124     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
125     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
126     static const JSC::ClassInfo s_info;
127     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
128     {
129         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
130     }
131 protected:
132     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
133 };
134
135 // Functions
136
137 JSC::EncodedJSValue JSC_HOST_CALL jsNodeFilterPrototypeFunctionAcceptNode(JSC::ExecState*);
138 // Attributes
139
140 JSC::JSValue jsNodeFilterConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
141 // Constants
142
143 JSC::JSValue jsNodeFilterFILTER_ACCEPT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
144 JSC::JSValue jsNodeFilterFILTER_REJECT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
145 JSC::JSValue jsNodeFilterFILTER_SKIP(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
146 JSC::JSValue jsNodeFilterSHOW_ALL(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
147 JSC::JSValue jsNodeFilterSHOW_ELEMENT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
148 JSC::JSValue jsNodeFilterSHOW_ATTRIBUTE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
149 JSC::JSValue jsNodeFilterSHOW_TEXT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
150 JSC::JSValue jsNodeFilterSHOW_CDATA_SECTION(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
151 JSC::JSValue jsNodeFilterSHOW_ENTITY_REFERENCE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
152 JSC::JSValue jsNodeFilterSHOW_ENTITY(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
153 JSC::JSValue jsNodeFilterSHOW_PROCESSING_INSTRUCTION(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
154 JSC::JSValue jsNodeFilterSHOW_COMMENT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
155 JSC::JSValue jsNodeFilterSHOW_DOCUMENT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
156 JSC::JSValue jsNodeFilterSHOW_DOCUMENT_TYPE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
157 JSC::JSValue jsNodeFilterSHOW_DOCUMENT_FRAGMENT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
158 JSC::JSValue jsNodeFilterSHOW_NOTATION(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
159
160 } // namespace WebCore
161
162 #endif