WebCore/generated/JSInt8Array.h
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 #ifndef JSInt8Array_h
       
    22 #define JSInt8Array_h
       
    23 
       
    24 #if ENABLE(3D_CANVAS)
       
    25 
       
    26 #include "Int8Array.h"
       
    27 #include "JSArrayBufferView.h"
       
    28 #include <runtime/JSObjectWithGlobalObject.h>
       
    29 
       
    30 namespace WebCore {
       
    31 
       
    32 class Int8Array;
       
    33 
       
    34 class JSInt8Array : public JSArrayBufferView {
       
    35     typedef JSArrayBufferView Base;
       
    36 public:
       
    37     JSInt8Array(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Int8Array>);
       
    38     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
       
    39     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
       
    40     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
       
    41     virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
       
    42     virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
       
    43     virtual void put(JSC::ExecState*, unsigned propertyName, JSC::JSValue);
       
    44     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    45     static const JSC::ClassInfo s_info;
       
    46 
       
    47     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    48     {
       
    49         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    50     }
       
    51 
       
    52     virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
       
    53     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
       
    54 
       
    55     // Custom functions
       
    56     JSC::JSValue set(JSC::ExecState*);
       
    57     Int8Array* impl() const
       
    58     {
       
    59         return static_cast<Int8Array*>(Base::impl());
       
    60     }
       
    61 protected:
       
    62     static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    63     JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);
       
    64     void indexSetter(JSC::ExecState*, unsigned index, JSC::JSValue);
       
    65 };
       
    66 
       
    67 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Int8Array*);
       
    68 Int8Array* toInt8Array(JSC::JSValue);
       
    69 
       
    70 class JSInt8ArrayPrototype : public JSC::JSObjectWithGlobalObject {
       
    71     typedef JSC::JSObjectWithGlobalObject Base;
       
    72 public:
       
    73     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
       
    74     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    75     static const JSC::ClassInfo s_info;
       
    76     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    77     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    78     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    79     {
       
    80         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    81     }
       
    82     JSInt8ArrayPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
       
    83 protected:
       
    84     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    85 };
       
    86 
       
    87 class JSInt8ArrayConstructor : public DOMConstructorObject {
       
    88 public:
       
    89     JSInt8ArrayConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    90 
       
    91     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    92     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    93     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    94     static const JSC::ClassInfo s_info;
       
    95     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    96     {
       
    97         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    98     }
       
    99 protected:
       
   100     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
   101     static JSC::EncodedJSValue JSC_HOST_CALL constructJSInt8Array(JSC::ExecState*);
       
   102     virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
       
   103 };
       
   104 
       
   105 // Functions
       
   106 
       
   107 JSC::EncodedJSValue JSC_HOST_CALL jsInt8ArrayPrototypeFunctionSet(JSC::ExecState*);
       
   108 // Attributes
       
   109 
       
   110 JSC::JSValue jsInt8ArrayConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   111 // Constants
       
   112 
       
   113 JSC::JSValue jsInt8ArrayBYTES_PER_ELEMENT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   114 
       
   115 } // namespace WebCore
       
   116 
       
   117 #endif // ENABLE(3D_CANVAS)
       
   118 
       
   119 #endif