Home

Michael Heilmann's Arcadia ADL Module Interface

This is the documentation for Michael Heilmann's Arcadia ADL. The module defines

Module Interface

Arcadia_ADL_Context

Arcadia_ADL_Context A context is a registry of readers, mapping the string type of an ADL asset to the reader that processes it.

A context is a singleton: there is exactly one context per process. It is created on demand by Arcadia_ADL_Context_getOrCreate. Reading an asset whose type entry is not served by any registered reader raises a semantical error.

Methods

Arcadia_ADL_Context_getOrCreate

Arcadia_ADL_Context* Arcadia_ADL_Context_getOrCreate   (Arcadia_Thread* thread) Get the context of the process, creating it on the first call.

Parameters

thread
The thread.

Return value

The context of the process.

Errors

Raises Arcadia_Status_AllocationFailed if the context cannot be allocated.

Arcadia_ADL_Context_readFromString

Arcadia_ADL_Definition* Arcadia_ADL_Context_readFromString   (Arcadia_Thread* thread,    Arcadia_ADL_Context* self,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* input,    Arcadia_BooleanValue skipExisting) Read an ADL asset from a string, storing the resulting definition in the container of definitions.

The string is parsed with the default DDL reader into a DDL map node and then processed as a node (see Arcadia_ADL_Context_readFromNode).

Parameters

thread
The thread.
self
The context.
definitions
The container of definitions the resulting definition is stored in.
input
The string that contains the ADL asset.
skipExisting
If an asset with the same name as the resulting definition was read before: skip the new definition (skipExisting is true) or raise an exists error (it is false).

Return value

The resulting definition, or the already stored definition of the same name if skipExisting is true.

Errors

Raises an error if the asset is not a DDL map, if its type entry is not served by a registered reader, if the asset violates the schema of its type, or if a definition of the same name already exists and skipExisting is false.

Arcadia_ADL_Context_readFromNode

Arcadia_ADL_Definition* Arcadia_ADL_Context_readFromNode   (Arcadia_Thread* thread,    Arcadia_ADL_Context* self,    Arcadia_ADL_Definitions* definitions,    Arcadia_DDL_Node* input,    Arcadia_BooleanValue skipExisting) Read an ADL asset from a DDL map node, storing the resulting definition in the container of definitions.

The node must be a DDL map node; otherwise a semantical error is raised. The type entry selects the reader, which validates the asset against its schema and constructs the definition.

Parameters

thread
The thread.
self
The context.
definitions
The container of definitions the resulting definition is stored in.
input
The DDL map node that contains the ADL asset.
skipExisting
If an asset with the same name as the resulting definition was read before: skip the new definition (skipExisting is true) or raise an exists error (it is false).

Return value

The resulting definition, or the already stored definition of the same name if skipExisting is true.

Errors

Raises an error if the asset is not a DDL map, if its type entry is not served by a registered reader, if the asset violates the schema of its type, or if a definition of the same name already exists and skipExisting is false.

Arcadia_ADL_Reader

Arcadia_ADL_Reader A reader validates the assets of a definition type against their schema and constructs the resulting definitions.

The Arcadia.ADL.Reader type is the base type of the concrete readers of the module, one per definition type. A reader lives in the context registry and is looked up by the string type entry of an asset. Applications normally do not call the methods of a reader directly; they read assets through a context.

Each concrete reader owns the schema of its type, given in the Arcadia Data Definition Schema Language (Arcadia DDLS), and validates every asset against it before constructing the definition.

Arcadia_ADL_Definition

Arcadia_ADL_Definition A definition, the base type of all definitions of the Arcadia asset definition language.

A definition has a name and belongs to a container of definitions. Some definitions hold references to other definitions; such references are resolved when the definition is linked (see Arcadia_ADL_Definition_link and Arcadia_ADL_Definitions_link).

Methods

Arcadia_ADL_Definition_getName

Arcadia_String* Arcadia_ADL_Definition_getName   (Arcadia_Thread* thread,    Arcadia_ADL_Definition* self) Get the name of the definition.

Parameters

thread
The thread.
self
The definition.

Return value

The name of the definition.

Arcadia_ADL_Definition_link

void Arcadia_ADL_Definition_link   (Arcadia_Thread* thread,    Arcadia_ADL_Definition* self) Link the definition: resolve its references and check their types.

This is a virtual method. Link implementations resolve every reference of the concrete definition, check that the referenced definition has the required type, and link referenced definitions recursively. Linking is idempotent.

Parameters

thread
The thread.
self
The definition.

Errors

Raises an error if a referenced definition does not exist or does not have the required type.

Arcadia_ADL_Definitions

Arcadia_ADL_Definitions A container of definitions, mapping definition names to definitions.

An application reads all of its assets into one container and links the container once the assets have been read.

Methods

Arcadia_ADL_Definitions_create

Arcadia_ADL_Definitions* Arcadia_ADL_Definitions_create   (Arcadia_Thread* thread) Create an empty container of definitions.

Parameters

thread
The thread.

Return value

An empty container of definitions.

Errors

Raises Arcadia_Status_AllocationFailed if the container cannot be allocated.

Arcadia_ADL_Definitions_getDefinitionOrNull

Arcadia_ADL_Definition* Arcadia_ADL_Definitions_getDefinitionOrNull   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* self,    Arcadia_String* name) Get the definition with the given name, or a null pointer if no definition of that name is stored.

Parameters

thread
The thread.
self
The container.
name
The name of the definition.

Return value

The definition with the given name, or a null pointer if there is none.

Arcadia_ADL_Definitions_link

void Arcadia_ADL_Definitions_link   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* self) Link every definition of the container.

Linking the container links the whole graph of definitions, because linking a definition also links the definitions it references.

Parameters

thread
The thread.
self
The container.

Errors

Raises an error if a referenced definition of any stored definition does not exist or does not have the required type.

Arcadia_ADL_Reference

Arcadia_ADL_Reference A reference of a definition to another definition, by name.

While an asset is being read, a reference holds the name of the referenced definition but not the definition itself. Resolving the reference looks the name up in the container of definitions. References are resolved when the owning definition is linked.

Methods

Arcadia_ADL_Reference_create

Arcadia_ADL_Reference* Arcadia_ADL_Reference_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* definitionName) Create a reference to the definition with the given name.

Parameters

thread
The thread.
definitions
The container the referenced definition is looked up in.
definitionName
The name of the referenced definition.

Return value

A reference to the definition with the given name.

Errors

Raises Arcadia_Status_AllocationFailed if the reference cannot be allocated.

Arcadia_ADL_Reference_getDefinitionName

Arcadia_String* Arcadia_ADL_Reference_getDefinitionName   (Arcadia_Thread* thread,    Arcadia_ADL_Reference* self) Get the name of the referenced definition.

Parameters

thread
The thread.
self
The reference.

Return value

The name of the referenced definition.

Arcadia_ADL_Reference_resolve

void Arcadia_ADL_Reference_resolve   (Arcadia_Thread* thread,    Arcadia_ADL_Reference* self) Resolve the reference: look the referenced definition up in the container.

Resolving is idempotent: a reference that was already resolved is left unchanged. If the referenced definition does not exist, an error is raised.

Parameters

thread
The thread.
self
The reference.

Errors

Raises Arcadia_Status_NotFound if the referenced definition does not exist.

Arcadia_ADL_Graphs_readFromNodes

void Arcadia_ADL_Graphs_readFromNodes
  (Arcadia_Thread* thread,
   Arcadia_ADL_Context* context,
   Arcadia_ADL_Definitions* definitions,
   Arcadia_List* nodes)
Collect graph templates and instances from a batch of DDL root maps and expand them into ordinary ADL definitions. Include Arcadia/ADL/Include.h.

Parameters

thread
The calling runtime thread.
context
The ADL context used to read ordinary batch definitions.
definitions
A fresh destination definitions container.
nodes
An ordered list of DDL map-node object references, including ordinary assets and graph front-end forms.

The function does not link or render the resulting definitions. Call Arcadia_ADL_Definitions_link after successful expansion. Generated nodes are currently read using Arcadia_ADL_Context_getOrCreate in the expander; the explicit context argument is used for ordinary batch nodes.

Graph shape/binding errors raise Arcadia_Status_SemanticalError; allocation and ordinary reader/link operations retain their own error behavior. Do not assume the destination is unchanged on failure: ordinary definitions are read before instance staging, and generated definitions are published individually.

Supported local audio nodes are DSP.SineWave and DSP.Mix. Mix's required nonempty inputs list is rewritten in its original order to generated local names, preserving repeated references. Each input must name a supported local DSP node; unresolved names, wrong families, references to Graph.Output, and local cycles raise Arcadia_Status_SemanticalError. A mix can be published as the single Graph.Output with referenceType: "DSP.Mix" and consumed by ordinary SampleBuffer.dsp after linking. Reference parameters remain Color-only; no output/source type-equality check is added.

See Graph composition for accepted local types, parameter bindings, generated names and the current reference-validation limitations. That section describes the current source implementation, not a broader historical graph-composition proposal.

Arcadia_ADL_ColorDefinition

Arcadia_ADL_ColorDefinition The definition of a color, with straight/unassociated red, green, blue and alpha components.

The type name of the definition, used as the type entry of an ADL asset, is "Color". Its public scalar fields are red, green, blue, then alpha, each Arcadia_Natural8Value. RGB asset fields are required; alpha is optional, defaulting to 255. Explicit alpha 0 is preserved. The definition adds no reference fields and links trivially; its native parent still retains definitions/name.

The existing five-argument factory remains unchanged and initializes alpha to 255. Native callers may assign the public alpha field afterward. The PDL constructor owns initialization and uses a narrow native typed-255 helper, since ordinary PDL integer literals are not Natural8 values. No new getter or dispatch slot is added. Nonintegral/out-of-range numeric asset alpha raises Arcadia_Status_ConversionFailed, as for RGB; a non-number raises Arcadia_Status_SemanticalError during schema validation.

Stored alpha does not enable blending, premultiply RGB or change RGB-only consumers. Media fills retain pixel alpha 255; mesh-generator color conversion and current example clear-color/text-run conversions retain alpha 1; UI Button color state retains RGB-only copying. Material blend settings remain separate.

Methods

Arcadia_ADL_ColorDefinition_create

Arcadia_ADL_ColorDefinition* Arcadia_ADL_ColorDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Natural8Value red,    Arcadia_Natural8Value green,    Arcadia_Natural8Value blue) Create the definition of a color with the supplied RGB and alpha initialized to 255.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
red
The red component.
green
The green component.
blue
The blue component.

Return value

The definition of the color.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_MeshDefinition

Arcadia_ADL_MeshDefinition The definition of a polygonal mesh.

The type name of the definition, used as the type entry of an ADL asset, is "Mesh". The mesh holds a reference to the color of its vertices; linking the definition resolves this reference and requires the referenced definition to be a Color definition.

Methods

Arcadia_ADL_MeshDefinition_create

Arcadia_ADL_MeshDefinition* Arcadia_ADL_MeshDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_SizeValue numberOfVertices,    Arcadia_RuntimeByteArray* vertexPositions,    Arcadia_RuntimeByteArray* vertexAmbientColors,    Arcadia_RuntimeByteArray* vertexAmbientTextureCoordinates,    Arcadia_String* ambientColorName) Create the definition of a mesh.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
numberOfVertices
The number of vertices of the mesh.
vertexPositions
The positions of the vertices.
vertexAmbientColors
The ambient colors of the vertices.
vertexAmbientTextureCoordinates
The ambient texture coordinates of the vertices.
ambientColorName
The name of the referenced color definition.

Return value

The definition of the mesh.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_ModelDefinition

Arcadia_ADL_ModelDefinition The definition of a model: a mesh rendered with a material.

The type name of the definition, used as the type entry of an ADL asset, is "Model". The model holds a reference to a mesh and a reference to a material, both resolved when the definition is linked.

Methods

Arcadia_ADL_ModelDefinition_create

Arcadia_ADL_ModelDefinition* Arcadia_ADL_ModelDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_String* meshName,    Arcadia_String* materialName) Create the definition of a model.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
meshName
The name of the referenced mesh definition.
materialName
The name of the referenced material definition.

Return value

The definition of the model.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_MaterialDefinition

Arcadia_ADL_MaterialDefinition The definition of the material a model is rendered with.

The type name of the definition, used as the type entry of an ADL asset, is "Material". The material holds a reference to the texture of its ambient-color source, resolved when the definition is linked; the referenced definition must be a Texture definition.

Methods

Arcadia_ADL_MaterialDefinition_create

Arcadia_ADL_MaterialDefinition* Arcadia_ADL_MaterialDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_ADL_MaterialType materialType,    Arcadia_ADL_AmbientColorSource ambientColorSource,    Arcadia_String* ambientColorTextureName,    Arcadia_ADL_BlendFunction blendSourceFunction,    Arcadia_ADL_BlendFunction blendDestinationFunction) Create the definition of a material.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
materialType
The material type, an element of the Arcadia_ADL_MaterialType enumeration.
ambientColorSource
The source of the ambient color, an element of the Arcadia_ADL_AmbientColorSource enumeration.
ambientColorTextureName
The name of the referenced texture definition.
blendSourceFunction
The source blend function, an element of the Arcadia_ADL_BlendFunction enumeration. The element None selects the default of the engine.
blendDestinationFunction
The destination blend function, an element of the Arcadia_ADL_BlendFunction enumeration. The element None selects the default of the engine.

Return value

The definition of the material.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_MeshGenerator

Arcadia_ADL_MeshGenerator The base class of the mesh generator definitions.

A mesh generator describes a mesh procedurally. It carries the ambient color of the mesh it generates. The ambient color is held as a reference, resolved when the definition is linked; the referenced definition must be a Color definition.

Methods

Arcadia_ADL_MeshGenerator_getAmbientColor

Arcadia_ADL_ColorDefinition* Arcadia_ADL_MeshGenerator_getAmbientColor   (Arcadia_Thread* thread,    Arcadia_ADL_MeshGenerator* self) Get the ambient color of this mesh generator.

Parameters

thread
The thread.
self
This mesh generator.

Return value

The ambient color definition of this mesh generator.

Arcadia_ADL_BoxMeshGenerator

Arcadia_ADL_BoxMeshGenerator The definition of a mesh generator that generates a box.

The type name of the definition, used as the type entry of an ADL asset, is "BoxMeshGenerator". The generator describes a box of the given width, height, and depth. It holds a reference to the ambient color of the box, resolved when the definition is linked; the referenced definition must be a Color definition.

Methods

Arcadia_ADL_BoxMeshGenerator_create

Arcadia_ADL_BoxMeshGenerator* Arcadia_ADL_BoxMeshGenerator_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Real32Value width,    Arcadia_Real32Value height,    Arcadia_Real32Value depth,    Arcadia_String* ambientColorName) Create the definition of a box mesh generator.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
width
The width of the box.
height
The height of the box.
depth
The depth of the box.
ambientColorName
The name of the referenced color definition.

Return value

The definition of the box mesh generator.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_BoxMeshGenerator_getWidth

Arcadia_Real32Value Arcadia_ADL_BoxMeshGenerator_getWidth   (Arcadia_Thread* thread,    Arcadia_ADL_BoxMeshGenerator* self) Get the width of this box mesh generator.

Parameters

thread
The thread.
self
This box mesh generator.

Return value

The width of the box.

Arcadia_ADL_BoxMeshGenerator_getHeight

Arcadia_Real32Value Arcadia_ADL_BoxMeshGenerator_getHeight   (Arcadia_Thread* thread,    Arcadia_ADL_BoxMeshGenerator* self) Get the height of this box mesh generator.

Parameters

thread
The thread.
self
This box mesh generator.

Return value

The height of the box.

Arcadia_ADL_BoxMeshGenerator_getDepth

Arcadia_Real32Value Arcadia_ADL_BoxMeshGenerator_getDepth   (Arcadia_Thread* thread,    Arcadia_ADL_BoxMeshGenerator* self) Get the depth of this box mesh generator.

Parameters

thread
The thread.
self
This box mesh generator.

Return value

The depth of the box.

Arcadia_ADL_PlaneMeshGenerator

Arcadia_ADL_PlaneMeshGenerator The definition of a mesh generator that generates a plane.

The type name of the definition, used as the type entry of an ADL asset, is "PlaneMeshGenerator". The generator describes a plane of the given width and height. It holds a reference to the ambient color of the plane, resolved when the definition is linked; the referenced definition must be a Color definition.

Methods

Arcadia_ADL_PlaneMeshGenerator_create

Arcadia_ADL_PlaneMeshGenerator* Arcadia_ADL_PlaneMeshGenerator_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Real32Value width,    Arcadia_Real32Value height,    Arcadia_String* ambientColorName) Create the definition of a plane mesh generator.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
width
The width of the plane.
height
The height of the plane.
ambientColorName
The name of the referenced color definition.

Return value

The definition of the plane mesh generator.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_PlaneMeshGenerator_getWidth

Arcadia_Real32Value Arcadia_ADL_PlaneMeshGenerator_getWidth   (Arcadia_Thread* thread,    Arcadia_ADL_PlaneMeshGenerator* self) Get the width of this plane mesh generator.

Parameters

thread
The thread.
self
This plane mesh generator.

Return value

The width of the plane.

Arcadia_ADL_PlaneMeshGenerator_getHeight

Arcadia_Real32Value Arcadia_ADL_PlaneMeshGenerator_getHeight   (Arcadia_Thread* thread,    Arcadia_ADL_PlaneMeshGenerator* self) Get the height of this plane mesh generator.

Parameters

thread
The thread.
self
This plane mesh generator.

Return value

The height of the plane.

Arcadia_ADL_SphereMeshGenerator

Arcadia_ADL_SphereMeshGenerator The definition of a mesh generator that generates a sphere.

The type name of the definition, used as the type entry of an ADL asset, is "SphereMeshGenerator". The generator describes a sphere of the given radius and number of segments. It holds a reference to the ambient color of the sphere, resolved when the definition is linked; the referenced definition must be a Color definition.

Methods

Arcadia_ADL_SphereMeshGenerator_create

Arcadia_ADL_SphereMeshGenerator* Arcadia_ADL_SphereMeshGenerator_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Real32Value radius,    Arcadia_Natural32Value segments,    Arcadia_String* ambientColorName) Create the definition of a sphere mesh generator.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
radius
The radius of the sphere.
segments
The number of segments of the sphere.
ambientColorName
The name of the referenced color definition.

Return value

The definition of the sphere mesh generator.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_SphereMeshGenerator_getRadius

Arcadia_Real32Value Arcadia_ADL_SphereMeshGenerator_getRadius   (Arcadia_Thread* thread,    Arcadia_ADL_SphereMeshGenerator* self) Get the radius of this sphere mesh generator.

Parameters

thread
The thread.
self
This sphere mesh generator.

Return value

The radius of the sphere.

Arcadia_ADL_SphereMeshGenerator_getSegments

Arcadia_Natural32Value Arcadia_ADL_SphereMeshGenerator_getSegments   (Arcadia_Thread* thread,    Arcadia_ADL_SphereMeshGenerator* self) Get the number of segments of this sphere mesh generator.

Parameters

thread
The thread.
self
This sphere mesh generator.

Return value

The number of segments of the sphere.

Arcadia_ADL_PixelBufferDefinition

Arcadia_ADL_PixelBufferDefinition The definition of a pixel buffer with a width, a height, and a list of fill operations.

The type name of the definition, used as the type entry of an ADL asset, is "PixelBuffer". The definition holds a list of references to its fill operations; linking the definition resolves the references.

Methods

Arcadia_ADL_PixelBufferDefinition_create

Arcadia_ADL_PixelBufferDefinition* Arcadia_ADL_PixelBufferDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Natural32Value width,    Arcadia_Natural32Value height) Create the definition of a pixel buffer.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
width
The width, in pixels, of the pixel buffer.
height
The height, in pixels, of the pixel buffer.

Return value

The definition of the pixel buffer.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_TextureDefinition

Arcadia_ADL_TextureDefinition The definition of a texture: a pixel buffer sampled with a magnification filter, a minification filter, and a texture address mode for each texture coordinate.

The type name of the definition, used as the type entry of an ADL asset, is "Texture". The texture holds a reference to the pixel buffer it samples, resolved when the definition is linked; the referenced definition must be a PixelBuffer definition.

The sampling properties magnificationFilter, minificationFilter, addressModeU, and addressModeV are optional. The value None is the default value and indicates that the sampling property is not specified, in which case the default of the engine is used.

Methods

Arcadia_ADL_TextureDefinition_create

Arcadia_ADL_TextureDefinition* Arcadia_ADL_TextureDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_String* pixelBufferName,    Arcadia_ADL_TextureFilter magnificationFilter,    Arcadia_ADL_TextureFilter minificationFilter,    Arcadia_ADL_TextureAddressMode addressModeU,    Arcadia_ADL_TextureAddressMode addressModeV) Create the definition of a texture.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
pixelBufferName
The name of the referenced pixel buffer definition.
magnificationFilter
The magnification filter, an element of the Arcadia_ADL_TextureFilter enumeration. The element None selects the default of the engine.
minificationFilter
The minification filter, an element of the Arcadia_ADL_TextureFilter enumeration. The element None selects the default of the engine.
addressModeU
The texture address mode of the U texture coordinate, an element of the Arcadia_ADL_TextureAddressMode enumeration. The element None selects the default of the engine.
addressModeV
The texture address mode of the V texture coordinate, an element of the Arcadia_ADL_TextureAddressMode enumeration. The element None selects the default of the engine.

Return value

The definition of the texture.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_PixelBufferOperations_FillOperationDefinition

Arcadia_ADL_PixelBufferOperations_FillOperationDefinition The definition of a fill operation that fills a pixel buffer with a single color.

The type name of the definition, used as the type entry of an ADL asset, is "PixelBufferOperations.FillOperation". The fill operation holds a reference to the color it fills the pixel buffer with, resolved when the definition is linked; the referenced definition must be a Color definition.

Methods

Arcadia_ADL_PixelBufferOperations_FillOperationDefinition_create

Arcadia_ADL_PixelBufferOperations_FillOperationDefinition* Arcadia_ADL_PixelBufferOperations_FillOperationDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_String* colorName) Create the definition of a fill operation.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
colorName
The name of the referenced color definition.

Return value

The definition of the fill operation.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_PixelBufferOperations_CheckerboardFillOperationDefinition

Arcadia_ADL_PixelBufferOperations_CheckerboardFillOperationDefinition The definition of a fill operation that fills a pixel buffer with a checkerboard pattern.

The type name of the definition, used as the type entry of an ADL asset, is "PixelBufferOperations.CheckerboardFillOperation". The fill operation holds a reference to the color of the first checker and a reference to the color of the second checker, both resolved when the definition is linked; the referenced definitions must be Color definitions.

Methods

Arcadia_ADL_PixelBufferOperations_CheckerboardFillOperationDefinition_create

Arcadia_ADL_PixelBufferOperations_CheckerboardFillOperationDefinition* Arcadia_ADL_PixelBufferOperations_CheckerboardFillOperationDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Integer32Value checkerWidth,    Arcadia_Integer32Value checkerHeight,    Arcadia_String* firstCheckerColorName,    Arcadia_String* secondCheckerColorName) Create the definition of a checkerboard fill operation.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
checkerWidth
The width, in pixels, of a checker of the pattern.
checkerHeight
The height, in pixels, of a checker of the pattern.
firstCheckerColorName
The name of the referenced color definition of the first checker.
secondCheckerColorName
The name of the referenced color definition of the second checker.

Return value

The definition of the checkerboard fill operation.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_SampleBufferDefinition

Arcadia_ADL_SampleBufferDefinition The definition of a sample buffer: a digital signal of a given duration generated by a digital signal processing (DSP) definition.

The type name of the definition, used as the type entry of an ADL asset, is "SampleBuffer". The sample buffer holds a reference to the DSP its signal is generated with, resolved when the definition is linked.

Methods

Arcadia_ADL_SampleBufferDefinition_create

Arcadia_ADL_SampleBufferDefinition* Arcadia_ADL_SampleBufferDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Natural32Value duration,    Arcadia_ADL_Reference* dsp) Create the definition of a sample buffer.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
duration
The duration, in seconds, of the sample buffer.
dsp
The reference to the DSP the sample buffer is generated with.

Return value

The definition of the sample buffer.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_DSPStreamProviderDefinition

Arcadia_ADL_DSPStreamProviderDefinition A DSP-backed stream-provider description.

The ADL type name is DSPStreamProvider. It references a DSP definition and specifies a sample rate. Its optional duration is in seconds; absence means that the provider is infinite. The Engine audials node factory creates the runtime DSP graph and provider from this linked definition.

Methods

Arcadia_ADL_DSPStreamProviderDefinition_create

Arcadia_ADL_DSPStreamProviderDefinition* Arcadia_ADL_DSPStreamProviderDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_ADL_Reference* dsp,    Arcadia_Natural32Value sampleRate,    Arcadia_BooleanValue hasDuration,    Arcadia_Natural32Value duration) Create a DSP stream-provider definition.

duration is meaningful only when hasDuration is true; its unit is seconds.

Arcadia_ADL_SoundSourceNodeDefinition

Arcadia_ADL_SoundSourceNodeDefinition A runtime finite-buffer sound source description.

The ADL type name is SoundSourceNode. It references a SampleBuffer and has optional isLooping (default false) and volume (default 1.0) entries. The Engine audials node factory turns the linked definition into a runtime SoundSourceNode.

Methods

Arcadia_ADL_SoundSourceNodeDefinition_create

Arcadia_ADL_SoundSourceNodeDefinition* Arcadia_ADL_SoundSourceNodeDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_ADL_Reference* sampleBuffer,    Arcadia_BooleanValue isLooping,    Arcadia_Real32Value volume) Create a finite-buffer sound-source definition.

sampleBuffer references the finite buffer to play. isLooping and volume are the node settings represented in the ADL description.

Arcadia_ADL_StreamingSoundSourceNodeDefinition

Arcadia_ADL_StreamingSoundSourceNodeDefinition A runtime streaming sound-source description.

The ADL type name is StreamingSoundSourceNode. It references a provider definition and has optional volume (default 1.0). Playback ends when the provider reaches end-of-stream or the runtime node is stopped.

Methods

Arcadia_ADL_StreamingSoundSourceNodeDefinition_create

Arcadia_ADL_StreamingSoundSourceNodeDefinition* Arcadia_ADL_StreamingSoundSourceNodeDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_ADL_Reference* provider,    Arcadia_Real32Value volume) Create a streaming sound-source definition.

provider references the stream provider used by the runtime node.

Arcadia_ADL_ConstantDefinition

Arcadia_ADL_ConstantDefinition The definition of a digital signal processing (DSP) generating a constant signal.

The type name of the definition, used as the type entry of an ADL asset, is "DSP.Constant".

Methods

Arcadia_ADL_ConstantDefinition_create

Arcadia_ADL_ConstantDefinition* Arcadia_ADL_ConstantDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Real32Value value) Create the definition of a constant-signal DSP.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
value
The constant value of the signal.

Return value

The definition of the constant-signal DSP.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_SineWaveDefinition

Arcadia_ADL_SineWaveDefinition The definition of a digital signal processing (DSP) generating a sine wave signal of a constant frequency.

The type name of the definition, used as the type entry of an ADL asset, is "DSP.SineWave". Its asset reader requires a strictly positive Integer32 frequency in hertz (1..INT32_MAX) and raises Arcadia_Status_SemanticalError for nonpositive values before constructing the definition, including graph-expanded definitions. Zero does not mean silence. This source validation does not restrict the signed Integer32 storage or the constructor/factory below, which still accepts the full signed representation.

Methods

Arcadia_ADL_SineWaveDefinition_create

Arcadia_ADL_SineWaveDefinition* Arcadia_ADL_SineWaveDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Integer32Value frequency) Create the definition of a sine wave DSP.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
frequency
The frequency, in Hertz, of the sine wave.

Return value

The definition of the sine wave DSP.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_SawtoothWaveDefinition

Arcadia_ADL_SawtoothWaveDefinition The definition of a digital signal processing (DSP) generating a sawtooth wave signal of a constant frequency.

The type name of the definition, used as the type entry of an ADL asset, is "DSP.SawtoothWave". Its asset reader requires a strictly positive Integer32 frequency in hertz (1..INT32_MAX) and raises Arcadia_Status_SemanticalError for nonpositive values before constructing the definition. Zero does not mean silence. This source validation does not restrict the signed Integer32 storage or the constructor/factory below, which still accepts the full signed representation.

Methods

Arcadia_ADL_SawtoothWaveDefinition_create

Arcadia_ADL_SawtoothWaveDefinition* Arcadia_ADL_SawtoothWaveDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Integer32Value frequency) Create the definition of a sawtooth wave DSP.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
frequency
The frequency, in Hertz, of the sawtooth wave.

Return value

The definition of the sawtooth wave DSP.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_WhiteNoiseDefinition

Arcadia_ADL_WhiteNoiseDefinition The definition of a digital signal processing (DSP) generating a white noise signal.

The type name of the definition, used as the type entry of an ADL asset, is "DSP.WhiteNoise".

Methods

Arcadia_ADL_WhiteNoiseDefinition_create

Arcadia_ADL_WhiteNoiseDefinition* Arcadia_ADL_WhiteNoiseDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name) Create the definition of a white noise DSP.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.

Return value

The definition of the white noise DSP.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_UI_ButtonDefinition

Arcadia_ADL_UI_ButtonDefinition The definition of a rectangular user-interface button.

The type name of the definition, used as the type entry of an ADL asset, is "UI.Button". The definition stores the button rectangle, alignment strings, and background color. It holds no references and therefore links trivially.

Methods

Arcadia_ADL_UI_ButtonDefinition_create

Arcadia_ADL_UI_ButtonDefinition* Arcadia_ADL_UI_ButtonDefinition_create   (Arcadia_Thread* thread,    Arcadia_ADL_Definitions* definitions,    Arcadia_String* name,    Arcadia_Integer32Value left,    Arcadia_Integer32Value bottom,    Arcadia_Natural32Value width,    Arcadia_Natural32Value height,    Arcadia_String* text,    Arcadia_String* horizontalAlignment,    Arcadia_String* verticalAlignment,    Arcadia_Natural8Value backgroundRed,    Arcadia_Natural8Value backgroundGreen,    Arcadia_Natural8Value backgroundBlue) Create the definition of a user-interface button.

Parameters

thread
The thread.
definitions
The container the definition belongs to.
name
The name of the definition.
left
The lower-left x coordinate of the button rectangle.
bottom
The lower-left y coordinate of the button rectangle.
width
The width of the button rectangle.
height
The height of the button rectangle.
text
The button label.
horizontalAlignment
The horizontal alignment string.
verticalAlignment
The vertical alignment string.
backgroundRed
The red component of the button background.
backgroundGreen
The green component of the button background.
backgroundBlue
The blue component of the button background.

Return value

The definition of the user-interface button.

Errors

Raises Arcadia_Status_AllocationFailed if the definition cannot be allocated.

Arcadia_ADL_BlendFunction

typedef enum Arcadia_ADL_BlendFunction Arcadia_ADL_BlendFunction; An enumeration of blend functions. A blend function identifies the factor the source or the destination color is multiplied with when blending is enabled. The values correspond to the blend functions of the engine and to the blend factors of OpenGL.

The value None is used as the default value and indicates that blending is disabled and hence no blend functions are applied. In ADL assets, each element is identified by a string literal of the same name, e.g. "Zero" or "SourceAlpha".

Elements

Arcadia_ADL_BlendFunction_None
Blending is disabled. This is the default value.
Arcadia_ADL_BlendFunction_Zero
The factor (0,0,0,0).
Arcadia_ADL_BlendFunction_One
The factor (1,1,1,1).
Arcadia_ADL_BlendFunction_SourceColor
The factor is the color of the source.
Arcadia_ADL_BlendFunction_OneMinusSourceColor
The factor is one minus the color of the source.
Arcadia_ADL_BlendFunction_DestinationColor
The factor is the color of the destination.
Arcadia_ADL_BlendFunction_OneMinusDestinationColor
The factor is one minus the color of the destination.
Arcadia_ADL_BlendFunction_SourceAlpha
The factor is the alpha of the source.
Arcadia_ADL_BlendFunction_OneMinusSourceAlpha
The factor is one minus the alpha of the source.
Arcadia_ADL_BlendFunction_DestinationAlpha
The factor is the alpha of the destination.
Arcadia_ADL_BlendFunction_OneMinusDestinationAlpha
The factor is one minus the alpha of the destination.

Arcadia_ADL_AmbientColorSource

typedef enum Arcadia_ADL_AmbientColorSource Arcadia_ADL_AmbientColorSource; An enumeration of ambient color sources. An ambient color source identifies where the ambient color of a material is taken from.

In ADL assets, each element is identified by a string literal of the same name, e.g. "Mesh" or "Texture".

Elements

Arcadia_ADL_AmbientColorSource_Mesh
The ambient color is the ambient color of the mesh.
Arcadia_ADL_AmbientColorSource_Vertex
The ambient color is taken from the vertices of the mesh.
Arcadia_ADL_AmbientColorSource_Texture
The ambient color is sampled from a texture.

Arcadia_ADL_MaterialType

typedef enum Arcadia_ADL_MaterialType Arcadia_ADL_MaterialType; An enumeration of material types. A material type identifies the illumination model a material is evaluated with.

In ADL assets, the element BlinnPhong is identified by the string literal "Blinn-Phong".

Elements

Arcadia_ADL_MaterialType_BlinnPhong
The material is evaluated with the Blinn-Phong illumination model.

Arcadia_ADL_TextureFilter

typedef enum Arcadia_ADL_TextureFilter Arcadia_ADL_TextureFilter; An enumeration of texture magnification and minification filters. A texture filter identifies a technique to compute the pixel value closest to the specified uv coordinates. The values correspond to the texture filters of the engine.

The value None is used as the default value and indicates that no filter is specified and the engine's default filter is used. In ADL assets, each element is identified by a string literal of the same name, e.g. "Linear" or "Nearest".

Elements

Arcadia_ADL_TextureFilter_None
No filter is specified. This is the default value.
Arcadia_ADL_TextureFilter_Linear
Linear filtering, e.g. bilinear interpolation.
Arcadia_ADL_TextureFilter_Nearest
Nearest-neighbor filtering.

Arcadia_ADL_TextureAddressMode

typedef enum Arcadia_ADL_TextureAddressMode Arcadia_ADL_TextureAddressMode; An enumeration of texture address modes for the U and V texture coordinates. A texture address mode identifies a technique for resolving uv coordinates that are outside of the boundaries of a texture. The values correspond to the texture address modes of the engine.

The value None is used as the default value and indicates that no address mode is specified and the engine's default address mode is used. In ADL assets, each element is identified by a string literal of the same name, e.g. "ClampToEdge" or "Repeat".

Elements

Arcadia_ADL_TextureAddressMode_None
No address mode is specified. This is the default value.
Arcadia_ADL_TextureAddressMode_ClampToBorder
Texture coordinates are clamped to the border.
Arcadia_ADL_TextureAddressMode_ClampToEdge
Texture coordinates are clamped to the edge.
Arcadia_ADL_TextureAddressMode_MirroredRepeat
Texture coordinates are mirrored and then repeated.
Arcadia_ADL_TextureAddressMode_Repeat
Texture coordinates are repeated.