WebCore/generated/JSLocation.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 JSLocation_h
       
    22 #define JSLocation_h
       
    23 
       
    24 #include "JSDOMBinding.h"
       
    25 #include <runtime/JSGlobalObject.h>
       
    26 #include <runtime/JSObjectWithGlobalObject.h>
       
    27 #include <runtime/ObjectPrototype.h>
       
    28 
       
    29 namespace WebCore {
       
    30 
       
    31 class Location;
       
    32 
       
    33 class JSLocation : public DOMObjectWithGlobalPointer {
       
    34     typedef DOMObjectWithGlobalPointer Base;
       
    35 public:
       
    36     JSLocation(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Location>);
       
    37     virtual ~JSLocation();
       
    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     bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    42     bool getOwnPropertyDescriptorDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    43     virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
       
    44     bool putDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSC::PutPropertySlot&);
       
    45     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    46     static const JSC::ClassInfo s_info;
       
    47 
       
    48     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    49     {
       
    50         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    51     }
       
    52 
       
    53     virtual bool deleteProperty(JSC::ExecState*, const JSC::Identifier&);
       
    54     virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
       
    55     virtual void defineGetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction, unsigned attributes);
       
    56 
       
    57     // Custom attributes
       
    58     void setHref(JSC::ExecState*, JSC::JSValue);
       
    59     void setProtocol(JSC::ExecState*, JSC::JSValue);
       
    60     void setHost(JSC::ExecState*, JSC::JSValue);
       
    61     void setHostname(JSC::ExecState*, JSC::JSValue);
       
    62     void setPort(JSC::ExecState*, JSC::JSValue);
       
    63     void setPathname(JSC::ExecState*, JSC::JSValue);
       
    64     void setSearch(JSC::ExecState*, JSC::JSValue);
       
    65     void setHash(JSC::ExecState*, JSC::JSValue);
       
    66 
       
    67     // Custom functions
       
    68     JSC::JSValue assign(JSC::ExecState*);
       
    69     JSC::JSValue replace(JSC::ExecState*);
       
    70     JSC::JSValue reload(JSC::ExecState*);
       
    71     JSC::JSValue toString(JSC::ExecState*);
       
    72     Location* impl() const { return m_impl.get(); }
       
    73 
       
    74 private:
       
    75     RefPtr<Location> m_impl;
       
    76 protected:
       
    77     static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
    78 };
       
    79 
       
    80 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Location*);
       
    81 Location* toLocation(JSC::JSValue);
       
    82 
       
    83 class JSLocationPrototype : public JSC::JSObjectWithGlobalObject {
       
    84     typedef JSC::JSObjectWithGlobalObject Base;
       
    85 public:
       
    86     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
       
    87     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    88     static const JSC::ClassInfo s_info;
       
    89     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    90     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    91     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    92     {
       
    93         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    94     }
       
    95     virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
       
    96     bool putDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSC::PutPropertySlot&);
       
    97     virtual void defineGetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction, unsigned attributes);
       
    98     JSLocationPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }
       
    99 protected:
       
   100     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
       
   101 };
       
   102 
       
   103 // Functions
       
   104 
       
   105 JSC::EncodedJSValue JSC_HOST_CALL jsLocationPrototypeFunctionAssign(JSC::ExecState*);
       
   106 JSC::EncodedJSValue JSC_HOST_CALL jsLocationPrototypeFunctionReplace(JSC::ExecState*);
       
   107 JSC::EncodedJSValue JSC_HOST_CALL jsLocationPrototypeFunctionReload(JSC::ExecState*);
       
   108 JSC::EncodedJSValue JSC_HOST_CALL jsLocationPrototypeFunctionToString(JSC::ExecState*);
       
   109 // Attributes
       
   110 
       
   111 JSC::JSValue jsLocationHref(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   112 void setJSLocationHref(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   113 JSC::JSValue jsLocationProtocol(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   114 void setJSLocationProtocol(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   115 JSC::JSValue jsLocationHost(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   116 void setJSLocationHost(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   117 JSC::JSValue jsLocationHostname(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   118 void setJSLocationHostname(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   119 JSC::JSValue jsLocationPort(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   120 void setJSLocationPort(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   121 JSC::JSValue jsLocationPathname(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   122 void setJSLocationPathname(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   123 JSC::JSValue jsLocationSearch(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   124 void setJSLocationSearch(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   125 JSC::JSValue jsLocationHash(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
       
   126 void setJSLocationHash(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
       
   127 
       
   128 } // namespace WebCore
       
   129 
       
   130 #endif