WebCore/generated/JSBarInfo.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 #include "JSBarInfo.h"
       
    23 
       
    24 #include "BarInfo.h"
       
    25 #include <wtf/GetPtr.h>
       
    26 
       
    27 using namespace JSC;
       
    28 
       
    29 namespace WebCore {
       
    30 
       
    31 ASSERT_CLASS_FITS_IN_CELL(JSBarInfo);
       
    32 
       
    33 /* Hash table */
       
    34 #if ENABLE(JIT)
       
    35 #define THUNK_GENERATOR(generator) , generator
       
    36 #else
       
    37 #define THUNK_GENERATOR(generator)
       
    38 #endif
       
    39 
       
    40 static const HashTableValue JSBarInfoTableValues[2] =
       
    41 {
       
    42     { "visible", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsBarInfoVisible), (intptr_t)0 THUNK_GENERATOR(0) },
       
    43     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    44 };
       
    45 
       
    46 #undef THUNK_GENERATOR
       
    47 static JSC_CONST_HASHTABLE HashTable JSBarInfoTable = { 2, 1, JSBarInfoTableValues, 0 };
       
    48 /* Hash table for prototype */
       
    49 #if ENABLE(JIT)
       
    50 #define THUNK_GENERATOR(generator) , generator
       
    51 #else
       
    52 #define THUNK_GENERATOR(generator)
       
    53 #endif
       
    54 
       
    55 static const HashTableValue JSBarInfoPrototypeTableValues[1] =
       
    56 {
       
    57     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    58 };
       
    59 
       
    60 #undef THUNK_GENERATOR
       
    61 static JSC_CONST_HASHTABLE HashTable JSBarInfoPrototypeTable = { 1, 0, JSBarInfoPrototypeTableValues, 0 };
       
    62 const ClassInfo JSBarInfoPrototype::s_info = { "BarInfoPrototype", 0, &JSBarInfoPrototypeTable, 0 };
       
    63 
       
    64 JSObject* JSBarInfoPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
    65 {
       
    66     return getDOMPrototype<JSBarInfo>(exec, globalObject);
       
    67 }
       
    68 
       
    69 const ClassInfo JSBarInfo::s_info = { "BarInfo", 0, &JSBarInfoTable, 0 };
       
    70 
       
    71 JSBarInfo::JSBarInfo(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<BarInfo> impl)
       
    72     : DOMObjectWithGlobalPointer(structure, globalObject)
       
    73     , m_impl(impl)
       
    74 {
       
    75 }
       
    76 
       
    77 JSBarInfo::~JSBarInfo()
       
    78 {
       
    79     forgetDOMObject(this, impl());
       
    80 }
       
    81 
       
    82 JSObject* JSBarInfo::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
    83 {
       
    84     return new (exec) JSBarInfoPrototype(globalObject, JSBarInfoPrototype::createStructure(globalObject->objectPrototype()));
       
    85 }
       
    86 
       
    87 bool JSBarInfo::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    88 {
       
    89     return getStaticValueSlot<JSBarInfo, Base>(exec, &JSBarInfoTable, this, propertyName, slot);
       
    90 }
       
    91 
       
    92 bool JSBarInfo::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
    93 {
       
    94     return getStaticValueDescriptor<JSBarInfo, Base>(exec, &JSBarInfoTable, this, propertyName, descriptor);
       
    95 }
       
    96 
       
    97 JSValue jsBarInfoVisible(ExecState* exec, JSValue slotBase, const Identifier&)
       
    98 {
       
    99     JSBarInfo* castedThis = static_cast<JSBarInfo*>(asObject(slotBase));
       
   100     UNUSED_PARAM(exec);
       
   101     BarInfo* imp = static_cast<BarInfo*>(castedThis->impl());
       
   102     JSValue result = jsBoolean(imp->visible());
       
   103     return result;
       
   104 }
       
   105 
       
   106 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, BarInfo* object)
       
   107 {
       
   108     return getDOMObjectWrapper<JSBarInfo>(exec, globalObject, object);
       
   109 }
       
   110 BarInfo* toBarInfo(JSC::JSValue value)
       
   111 {
       
   112     return value.inherits(&JSBarInfo::s_info) ? static_cast<JSBarInfo*>(asObject(value))->impl() : 0;
       
   113 }
       
   114 
       
   115 }