webengine/osswebengine/DerivedSources/WebCore/JSRange.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 JSRange_H
       
    22 #define JSRange_H
       
    23 
       
    24 #include "kjs_binding.h"
       
    25 
       
    26 namespace WebCore {
       
    27 
       
    28 class Range;
       
    29 
       
    30 class JSRange : public KJS::DOMObject {
       
    31 public:
       
    32     JSRange(KJS::ExecState*, Range*);
       
    33     virtual ~JSRange();
       
    34     virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    35     KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
       
    36     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    37     static const KJS::ClassInfo info;
       
    38 
       
    39     static KJS::JSValue* getConstructor(KJS::ExecState*);
       
    40     enum {
       
    41         // Attributes
       
    42         StartContainerAttrNum, StartOffsetAttrNum, EndContainerAttrNum, EndOffsetAttrNum, 
       
    43         CollapsedAttrNum, CommonAncestorContainerAttrNum, 
       
    44 
       
    45         // The Constructor Attribute
       
    46         ConstructorAttrNum, 
       
    47 
       
    48         // Functions
       
    49         SetStartFuncNum, SetEndFuncNum, SetStartBeforeFuncNum, SetStartAfterFuncNum, 
       
    50         SetEndBeforeFuncNum, SetEndAfterFuncNum, CollapseFuncNum, SelectNodeFuncNum, 
       
    51         SelectNodeContentsFuncNum, CompareBoundaryPointsFuncNum, DeleteContentsFuncNum, ExtractContentsFuncNum, 
       
    52         CloneContentsFuncNum, InsertNodeFuncNum, SurroundContentsFuncNum, CloneRangeFuncNum, 
       
    53         ToStringFuncNum, DetachFuncNum, CreateContextualFragmentFuncNum, IntersectsNodeFuncNum, 
       
    54         CompareNodeFuncNum, ComparePointFuncNum, IsPointInRangeFuncNum
       
    55     };
       
    56     Range* impl() const { return m_impl.get(); }
       
    57 private:
       
    58     RefPtr<Range> m_impl;
       
    59 };
       
    60 
       
    61 KJS::JSValue* toJS(KJS::ExecState*, Range*);
       
    62 Range* toRange(KJS::JSValue*);
       
    63 
       
    64 class JSRangePrototype : public KJS::JSObject {
       
    65 public:
       
    66     static KJS::JSObject* self(KJS::ExecState* exec);
       
    67     virtual const KJS::ClassInfo* classInfo() const { return &info; }
       
    68     static const KJS::ClassInfo info;
       
    69     bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
       
    70     KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
       
    71     JSRangePrototype(KJS::ExecState* exec)
       
    72         : KJS::JSObject(exec->lexicalInterpreter()->builtinObjectPrototype()) { }
       
    73 };
       
    74 
       
    75 class JSRangePrototypeFunction : public KJS::InternalFunctionImp {
       
    76 public:
       
    77     JSRangePrototypeFunction(KJS::ExecState* exec, int i, int len, const KJS::Identifier& name)
       
    78         : KJS::InternalFunctionImp(static_cast<KJS::FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name)
       
    79         , id(i)
       
    80     {
       
    81         put(exec, exec->propertyNames().length, KJS::jsNumber(len), KJS::DontDelete|KJS::ReadOnly|KJS::DontEnum);
       
    82     }
       
    83     virtual KJS::JSValue* callAsFunction(KJS::ExecState*, KJS::JSObject*, const KJS::List&);
       
    84 
       
    85 private:
       
    86     int id;
       
    87 };
       
    88 
       
    89 } // namespace WebCore
       
    90 
       
    91 #endif