tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSWebKitAnimation.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 JSWebKitAnimation_h
22 #define JSWebKitAnimation_h
23
24 #include "JSDOMBinding.h"
25 #include "WebKitAnimation.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
29
30 namespace WebCore {
31
32 class JSWebKitAnimation : public JSDOMWrapper {
33 public:
34     typedef JSDOMWrapper Base;
35     static JSWebKitAnimation* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitAnimation> impl)
36     {
37         JSWebKitAnimation* ptr = new (JSC::allocateCell<JSWebKitAnimation>(globalObject->globalData().heap)) JSWebKitAnimation(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 void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
46     static const JSC::ClassInfo s_info;
47
48     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
49     {
50         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
51     }
52
53     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
54
55     // Custom attributes
56     JSC::JSValue iterationCount(JSC::ExecState*) const;
57     WebKitAnimation* impl() const { return m_impl; }
58     void releaseImpl() { m_impl->deref(); m_impl = 0; }
59
60 private:
61     WebKitAnimation* m_impl;
62 protected:
63     JSWebKitAnimation(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<WebKitAnimation>);
64     void finishCreation(JSC::JSGlobalData&);
65     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
66 };
67
68 class JSWebKitAnimationOwner : public JSC::WeakHandleOwner {
69     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
70     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
71 };
72
73 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, WebKitAnimation*)
74 {
75     DEFINE_STATIC_LOCAL(JSWebKitAnimationOwner, jsWebKitAnimationOwner, ());
76     return &jsWebKitAnimationOwner;
77 }
78
79 inline void* wrapperContext(DOMWrapperWorld* world, WebKitAnimation*)
80 {
81     return world;
82 }
83
84 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WebKitAnimation*);
85 WebKitAnimation* toWebKitAnimation(JSC::JSValue);
86
87 class JSWebKitAnimationPrototype : public JSC::JSNonFinalObject {
88 public:
89     typedef JSC::JSNonFinalObject Base;
90     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
91     static JSWebKitAnimationPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
92     {
93         JSWebKitAnimationPrototype* ptr = new (JSC::allocateCell<JSWebKitAnimationPrototype>(globalData.heap)) JSWebKitAnimationPrototype(globalData, globalObject, structure);
94         ptr->finishCreation(globalData);
95         return ptr;
96     }
97
98     static const JSC::ClassInfo s_info;
99     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
100     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
101     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
102     {
103         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
104     }
105
106 private:
107     JSWebKitAnimationPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
108 protected:
109     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
110 };
111
112 class JSWebKitAnimationConstructor : public DOMConstructorObject {
113 private:
114     JSWebKitAnimationConstructor(JSC::Structure*, JSDOMGlobalObject*);
115     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
116
117 public:
118     typedef DOMConstructorObject Base;
119     static JSWebKitAnimationConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
120     {
121         JSWebKitAnimationConstructor* ptr = new (JSC::allocateCell<JSWebKitAnimationConstructor>(*exec->heap())) JSWebKitAnimationConstructor(structure, globalObject);
122         ptr->finishCreation(exec, globalObject);
123         return ptr;
124     }
125
126     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
127     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
128     static const JSC::ClassInfo s_info;
129     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
130     {
131         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
132     }
133 protected:
134     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
135 };
136
137 // Functions
138
139 JSC::EncodedJSValue JSC_HOST_CALL jsWebKitAnimationPrototypeFunctionPlay(JSC::ExecState*);
140 JSC::EncodedJSValue JSC_HOST_CALL jsWebKitAnimationPrototypeFunctionPause(JSC::ExecState*);
141 // Attributes
142
143 JSC::JSValue jsWebKitAnimationName(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
144 JSC::JSValue jsWebKitAnimationDuration(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
145 JSC::JSValue jsWebKitAnimationElapsedTime(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
146 void setJSWebKitAnimationElapsedTime(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
147 JSC::JSValue jsWebKitAnimationDelay(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
148 JSC::JSValue jsWebKitAnimationIterationCount(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
149 JSC::JSValue jsWebKitAnimationPaused(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
150 JSC::JSValue jsWebKitAnimationEnded(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
151 JSC::JSValue jsWebKitAnimationDirection(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
152 JSC::JSValue jsWebKitAnimationFillMode(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
153 JSC::JSValue jsWebKitAnimationConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
154 // Constants
155
156 JSC::JSValue jsWebKitAnimationDIRECTION_NORMAL(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
157 JSC::JSValue jsWebKitAnimationDIRECTION_ALTERNATE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
158 JSC::JSValue jsWebKitAnimationFILL_NONE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
159 JSC::JSValue jsWebKitAnimationFILL_BACKWARDS(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
160 JSC::JSValue jsWebKitAnimationFILL_FORWARDS(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
161 JSC::JSValue jsWebKitAnimationFILL_BOTH(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
162
163 } // namespace WebCore
164
165 #endif