Home | History | Annotate | Download | only in ObjC
      1 /*
      2  * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
      3  * Copyright (C) 2006 Samuel Weinig <sam.weinig (at) gmail.com>
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions
      7  * are met:
      8  * 1. Redistributions of source code must retain the above copyright
      9  *    notice, this list of conditions and the following disclaimer.
     10  * 2. Redistributions in binary form must reproduce the above copyright
     11  *    notice, this list of conditions and the following disclaimer in the
     12  *    documentation and/or other materials provided with the distribution.
     13  *
     14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     21  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
     22  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     25  */
     26 
     27 #import <WebCore/DOMObject.h>
     28 
     29 #if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
     30 
     31 @class DOMIDBKey;
     32 @class DOMOptionsObject;
     33 @class DOMTestObj;
     34 @class DOMlog;
     35 @class NSString;
     36 @protocol DOMEventListener;
     37 
     38 enum {
     39     DOM_CONST_VALUE_0 = 0,
     40     DOM_CONST_VALUE_1 = 1,
     41     DOM_CONST_VALUE_2 = 2,
     42     DOM_CONST_VALUE_4 = 4,
     43     DOM_CONST_VALUE_8 = 8,
     44     DOM_CONST_VALUE_9 = -1,
     45     DOM_CONST_VALUE_10 = "my constant string",
     46     DOM_CONST_VALUE_11 = 0xffffffff,
     47     DOM_CONST_VALUE_12 = 0x01,
     48     DOM_CONST_VALUE_13 = 0X20,
     49     DOM_CONST_VALUE_14 = 0x1abc
     50 };
     51 
     52 @interface DOMTestObj : DOMObject
     53 - (int)readOnlyIntAttr;
     54 - (NSString *)readOnlyStringAttr;
     55 - (DOMTestObj *)readOnlyTestObjAttr;
     56 - (short)shortAttr;
     57 - (void)setShortAttr:(short)newShortAttr;
     58 - (unsigned short)unsignedShortAttr;
     59 - (void)setUnsignedShortAttr:(unsigned short)newUnsignedShortAttr;
     60 - (int)intAttr;
     61 - (void)setIntAttr:(int)newIntAttr;
     62 - (long long)longLongAttr;
     63 - (void)setLongLongAttr:(long long)newLongLongAttr;
     64 - (unsigned long long)unsignedLongLongAttr;
     65 - (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr;
     66 - (NSString *)stringAttr;
     67 - (void)setStringAttr:(NSString *)newStringAttr;
     68 - (DOMTestObj *)testObjAttr;
     69 - (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr;
     70 - (DOMTestObj *)XMLObjAttr;
     71 - (void)setXMLObjAttr:(DOMTestObj *)newXMLObjAttr;
     72 - (BOOL)create;
     73 - (void)setCreate:(BOOL)newCreate;
     74 - (NSString *)reflectedStringAttr;
     75 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
     76 - (int)reflectedIntegralAttr;
     77 - (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr;
     78 - (unsigned)reflectedUnsignedIntegralAttr;
     79 - (void)setReflectedUnsignedIntegralAttr:(unsigned)newReflectedUnsignedIntegralAttr;
     80 - (BOOL)reflectedBooleanAttr;
     81 - (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr;
     82 - (NSString *)reflectedURLAttr;
     83 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr;
     84 - (NSString *)reflectedNonEmptyURLAttr;
     85 - (void)setReflectedNonEmptyURLAttr:(NSString *)newReflectedNonEmptyURLAttr;
     86 - (NSString *)reflectedStringAttr;
     87 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
     88 - (int)reflectedCustomIntegralAttr;
     89 - (void)setReflectedCustomIntegralAttr:(int)newReflectedCustomIntegralAttr;
     90 - (BOOL)reflectedCustomBooleanAttr;
     91 - (void)setReflectedCustomBooleanAttr:(BOOL)newReflectedCustomBooleanAttr;
     92 - (NSString *)reflectedCustomURLAttr;
     93 - (void)setReflectedCustomURLAttr:(NSString *)newReflectedCustomURLAttr;
     94 - (NSString *)reflectedCustomNonEmptyURLAttr;
     95 - (void)setReflectedCustomNonEmptyURLAttr:(NSString *)newReflectedCustomNonEmptyURLAttr;
     96 - (int)attrWithGetterException;
     97 - (void)setAttrWithGetterException:(int)newAttrWithGetterException;
     98 - (int)attrWithSetterException;
     99 - (void)setAttrWithSetterException:(int)newAttrWithSetterException;
    100 - (NSString *)stringAttrWithGetterException;
    101 - (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException;
    102 - (NSString *)stringAttrWithSetterException;
    103 - (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException;
    104 - (int)customAttr;
    105 - (void)setCustomAttr:(int)newCustomAttr;
    106 - (NSString *)scriptStringAttr;
    107 #if ENABLE(Condition1)
    108 - (int)conditionalAttr1;
    109 - (void)setConditionalAttr1:(int)newConditionalAttr1;
    110 #endif
    111 #if ENABLE(Condition1) && ENABLE(Condition2)
    112 - (int)conditionalAttr2;
    113 - (void)setConditionalAttr2:(int)newConditionalAttr2;
    114 #endif
    115 #if ENABLE(Condition1) || ENABLE(Condition2)
    116 - (int)conditionalAttr3;
    117 - (void)setConditionalAttr3:(int)newConditionalAttr3;
    118 #endif
    119 - (int)descriptionName;
    120 - (int)idName;
    121 - (void)setIdName:(int)newIdName;
    122 - (NSString *)hashName;
    123 - (void)voidMethod;
    124 - (void)voidMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
    125 - (int)intMethod;
    126 - (int)intMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
    127 - (DOMTestObj *)objMethod;
    128 - (DOMTestObj *)objMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
    129 - (DOMTestObj *)methodThatRequiresAllArgs:(NSString *)strArg objArg:(DOMTestObj *)objArg;
    130 - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg;
    131 - (void)serializedValue:(NSString *)serializedArg;
    132 - (void)idbKey:(DOMIDBKey *)key;
    133 - (void)optionsObject:(DOMOptionsObject *)oo ooo:(DOMOptionsObject *)ooo;
    134 - (void)methodWithException;
    135 - (void)customMethod;
    136 - (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
    137 - (void)customArgsAndException:(DOMlog *)intArg;
    138 - (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
    139 - (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture;
    140 - (void)withDynamicFrame;
    141 - (void)withDynamicFrameAndArg:(int)intArg;
    142 - (void)withDynamicFrameAndOptionalArg:(int)intArg optionalArg:(int)optionalArg;
    143 - (void)withDynamicFrameAndUserGesture:(int)intArg;
    144 - (void)withDynamicFrameAndUserGestureASAD:(int)intArg optionalArg:(int)optionalArg;
    145 - (void)withScriptStateVoid;
    146 - (DOMTestObj *)withScriptStateObj;
    147 - (void)withScriptStateVoidException;
    148 - (DOMTestObj *)withScriptStateObjException;
    149 - (void)withScriptExecutionContext;
    150 - (void)methodWithOptionalArg:(int)opt;
    151 - (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt;
    152 - (void)methodWithNonOptionalArgAndTwoOptionalArgs:(int)nonOpt opt1:(int)opt1 opt2:(int)opt2;
    153 - (void)classMethod;
    154 - (int)classMethodWithOptional:(int)arg;
    155 @end
    156 
    157 #endif
    158