Changeset 15484 in webkit for trunk/JavaScriptCore/API/JSObjectRef.h
- Timestamp:
- Jul 17, 2006, 3:49:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSObjectRef.h
r15483 r15484 63 63 @param ctx The execution context to use. 64 64 @param object The JSObject being created. 65 @param exception A pointer to a JSValueRef in which to return an exception, if any.66 65 @discussion If you named your function Initialize, you would declare it like this: 67 66 68 void Initialize(JSContextRef ctx, JSObjectRef object , JSValueRef* exception);67 void Initialize(JSContextRef ctx, JSObjectRef object); 69 68 70 69 Unlike the other object callbacks, the initialize callback is called on the least … … 72 71 */ 73 72 typedef void 74 (*JSObjectInitializeCallback) (JSContextRef ctx, JSObjectRef object , JSValueRef* exception);73 (*JSObjectInitializeCallback) (JSContextRef ctx, JSObjectRef object); 75 74 76 75 /*! … … 380 379 /*! 381 380 @function 382 @abstract Creates a JavaScript object with a given class and prototype.381 @abstract Creates a JavaScript object. 383 382 @param ctx The execution context to use. 384 383 @param jsClass The JSClass to assign to the object. Pass NULL to use the default object class. 385 384 @param prototype The prototype to assign to the object. Pass NULL to use the default object prototype. 386 @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. 387 @result A JSObject with the given class and prototype. 388 */ 389 JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, JSValueRef prototype, JSValueRef* exception); 385 @result A JSObject with the given class, prototype, and private data. 386 @discussion The default object class does not allocate storage for private data, so you must provide a non-NULL JSClass if you want your object to be able to store private data. 387 */ 388 JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, JSValueRef prototype); 389 390 /*! 391 @function 392 @abstract Creates a JavaScript object. 393 @param ctx The execution context to use. 394 @param jsClass The JSClass to assign to the object. Pass NULL to use the default object class. 395 @param prototype The prototype to assign to the object. Pass NULL to use the default object prototype. 396 @param data A void* to set as the object's private data. Pass NULL to specify no private data. 397 @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. 398 @result A JSObject with the given class, prototype, and private data. 399 @discussion The default object class does not allocate storage for private data, so you must provide a non-NULL JSClass if you want your object to be able to store private data. 400 401 data will be set on the created object before the intialize methods in its class chain are called. This enables the initialize methods to retrieve and manipulate data through JSObjectGetPrivate. 402 */ 403 JSObjectRef JSObjectMakeWithData(JSContextRef ctx, JSClassRef jsClass, JSValueRef prototype, void* data); 390 404 391 405 /*! … … 512 526 /*! 513 527 @function 514 @abstract Gets a pointer to private data from an object.528 @abstract Gets an object's private data. 515 529 @param object A JSObject whose private data you want to get. 516 @result A void* that points tothe object's private data, if the object has private data, otherwise NULL.530 @result A void* that is the object's private data, if the object has private data, otherwise NULL. 517 531 */ 518 532 void* JSObjectGetPrivate(JSObjectRef object); … … 522 536 @abstract Sets a pointer to private data on an object. 523 537 @param object A JSObject whose private data you want to set. 524 @param data A void* t hat points tothe object's private data.538 @param data A void* to set as the object's private data. 525 539 @result true if the object can store private data, otherwise false. 526 @discussion Only custom objects created with aJSClass can store private data.540 @discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data. 527 541 */ 528 542 bool JSObjectSetPrivate(JSObjectRef object, void* data);
Note:
See TracChangeset
for help on using the changeset viewer.