webengine/osswebengine/DerivedSources/WebCore/JSHTMLSelectElement.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 JSHTMLSelectElement_H
       
    22 #define JSHTMLSelectElement_H
       
    23 
       
    24 #include "JSHTMLElement.h"
       
    25 
       
    26 namespace WebCore {
       
    27 
       
    28 class HTMLSelectElement;
       
    29 
       
    30 class JSHTMLSelectElement : public JSHTMLElement {
       
    31 public:
       
    32     JSHTMLSelectElement(KJS::ExecState*, HTMLSelectElement*);
       
    33     virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    34     KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
       
    35     virtual void put(KJS::ExecState*, const KJS::Identifier&, KJS::JSValue*, int attr = KJS::None);
       
    36     void putValueProperty(KJS::ExecState*, int, KJS::JSValue*, int attr);
       
    37     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    38     static const KJS::ClassInfo info;
       
    39 
       
    40     static KJS::JSValue* getConstructor(KJS::ExecState*);
       
    41     enum {
       
    42         // Attributes
       
    43         TypeAttrNum, SelectedIndexAttrNum, ValueAttrNum, LengthAttrNum, 
       
    44         FormAttrNum, OptionsAttrNum, DisabledAttrNum, MultipleAttrNum, 
       
    45         NameAttrNum, SizeAttrNum, TabIndexAttrNum, 
       
    46 
       
    47         // The Constructor Attribute
       
    48         ConstructorAttrNum, 
       
    49 
       
    50         // Functions
       
    51         AddFuncNum, RemoveFuncNum, BlurFuncNum, FocusFuncNum, 
       
    52         ItemFuncNum, NamedItemFuncNum
       
    53     };
       
    54 
       
    55     // Custom functions
       
    56     KJS::JSValue* remove(KJS::ExecState*, const KJS::List&);
       
    57     void indexSetter(KJS::ExecState*, unsigned index, KJS::JSValue*, int attr);
       
    58 private:
       
    59     static KJS::JSValue* indexGetter(KJS::ExecState*, KJS::JSObject*, const KJS::Identifier&, const KJS::PropertySlot&);
       
    60 };
       
    61 
       
    62 
       
    63 class JSHTMLSelectElementPrototype : public KJS::JSObject {
       
    64 public:
       
    65     static KJS::JSObject* self(KJS::ExecState* exec);
       
    66     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    67     static const KJS::ClassInfo info;
       
    68     bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    69     JSHTMLSelectElementPrototype(KJS::ExecState* exec)
       
    70         : KJS::JSObject(JSHTMLElementPrototype::self(exec)) { }
       
    71 };
       
    72 
       
    73 class JSHTMLSelectElementPrototypeFunction : public KJS::InternalFunctionImp {
       
    74 public:
       
    75     JSHTMLSelectElementPrototypeFunction(KJS::ExecState* exec, int i, int len, const KJS::Identifier& name)
       
    76         : KJS::InternalFunctionImp(static_cast<KJS::FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)
       
    77         , id(i)
       
    78     {
       
    79         put(exec, exec->propertyNames().length, KJS::jsNumber(len), KJS::DontDelete|KJS::ReadOnly|KJS::DontEnum);
       
    80     }
       
    81     virtual KJS::JSValue* callAsFunction(KJS::ExecState*, KJS::JSObject*, const KJS::List&);
       
    82 
       
    83 private:
       
    84     int id;
       
    85 };
       
    86 
       
    87 } // namespace WebCore
       
    88 
       
    89 #endif