tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSBarInfo.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 JSBarInfo_h
22 #define JSBarInfo_h
23
24 #include "BarInfo.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
29
30 namespace WebCore {
31
32 class JSBarInfo : public JSDOMWrapper {
33 public:
34     typedef JSDOMWrapper Base;
35     static JSBarInfo* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<BarInfo> impl)
36     {
37         JSBarInfo* ptr = new (JSC::allocateCell<JSBarInfo>(globalObject->globalData().heap)) JSBarInfo(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     BarInfo* impl() const { return m_impl; }
53     void releaseImpl() { m_impl->deref(); m_impl = 0; }
54
55 private:
56     BarInfo* m_impl;
57 protected:
58     JSBarInfo(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<BarInfo>);
59     void finishCreation(JSC::JSGlobalData&);
60     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
61 };
62
63 class JSBarInfoOwner : public JSC::WeakHandleOwner {
64     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
65     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
66 };
67
68 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, BarInfo*)
69 {
70     DEFINE_STATIC_LOCAL(JSBarInfoOwner, jsBarInfoOwner, ());
71     return &jsBarInfoOwner;
72 }
73
74 inline void* wrapperContext(DOMWrapperWorld* world, BarInfo*)
75 {
76     return world;
77 }
78
79 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, BarInfo*);
80 BarInfo* toBarInfo(JSC::JSValue);
81
82 class JSBarInfoPrototype : public JSC::JSNonFinalObject {
83 public:
84     typedef JSC::JSNonFinalObject Base;
85     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
86     static JSBarInfoPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
87     {
88         JSBarInfoPrototype* ptr = new (JSC::allocateCell<JSBarInfoPrototype>(globalData.heap)) JSBarInfoPrototype(globalData, globalObject, structure);
89         ptr->finishCreation(globalData);
90         return ptr;
91     }
92
93     static const JSC::ClassInfo s_info;
94     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
95     {
96         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
97     }
98
99 private:
100     JSBarInfoPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
101 protected:
102     static const unsigned StructureFlags = Base::StructureFlags;
103 };
104
105 // Attributes
106
107 JSC::JSValue jsBarInfoVisible(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
108
109 } // namespace WebCore
110
111 #endif