/src/3rdparty/webkit/Source/WebCore/generated/JSWebGLUniformLocation.cpp

https://bitbucket.org/ultra_iter/qt-vtl · C++ · 167 lines · 113 code · 32 blank · 22 comment · 0 complexity · 703f7b483b66fd716a040aff4838e8b8 MD5 · raw file

  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. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #include "config.h"
  18. #if ENABLE(WEBGL)
  19. #include "JSWebGLUniformLocation.h"
  20. #include "WebGLUniformLocation.h"
  21. #include <wtf/GetPtr.h>
  22. using namespace JSC;
  23. namespace WebCore {
  24. ASSERT_CLASS_FITS_IN_CELL(JSWebGLUniformLocation);
  25. /* Hash table */
  26. #if ENABLE(JIT)
  27. #define THUNK_GENERATOR(generator) , generator
  28. #else
  29. #define THUNK_GENERATOR(generator)
  30. #endif
  31. static const HashTableValue JSWebGLUniformLocationTableValues[2] =
  32. {
  33. { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebGLUniformLocationConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
  34. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  35. };
  36. #undef THUNK_GENERATOR
  37. static JSC_CONST_HASHTABLE HashTable JSWebGLUniformLocationTable = { 2, 1, JSWebGLUniformLocationTableValues, 0 };
  38. /* Hash table for constructor */
  39. #if ENABLE(JIT)
  40. #define THUNK_GENERATOR(generator) , generator
  41. #else
  42. #define THUNK_GENERATOR(generator)
  43. #endif
  44. static const HashTableValue JSWebGLUniformLocationConstructorTableValues[1] =
  45. {
  46. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  47. };
  48. #undef THUNK_GENERATOR
  49. static JSC_CONST_HASHTABLE HashTable JSWebGLUniformLocationConstructorTable = { 1, 0, JSWebGLUniformLocationConstructorTableValues, 0 };
  50. class JSWebGLUniformLocationConstructor : public DOMConstructorObject {
  51. public:
  52. JSWebGLUniformLocationConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
  53. virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
  54. virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
  55. static const JSC::ClassInfo s_info;
  56. static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
  57. {
  58. return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
  59. }
  60. protected:
  61. static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
  62. };
  63. const ClassInfo JSWebGLUniformLocationConstructor::s_info = { "WebGLUniformLocationConstructor", &DOMConstructorObject::s_info, &JSWebGLUniformLocationConstructorTable, 0 };
  64. JSWebGLUniformLocationConstructor::JSWebGLUniformLocationConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
  65. : DOMConstructorObject(structure, globalObject)
  66. {
  67. ASSERT(inherits(&s_info));
  68. putDirect(exec->globalData(), exec->propertyNames().prototype, JSWebGLUniformLocationPrototype::self(exec, globalObject), DontDelete | ReadOnly);
  69. }
  70. bool JSWebGLUniformLocationConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  71. {
  72. return getStaticValueSlot<JSWebGLUniformLocationConstructor, JSDOMWrapper>(exec, &JSWebGLUniformLocationConstructorTable, this, propertyName, slot);
  73. }
  74. bool JSWebGLUniformLocationConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  75. {
  76. return getStaticValueDescriptor<JSWebGLUniformLocationConstructor, JSDOMWrapper>(exec, &JSWebGLUniformLocationConstructorTable, this, propertyName, descriptor);
  77. }
  78. /* Hash table for prototype */
  79. #if ENABLE(JIT)
  80. #define THUNK_GENERATOR(generator) , generator
  81. #else
  82. #define THUNK_GENERATOR(generator)
  83. #endif
  84. static const HashTableValue JSWebGLUniformLocationPrototypeTableValues[1] =
  85. {
  86. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  87. };
  88. #undef THUNK_GENERATOR
  89. static JSC_CONST_HASHTABLE HashTable JSWebGLUniformLocationPrototypeTable = { 1, 0, JSWebGLUniformLocationPrototypeTableValues, 0 };
  90. const ClassInfo JSWebGLUniformLocationPrototype::s_info = { "WebGLUniformLocationPrototype", &JSC::JSObjectWithGlobalObject::s_info, &JSWebGLUniformLocationPrototypeTable, 0 };
  91. JSObject* JSWebGLUniformLocationPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
  92. {
  93. return getDOMPrototype<JSWebGLUniformLocation>(exec, globalObject);
  94. }
  95. const ClassInfo JSWebGLUniformLocation::s_info = { "WebGLUniformLocation", &JSDOMWrapper::s_info, &JSWebGLUniformLocationTable, 0 };
  96. JSWebGLUniformLocation::JSWebGLUniformLocation(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebGLUniformLocation> impl)
  97. : JSDOMWrapper(structure, globalObject)
  98. , m_impl(impl)
  99. {
  100. ASSERT(inherits(&s_info));
  101. }
  102. JSObject* JSWebGLUniformLocation::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
  103. {
  104. return new (exec) JSWebGLUniformLocationPrototype(exec->globalData(), globalObject, JSWebGLUniformLocationPrototype::createStructure(globalObject->globalData(), globalObject->objectPrototype()));
  105. }
  106. bool JSWebGLUniformLocation::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  107. {
  108. return getStaticValueSlot<JSWebGLUniformLocation, Base>(exec, &JSWebGLUniformLocationTable, this, propertyName, slot);
  109. }
  110. bool JSWebGLUniformLocation::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  111. {
  112. return getStaticValueDescriptor<JSWebGLUniformLocation, Base>(exec, &JSWebGLUniformLocationTable, this, propertyName, descriptor);
  113. }
  114. JSValue jsWebGLUniformLocationConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
  115. {
  116. JSWebGLUniformLocation* domObject = static_cast<JSWebGLUniformLocation*>(asObject(slotBase));
  117. return JSWebGLUniformLocation::getConstructor(exec, domObject->globalObject());
  118. }
  119. JSValue JSWebGLUniformLocation::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
  120. {
  121. return getDOMConstructor<JSWebGLUniformLocationConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
  122. }
  123. JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLUniformLocation* impl)
  124. {
  125. return wrap<JSWebGLUniformLocation>(exec, globalObject, impl);
  126. }
  127. WebGLUniformLocation* toWebGLUniformLocation(JSC::JSValue value)
  128. {
  129. return value.inherits(&JSWebGLUniformLocation::s_info) ? static_cast<JSWebGLUniformLocation*>(asObject(value))->impl() : 0;
  130. }
  131. }
  132. #endif // ENABLE(WEBGL)