WebCore/generated/JSWebGLProgram.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 "JSWebGLProgram.h"
       
    26 
       
    27 #include "WebGLProgram.h"
       
    28 #include <wtf/GetPtr.h>
       
    29 
       
    30 using namespace JSC;
       
    31 
       
    32 namespace WebCore {
       
    33 
       
    34 ASSERT_CLASS_FITS_IN_CELL(JSWebGLProgram);
       
    35 
       
    36 /* Hash table for prototype */
       
    37 #if ENABLE(JIT)
       
    38 #define THUNK_GENERATOR(generator) , generator
       
    39 #else
       
    40 #define THUNK_GENERATOR(generator)
       
    41 #endif
       
    42 
       
    43 static const HashTableValue JSWebGLProgramPrototypeTableValues[1] =
       
    44 {
       
    45     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    46 };
       
    47 
       
    48 #undef THUNK_GENERATOR
       
    49 static JSC_CONST_HASHTABLE HashTable JSWebGLProgramPrototypeTable = { 1, 0, JSWebGLProgramPrototypeTableValues, 0 };
       
    50 const ClassInfo JSWebGLProgramPrototype::s_info = { "WebGLProgramPrototype", 0, &JSWebGLProgramPrototypeTable, 0 };
       
    51 
       
    52 JSObject* JSWebGLProgramPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
    53 {
       
    54     return getDOMPrototype<JSWebGLProgram>(exec, globalObject);
       
    55 }
       
    56 
       
    57 const ClassInfo JSWebGLProgram::s_info = { "WebGLProgram", 0, 0, 0 };
       
    58 
       
    59 JSWebGLProgram::JSWebGLProgram(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebGLProgram> impl)
       
    60     : DOMObjectWithGlobalPointer(structure, globalObject)
       
    61     , m_impl(impl)
       
    62 {
       
    63 }
       
    64 
       
    65 JSWebGLProgram::~JSWebGLProgram()
       
    66 {
       
    67     forgetDOMObject(this, impl());
       
    68 }
       
    69 
       
    70 JSObject* JSWebGLProgram::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
    71 {
       
    72     return new (exec) JSWebGLProgramPrototype(globalObject, JSWebGLProgramPrototype::createStructure(globalObject->objectPrototype()));
       
    73 }
       
    74 
       
    75 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLProgram* object)
       
    76 {
       
    77     return getDOMObjectWrapper<JSWebGLProgram>(exec, globalObject, object);
       
    78 }
       
    79 WebGLProgram* toWebGLProgram(JSC::JSValue value)
       
    80 {
       
    81     return value.inherits(&JSWebGLProgram::s_info) ? static_cast<JSWebGLProgram*>(asObject(value))->impl() : 0;
       
    82 }
       
    83 
       
    84 }
       
    85 
       
    86 #endif // ENABLE(3D_CANVAS)