Changeset 15133 in webkit for trunk/JavaScriptCore/API/JSObjectRef.h
- Timestamp:
- Jul 1, 2006, 9:06:07 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSObjectRef.h
r15043 r15133 29 29 30 30 #include "JSBase.h" 31 #include "JSValueRef.h" 31 32 32 33 #ifdef __cplusplus … … 48 49 (*JSFinalizeCallback) (JSObjectRef object); 49 50 50 typedef JSCharBufferRef51 (*JSCopyDescriptionCallback) (JSObjectRef object);52 53 51 typedef bool 54 52 (*JSHasPropertyCallback) (JSObjectRef object, JSCharBufferRef propertyName); 55 53 56 54 typedef bool 57 (*JSGetPropertyCallback) (JS ObjectRef object, JSCharBufferRef propertyName, JSValueRef* returnValue);55 (*JSGetPropertyCallback) (JSContextRef context, JSObjectRef object, JSCharBufferRef propertyName, JSValueRef* returnValue); 58 56 59 57 typedef bool … … 77 75 typedef struct __JSObjectCallbacks { 78 76 int version; // current (and only) version is 0 79 struct __JSObjectCallbacks* parentCallbacks; // pass NULL for the default object callbacks80 77 JSInitializeCallback initialize; 81 78 JSFinalizeCallback finalize; 82 JSCopyDescriptionCallback copyDescription;83 79 JSHasPropertyCallback hasProperty; 84 80 JSGetPropertyCallback getProperty; … … 93 89 extern const JSObjectCallbacks kJSObjectCallbacksNone; 94 90 91 typedef struct { 92 const char* const name; // FIXME: convert UTF8 93 JSGetPropertyCallback getProperty; 94 JSSetPropertyCallback setProperty; 95 JSPropertyAttributes attributes; 96 } JSStaticValue; 97 98 typedef struct { 99 const char* const name; // FIXME: convert UTF8 100 JSCallAsFunctionCallback callAsFunction; 101 JSPropertyAttributes attributes; 102 } JSStaticFunction; 103 104 JSClassRef JSClassCreate(JSContextRef context, JSStaticValue* staticValues, JSStaticFunction* staticFunctions, const JSObjectCallbacks* callbacks, JSClassRef parentClass); 105 void JSClassRelease(JSClassRef jsClass); 106 JSClassRef JSClassRetain(JSClassRef jsClass); 107 95 108 // pass NULL as prototype to get the built-in object prototype 96 JSObjectRef JSObjectMake(JSContextRef context, const JSObjectCallbacks* callbacks, JSObjectRef prototype);109 JSObjectRef JSObjectMake(JSContextRef context, JSClassRef jsClass, JSObjectRef prototype); 97 110 98 111 // Will be assigned the built-in function prototype … … 120 133 121 134 // Used for enumerating the names of an object's properties like a for...in loop would 122 JSProperty ListEnumeratorRef JSObjectCreatePropertyEnumerator(JSContextRef context, JSObjectRef object);123 JSProperty ListEnumeratorRef JSPropertyEnumeratorRetain(JSPropertyListEnumeratorRef enumerator);124 void JSPropertyEnumeratorRelease(JSProperty ListEnumeratorRef enumerator);125 JSCharBufferRef JSPropertyEnumeratorGetNext(JSContextRef context, JSProperty ListEnumeratorRef enumerator);135 JSPropertyEnumeratorRef JSObjectCreatePropertyEnumerator(JSContextRef context, JSObjectRef object); 136 JSPropertyEnumeratorRef JSPropertyEnumeratorRetain(JSPropertyEnumeratorRef enumerator); 137 void JSPropertyEnumeratorRelease(JSPropertyEnumeratorRef enumerator); 138 JSCharBufferRef JSPropertyEnumeratorGetNext(JSContextRef context, JSPropertyEnumeratorRef enumerator); 126 139 127 140 // Used for adding property names to a for...in enumeration
Note:
See TracChangeset
for help on using the changeset viewer.