OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2586 }; | 2586 }; |
2587 | 2587 |
2588 | 2588 |
2589 enum PropertyAttribute { | 2589 enum PropertyAttribute { |
2590 None = 0, | 2590 None = 0, |
2591 ReadOnly = 1 << 0, | 2591 ReadOnly = 1 << 0, |
2592 DontEnum = 1 << 1, | 2592 DontEnum = 1 << 1, |
2593 DontDelete = 1 << 2 | 2593 DontDelete = 1 << 2 |
2594 }; | 2594 }; |
2595 | 2595 |
2596 enum ExternalArrayType { | |
2597 kExternalInt8Array = 1, | |
2598 kExternalUint8Array, | |
2599 kExternalInt16Array, | |
2600 kExternalUint16Array, | |
2601 kExternalInt32Array, | |
2602 kExternalUint32Array, | |
2603 kExternalFloat32Array, | |
2604 kExternalFloat64Array, | |
2605 kExternalUint8ClampedArray, | |
2606 | |
2607 // Legacy constant names | |
2608 kExternalByteArray = kExternalInt8Array, | |
2609 kExternalUnsignedByteArray = kExternalUint8Array, | |
2610 kExternalShortArray = kExternalInt16Array, | |
2611 kExternalUnsignedShortArray = kExternalUint16Array, | |
2612 kExternalIntArray = kExternalInt32Array, | |
2613 kExternalUnsignedIntArray = kExternalUint32Array, | |
2614 kExternalFloatArray = kExternalFloat32Array, | |
2615 kExternalDoubleArray = kExternalFloat64Array, | |
2616 kExternalPixelArray = kExternalUint8ClampedArray | |
2617 }; | |
2618 | |
2619 /** | 2596 /** |
2620 * Accessor[Getter|Setter] are used as callback functions when | 2597 * Accessor[Getter|Setter] are used as callback functions when |
2621 * setting|getting a particular property. See Object and ObjectTemplate's | 2598 * setting|getting a particular property. See Object and ObjectTemplate's |
2622 * method SetAccessor. | 2599 * method SetAccessor. |
2623 */ | 2600 */ |
2624 typedef void (*AccessorGetterCallback)( | 2601 typedef void (*AccessorGetterCallback)( |
2625 Local<String> property, | 2602 Local<String> property, |
2626 const PropertyCallbackInfo<Value>& info); | 2603 const PropertyCallbackInfo<Value>& info); |
2627 typedef void (*AccessorNameGetterCallback)( | 2604 typedef void (*AccessorNameGetterCallback)( |
2628 Local<Name> property, | 2605 Local<Name> property, |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2959 */ | 2936 */ |
2960 // TODO(dcarney): take an isolate and optionally bail out? | 2937 // TODO(dcarney): take an isolate and optionally bail out? |
2961 Local<Object> Clone(); | 2938 Local<Object> Clone(); |
2962 | 2939 |
2963 /** | 2940 /** |
2964 * Returns the context in which the object was created. | 2941 * Returns the context in which the object was created. |
2965 */ | 2942 */ |
2966 Local<Context> CreationContext(); | 2943 Local<Context> CreationContext(); |
2967 | 2944 |
2968 /** | 2945 /** |
2969 * Set the backing store of the indexed properties to be managed by the | |
2970 * embedding layer. Access to the indexed properties will follow the rules | |
2971 * spelled out in CanvasPixelArray. | |
2972 * Note: The embedding program still owns the data and needs to ensure that | |
2973 * the backing store is preserved while V8 has a reference. | |
2974 */ | |
2975 void SetIndexedPropertiesToPixelData(uint8_t* data, int length); | |
2976 bool HasIndexedPropertiesInPixelData(); | |
2977 uint8_t* GetIndexedPropertiesPixelData(); | |
2978 int GetIndexedPropertiesPixelDataLength(); | |
2979 | |
2980 /** | |
2981 * Set the backing store of the indexed properties to be managed by the | |
2982 * embedding layer. Access to the indexed properties will follow the rules | |
2983 * spelled out for the CanvasArray subtypes in the WebGL specification. | |
2984 * Note: The embedding program still owns the data and needs to ensure that | |
2985 * the backing store is preserved while V8 has a reference. | |
2986 */ | |
2987 void SetIndexedPropertiesToExternalArrayData(void* data, | |
2988 ExternalArrayType array_type, | |
2989 int number_of_elements); | |
2990 bool HasIndexedPropertiesInExternalArrayData(); | |
2991 void* GetIndexedPropertiesExternalArrayData(); | |
2992 ExternalArrayType GetIndexedPropertiesExternalArrayDataType(); | |
2993 int GetIndexedPropertiesExternalArrayDataLength(); | |
2994 | |
2995 /** | |
2996 * Checks whether a callback is set by the | 2946 * Checks whether a callback is set by the |
2997 * ObjectTemplate::SetCallAsFunctionHandler method. | 2947 * ObjectTemplate::SetCallAsFunctionHandler method. |
2998 * When an Object is callable this method returns true. | 2948 * When an Object is callable this method returns true. |
2999 */ | 2949 */ |
3000 bool IsCallable(); | 2950 bool IsCallable(); |
3001 | 2951 |
3002 /** | 2952 /** |
3003 * Call an Object as a function if a callback is set by the | 2953 * Call an Object as a function if a callback is set by the |
3004 * ObjectTemplate::SetCallAsFunctionHandler method. | 2954 * ObjectTemplate::SetCallAsFunctionHandler method. |
3005 */ | 2955 */ |
(...skipping 5088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8094 */ | 8044 */ |
8095 | 8045 |
8096 | 8046 |
8097 } // namespace v8 | 8047 } // namespace v8 |
8098 | 8048 |
8099 | 8049 |
8100 #undef TYPE_CHECK | 8050 #undef TYPE_CHECK |
8101 | 8051 |
8102 | 8052 |
8103 #endif // V8_H_ | 8053 #endif // V8_H_ |
OLD | NEW |