WebCore/generated/JSArrayBufferView.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 JSArrayBufferView_h
       
    22 #define JSArrayBufferView_h
       
    23 
       
    24 #if ENABLE(3D_CANVAS)
       
    25 
       
    26 #include "JSDOMBinding.h"
       
    27 #include <runtime/JSGlobalObject.h>
       
    28 #include <runtime/JSObjectWithGlobalObject.h>
       
    29 #include <runtime/ObjectPrototype.h>
       
    30 
       
    31 namespace WebCore {
       
    32 
       
    33 class ArrayBufferView;
       
    34 
       
    35 class JSArrayBufferView : public DOMObjectWithGlobalPointer {
       
    36     typedef DOMObjectWithGlobalPointer Base;
       
    37 public:
       
    38     JSArrayBufferView(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<ArrayBufferView>);
       
    39     virtual ~JSArrayBufferView();
       
    40     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
       
    41     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
       
    42     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
       
    43     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    44     static const JSC::ClassInfo s_info;
       
    45 
       
    46     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    47     {
       
    48         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    49     }
       
    50 
       
    51 
       
    52     // Custom functions
       
    53     JSC::JSValue slice(JSC::ExecState*);
       
    54     ArrayBufferView* impl() const { return m_impl.get(); }
       
    55 
       
    56 private:
       
    57     RefPtr<ArrayBufferView> m_impl;
       
    58 protected:
       
    59     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    60 };
       
    61 
       
    62 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, ArrayBufferView*);
       
    63 ArrayBufferView* toArrayBufferView(JSC::JSValue);
       
    64 
       
    65 class JSArrayBufferViewPrototype : public JSC::JSObjectWithGlobalObject {
       
    66     typedef JSC::JSObjectWithGlobalObject Base;
       
    67 public:
       
    68     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
       
    69     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    70     static const JSC::ClassInfo s_info;
       
    71     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    72     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    73     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    74     {
       
    75         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    76     }
       
    77     JSArrayBufferViewPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
       
    78 protected:
       
    79     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    80 };
       
    81 
       
    82 // Functions
       
    83 
       
    84 JSC::EncodedJSValue JSC_HOST_CALL jsArrayBufferViewPrototypeFunctionSlice(JSC::ExecState*);
       
    85 // Attributes
       
    86 
       
    87 JSC::JSValue jsArrayBufferViewBuffer(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
    88 JSC::JSValue jsArrayBufferViewByteOffset(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
    89 JSC::JSValue jsArrayBufferViewByteLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
    90 JSC::JSValue jsArrayBufferViewLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
    91 
       
    92 } // namespace WebCore
       
    93 
       
    94 #endif // ENABLE(3D_CANVAS)
       
    95 
       
    96 #endif