WebCore/generated/JSWebGLActiveInfo.cpp
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 #include "config.h"
       
    22 
       
    23 #if ENABLE(3D_CANVAS)
       
    24 
       
    25 #include "JSWebGLActiveInfo.h"
       
    26 
       
    27 #include "KURL.h"
       
    28 #include "WebGLActiveInfo.h"
       
    29 #include <runtime/JSNumberCell.h>
       
    30 #include <runtime/JSString.h>
       
    31 #include <wtf/GetPtr.h>
       
    32 
       
    33 using namespace JSC;
       
    34 
       
    35 namespace WebCore {
       
    36 
       
    37 ASSERT_CLASS_FITS_IN_CELL(JSWebGLActiveInfo);
       
    38 
       
    39 /* Hash table */
       
    40 #if ENABLE(JIT)
       
    41 #define THUNK_GENERATOR(generator) , generator
       
    42 #else
       
    43 #define THUNK_GENERATOR(generator)
       
    44 #endif
       
    45 
       
    46 static const HashTableValue JSWebGLActiveInfoTableValues[4] =
       
    47 {
       
    48     { "size", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebGLActiveInfoSize), (intptr_t)0 THUNK_GENERATOR(0) },
       
    49     { "type", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebGLActiveInfoType), (intptr_t)0 THUNK_GENERATOR(0) },
       
    50     { "name", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebGLActiveInfoName), (intptr_t)0 THUNK_GENERATOR(0) },
       
    51     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    52 };
       
    53 
       
    54 #undef THUNK_GENERATOR
       
    55 static JSC_CONST_HASHTABLE HashTable JSWebGLActiveInfoTable = { 8, 7, JSWebGLActiveInfoTableValues, 0 };
       
    56 /* Hash table for prototype */
       
    57 #if ENABLE(JIT)
       
    58 #define THUNK_GENERATOR(generator) , generator
       
    59 #else
       
    60 #define THUNK_GENERATOR(generator)
       
    61 #endif
       
    62 
       
    63 static const HashTableValue JSWebGLActiveInfoPrototypeTableValues[1] =
       
    64 {
       
    65     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    66 };
       
    67 
       
    68 #undef THUNK_GENERATOR
       
    69 static JSC_CONST_HASHTABLE HashTable JSWebGLActiveInfoPrototypeTable = { 1, 0, JSWebGLActiveInfoPrototypeTableValues, 0 };
       
    70 const ClassInfo JSWebGLActiveInfoPrototype::s_info = { "WebGLActiveInfoPrototype", 0, &JSWebGLActiveInfoPrototypeTable, 0 };
       
    71 
       
    72 JSObject* JSWebGLActiveInfoPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
    73 {
       
    74     return getDOMPrototype<JSWebGLActiveInfo>(exec, globalObject);
       
    75 }
       
    76 
       
    77 const ClassInfo JSWebGLActiveInfo::s_info = { "WebGLActiveInfo", 0, &JSWebGLActiveInfoTable, 0 };
       
    78 
       
    79 JSWebGLActiveInfo::JSWebGLActiveInfo(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebGLActiveInfo> impl)
       
    80     : DOMObjectWithGlobalPointer(structure, globalObject)
       
    81     , m_impl(impl)
       
    82 {
       
    83 }
       
    84 
       
    85 JSWebGLActiveInfo::~JSWebGLActiveInfo()
       
    86 {
       
    87     forgetDOMObject(this, impl());
       
    88 }
       
    89 
       
    90 JSObject* JSWebGLActiveInfo::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
    91 {
       
    92     return new (exec) JSWebGLActiveInfoPrototype(globalObject, JSWebGLActiveInfoPrototype::createStructure(globalObject->objectPrototype()));
       
    93 }
       
    94 
       
    95 bool JSWebGLActiveInfo::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    96 {
       
    97     return getStaticValueSlot<JSWebGLActiveInfo, Base>(exec, &JSWebGLActiveInfoTable, this, propertyName, slot);
       
    98 }
       
    99 
       
   100 bool JSWebGLActiveInfo::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   101 {
       
   102     return getStaticValueDescriptor<JSWebGLActiveInfo, Base>(exec, &JSWebGLActiveInfoTable, this, propertyName, descriptor);
       
   103 }
       
   104 
       
   105 JSValue jsWebGLActiveInfoSize(ExecState* exec, JSValue slotBase, const Identifier&)
       
   106 {
       
   107     JSWebGLActiveInfo* castedThis = static_cast<JSWebGLActiveInfo*>(asObject(slotBase));
       
   108     UNUSED_PARAM(exec);
       
   109     WebGLActiveInfo* imp = static_cast<WebGLActiveInfo*>(castedThis->impl());
       
   110     JSValue result = jsNumber(exec, imp->size());
       
   111     return result;
       
   112 }
       
   113 
       
   114 JSValue jsWebGLActiveInfoType(ExecState* exec, JSValue slotBase, const Identifier&)
       
   115 {
       
   116     JSWebGLActiveInfo* castedThis = static_cast<JSWebGLActiveInfo*>(asObject(slotBase));
       
   117     UNUSED_PARAM(exec);
       
   118     WebGLActiveInfo* imp = static_cast<WebGLActiveInfo*>(castedThis->impl());
       
   119     JSValue result = jsNumber(exec, imp->type());
       
   120     return result;
       
   121 }
       
   122 
       
   123 JSValue jsWebGLActiveInfoName(ExecState* exec, JSValue slotBase, const Identifier&)
       
   124 {
       
   125     JSWebGLActiveInfo* castedThis = static_cast<JSWebGLActiveInfo*>(asObject(slotBase));
       
   126     UNUSED_PARAM(exec);
       
   127     WebGLActiveInfo* imp = static_cast<WebGLActiveInfo*>(castedThis->impl());
       
   128     JSValue result = jsString(exec, imp->name());
       
   129     return result;
       
   130 }
       
   131 
       
   132 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLActiveInfo* object)
       
   133 {
       
   134     return getDOMObjectWrapper<JSWebGLActiveInfo>(exec, globalObject, object);
       
   135 }
       
   136 WebGLActiveInfo* toWebGLActiveInfo(JSC::JSValue value)
       
   137 {
       
   138     return value.inherits(&JSWebGLActiveInfo::s_info) ? static_cast<JSWebGLActiveInfo*>(asObject(value))->impl() : 0;
       
   139 }
       
   140 
       
   141 }
       
   142 
       
   143 #endif // ENABLE(3D_CANVAS)