Crate ul_next_sys

source ·

Structs§

  • @struct JSClassDefinition @abstract This structure contains properties and callbacks that define a type of object. All fields other than the version field are optional. Any pointer may be NULL. @field version The version number of this structure. The current version is 0. @field attributes A logically ORed set of JSClassAttributes to give to the class. @field className A null-terminated UTF8 string containing the class’s name. @field parentClass A JSClass to set as the class’s parent class. Pass NULL use the default object class. @field staticValues A JSStaticValue array containing the class’s statically declared value properties. Pass NULL to specify no statically declared value properties. The array must be terminated by a JSStaticValue whose name field is NULL. @field staticFunctions A JSStaticFunction array containing the class’s statically declared function properties. Pass NULL to specify no statically declared function properties. The array must be terminated by a JSStaticFunction whose name field is NULL. @field initialize The callback invoked when an object is first created. Use this callback to initialize the object. @field finalize The callback invoked when an object is finalized (prepared for garbage collection). Use this callback to release resources allocated for the object, and perform other cleanup. @field hasProperty The callback invoked when determining whether an object has a property. If this field is NULL, getProperty is called instead. The hasProperty callback enables optimization in cases where only a property’s existence needs to be known, not its value, and computing its value is expensive. @field getProperty The callback invoked when getting a property’s value. @field setProperty The callback invoked when setting a property’s value. @field deleteProperty The callback invoked when deleting a property. @field getPropertyNames The callback invoked when collecting the names of an object’s properties. @field callAsFunction The callback invoked when an object is called as a function. @field hasInstance The callback invoked when an object is used as the target of an ‘instanceof’ expression. @field callAsConstructor The callback invoked when an object is used as a constructor in a ‘new’ expression. @field convertToType The callback invoked when converting an object to a particular JavaScript type. @discussion The staticValues and staticFunctions arrays are the simplest and most efficient means for vending custom properties. Statically declared properties autmatically service requests like getProperty, setProperty, and getPropertyNames. Property access callbacks are required only to implement unusual properties, like array indexes, whose names are not known at compile-time.
  • @struct JSStaticFunction @abstract This structure describes a statically declared function property. @field name A null-terminated UTF8 string containing the property’s name. @field callAsFunction A JSObjectCallAsFunctionCallback to invoke when the property is called as a function. @field attributes A logically ORed set of JSPropertyAttributes to give to the property.
  • @struct JSStaticValue @abstract This structure describes a statically declared value property. @field name A null-terminated UTF8 string containing the property’s name. @field getProperty A JSObjectGetPropertyCallback to invoke when getting the property’s value. @field setProperty A JSObjectSetPropertyCallback to invoke when setting the property’s value. May be NULL if the ReadOnly attribute is set. @field attributes A logically ORed set of JSPropertyAttributes to give to the property.
  • Command description.
  • Command list, @see ULGPUDriverUpdateCommandList
  • GPU State description.
  • Vertex index buffer data.
  • Raw 4x4 matrix as an array of floats
  • Render buffer description.
  • Vertex buffer data.
  • Vertex layout for path vertices.
  • Vertex layout for quad vertices.
  • 4-component float vector

Constants§

Functions§

  • @function JSCheckScriptSyntax @abstract Checks for syntax errors in a string of JavaScript. @param ctx The execution context to use. @param script A JSString containing the script to check for syntax errors. @param sourceURL A JSString containing a URL for the script’s source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. @param startingLineNumber An integer value specifying the script’s starting line number in the file located at sourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line 1 and invalid values are clamped to 1. @param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. @result true if the script is syntactically correct, otherwise false.
  • @function @abstract Creates a JavaScript class suitable for use with JSObjectMake. @param definition A JSClassDefinition that defines the class. @result A JSClass with the given definition. Ownership follows the Create Rule.
  • @function @abstract Releases a JavaScript class. @param jsClass The JSClass to release.
  • @function @abstract Retains a JavaScript class. @param jsClass The JSClass to retain. @result A JSClass that is the same as jsClass.
  • @function @abstract Gets the global context of a JavaScript execution context. @param ctx The JSContext whose global context you want to get. @result ctx’s global context.
  • @function @abstract Gets the global object of a JavaScript execution context. @param ctx The JSContext whose global object you want to get. @result ctx’s global object.
  • @function @abstract Gets the context group to which a JavaScript execution context belongs. @param ctx The JSContext whose group you want to get. @result ctx’s group.
  • @function @abstract Creates a JavaScript context group. @discussion A JSContextGroup associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging JavaScript objects between contexts in different groups will produce undefined behavior. When objects from the same context group are used in multiple threads, explicit synchronization is required.
  • @function @abstract Releases a JavaScript context group. @param group The JSContextGroup to release.
  • @function @abstract Retains a JavaScript context group. @param group The JSContextGroup to retain. @result A JSContextGroup that is the same as group.
  • @function JSEvaluateScript @abstract Evaluates a string of JavaScript. @param ctx The execution context to use. @param script A JSString containing the script to evaluate. @param thisObject The object to use as “this,” or NULL to use the global object as “this.” @param sourceURL A JSString containing a URL for the script’s source file. This is used by debuggers and when reporting exceptions. Pass NULL if you do not care to include source file information. @param startingLineNumber An integer value specifying the script’s starting line number in the file located at sourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line 1 and invalid values are clamped to 1. @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. @result The JSValue that results from evaluating script, or NULL if an exception is thrown.
  • @function JSGarbageCollect @abstract Performs a JavaScript garbage collection. @param ctx The execution context to use. @discussion JavaScript values that are on the machine stack, in a register, protected by JSValueProtect, set as the global object of an execution context, or reachable from any such value will not be collected.
  • @function @abstract Gets a copy of the name of a context. @param ctx The JSGlobalContext whose name you want to get. @result The name for ctx. @discussion A JSGlobalContext’s name is exposed when inspecting the context to make it easier to identify the context you would like to inspect.
  • @function @abstract Creates a global JavaScript execution context. @discussion JSGlobalContextCreate allocates a global object and populates it with all the built-in JavaScript objects, such as Object, Function, String, and Array.
  • @function @abstract Creates a global JavaScript execution context in the context group provided. @discussion JSGlobalContextCreateInGroup allocates a global object and populates it with all the built-in JavaScript objects, such as Object, Function, String, and Array. @param globalObjectClass The class to use when creating the global object. Pass NULL to use the default object class. @param group The context group to use. The created global context retains the group. Pass NULL to create a unique group for the context. @result A JSGlobalContext with a global object of class globalObjectClass and a context group equal to group.
  • @function @abstract Gets whether the context is inspectable in Web Inspector. @param ctx The JSGlobalContext that you want to change the inspectability of. @result Whether the context is inspectable in Web Inspector.
  • @function @abstract Releases a global JavaScript execution context. @param ctx The JSGlobalContext to release.
  • @function @abstract Retains a global JavaScript execution context. @param ctx The JSGlobalContext to retain. @result A JSGlobalContext that is the same as ctx.
  • @function @abstract Sets whether the context is inspectable in Web Inspector. Default value is NO. @param ctx The JSGlobalContext that you want to change the inspectability of. @param inspectable YES to allow Web Inspector to connect to the context, otherwise NO.
  • @function @abstract Sets the name exposed when inspecting a context. @param ctx The JSGlobalContext that you want to name. @param name The name to set on the context.
  • @function @abstract Calls an object as a constructor. @param ctx The execution context to use. @param object The JSObject to call as a constructor. @param argumentCount An integer count of the number of arguments in arguments. @param arguments A JSValue array of arguments to pass to the constructor. Pass NULL if argumentCount is 0. @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. @result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor.
  • @function @abstract Calls an object as a function. @param ctx The execution context to use. @param object The JSObject to call as a function. @param thisObject The object to use as “this,” or NULL to use the global object as “this.” @param argumentCount An integer count of the number of arguments in arguments. @param arguments A JSValue array of arguments to pass to the function. Pass NULL if argumentCount is 0. @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. @result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function.
  • @function @abstract Gets the names of an object’s enumerable properties. @param ctx The execution context to use. @param object The object whose property names you want to get. @result A JSPropertyNameArray containing the names object’s enumerable properties. Ownership follows the Create Rule.
  • @function @abstract Deletes a property from an object. @param ctx The execution context to use. @param object The JSObject whose property you want to delete. @param propertyName A JSString containing the property’s name. @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. @result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set).
  • @function @abstract Deletes a property from an object using a JSValueRef as the property key. @param ctx The execution context to use. @param object The JSObject whose property you want to delete. @param propertyKey A JSValueRef containing the property key to use when looking up the property. @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. @result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set). @discussion This function is the same as performing “delete object[propertyKey]” from JavaScript.
  • @function @abstract Returns the number of bytes in a JavaScript data object. @param ctx The execution context to use. @param object The JS Arary Buffer object whose length in bytes to return. @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. @result The number of bytes stored in the data object.
  • @function @abstract Returns a pointer to the data buffer that serves as the backing store for a JavaScript Typed Array object. @param object The Array Buffer object whose internal backing store pointer to return. @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. @result A pointer to the raw data buffer that serves as object’s backing store or NULL if object is not an Array Buffer object. @discussion The pointer returned by this function is temporary and is not guaranteed to remain valid across JavaScriptCore API calls.
  • @function @abstract Gets an object’s private data. @param object A JSObject whose private data you want to get. @result A void* that is the object’s private data, if the object has private data, otherwise NULL.
  • @function @abstract Gets a property from an object. @param ctx The execution context to use. @param object The JSObject whose property you want to get. @param propertyName A JSString containing the property’s name. @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. @result The property’s value if object has the property, otherwise the undefined value.
  • @function @abstract Gets a property from an object by numeric index. @param ctx The execution context to use. @param object The JSObject whose property you want to get. @param propertyIndex An integer value that is the property’s name. @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. @result The property’s value if object has the property, otherwise the undefined value. @discussion Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but JSObjectGetPropertyAtIndex provides optimized access to numeric properties.
  • @function @abstract Gets a property from an object using a JSValueRef as the property key. @param ctx The execution context to use. @param object The JSObject whose property you want to get. @param propertyKey A JSValueRef containing the property key to use when looking up the property. @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. @result The property’s value if object has the property key, otherwise the undefined value. @discussion This function is the same as performing “object[propertyKey]” from JavaScript.
  • @function @abstract Gets an object’s prototype. @param ctx The execution context to use. @param object A JSObject whose prototype you want to get. @result A JSValue that is the object’s prototype.
  • @function @abstract Returns the JavaScript Array Buffer object that is used as the backing of a JavaScript Typed Array object. @param ctx The execution context to use. @param object The JSObjectRef whose Typed Array type data pointer to obtain. @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. @result A JSObjectRef with a JSTypedArrayType of kJSTypedArrayTypeArrayBuffer or NULL if object is not a Typed Array.
  • @function @abstract Returns the byte length of a JavaScript Typed Array object. @param ctx The execution context to use. @param object The Typed Array object whose byte length to return. @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. @result The byte length of the Typed Array object or 0 if the object is not a Typed Array object.
  • @function @abstract Returns the byte offset of a JavaScript Typed Array object. @param ctx The execution context to use. @param object The Typed Array object whose byte offset to return. @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. @result The byte offset of the Typed Array object or 0 if the object is not a Typed Array object.
  • @function @abstract Returns a temporary pointer to the backing store of a JavaScript Typed Array object. @param ctx The execution context to use. @param object The Typed Array object whose backing store pointer to return. @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. @result A pointer to the raw data buffer that serves as object’s backing store or NULL if object is not a Typed Array object. @discussion The pointer returned by this function is temporary and is not guaranteed to remain valid across JavaScriptCore API calls.
  • @function @abstract Returns the length of a JavaScript Typed Array object. @param ctx The execution context to use. @param object The Typed Array object whose length to return. @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. @result The length of the Typed Array object or 0 if the object is not a Typed Array object.
  • @function @abstract Tests whether an object has a given property. @param object The JSObject to test. @param propertyName A JSString containing the property’s name. @result true if the object has a property whose name matches propertyName, otherwise false.
  • @function @abstract Tests whether an object has a given property using a JSValueRef as the property key. @param object The JSObject to test. @param propertyKey A JSValueRef containing the property key to use when looking up the property. @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. @result true if the object has a property whose name matches propertyKey, otherwise false. @discussion This function is the same as performing “propertyKey in object” from JavaScript.
  • @function @abstract Tests whether an object can be called as a constructor. @param ctx The execution context to use. @param object The JSObject to test. @result true if the object can be called as a constructor, otherwise false.
  • @function @abstract Tests whether an object can be called as a function. @param ctx The execution context to use. @param object The JSObject to test. @result true if the object can be called as a function, otherwise false.
  • @function @abstract Creates a JavaScript object. @param ctx The execution context to use. @param jsClass The JSClass to assign to the object. Pass NULL to use the default object class. @param data A void* to set as the object’s private data. Pass NULL to specify no private data. @result A JSObject with the given class and private data. @discussion The default object class does not allocate storage for private data, so you must provide a non-NULL jsClass to JSObjectMake if you want your object to be able to store private data.
  • @function @abstract Creates a JavaScript Array object. @param ctx The execution context to use. @param argumentCount An integer count of the number of arguments in arguments. @param arguments A JSValue array of data to populate the Array with. Pass NULL if argumentCount is 0. @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. @result A JSObject that is an Array. @discussion The behavior of this function does not exactly match the behavior of the built-in Array constructor. Specifically, if one argument is supplied, this function returns an array with one element.
  • @function @abstract Creates a JavaScript Array Buffer object from an existing pointer. @param ctx The execution context to use. @param bytes A pointer to the byte buffer to be used as the backing store of the Typed Array object. @param byteLength The number of bytes pointed to by the parameter bytes. @param bytesDeallocator The allocator to use to deallocate the external buffer when the Typed Array data object is deallocated. @param deallocatorContext A pointer to pass back to the deallocator. @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. @result A JSObjectRef Array Buffer whose backing store is the same as the one pointed to by bytes or NULL if there was an error. @discussion If an exception is thrown during this function the bytesDeallocator will always be called.
  • @function @abstract Convenience method for creating a JavaScript constructor. @param ctx The execution context to use. @param jsClass A JSClass that is the class your constructor will assign to the objects its constructs. jsClass will be used to set the constructor’s .prototype property, and to evaluate ‘instanceof’ expressions. Pass NULL to use the default object class. @param callAsConstructor A JSObjectCallAsConstructorCallback to invoke when your constructor is used in a ‘new’ expression. Pass NULL to use the default object constructor. @result A JSObject that is a constructor. The object’s prototype will be the default object prototype. @discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data. If the constructor is inherited via JS subclassing and the value returned from callAsConstructor was created with jsClass, then the returned object will have it’s prototype overridden to the derived class’s prototype.
  • @function @abstract Creates a JavaScript Date object, as if by invoking the built-in Date constructor. @param ctx The execution context to use. @param argumentCount An integer count of the number of arguments in arguments. @param arguments A JSValue array of arguments to pass to the Date Constructor. Pass NULL if argumentCount is 0. @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. @result A JSObject that is a Date.
  • @function @abstract Creates a JavaScript promise object by invoking the provided executor. @param ctx The execution context to use. @param resolve A pointer to a JSObjectRef in which to store the resolve function for the new promise. Pass NULL if you do not care to store the resolve callback. @param reject A pointer to a JSObjectRef in which to store the reject function for the new promise. Pass NULL if you do not care to store the reject callback. @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. @result A JSObject that is a promise or NULL if an exception occurred.
  • @function @abstract Creates a JavaScript Error object, as if by invoking the built-in Error constructor. @param ctx The execution context to use. @param argumentCount An integer count of the number of arguments in arguments. @param arguments A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0. @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. @result A JSObject that is an Error.
  • @function @abstract Creates a function with a given script as its body. @param ctx The execution context to use. @param name A JSString containing the function’s name. This will be used when converting the function to string. Pass NULL to create an anonymous function. @param parameterCount An integer count of the number of parameter names in parameterNames. @param parameterNames A JSString array containing the names of the function’s parameters. Pass NULL if parameterCount is 0. @param body A JSString containing the script to use as the function’s body. @param sourceURL A JSString containing a URL for the script’s source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. @param startingLineNumber An integer value specifying the script’s starting line number in the file located at sourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line 1 and invalid values are clamped to 1. @param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. @result A JSObject that is a function, or NULL if either body or parameterNames contains a syntax error. The object’s prototype will be the default function prototype. @discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution.
  • @function @abstract Convenience method for creating a JavaScript function with a given callback as its implementation. @param ctx The execution context to use. @param name A JSString containing the function’s name. This will be used when converting the function to string. Pass NULL to create an anonymous function. @param callAsFunction The JSObjectCallAsFunctionCallback to invoke when the function is called. @result A JSObject that is a function. The object’s prototype will be the default function prototype.
  • @function @abstract Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor. @param ctx The execution context to use. @param argumentCount An integer count of the number of arguments in arguments. @param arguments A JSValue array of arguments to pass to the RegExp Constructor. Pass NULL if argumentCount is 0. @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. @result A JSObject that is a RegExp.
  • @function @abstract Creates a JavaScript Typed Array object with the given number of elements. @param ctx The execution context to use. @param arrayType A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned. @param length The number of elements to be in the new Typed Array. @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. @result A JSObjectRef that is a Typed Array with all elements set to zero or NULL if there was an error.
  • @function @abstract Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object. @param ctx The execution context to use. @param arrayType A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned. @param buffer An Array Buffer object that should be used as the backing store for the created JavaScript Typed Array object. @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. @result A JSObjectRef that is a Typed Array or NULL if there was an error. The backing store of the Typed Array will be buffer.
  • @function @abstract Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object with the given offset and length. @param ctx The execution context to use. @param arrayType A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned. @param buffer An Array Buffer object that should be used as the backing store for the created JavaScript Typed Array object. @param byteOffset The byte offset for the created Typed Array. byteOffset should aligned with the element size of arrayType. @param length The number of elements to include in the Typed Array. @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. @result A JSObjectRef that is a Typed Array or NULL if there was an error. The backing store of the Typed Array will be buffer.
  • @function @abstract Creates a JavaScript Typed Array object from an existing pointer. @param ctx The execution context to use. @param arrayType A value identifying the type of array to create. If arrayType is kJSTypedArrayTypeNone or kJSTypedArrayTypeArrayBuffer then NULL will be returned. @param bytes A pointer to the byte buffer to be used as the backing store of the Typed Array object. @param byteLength The number of bytes pointed to by the parameter bytes. @param bytesDeallocator The allocator to use to deallocate the external buffer when the JSTypedArrayData object is deallocated. @param deallocatorContext A pointer to pass back to the deallocator. @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. @result A JSObjectRef Typed Array whose backing store is the same as the one pointed to by bytes or NULL if there was an error. @discussion If an exception is thrown during this function the bytesDeallocator will always be called.
  • @function @abstract Sets a pointer to private data on an object. @param object The JSObject whose private data you want to set. @param data A void* to set as the object’s private data. @result true if object can store private data, otherwise false. @discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data.
  • @function @abstract Sets a property on an object. @param ctx The execution context to use. @param object The JSObject whose property you want to set. @param propertyName A JSString containing the property’s name. @param value A JSValueRef to use as the property’s value. @param attributes A logically ORed set of JSPropertyAttributes to give to the property. @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.
  • @function @abstract Sets a property on an object by numeric index. @param ctx The execution context to use. @param object The JSObject whose property you want to set. @param propertyIndex The property’s name as a number. @param value A JSValue to use as the property’s value. @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. @discussion Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but JSObjectSetPropertyAtIndex provides optimized access to numeric properties.
  • @function @abstract Sets a property on an object using a JSValueRef as the property key. @param ctx The execution context to use. @param object The JSObject whose property you want to set. @param propertyKey A JSValueRef containing the property key to use when looking up the property. @param value A JSValueRef to use as the property’s value. @param attributes A logically ORed set of JSPropertyAttributes to give to the property. @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. @discussion This function is the same as performing “object[propertyKey] = value” from JavaScript.
  • @function @abstract Sets an object’s prototype. @param ctx The execution context to use. @param object The JSObject whose prototype you want to set. @param value A JSValue to set as the object’s prototype.
  • @function @abstract Adds a property name to a JavaScript property name accumulator. @param accumulator The accumulator object to which to add the property name. @param propertyName The property name to add.
  • @function @abstract Gets a count of the number of items in a JavaScript property name array. @param array The array from which to retrieve the count. @result An integer count of the number of names in array.
  • @function @abstract Gets a property name at a given index in a JavaScript property name array. @param array The array from which to retrieve the property name. @param index The index of the property name to retrieve. @result A JSStringRef containing the property name.
  • @function @abstract Releases a JavaScript property name array. @param array The JSPropetyNameArray to release.
  • @function @abstract Retains a JavaScript property name array. @param array The JSPropertyNameArray to retain. @result A JSPropertyNameArray that is the same as array.
  • @function @abstract Creates a JavaScript string from a buffer of Unicode characters. @param chars The buffer of Unicode characters to copy into the new JSString. @param numChars The number of characters to copy from the buffer pointed to by chars. @result A JSString containing chars. Ownership follows the Create Rule.
  • @function @abstract Creates a JavaScript string from a null-terminated UTF8 string. @param string The null-terminated UTF8 string to copy into the new JSString. @result A JSString containing string. Ownership follows the Create Rule.
  • @function @abstract Returns a pointer to the Unicode character buffer that serves as the backing store for a JavaScript string. @param string The JSString whose backing store you want to access. @result A pointer to the Unicode character buffer that serves as string’s backing store, which will be deallocated when string is deallocated.
  • @function @abstract Returns the number of Unicode characters in a JavaScript string. @param string The JSString whose length (in Unicode characters) you want to know. @result The number of Unicode characters stored in string.
  • @function @abstract Returns the maximum number of bytes a JavaScript string will take up if converted into a null-terminated UTF8 string. @param string The JSString whose maximum converted size (in bytes) you want to know. @result The maximum number of bytes that could be required to convert string into a null-terminated UTF8 string. The number of bytes that the conversion actually ends up requiring could be less than this, but never more.
  • @function @abstract Converts a JavaScript string into a null-terminated UTF8 string, and copies the result into an external byte buffer. @param string The source JSString. @param buffer The destination byte buffer into which to copy a null-terminated UTF8 representation of string. On return, buffer contains a UTF8 string representation of string. If bufferSize is too small, buffer will contain only partial results. If buffer is not at least bufferSize bytes in size, behavior is undefined. @param bufferSize The size of the external buffer in bytes. @result The number of bytes written into buffer (including the null-terminator byte).
  • @function @abstract Tests whether two JavaScript strings match. @param a The first JSString to test. @param b The second JSString to test. @result true if the two strings match, otherwise false.
  • @function @abstract Tests whether a JavaScript string matches a null-terminated UTF8 string. @param a The JSString to test. @param b The null-terminated UTF8 string to test. @result true if the two strings match, otherwise false.
  • @function @abstract Releases a JavaScript string. @param string The JSString to release.
  • @function @abstract Retains a JavaScript string. @param string The JSString to retain. @result A JSString that is the same as string.
  • @function @abstract Creates a JavaScript string containing the JSON serialized representation of a JS value. @param ctx The execution context to use. @param value The value to serialize. @param indent The number of spaces to indent when nesting. If 0, the resulting JSON will not contains newlines. The size of the indent is clamped to 10 spaces. @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. @result A JSString with the result of serialization, or NULL if an exception is thrown.
  • @function @abstract Returns a JavaScript value’s type. @param ctx The execution context to use. @param value The JSValue whose type you want to obtain. @result A value of type JSType that identifies value’s type.
  • @function @abstract Returns a JavaScript value’s Typed Array type. @param ctx The execution context to use. @param value The JSValue whose Typed Array type to return. @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. @result A value of type JSTypedArrayType that identifies value’s Typed Array type, or kJSTypedArrayTypeNone if the value is not a Typed Array object.
  • @function @abstract Tests whether a JavaScript value is an array. @param ctx The execution context to use. @param value The JSValue to test. @result true if value is an array, otherwise false.
  • @function @abstract Tests whether a JavaScript value’s type is the boolean type. @param ctx The execution context to use. @param value The JSValue to test. @result true if value’s type is the boolean type, otherwise false.
  • @function @abstract Tests whether a JavaScript value is a date. @param ctx The execution context to use. @param value The JSValue to test. @result true if value is a date, otherwise false.
  • @function @abstract Tests whether two JavaScript values are equal, as compared by the JS == operator. @param ctx The execution context to use. @param a The first value to test. @param b The second value to test. @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. @result true if the two values are equal, false if they are not equal or an exception is thrown.
  • @function @abstract Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS instanceof operator. @param ctx The execution context to use. @param value The JSValue to test. @param constructor The constructor to test against. @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. @result true if value is an object constructed by constructor, as compared by the JS instanceof operator, otherwise false.
  • @function @abstract Tests whether a JavaScript value’s type is the null type. @param ctx The execution context to use. @param value The JSValue to test. @result true if value’s type is the null type, otherwise false.
  • @function @abstract Tests whether a JavaScript value’s type is the number type. @param ctx The execution context to use. @param value The JSValue to test. @result true if value’s type is the number type, otherwise false.
  • @function @abstract Tests whether a JavaScript value’s type is the object type. @param ctx The execution context to use. @param value The JSValue to test. @result true if value’s type is the object type, otherwise false.
  • @function @abstract Tests whether a JavaScript value is an object with a given class in its class chain. @param ctx The execution context to use. @param value The JSValue to test. @param jsClass The JSClass to test against. @result true if value is an object and has jsClass in its class chain, otherwise false.
  • @function @abstract Tests whether two JavaScript values are strict equal, as compared by the JS === operator. @param ctx The execution context to use. @param a The first value to test. @param b The second value to test. @result true if the two values are strict equal, otherwise false.
  • @function @abstract Tests whether a JavaScript value’s type is the string type. @param ctx The execution context to use. @param value The JSValue to test. @result true if value’s type is the string type, otherwise false.
  • @function @abstract Tests whether a JavaScript value’s type is the symbol type. @param ctx The execution context to use. @param value The JSValue to test. @result true if value’s type is the symbol type, otherwise false.
  • @function @abstract Tests whether a JavaScript value’s type is the undefined type. @param ctx The execution context to use. @param value The JSValue to test. @result true if value’s type is the undefined type, otherwise false.
  • @function @abstract Creates a JavaScript value of the boolean type. @param ctx The execution context to use. @param boolean The bool to assign to the newly created JSValue. @result A JSValue of the boolean type, representing the value of boolean.
  • @function @abstract Creates a JavaScript value from a JSON formatted string. @param ctx The execution context to use. @param string The JSString containing the JSON string to be parsed. @result A JSValue containing the parsed value, or NULL if the input is invalid.
  • @function @abstract Creates a JavaScript value of the null type. @param ctx The execution context to use. @result The unique null value.
  • @function @abstract Creates a JavaScript value of the number type. @param ctx The execution context to use. @param number The double to assign to the newly created JSValue. @result A JSValue of the number type, representing the value of number.
  • @function @abstract Creates a JavaScript value of the string type. @param ctx The execution context to use. @param string The JSString to assign to the newly created JSValue. The newly created JSValue retains string, and releases it upon garbage collection. @result A JSValue of the string type, representing the value of string.
  • @function @abstract Creates a JavaScript value of the symbol type. @param ctx The execution context to use. @param description A description of the newly created symbol value. @result A unique JSValue of the symbol type, whose description matches the one provided.
  • @function @abstract Creates a JavaScript value of the undefined type. @param ctx The execution context to use. @result The unique undefined value.
  • @function @abstract Protects a JavaScript value from garbage collection. @param ctx The execution context to use. @param value The JSValue to protect. @discussion Use this method when you want to store a JSValue in a global or on the heap, where the garbage collector will not be able to discover your reference to it.
  • @function @abstract Converts a JavaScript value to boolean and returns the resulting boolean. @param ctx The execution context to use. @param value The JSValue to convert. @result The boolean result of conversion.
  • @function @abstract Converts a JavaScript value to number and returns the resulting number. @param ctx The execution context to use. @param value The JSValue to convert. @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. @result The numeric result of conversion, or NaN if an exception is thrown.
  • @function @abstract Converts a JavaScript value to object and returns the resulting object. @param ctx The execution context to use. @param value The JSValue to convert. @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. @result The JSObject result of conversion, or NULL if an exception is thrown.
  • @function @abstract Converts a JavaScript value to string and copies the result into a JavaScript string. @param ctx The execution context to use. @param value The JSValue to convert. @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. @result A JSString with the result of conversion, or NULL if an exception is thrown. Ownership follows the Create Rule.
  • @function @abstract Unprotects a JavaScript value from garbage collection. @param ctx The execution context to use. @param value The JSValue to unprotect. @discussion A value may be protected multiple times and must be unprotected an equal number of times before becoming eligible for garbage collection.
  • Get the main monitor (this is never NULL).
  • Get the underlying Renderer instance.
  • Whether or not the App is running.
  • Quit the application.
  • Run the main loop.
  • Set a callback for whenever the App updates. You should update all app logic here.
  • Sets up an orthographic projection matrix with a certain viewport width and height, multiplies it by ‘transform’, and returns the result.
  • Reset bitmap pixels to 0.
  • Get the bytes per pixel.
  • Get the pixel format.
  • Get the height in pixels.
  • Get the number of bytes per row.
  • Get the size in bytes of the underlying pixel buffer.
  • Get the width in pixels.
  • Whether or not this bitmap is empty.
  • Lock pixels for reading/writing, returns pointer to pixel buffer.
  • Whether or not this bitmap owns its own pixel buffer.
  • Get raw pixel buffer– you should only call this if Bitmap is already locked.
  • Get the underlying Bitmap from the default Surface.
  • This converts a BGRA bitmap to RGBA bitmap and vice-versa by swapping the red and blue channels.
  • Unlock pixels after locking.
  • Write bitmap to a PNG on disk.
  • Get a pointer to the raw byte data.
  • Get the size in bytes.
  • Get the user data associated with this Buffer, if any.
  • Check whether this Buffer owns its own data (Buffer was created via ulCreateBufferFromCopy). If this is false, Buffer will call the user-supplied destruction callback to deallocate data when this Buffer instance is destroyed.
  • The delay (in seconds) between every tick of a CSS animation.
  • The alignment (in bytes) of the BitmapSurface when using the CPU renderer.
  • A writable OS file path to store persistent Session data in.
  • The winding order for front-facing triangles.
  • The gamma to use when compositing font glyphs, change this value to adjust contrast (Adobe and Apple prefer 1.8, others may prefer 2.2). (Default = 1.8)
  • The hinting algorithm to use when rendering fonts. (Default = kFontHinting_Normal)
  • Whether or not to continuously repaint any Views, regardless if they are dirty.
  • The max amount of time (in seconds) to allow repeating timers to run during each call to Renderer::Update.
  • The size of WebCore’s memory cache in bytes.
  • The minimum size of large VM heaps in JavaScriptCore.
  • The minimum size of small VM heaps in JavaScriptCore.
  • The number of threads to use in the Renderer (for parallel painting on the CPU, etc.).
  • The system’s physical RAM size in bytes.
  • The number of pages to keep in the cache. (Default: 0, none)
  • The delay (in seconds) between every call to the recycler.
  • The relative path to the resources folder (loaded via the FileSystem API).
  • The delay (in seconds) between every tick of a smooth scroll animation.
  • Global user-defined CSS string (included before any CSS on the page).
  • Create the App singleton.
  • Create bitmap with certain dimensions and pixel format.
  • Create bitmap from copy.
  • Create bitmap from existing pixel buffer. @see Bitmap for help using this function.
  • Create a Buffer from existing, user-owned data without any copies. An optional, user-supplied callback will be called to deallocate data upon destruction.
  • Create a Buffer from existing data, a deep copy of data will be made.
  • Create config with default values (see <Ultralight/platform/Config.h>).
  • Create empty bitmap.
  • Create a gamepad axis event, see GamepadAxisEvent for help using this function.
  • Create a gamepad button event, see GamepadButtonEvent for help using this function.
  • Create a gamepad event, see GamepadEvent for help using this function.
  • Create a key event, @see KeyEvent for help with the following parameters.
  • Create a mouse event, @see MouseEvent for help using this function.
  • Create a new Overlay.
  • Create a new Overlay, wrapping an existing View.
  • Create the core renderer singleton for the library directly.
  • Create a scroll event, @see ScrollEvent for help using this function.
  • Create a Session to store local data in (such as cookies, local storage, application cache, indexed db, etc).
  • Create settings with default values (see <AppCore/App.h>).
  • Create string from null-terminated ASCII C-string.
  • Create string from copy of existing string.
  • Create string from UTF-8 buffer.
  • Create string from UTF-16 buffer.
  • Create a View with certain size (in pixels).
  • Create view configuration with default values (see <Ultralight/platform/View.h>).
  • Create a new Window.
  • Get the default session (persistent session named “default”).
  • Destroy the App instance.
  • Destroy a bitmap (you should only destroy Bitmaps you have explicitly created via one of the creation functions above.
  • Destroy buffer (you should destroy any buffers you explicitly Create).
  • Destroy config.
  • Destroy font file
  • Destroy a gamepad axis event.
  • Destroy a gamepad button event.
  • Destroy a gamepad event.
  • Destroy a key event.
  • Destroy a mouse event.
  • Destroy an overlay.
  • Destroy the renderer.
  • Destroy a scroll event.
  • Destroy a Session.
  • Destroy settings.
  • Destroy string (you should destroy any strings you explicitly Create).
  • Destroy a View.
  • Destroy view configuration.
  • Destroy a Window.
  • This is only needed if you are not calling ulCreateApp().
  • This is only needed if you are not calling ulCreateApp().
  • This is only needed if you are not calling ulCreateApp().
  • Fire a gamepad axis event (to be called when an axis value is changed).
  • Fire a gamepad button event (to be called when a button value is changed).
  • Fire a gamepad event (connection / disconnection).
  • Create a font file from an in-memory buffer.
  • Create a font file from an on-disk file path.
  • Whether or not a ULIntRect is empty (all members equal to 0)
  • Create an empty ULIntRect (all members equal to 0)
  • Print detailed memory usage statistics to the log. (@see ulPlatformSetLogger)
  • Get the height of the monitor (in pixels).
  • Get the monitor’s DPI scale (1.0 = 100%).
  • Get the width of the monitor (in pixels).
  • Grant this overlay exclusive keyboard focus.
  • Get the height (in pixels).
  • Get the underlying View.
  • Get the width (in pixels).
  • Get the x-position (offset from the left of the Window), in pixels.
  • Get the y-position (offset from the top of the Window), in pixels.
  • Whether or not an overlay has keyboard focus.
  • Hide the overlay (will no longer be drawn).
  • Whether or not the overlay is hidden (not drawn).
  • Move the overlay to a new position (in pixels).
  • Resize the overlay (and underlying View), dimensions should be specified in pixels.
  • Show the overlay.
  • Remove keyboard focus.
  • Set a custom Clipboard implementation.
  • Set a custom FileSystem implementation.
  • Set a custom FontLoader implementation.
  • Set a custom GPUDriver implementation.
  • Set a custom Logger implementation.
  • Set a custom Surface implementation.
  • Attempt to release as much memory as possible. Don’t call this from any callbacks or driver code.
  • Whether or not a ULRect is empty (all members equal to 0)
  • Create an empty ULRect (all members equal to 0)
  • Notify the renderer that a display has refreshed (you should call this after vsync).
  • Render all active Views.
  • The disk path to write to (used by persistent sessions only).
  • Unique numeric Id for the session.
  • Unique name identifying the session (used for unique disk path).
  • Whether or not is persistent (backed to disk).
  • Describe the details of a gamepad, to be used with ulFireGamepadEvent and related events below. This can be called multiple times with the same index if the details change.
  • Set the name of this app.
  • Set the name of the developer of this app.
  • Set the root file path for our file system, you should set this to the relative path where all of your app data is.
  • We try to use the GPU renderer when a compatible GPU is detected.
  • Set whether or not we should load and compile shaders from the file system (eg, from the /shaders/ path, relative to file_system_path).
  • Start the remote inspector server.
  • Replaces the contents of ‘str’ with the contents of a C-string.
  • Replaces the contents of ‘str’ with the contents of ‘new_str’
  • Get native UTF-8 buffer data (always null-terminated).
  • Get length (in bytes) of the UTF-8 buffer data, not including null terminator.
  • Whether this string is empty or not.
  • Clear the dirty bounds.
  • Get the dirty bounds.
  • Height (in pixels).
  • Number of bytes between rows (usually width * 4)
  • Size in bytes.
  • Get the underlying user data pointer (this is only valid if you have set a custom surface implementation via ulPlatformSetSurfaceDefinition).
  • Width (in pixels).
  • Lock the pixel buffer and get a pointer to the beginning of the data for reading/writing.
  • Resize the pixel buffer to a certain width and height (both in pixels).
  • Set the dirty bounds to a certain value.
  • Unlock the pixel buffer.
  • Update timers and dispatch internal callbacks (JavaScript and network).
  • Get the numeric major version of the library.
  • Get the numeric minor version of the library.
  • Get the numeric patch version of the library.
  • Get the version string of the library in MAJOR.MINOR.PATCH format.
  • Check if can navigate backwards in history.
  • Check if can navigate forwards in history.
  • Set a user-generated id of the display (monitor, TV, or screen) that the View will be shown on.
  • Set whether images should be enabled (Default = True).
  • Set whether JavaScript should be enabled (Default = True).
  • Set default font-family to use for fixed fonts, eg
     and 
    (Default = Courier New).
  • Set default font-family to use for sans-serif fonts (Default = Arial).
  • Set default font-family to use for serif fonts (Default = Times New Roman).
  • Set default font-family to use (Default = Times New Roman).
  • Set the initial device scale, ie. the amount to scale page units to screen pixels. This should be set to the scaling factor of the device that the View is displayed on. (Default = 1.0)
  • Set whether or not the View should initially have input focus. (Default = True)
  • Set whether to render using the GPU renderer (accelerated) or the CPU renderer (unaccelerated).
  • Set whether images should be enabled (Default = True).
  • Set user agent string (See <Ultralight/platform/Config.h> for the default).
  • Create an Inspector View to inspect / debug this View locally.
  • Evaluate a string of JavaScript and return result.
  • Fire a keyboard event.
  • Fire a mouse event.
  • Fire a scroll event.
  • Give focus to the View.
  • Get the device scale, ie. the amount to scale page units to screen pixels.
  • Get the height, in pixels.
  • Whether or not a view should be painted during the next call to ulRender.
  • Get the RenderTarget for the View.
  • Get the Surface for the View (native pixel buffer that the CPU renderer draws into).
  • Get current title.
  • Get current URL.
  • Get the width, in pixels.
  • Navigate backwards in history.
  • Navigate forwards in history.
  • Navigate to arbitrary offset in history.
  • Whether or not the View has focus.
  • Whether or not the View has an input element with visible keyboard focus (indicated by a blinking caret).
  • Whether or not the View is GPU-accelerated. If this is false, the page will be rendered via the CPU renderer.
  • Check if the main frame of the page is currrently loading.
  • Whether or not the View supports transparent backgrounds.
  • Load a raw string of HTML.
  • Load a URL into main frame.
  • Acquire the page’s JSContext for use with JavaScriptCore API.
  • Reload current page.
  • Resize view to a certain width and height (in pixels).
  • Set callback for when a message is added to the console (useful for JavaScript / network errors and debugging).
  • Set callback for when the page begins loading a new URL into a frame.
  • Set callback for when the mouse cursor changes.
  • Set callback for when the page title changes.
  • Set callback for when the tooltip changes (usually result of a mouse hover).
  • Set callback for when the page URL changes.
  • Set callback for when the page wants to create a new View.
  • Set callback for when the page wants to create a new View to display the local inspector in.
  • Set callback for when all JavaScript has been parsed and the document is ready.
  • Set the device scale.
  • Set the display id of the View.
  • Set callback for when an error occurs while loading a URL into a frame.
  • Set callback for when the page finishes loading a URL into a frame.
  • Set whether or not a view should be repainted during the next call to ulRender.
  • Set callback for when the history (back/forward state) is modified.
  • Set callback for when the JavaScript window object is reset for a new page load.
  • Stop all page loads.
  • Remove focus from the View and unfocus any focused input elements.
  • Unlock the page’s JSContext after a previous call to ulViewLockJSContext().
  • Get the full WebKit version string.
  • Close a window.
  • Get window height (in pixels).
  • Get the underlying native window handle.
  • Get the x-position of the window (in screen coordinates) relative to the top-left of the monitor area.
  • Get the y-position of the window (in screen coordinates) relative to the top-left of the monitor area.
  • Get the DPI scale of a window.
  • Get window height (in screen coordinates).
  • Get window width (in screen coordinates).
  • Get window width (in pixels).
  • Hide the window.
  • Get whether or not a window is fullscreen.
  • Whether or not the window is currently visible (not hidden).
  • Move the window to a new position (in screen coordinates) relative to the top-left of the monitor area.
  • Move the window to the center of the monitor.
  • Convert pixels to screen coordinates using the current DPI scale.
  • Convert screen coordinates to pixels using the current DPI scale.
  • Set a callback to be notified when a window closes.
  • Set the cursor for a window.
  • Set a callback to be notified when a window resizes (parameters are passed back in pixels).
  • Set the window title.
  • Show the window (if it was previously hidden).

Type Aliases§

  • @typedef JSChar @abstract A UTF-16 code unit. One, or a sequence of two, can encode any Unicode character. As with all scalar types, endianness depends on the underlying architecture.
  • @typedef JSClassAttributes @abstract A set of JSClassAttributes. Combine multiple attributes by logically ORing them together.
  • @typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior.
  • @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects.
  • @typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state.
  • @typedef JSGlobalContextRef A global JavaScript execution context. A JSGlobalContext is a JSContext.
  • @typedef JSObjectCallAsConstructorCallback @abstract The callback invoked when an object is used as a constructor in a ‘new’ expression. @param ctx The execution context to use. @param constructor A JSObject that is the constructor being called. @param argumentCount An integer count of the number of arguments in arguments. @param arguments A JSValue array of the arguments passed to the function. @param exception A pointer to a JSValueRef in which to return an exception, if any. @result A JSObject that is the constructor’s return value. @discussion If you named your function CallAsConstructor, you would declare it like this:
  • @typedef JSObjectCallAsFunctionCallback @abstract The callback invoked when an object is called as a function. @param ctx The execution context to use. @param function A JSObject that is the function being called. @param thisObject A JSObject that is the ‘this’ variable in the function’s scope. @param argumentCount An integer count of the number of arguments in arguments. @param arguments A JSValue array of the arguments passed to the function. @param exception A pointer to a JSValueRef in which to return an exception, if any. @result A JSValue that is the function’s return value. @discussion If you named your function CallAsFunction, you would declare it like this:
  • @typedef JSObjectConvertToTypeCallback @abstract The callback invoked when converting an object to a particular JavaScript type. @param ctx The execution context to use. @param object The JSObject to convert. @param type A JSType specifying the JavaScript type to convert to. @param exception A pointer to a JSValueRef in which to return an exception, if any. @result The objects’s converted value, or NULL if the object was not converted. @discussion If you named your function ConvertToType, you would declare it like this:
  • @typedef JSObjectDeletePropertyCallback @abstract The callback invoked when deleting a property. @param ctx The execution context to use. @param object The JSObject in which to delete the property. @param propertyName A JSString containing the name of the property to delete. @param exception A pointer to a JSValueRef in which to return an exception, if any. @result true if propertyName was successfully deleted, otherwise false. @discussion If you named your function DeleteProperty, you would declare it like this:
  • @typedef JSObjectFinalizeCallback @abstract The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread. @param object The JSObject being finalized. @discussion If you named your function Finalize, you would declare it like this:
  • @typedef JSObjectGetPropertyCallback @abstract The callback invoked when getting a property’s value. @param ctx The execution context to use. @param object The JSObject to search for the property. @param propertyName A JSString containing the name of the property to get. @param exception A pointer to a JSValueRef in which to return an exception, if any. @result The property’s value if object has the property, otherwise NULL. @discussion If you named your function GetProperty, you would declare it like this:
  • @typedef JSObjectGetPropertyNamesCallback @abstract The callback invoked when collecting the names of an object’s properties. @param ctx The execution context to use. @param object The JSObject whose property names are being collected. @param propertyNames A JavaScript property name accumulator in which to accumulate the names of object’s properties. @discussion If you named your function GetPropertyNames, you would declare it like this:
  • @typedef JSObjectHasInstanceCallback @abstract hasInstance The callback invoked when an object is used as the target of an ‘instanceof’ expression. @param ctx The execution context to use. @param constructor The JSObject that is the target of the ‘instanceof’ expression. @param possibleInstance The JSValue being tested to determine if it is an instance of constructor. @param exception A pointer to a JSValueRef in which to return an exception, if any. @result true if possibleInstance is an instance of constructor, otherwise false. @discussion If you named your function HasInstance, you would declare it like this:
  • @typedef JSObjectHasPropertyCallback @abstract The callback invoked when determining whether an object has a property. @param ctx The execution context to use. @param object The JSObject to search for the property. @param propertyName A JSString containing the name of the property look up. @result true if object has the property, otherwise false. @discussion If you named your function HasProperty, you would declare it like this:
  • @typedef JSObjectInitializeCallback @abstract The callback invoked when an object is first created. @param ctx The execution context to use. @param object The JSObject being created. @discussion If you named your function Initialize, you would declare it like this:
  • @typedef JSObjectRef A JavaScript object. A JSObject is a JSValue.
  • @typedef JSObjectSetPropertyCallback @abstract The callback invoked when setting a property’s value. @param ctx The execution context to use. @param object The JSObject on which to set the property’s value. @param propertyName A JSString containing the name of the property to set. @param value A JSValue to use as the property’s value. @param exception A pointer to a JSValueRef in which to return an exception, if any. @result true if the property was set, otherwise false. @discussion If you named your function SetProperty, you would declare it like this:
  • @typedef JSPropertyAttributes @abstract A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together.
  • @typedef JSPropertyNameAccumulatorRef An ordered set used to collect the names of a JavaScript object’s properties.
  • @typedef JSPropertyNameArrayRef An array of JavaScript property names.
  • @typedef JSStringRef A UTF16 character buffer. The fundamental string representation in JavaScript.
  • @enum JSType @abstract A constant identifying the type of a JSValue. @constant kJSTypeUndefined The unique undefined value. @constant kJSTypeNull The unique null value. @constant kJSTypeBoolean A primitive boolean value, one of true or false. @constant kJSTypeNumber A primitive number value. @constant kJSTypeString A primitive string value. @constant kJSTypeObject An object value (meaning that this JSValueRef is a JSObjectRef). @constant kJSTypeSymbol A primitive symbol value.
  • @typedef JSTypedArrayBytesDeallocator A function used to deallocate bytes passed to a Typed Array constructor. The function should take two arguments. The first is a pointer to the bytes that were originally passed to the Typed Array constructor. The second is a pointer to additional information desired at the time the bytes are to be freed.
  • @enum JSTypedArrayType @abstract A constant identifying the Typed Array type of a JSObjectRef. @constant kJSTypedArrayTypeInt8Array Int8Array @constant kJSTypedArrayTypeInt16Array Int16Array @constant kJSTypedArrayTypeInt32Array Int32Array @constant kJSTypedArrayTypeUint8Array Uint8Array @constant kJSTypedArrayTypeUint8ClampedArray Uint8ClampedArray @constant kJSTypedArrayTypeUint16Array Uint16Array @constant kJSTypedArrayTypeUint32Array Uint32Array @constant kJSTypedArrayTypeFloat32Array Float32Array @constant kJSTypedArrayTypeFloat64Array Float64Array @constant kJSTypedArrayTypeBigInt64Array BigInt64Array @constant kJSTypedArrayTypeBigUint64Array BigUint64Array @constant kJSTypedArrayTypeArrayBuffer ArrayBuffer @constant kJSTypedArrayTypeNone Not a Typed Array
  • @typedef JSValueRef A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them.
  • The callback invoked when the library wants to clear the system’s clipboard.
  • The callback invoked when the library wants to read from the system’s clipboard.
  • The callback invoked when the library wants to write to the system’s clipboard.
  • Command types, used with ULCommand::command_type
  • The callback invoked when the FileSystem wants to check if a file path exists, return true if it exists.
  • Get the charset / encoding of the file (eg “utf-8”).
  • Get the mime-type of the file (eg “text/html”).
  • Open file for reading and map it to a Buffer.
  • Fallback font family name. Will be used if all other fonts fail to load.
  • Fallback font family name that can render the specified characters. This is mainly used to support CJK (Chinese, Japanese, Korean) text display.
  • Get the actual font file data (TTF/OTF) for a given font description.
  • The callback invoked when the GPUDriver will begin dispatching commands (such as CreateTexture and UpdateCommandList) during the current call to ulRender().
  • The callback invoked when the GPUDriver wants to create geometry with certain ID and vertex/index data.
  • The callback invoked when the GPUDriver wants to create a render buffer with certain ID and buffer description.
  • The callback invoked when the GPUDriver wants to create a texture with a certain ID and optional bitmap.
  • The callback invoked when the GPUDriver wants to destroy geometry.
  • The callback invoked when the GPUDriver wants to destroy a render buffer
  • The callback invoked when the GPUDriver wants to destroy a texture.
  • The callback invoked when the GPUDriver has finished dispatching commands during the current call to ulRender().
  • The callback invoked when the GPUDriver wants to generate the next available geometry ID.
  • The callback invoked when the GPUDriver wants to generate the next available render buffer ID.
  • The callback invoked when the GPUDriver wants to get the next available texture ID.
  • The callback invoked when the GPUDriver wants to update the command list (you should copy the commands to your own structure).
  • The callback invoked when the GPUDriver wants to update existing geometry with new vertex/index data.
  • The callback invoked when the GPUDriver wants to update an existing non-RTT texture with new bitmap data.
  • Vertex index type.
  • Logger
  • The callback invoked when the library wants to print a message to the log.
  • Shader types, used with ULGPUState::shader_type
  • The callback invoked when a Surface is created.
  • The callback invoked when a Surface is destroyed.
  • The callback invoked when a Surface’s height (in pixels) is requested.
  • The callback invoked when a Surface’s row bytes is requested.
  • The callback invoked when a Surface’s size (in bytes) is requested.
  • The callback invoked when a Surface’s width (in pixels) is requested.
  • The callback invoked when a Surface’s pixel buffer is requested to be locked for reading/writing (should return a pointer to locked bytes).
  • The callback invoked when a Surface is requested to be resized to a certain width/height.
  • The callback invoked when a Surface’s pixel buffer is requested to be unlocked after previously being locked.
  • Vertex formats.
  • Window creation flags. @see Window::Create