fuchsia.ui.gfx

Added: 7

PROTOCOLS

SnapshotCallbackDEPRECATED

Defined in fuchsia.ui.gfx/commands.fidl

Removed: 17 Deprecated: 13

OnData

Request

NameType
data fuchsia.mem/Buffer

STRUCTS

AddChildCmd

Defined in fuchsia.ui.gfx/commands.fidl

Add a node as a child to another node.

Constraints:

  • id refs a Node with the has_children characteristic.
  • child_id refs any Node.

Discussion: The child node is first removed from its existing parent, as if DetachCmd was applied first.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
child_id uint32 No default

AddLayerCmd

Defined in fuchsia.ui.gfx/commands.fidl

Add a layer to a layer stack. Constraints:

  • layer_stack_id refs a LayerStack.
  • layer_id refs a Layer.
  • The layer must not already belong to a different stack; it must first be detached.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
layer_stack_id uint32 No default
layer_id uint32 No default

AddLightCmd

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
scene_id uint32 No default
light_id uint32 No default

AddPartCmd

Defined in fuchsia.ui.gfx/commands.fidl

Add a node as a part of another node. The implications of being a part rather than a child differ based on the type of the part. However, one implication is constant: removing all of a node's children (e.g. via DetachChildrenCmd) does not affect its parts. This is similar to the "shadow DOM" in a web browser: the controls of a

Constraints:

  • id refs a Node with the has_parts characteristic.
  • part_id refs any Node.

Discussion: The part node is first removed from its existing parent, as if DetachCmd was applied first.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
part_id uint32 No default

AmbientLightArgs

Defined in fuchsia.ui.gfx/resources.fidl

An AmbientLight is a Light that is is assumed to be everywhere in the scene, in all directions.

Supported commands:

  • SetLightColor
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

BindMeshBuffersCmd

Defined in fuchsia.ui.gfx/commands.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
mesh_id uint32 No default
index_buffer_id uint32 No default
index_format MeshIndexFormat No default
index_offset uint64 No default
index_count uint32 No default
vertex_buffer_id uint32 No default
vertex_format MeshVertexFormat No default
vertex_offset uint64 No default
vertex_count uint32 No default
bounding_box BoundingBox No default

BoundingBox

Defined in fuchsia.ui.gfx/types.fidl

Represents an axis-aligned bounding box.

If any of the dimensions has a negative extent (e.g. max.x < min.x) then the bounding box is treated as empty. It is valid for a client to define an empty bounding box.

An "empty bounding box" is one that does not admit a point inhabitant. Note that a zero-volume, zero-area bounding box (e.g., a point like (0,0,0)-(0,0,0), or a line like (0,0,0)-(1,0,0)) is thus not empty.

FieldTypeDescriptionDefault
min vec3 No default
max vec3 No default

BufferArgs

Defined in fuchsia.ui.gfx/resources.fidl

A buffer mapped to a range of Memory.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
memory_id uint32 No default
memory_offset uint32 No default
num_bytes uint32 No default

CameraArgs

Defined in fuchsia.ui.gfx/resources.fidl

A Camera is used to render a Scene from a particular viewpoint. This is achieved by setting a Renderer to use the camera.

The following commands may be applied to a Camera:

  • SetCameraTransform
  • SetCameraProjection
  • SetCameraPoseBuffer
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
scene_id uint32

The scene that the camera is viewing.

No default

CircleArgs

Defined in fuchsia.ui.gfx/shapes.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
radius Value No default

ClipNodeArgs

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_parent
  • is_clip
  • has_parts
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
unused uint32 0

ColorRgb

Defined in fuchsia.ui.gfx/types.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
red float32 No default
green float32 No default
blue float32 No default

ColorRgbValue

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a ColorRgb, and value is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value ColorRgb No default
variable_id uint32 No default

ColorRgba

Defined in fuchsia.ui.gfx/types.fidl

sRGB color space and nonlinear transfer function.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
red uint8 No default
green uint8 No default
blue uint8 No default
alpha uint8 No default

ColorRgbaValue

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a ColorRgba, and value is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value ColorRgba No default
variable_id uint32 No default

CompositorArgs

Defined in fuchsia.ui.gfx/resources.fidl

A Compositor draws its LayerStack into a framebuffer provided by its attached Display, if any. If no display is attached, nothing is rendered.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

CreateResourceCmd resource

Defined in fuchsia.ui.gfx/commands.fidl

Instructs the compositor to create the specified Resource, and to register it in a table so that it can be referenced by subsequent commands.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32

An ID that is currently not used within the session.

No default
resource ResourceArgs No default

DetachChildrenCmd

Defined in fuchsia.ui.gfx/commands.fidl

Detaches all of a node's children (but not its parts).

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default

DetachCmd

Defined in fuchsia.ui.gfx/commands.fidl

Detaches a parentable object from its parent (e.g. a node from a parent node, or a layer from a layer stack). It is illegal to apply this command to a non-parentable object. No-op if the target object currently has no parent.

Constraints:

  • id refs a parentable object

Discussion: For nodes, this command will detach a node from its parent, regardless of whether it is a part or a child of its parent.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default

DetachLightCmd

Defined in fuchsia.ui.gfx/commands.fidl

Detach the light specified by light_id from the scene that it is attached to, if any.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
light_id uint32 No default

DetachLightsCmd

Defined in fuchsia.ui.gfx/commands.fidl

Detach all lights from the scene specified by scene_id.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
scene_id uint32 No default

DirectionalLightArgs

Defined in fuchsia.ui.gfx/resources.fidl

A DirectionalLight is a Light that is emitted from a point at infinity.

Although the light is directional, the light has some amount of angular dispersion (i.e., the light is not fully columnated). For simplicity, we assume the dispersion of the light source is symmetric about the light's primary direction.

Supported commands:

  • SetLightColor
  • SetLightDirection
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

DisplayCompositorArgs

Defined in fuchsia.ui.gfx/resources.fidl

A DisplayCompositor draws its attached LayerStack into an image that is presented on a display.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

DisplayInfo

Defined in fuchsia.ui.gfx/display_info.fidl

Provides information about a display.

Deprecated: 13

FieldTypeDescriptionDefault
width_in_px uint32

The size of the display, in physical pixels.

No default
height_in_px uint32 No default

EntityNodeArgs

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_transform
  • has_children
  • has_parent
  • has_parts
  • has_clip
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
unused uint32 0

ExportResourceCmdDeprecated resource

Defined in fuchsia.ui.gfx/commands.fidl

Create an external reference to the specified resource, which can then be imported into another Session by passing a handle to token's peer to ImportResourceCmd; see that comment for more details.

The importing client is typically in a different process than the exporter. No specific mechanism is provided for transferring a token from an exporter to an importer; collaborators may choose any out-of-band API they wish to do so.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
token handle<eventpair> No default

ExportToken resource

Defined in fuchsia.ui.gfx/tokens.fidl

Token that uniquely identifies a root point for a subgraph in the global scene graph. Each ExportToken has exactly one corresponding ImportToken.

A Scenic client can have its contents referenced from another client by creating a typed resource using this token. The other client must also create a correspondingly typed resource using the corresponding ImportToken.

The exact nature of the inter-client reference depends on the specific resources created from the tokens. For example, creating a View resource from this token allows everything attached to the View to be embedded in another clients ViewHolder.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value handle<eventpair> No default

FactoredTransform

Defined in fuchsia.ui.gfx/types.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
translation vec3 No default
scale vec3 No default
anchor vec3

Point around which rotation and scaling occur.

No default
rotation Quaternion No default

FloatValue

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a float32, and value is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value float32 No default
variable_id uint32 No default

ImageArgs

Defined in fuchsia.ui.gfx/resources.fidl

An image mapped to a range of a Memory resource.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
info fuchsia.images/ImageInfo No default
memory_id uint32 No default
memory_offset uint32 No default

ImageArgs2

Defined in fuchsia.ui.gfx/resources.fidl

An image mapped to a range of a Memory resource.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
width uint32 No default
height uint32 No default
buffer_collection_id uint32

The id of a BufferCollection. Before creating this resource, the buffer collection should be registered on the same Session with RegisterBufferCollection and it should have its contraints set. Once the buffers are allocated successfully (e.g. after calling WaitForBuffersAllocated), the collection's id can be used to create the image resource.

No default
buffer_collection_index uint32

The index of the VMO from the BufferCollection that backs this image.

No default

ImageArgs3 resource

Defined in fuchsia.ui.gfx/resources.fidl

An image that is backed by a BufferCollection registered with Allocator.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
width uint32 No default
height uint32 No default
import_token fuchsia.ui.composition/BufferCollectionImportToken

Image creation requires an allocated BufferCollection registered with Allocator. import_token should be the other end of a BufferCollectionExportToken that is successfully registered. All clients of the specified BufferCollection must have set their constraints and buffers should be allocated before calling.

No default
buffer_collection_index uint32

The index of the VMO from the BufferCollection that backs this image.

No default

ImagePipe2Args resource

Defined in fuchsia.ui.gfx/resources.fidl

ImagePipe2 is a Resource that can be used as a Texture for a Material.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
image_pipe_request server_end<fuchsia.images/ImagePipe2> No default

ImportResourceCmdDeprecated resource

Defined in fuchsia.ui.gfx/commands.fidl

Import a resource that was exported via ExportResourceCmd(). token is a handle to the eventpair peer that was used to export the resource, and spec describes the type of the imported resource, and the commands which can legally be applied to it. Afterward, id can be used to refer to the resource in an Command, similarly (but not identically: see below) to a resource that was created in the session. For example, you can add children to an imported EntityNode via AddChildCmd.

However, note that the importer does not gain full access to the imported resource, but rather to an attenuated subset of its capabilities. For example, you cannot use a DetachCmd to detach an imported EntityNode from its parent.

Unlike ExportResourceCmd, there is no configurable timeout. There is an expectation that the exported resource will become available in a short amount of time. TODO: this needs elaboration... e.g. we might notify via the SessionListener when we know that the link will never be made (e.g. if the peer of the import token is destroyed).

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
token handle<eventpair> No default
spec ImportSpec No default

ImportToken resource

Defined in fuchsia.ui.gfx/tokens.fidl

Token that uniquely identifies an attachment point for a subgraph in the global scene graph. Each ImportToken has exactly one corresponding ExportToken.

A Scenic client can reference contents from another client by creating a typed resource using this token. The other client must also create a correspondingly typed resource using the corresponding ExportToken.

The exact nature of the inter-client reference depends on the specific resources created from the tokens. For example, creating a ViewHolder resource from this token allows a client to embed another client's View.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value handle<eventpair> No default

ImportUnboundEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered when the imported resource with the given ID is no longer bound to its host resource, or if the imported resource can not be bound because the host resource is not available.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
resource_id uint32 No default

LayerArgs

Defined in fuchsia.ui.gfx/resources.fidl

A Layer is a 2-dimensional image that is drawn by a Compositor. The contents of each Layer in a Layerstack are independent of each other. A layer is not drawn unless it has a camera, texture, or color.

Supported commands:

  • Detach
  • SetCamera
  • SetColor
  • SetTexture
  • SetSize (depth must be zero)
  • SetSize
  • SetTranslation (z component determines the relative Z-ordering of layers)
  • SetRotation (must rotate around Z-axis)
  • SetScale
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

LayerStackArgs

Defined in fuchsia.ui.gfx/resources.fidl

A LayerStack is a stack of layers that are attached to a Compositor, which draws them in order of increasing Z-order (or rather, presents the illusion of drawing them in that order: it may apply any optimizations that don't affect the output).

Supported commands:

  • AddLayer
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

MaterialArgs

Defined in fuchsia.ui.gfx/resources.fidl

Simple texture-mapped material.

Supported commands:

  • SetTextureCmd: sets the texture, or it can be left as zero (no texture). The texture can be an Image or ImagePipe2.
  • SetColorCmd: sets the color.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

Matrix4Value

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec4, and value is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value mat4 No default
variable_id uint32 No default

MemoryArgs resource

Defined in fuchsia.ui.gfx/resources.fidl

Memory is a Resource that wraps a client-provided Zircon vmo to register it with Scenic.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
vmo handle<vmo>

The VMO which backs this memory.

No default
allocation_size uint64

The amount of memory from vmo that should be utilized.

No default
memory_type fuchsia.images/MemoryType

The type of memory stored in the VMO, namely whether it's GPU memory or host memory.

No default

MeshArgs

Defined in fuchsia.ui.gfx/shapes.fidl

A Mesh cannot be rendered until it has been bound to vertex/index buffers; see BindMeshBuffersCmd.

Removed: 17 Deprecated: 13

<EMPTY>

MeshVertexFormat

Defined in fuchsia.ui.gfx/commands.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
position_type ValueType

kVector2 or kVector3.

No default
normal_type ValueType

kVector2 or kVector3 (must match position_type), or kNone.

No default
tex_coord_type ValueType

kVector2 or kNone.

No default

Metrics

Defined in fuchsia.ui.gfx/types.fidl

Rendering target metrics associated with a node. See also MetricsEvent.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
scale_x float32

The ratio between the size of one logical pixel within the node's local coordinate system and the size of one physical pixel of the rendering target.

This scale factors change in relation to the resolution of the rendering target and the scale transformations applied by containing nodes. They are always strictly positive and non-zero.

For example, suppose the rendering target is a high resolution display with a device pixel ratio of 2.0 meaning that each logical pixel within the model corresponds to two physical pixels of the display. Assuming no scale transformations affect the node, then its metrics event will report a scale factor of 2.0.

Building on this example, if instead the node's parent applies a scale transformation of 0.25 to the node, then the node's metrics event will report a scale factor of 0.5 indicating that the node should render its content at a reduced resolution and level of detail since a smaller area of physical pixels (half the size in each dimension) will be rendered.

No default
scale_y float32 No default
scale_z float32 No default

MetricsEvent

Defined in fuchsia.ui.gfx/events.fidl

Provides rendering target metrics information about the specified node.

This event is delivered when the following conditions are true:

  • The node is a descendant of a Scene.
  • The node has kMetricsEventMask set to an enabled state.
  • The node's metrics have changed since they were last delivered, or since kMetricsEventMask transitioned from a disabled state to an enabled state.

Subscribe to this event to receive information about the scale factors you should apply when generating textures for your nodes.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
metrics Metrics No default

OpacityNodeArgsHACK

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_transform
  • has_parent
  • has_children
  • has_parts
  • has_opacity
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
unused uint32 0

Plane3

Defined in fuchsia.ui.gfx/types.fidl

Oriented plane described by a normal vector and a distance from the origin along that vector.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dir vec3 No default
dist float32 No default

PointLightArgs

Defined in fuchsia.ui.gfx/resources.fidl

A PointLight is a Light that emits light in all directions. By default, the intensity of the light falls off according to the physically based "inverse-square law" (see Wikipedia), although it can be adjusted to other values for artistic effect.

Supported commands:

  • SetLightColor
  • SetPointLightPosition
  • SetPointLightFalloff
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

Quaternion

Defined in fuchsia.ui.gfx/types.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
x float32 No default
y float32 No default
z float32 No default
w float32 No default

QuaternionValue

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a Quaternion, and value is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value Quaternion No default
variable_id uint32 No default

RectangleArgs

Defined in fuchsia.ui.gfx/shapes.fidl

Rectangle centered at (0,0).

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
width Value No default
height Value No default

ReleaseResourceCmd

Defined in fuchsia.ui.gfx/commands.fidl

Releases the client's reference to the resource; it is then illegal to use the ID in subsequent Commands. Other references to the resource may exist, so releasing the resource does not result in its immediate destruction; it is only destroyed once the last reference is released. For example, the resource may be required to render an in-progress frame, or it may be referred to by another resource). However, the ID will be immediately unregistered, and may be reused to create a new resource.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32

ID of the resource to be dereferenced.

No default

RemoveAllLayersCmd

Defined in fuchsia.ui.gfx/commands.fidl

Remove all layers from a layer stack. Constraints

  • layer_stack_id refs a LayerStack.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
layer_stack_id uint32 No default

RemoveLayerCmd

Defined in fuchsia.ui.gfx/commands.fidl

Remove a layer from a layer stack. Constraints:

  • layer_stack_id refs a LayerStack.
  • layer_id refs a Layer.
  • The layer must belong to this stack.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
layer_stack_id uint32 No default
layer_id uint32 No default

RendererArgs

Defined in fuchsia.ui.gfx/resources.fidl

A Renderer renders a Scene via a Camera.

Supported commands:

  • SetCamera
  • SetRendererParam
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

RoundedRectangleArgs

Defined in fuchsia.ui.gfx/shapes.fidl

RoundedRectangle centered at (0,0). Legal parameter values must satisfy the constraint that the flat sides of the rectangle have non-negative length. In other words, the following constraints must hold:

  • top_left_radius + top_right_radius <= width
  • bottom_left_radius + bottom_right_radius <= width
  • top_left_radius + bottom_left_radius <= height
  • top_right_radius + bottom_right_radius <= height
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
width Value No default
height Value No default
top_left_radius Value No default
top_right_radius Value No default
bottom_right_radius Value No default
bottom_left_radius Value No default

SceneAddAmbientLightCmd

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
scene_id uint32 No default
light_id uint32 No default

SceneAddDirectionalLightCmd

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
scene_id uint32 No default
light_id uint32 No default

SceneAddPointLightCmd

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
scene_id uint32 No default
light_id uint32 No default

SceneArgs

Defined in fuchsia.ui.gfx/resources.fidl

A Scene is the root of a scene-graph, and defines the rendering environment (lighting, etc.) for the tree of nodes beneath it.

Supported commands:

  • Add/RemoveLight
  • AddChild
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
dummy uint32 0

SendSizeChangeHintCmdHACK

Defined in fuchsia.ui.gfx/commands.fidl

Sends a hint about a pending size change to the given node and all nodes below. This is generally sent before an animation.

width_change_factor and height_change_factor is how much bigger or smaller the item is expected to be in the near future. This one number encapsulate both changes in scale, as well as changes to layout width and height.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
width_change_factor float32 No default
height_change_factor float32 No default

SetAnchorCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource's (typically a Node's) anchor point.

Constraints:

  • id refs a Resource with the has_transform characteristic.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
value Vector3Value No default

SetCameraClipSpaceTransformCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's 2D clip-space transform.

Constraints:

  • camera_id refs a Camera.
  • translation is the desired translation, in Vulkan NDC.
  • scale is the scale factor to apply on the x/y plane before translation.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
camera_id uint32 No default
translation vec2 No default
scale float32 No default

SetCameraCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a renderer's camera.

Constraints:

  • renderer_id refs a Renderer.
  • camera_id refs a Camera, or stops rendering by passing zero.
  • matrix is a value or variable of type kMatrix4x4.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
renderer_id uint32 No default
camera_id uint32 No default

SetCameraPoseBufferCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets the "pose buffer" for the camera identified by camera_id. This operation can be applied to both Cameras and StereoCameras.

This will override any position and rotation set for the camera and will make it take its position and rotation from the pose buffer each frame based on the presentation time for that frame.

A pose buffer represents a ring buffer of poses for a fixed number of time points in the future. Each entry in the buffer identified by buffer_id is a quaternion and a position layed out as follows:

struct Pose { // Quaternion float32 a; float32 b; float32 c; float32 d;

// Position float32 x; float32 y; float32 z;

// Reserved/Padding byte[4] reserved; }

The buffer can be thought of as a packed array of num_entries Pose structs and is required to be at least num_entries * sizeof(Pose) bytes.

The quaternions and positions are specified in the space of the camera's parent node.

base_time is a base time point expressed in nanoseconds in the CLOCK_MONOTONIC timebase and time_interval is the time in nanoseconds between entries in the buffer. base_time must be in the past.

For a given point in time t expressed in nanoseconds in the CLOCK_MONOTONIC timebase the index of the corresponding pose in the pose buffer can be computed as follows:

index(t) = ((t - base_time) / time_interval) % num_entries

poses[index(t)] is valid for t over the time interval (t - time_interval, t] and should be expected to updated continuously without synchronization for the duration of that interval. If a single pose value is needed for multiple non-atomic operations a value should be latched and stored outside the pose buffer.

Because the poses are not protected by any synchronization primitives it is possible that when a pose is latched it will be only partially updated, and the pose being read will contain some components from the pose before it is updated and some components from the updated pose. The safety of using these "torn" poses relies on two things:

  1. Sequential poses written to poses[index(t)] are very similar to each other numerically, so that if some components are taken from the first and some are taken from another the result is numerically similar to both

  2. The space of positions and quaternions is locally flat at the scale of changes between sequential updates, which guarantees that two poses which are numerically similar also represent semantically similar poses (i.e. there are no discontinuities which will cause a small numerical change in the position or quaterninon to cause a large change in the encoded pose) For positions this is guaranteed because Scenic uses a Euclidean 3-space which is globally flat and for quaternions this is guaranteed because quaternions encode rotation as points on a unit 4-sphere, and spheres are locally flat. For more details on the encoding of rotations in quaterions see https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

This commanderation is intended for late latching camera pose to support low-latency motion-tracked rendering.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
camera_id uint32 No default
buffer_id uint32 No default
num_entries uint32 No default
base_time int64 No default
time_interval uint64 No default

SetCameraProjectionCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's projection matrix. This operation cannot be applied to a StereoCamera.

Constraints:

  • camera_id refs a Camera that is not a StereoCamera.
  • fovy is the Y-axis field of view, in radians.

NOTE: A default orthographic projection is specified by setting fovy to zero. In this case, the camera transform is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
camera_id uint32 No default
fovy FloatValue No default

SetCameraTransformCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's view matrix. This operation can be applied to both Cameras and StereoCameras.

Constraints:

  • camera_id refs a Camera.
  • eye_position is the position of the eye.
  • eye_look_at is the point is the scene the that eye is pointed at.
  • eye_up defines the camera's "up" vector.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
camera_id uint32 No default
eye_position Vector3Value No default
eye_look_at Vector3Value No default
eye_up Vector3Value No default

SetClipCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's clip. DEPRECATED: use SetClipPlanesCmd.

Constraints:

  • node_id refs a Node with the has_clip characteristic.
  • clip_id a Node with the is_clip characteristic, or nothing. If the referenced node is not rooted, then it will have no effect (since its full world-transform cannot be determined).
  • clip_to_self If false, children are only clipped to the region specified by clip_id. If true, children are additionally clipped to the node's shape (as determined by its ShapeNode parts).

Discussion: If a node has a clip, it will be applied to both the parts and the children of the node. Under some circumstances (TBD), a clip will not be applicable to a node; in such cases it will be as though no clip has been specified for the node.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
clip_id uint32 No default
clip_to_self bool No default

SetClipPlanesCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets the list of clip planes that apply to a Node and all of its children. Replaces the list set by any previous SetClipPlanesCmd.

  • node_id refs a Node with the has_clip characteristic.
  • clip_planes is the new list of oriented clip planes.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
clip_planes vector<Plane3> No default

SetColorCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a material's color.

Constraints:

  • material_id refs a Material.

If a texture is set on the material, then the value sampled from the texture is multiplied by the color.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
material_id uint32 No default
color ColorRgbaValue No default

SetDisableClippingCmd

Defined in fuchsia.ui.gfx/commands.fidl

Set whether clipping should be disabled for the specified renderer. For a newly-created renderer, clipping will NOT be disabled (i.e. it will be enabled).

NOTE: this disables visual clipping only; objects are still clipped for the purposes of hit-testing.

renderer_id refs the target renderer. disable_clipping specifies whether the clipping should be disabled.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
renderer_id uint32 No default
disable_clipping bool No default

SetDisplayColorConversionCmdHACK

Defined in fuchsia.ui.gfx/commands.fidl

Set the color conversion applied to the compositor's display. The conversion is applied to to each pixel according to the formula:

(matrix * (pixel + preoffsets)) + postoffsets

where pixel is a column vector consisting of the pixel's 3 components.

matrix is passed in row-major order. Clients will be responsible for passing default values, when needed. Default values are not currently supported in fidl. Default Values: preoffsets = [0 0 0] matrix = [1 0 0 0 1 0 0 0 1] postoffsets = [0 0 0]

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
compositor_id uint32 No default
preoffsets float32[3] No default
matrix float32[9] No default
postoffsets float32[3] No default

SetDisplayMinimumRgbCmdHACK

Defined in fuchsia.ui.gfx/commands.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
min_value uint8 No default

SetDisplayRotationCmdHACK

Defined in fuchsia.ui.gfx/commands.fidl

Depending on the device, the display might be rotated with respect to what the lower level device controller considers the physical orientation of pixels. The compositors and layers must be in alignment with the underlying physical orientation which means that for certain operations like screenshotting, they cannot provide results with the accurate orientation unless they have information about how the higher-level display is orienting the screen. The only legal values for the rotation are 0, 90, 180, and 270, which are each applied counterclockwise.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
compositor_id uint32 No default
rotation_degrees uint32 No default

SetEnableDebugViewBoundsCmd

Defined in fuchsia.ui.gfx/commands.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_id uint32 No default
enable bool No default

SetEventMaskCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets which events a resource should deliver to the session listener. This command replaces any prior event mask for the resource.

The initial event mask for a resource is zero, meaning no events are reported.

Constraints:

  • resource_id is a valid resource id
  • event_mask is zero or a combination of k*EventMask bits OR'ed together.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
event_mask uint32 No default

SetHitTestBehaviorCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a node's hit test behavior.

Discussion: By default, hit testing is performed on the node's content, its parts, and its children.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
hit_test_behavior HitTestBehavior No default

SetImportFocusCmdDEPRECATED

Defined in fuchsia.ui.gfx/commands.fidl

Removed: 17 Deprecated: 13

<EMPTY>

SetLabelCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a label to help developers identify the purpose of the resource when using diagnostic tools.

The label serves no functional purpose in the scene graph. It exists only to help developers understand its structure. The scene manager may truncate or discard labels at will.

Constraints:

  • The label's maximum length is kLabelMaxLength characters.
  • Setting the label to an empty string clears it.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
label string No default

SetLayerStackCmd

Defined in fuchsia.ui.gfx/commands.fidl

Set a compositor's layer stack, replacing the current stack (if any). Constraints:

  • compositor_id refs a DisplayCompositor.
  • layer_stack_id refs a LayerStack.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
compositor_id uint32 No default
layer_stack_id uint32 No default

SetLightColorCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets the color of the Light identified by light_id.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
light_id uint32 No default
color ColorRgbValue No default

SetLightDirectionCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets the direction of the DirectionalLight identified by light_id.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
light_id uint32 No default
direction Vector3Value No default

SetMaterialCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's material.

Constraints:

  • node_id refs a Node with the has_material characteristic.
  • material_id refs a Material, or nothing.
  • if this command causes the target to have both a Shape and a Material, then these must be compatible with each other (see README.md regarding "Shape/Material Compatibility").

Discussion: In order to be painted, a node requires both a Shape and a Material. Without a material, a node can still participate in hit-testing and clipping. Without a shape, a node cannot do any of the above.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
material_id uint32 No default

SetOpacityCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a node's opacity.

Constraints:

  • node_id refs a Node with the has_opacity characteristic.
  • opacity is in the range [0, 1].
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
opacity float32 No default

SetPointLightFalloffCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets the falloff factor of the PointLight identified by light_id. A value of 1.0 corresponds to the physically-based "inverse-square law" (see Wikipedia). Other values can be used for artistic effect, e.g. a value of 0.0 means that the radiance of a surface is not dependant on its distance from the light.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
light_id uint32 No default
falloff FloatValue No default

SetPointLightPositionCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets the position of the PointLight identified by light_id.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
light_id uint32 No default
position Vector3Value No default

SetRendererCmd

Defined in fuchsia.ui.gfx/commands.fidl

Set a layer's renderer, replacing the current renderer (if any). Constraints:

  • layer_id refs a Layer.
  • renderer_id refs a Renderer.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
layer_id uint32 No default
renderer_id uint32 No default

SetRendererParamCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a parameter that affects how a renderer renders a scene.

renderer_id refs the Renderer that is being modified. param describes the parameter that should be set, and to what.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
renderer_id uint32 No default
param RendererParam No default

SetRotationCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource's (typically a Node's) rotation.

Constraints:

  • id refs a Resource with the has_transform characteristic.

Discussion: Quaternions represent any rotation in a 3D coordinate system. Consisting of [a,b,c,d], [a] represents the amount of rotation that should be applied and [b,c,d] represents the vector around which the rotation is applied. This conforms to the semantics of glm::quat.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
value QuaternionValue No default

SetScaleCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource's (typically a Node's) scale.

Constraints:

  • id refs a Resource with the has_transform characteristic.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
value Vector3Value No default

SetSemanticVisibilityCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a node's semantic visibility.

Discussion: By default, all nodes are semantically visible. Semantically invisible nodes and their children are ignored by hit tests performed for accessibility.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
visible bool true

SetShapeCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's shape.

Constraints:

  • node_id refs a Node with the has_shape characteristic.
  • shape_id refs a Shape, or nothing.
  • if this command causes the target to have both a Shape and a Material, then these must be compatible with each other (see README.md regarding "Shape/Material Compatibility").

Discussion: In order to be painted, a node requires both a Shape and a Material. Without a material, a node can still participate in hit-testing and clipping. Without a shape, a node cannot do any of the above.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
shape_id uint32 No default

SetSizeCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets an object's size.

Constraints:

  • id refs a resizeable object.
  • some objects that support this command may have additional constraints (e.g. in some cases depth must be zero).
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
value Vector2Value No default

SetStereoCameraProjectionCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a StereoCamera's projection matrices. This operation can only be applied to a StereoCamera.

Constraints:

  • camera_id refs a StereoCamera.
  • left_projection is the projection matrix for the left eye.
  • right_projection is the projection matrix for the right eye.

These projection matrices may also contain a transform in camera space for their eye if needed.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
camera_id uint32 No default
left_projection Matrix4Value No default
right_projection Matrix4Value No default

SetTagCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's tag value.

A session can apply a tag value to any node to which it has access, including imported nodes. These tags are private to the session and cannot be read or modified by other sessions. When multiple sessions import the same node, each session will only observe its own tag values.

Hit test results for a session only include nodes which the session has tagged with a non-zero value. Therefore a session can use tag values to associate nodes with their functional purpose when picked.

Constraints:

  • node_id refs a Node.
  • tag_value is the tag value to assign, or 0 to remove the tag.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
tag_value uint32 No default

SetTextureCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a material's texture.

Constraints:

  • material_id refs a Material.
  • texture_id refs a Image, ImagePipe2, or nothing.

If no texture is provided (i.e. texture_id is zero), a solid color is used. If a texture is provided, then the value sampled from the texture is multiplied by the color.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
material_id uint32 No default
texture_id uint32 No default

SetTranslationCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource's (typically a Node's) translation.

Constraints:

  • id refs a Resource with the has_transform characteristic.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
id uint32 No default
value Vector3Value No default

SetViewHolderBoundsColorCmd

Defined in fuchsia.ui.gfx/commands.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_holder_id uint32 No default
color ColorRgbValue No default

SetViewPropertiesCmd

Defined in fuchsia.ui.gfx/commands.fidl

Sets the properties for a ViewHolder's attached View.

Constraints:

  • view_holder_id refs a ViewHolder.
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_holder_id uint32 No default
properties ViewProperties No default

ShapeNodeArgs

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_parent
  • has_shape
  • has_material
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
unused uint32 0

SizeChangeHintEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered in response to a size change hint from a parent node (SendSizeChangeHintCmd).

This event is delivered when the following conditions are true:

  • The node has kSizeChangeEventMask set to an enabled state.
  • A parent node has sent a SendSizeChangeHintCmd.

Subscribe to this event to receive information about how large textures you will need in the near future for your nodes. The canonical use case is to pre-allocate memory to avoid repeated re-allocations.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
width_change_factor float32 No default
height_change_factor float32 No default

StereoCameraArgs

Defined in fuchsia.ui.gfx/resources.fidl

A StereoCamera is a Camera that renders the scene in side-by-side stereo.

Any command which can be applied to a Camera can also be applied to a StereoCamera. Additional supported commands:

  • SetStereoCameraProjection
Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
scene_id uint32

The scene that the camera is viewing.

No default

TakeSnapshotCmdDEPRECATED resource

Defined in fuchsia.ui.gfx/commands.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
node_id uint32 No default
callback SnapshotCallbackDEPRECATED No default

VariableArgs

Defined in fuchsia.ui.gfx/resources.fidl

Describes a typed, client-modifiable value.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
type ValueType No default
initial_value Value No default

Vector2Value

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec2, and value is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value vec2 No default
variable_id uint32 No default

Vector3Value

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec3, and value is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value vec3 No default
variable_id uint32 No default

Vector4Value

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec4, and value is ignored.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
value vec4 No default
variable_id uint32 No default

ViewArgs resource

Defined in fuchsia.ui.gfx/resources.fidl

Represents the root of a subgraph within a larger scene graph. Nodes can be attached to the View as children, and these Nodes will have the Views' coordinate transform applied to their own, in addition to being clipped to the Views' bounding box. See ViewProperties.

Each View is linked to a paired ViewHolder via a shared token pair.

Usually the View and its associated ViewHolder exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
token fuchsia.ui.views/ViewToken No default
debug_name string? No default

ViewArgs3 resource

Defined in fuchsia.ui.gfx/resources.fidl

Represents the root of a subgraph within a larger scene graph. Nodes can be attached to the View as children, and these Nodes will have the Views' coordinate transform applied to their own, in addition to being clipped to the Views' bounding box. See ViewProperties.

Each View is linked to a paired ViewHolder via a shared token pair.

Usually the View and its associated ViewHolder exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

Clients self-identify their View with a ViewRef, which is a stable identifier that may be cloned and passed to other components in a feed-forward style. It is accompanied by a ViewRefControl, which Scenic uses to signal View destruction across the system; the ViewRefControl must be unique - do not clone it.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
token fuchsia.ui.views/ViewToken No default
control_ref fuchsia.ui.views/ViewRefControl

control_ref.reference must have default eventpair rights (i.e., with signaling), minus ZX_RIGHT_DUPLICATE.

No default
view_ref fuchsia.ui.views/ViewRef

view_ref.reference must have basic rights (i.e., no signaling).

No default
debug_name string? No default

ViewAttachedToSceneEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when the parent ViewHolder for the given View becomes a part of a Scene.

A ViewHolder is considered to be part of a Scene if there is an unbroken chain of parent-child relationships between the Scene node and the ViewHolder node.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_id uint32 No default
properties ViewProperties No default

ViewConnectedEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder's Session when its peer View is connected.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_holder_id uint32 No default

ViewDetachedFromSceneEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when the parent ViewHolder for the given View is no longer part of a scene.

This can happen if the ViewHolder is detached directly from the scene, or if one of its parent nodes is.

A ViewHolder is considered to be part of a Scene if there is an unbroken chain of parent-child relationships between the Scene node and the ViewHolder node.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_id uint32 No default

ViewDisconnectedEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder's Session when its peer View is disconnected or destroyed.

If the View is destroyed before the connection is established, then this event will be delivered immediately when the ViewHolder attempts to connect.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_holder_id uint32 No default

ViewHolderArgs resource

Defined in fuchsia.ui.gfx/resources.fidl

Represents an attachment point for a subgraph within a larger scene graph. The ViewHolder can be attached to a Node as a child, and the contents of the linked View will become a child of the Node as well.

Each ViewHolder is linked to a paired View via a shared token pair.

Usually the ViewHolder and its associated View exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
token fuchsia.ui.views/ViewHolderToken No default
debug_name string? No default

ViewHolderConnectedEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when its peer ViewHolder is connected.

If the ViewHolder is destroyed before the connection is established, then this event will not be delivered.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_id uint32 No default

ViewHolderDisconnectedEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when its peer ViewHolder is disconnected or destroyed.

If the ViewHolder is destroyed before the connection is established, then this event will be delivered immediately when the View attempts to connect.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_id uint32 No default

ViewProperties

Defined in fuchsia.ui.gfx/types.fidl

Represents the properties for a View.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
bounding_box BoundingBox

The View's bounding box extents can be defined as: { bounding_box.min, bounding_box.max } Content contained within the View is clipped to this bounding box.

No default
inset_from_min vec3

insets_from_min and insets_from_max specify the distances between the view's bounding box and that of its parent.

These properties are not strictly enforced by Scenic, but only used as hints for clients and other components that receives ViewProperties:

View clients can assume that anything drawn outside of { bounding_box.min + inset_from_min, bounding_box.max - inset_from_max } may be obscured by an ancestor view. The reason for obscuring, and the rules surrounding it, is specific to each product.

No default
inset_from_max vec3 No default
focus_change bool

Whether the View can receive a focus event; default is true. When false, and this View is eligible to receive a focus event, no focus/unfocus event is actually sent to any View.

true
downward_input bool

Whether the View allows geometrically underlying Views to receive input; default is true. When false, Scenic does not send input events to underlying Views.

true

ViewPropertiesChangedEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered when the parent ViewHolder for the given View makes a change to the View's properties.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_id uint32 No default
properties ViewProperties No default

ViewState

Defined in fuchsia.ui.gfx/types.fidl

Represents the state of a View in Scenic.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
is_rendering bool

Whether the View is rendering. Default is false. Delivered to the View's corresponding ViewHolder after the View's first frame render request.

No default

ViewStateChangedEvent

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder's Session when its peer View's state has changed.

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
view_holder_id uint32 No default
state ViewState No default

mat4

Defined in fuchsia.ui.gfx/types.fidl

FieldTypeDescriptionDefault
matrix float32[16]

Column major order.

No default

vec2

Defined in fuchsia.ui.gfx/types.fidl

FieldTypeDescriptionDefault
x float32 No default
y float32 No default

vec3

Defined in fuchsia.ui.gfx/types.fidl

FieldTypeDescriptionDefault
x float32 No default
y float32 No default
z float32 No default

vec4

Defined in fuchsia.ui.gfx/types.fidl

Removed: 17 Deprecated: 13

FieldTypeDescriptionDefault
x float32 No default
y float32 No default
z float32 No default
w float32 No default

ENUMS

HitTestBehavior strict

Type: uint32

Defined in fuchsia.ui.gfx/types.fidl

Describes how nodes interact with hit testings.

Removed: 17 Deprecated: 13

NameValueDescription
0

Apply hit testing to the node's content, its parts, and its children.

1

Suppress hit testing of the node and everything it contains.

ImportSpec strict

Type: uint32

Defined in fuchsia.ui.gfx/resources.fidl

Describes an exported resource that is to be imported by an ImportResourceCmd.

NOTE: Currently just an enum of importable resource types, but may later be expanded to express concepts like "meshes with a particular vertex format".

Removed: 17 Deprecated: 13

NameValueDescription
0

MeshIndexFormat strict

Type: uint32

Defined in fuchsia.ui.gfx/commands.fidl

Set a mesh's indices and vertices.

mesh_id refs the Mesh to be updated. index_buffer_id refs a Buffer that contains the mesh indices. index_format defines how the index buffer data is to be interpreted. index_offset number of bytes from the start of the index Buffer. index_count number of indices. vertex_buffer_id refs a Buffer that contains the mesh vertices. vertex_format defines how the vertex buffer data is to be interpreted. vertex_offset number of bytes from the start of the vertex Buffer. vertex_count number of vertices. bounding_box must contain all vertices within the specified range.

The MeshVertexFormat defines which per-vertex attributes are provided by the mesh, and the size of each attribute (and therefore the size of each vertex). The attributes are ordered within the vertex in the same order that they appear within the MeshVertexFormat struct. For example, if the values are kVector3, kNone and kVector2, then:

  • each vertex has a position and UV-coordinates, but no surface normal.
  • the 3D position occupies bytes 0-11 (3 dimensions * 4 bytes per float32).
  • the UV coords occupy bytes 12-19, since no surface normal is provided.
Removed: 17 Deprecated: 13

NameValueDescription
1
2

RenderFrequency strict

Type: uint32

Defined in fuchsia.ui.gfx/renderer.fidl

Removed: 17 Deprecated: 13

NameValueDescription
0
1

ShadowTechnique strict

Type: uint32

Defined in fuchsia.ui.gfx/renderer.fidl

Represents the shadow algorithm that the Renderer should use when lighting the scene.

Removed: 17 Deprecated: 13

NameValueDescription
0

No shadows.

1

Default. Screen-space, depth-buffer based shadows; SSDO-ish.

2

Basic shadow map.

3

Moment shadow map (see http:///momentsingraphics.de).

4

Stencil shadow volume.

ValueType strict

Type: uint32

Defined in fuchsia.ui.gfx/types.fidl

Removed: 17 Deprecated: 13

NameValueDescription
0
1
2
3
4
5
6
7
8
9

UNIONS

Command strict resource

Defined in fuchsia.ui.gfx/commands.fidl

Commands that are used to modify the state of a Session.

Removed: 17 Deprecated: 13
<tr id="Command.scene_add_ambientlight"> <tr id="Command.scene_add_directionallight"> <tr id="Command.scene_add_pointlight">
OrdinalVariantTypeDescription
create_resource CreateResourceCmd
release_resource ReleaseResourceCmd
export_resource ExportResourceCmdDeprecated
import_resource ImportResourceCmdDeprecated
set_tag SetTagCmd

Tagging commands.

detach DetachCmd

Grouping commands.

set_translation SetTranslationCmd

Spatial commands.

set_scale SetScaleCmd
set_rotation SetRotationCmd
set_anchor SetAnchorCmd
set_size SetSizeCmd
set_opacity SetOpacityCmd
send_size_change_hint_hack SendSizeChangeHintCmdHACK
add_child AddChildCmd

Node-specific commands.

add_part AddPartCmd

re-parenting?

detach_children DetachChildrenCmd
set_shape SetShapeCmd
set_material SetMaterialCmd
set_clip SetClipCmd
set_hit_test_behavior SetHitTestBehaviorCmd
set_view_properties SetViewPropertiesCmd
take_snapshot_cmd TakeSnapshotCmdDEPRECATED
set_camera SetCameraCmd

Camera and lighting commands.

set_camera_transform SetCameraTransformCmd
set_camera_projection SetCameraProjectionCmd
set_stereo_camera_projection SetStereoCameraProjectionCmd
set_camera_pose_buffer SetCameraPoseBufferCmd
set_light_color SetLightColorCmd
set_light_direction SetLightDirectionCmd
add_light AddLightCmd
detach_light DetachLightCmd
detach_lights DetachLightsCmd
set_texture SetTextureCmd
set_color SetColorCmd
bind_mesh_buffers BindMeshBuffersCmd

Mesh commands.

add_layer AddLayerCmd

Layer and renderer commands.

remove_layer RemoveLayerCmd
remove_all_layers RemoveAllLayersCmd
set_layer_stack SetLayerStackCmd
set_renderer SetRendererCmd
set_renderer_param SetRendererParamCmd
set_event_mask SetEventMaskCmd

Events.

set_label SetLabelCmd

Diagnostic commands.

set_disable_clipping SetDisableClippingCmd

Debugging commands.

set_import_focus SetImportFocusCmdDEPRECATED
set_clip_planes SetClipPlanesCmd
set_point_light_position SetPointLightPositionCmd
set_point_lightfalloff SetPointLightFalloffCmd
<h3 id="Command.scene_add_ambientlight" class="add-link hide-from-toc">49 scene_add_ambientlight SceneAddAmbientLightCmd
<h3 id="Command.scene_add_directionallight" class="add-link hide-from-toc">50 scene_add_directionallight SceneAddDirectionalLightCmd
<h3 id="Command.scene_add_pointlight" class="add-link hide-from-toc">51 scene_add_point_light SceneAddPointLightCmd
set_display_color_conversion SetDisplayColorConversionCmdHACK
set_display_rotation SetDisplayRotationCmdHACK
set_enable_view_debug_bounds SetEnableDebugViewBoundsCmd
set_view_holder_bounds_color SetViewHolderBoundsColorCmd
set_camera_clip_space_transform SetCameraClipSpaceTransformCmd
set_display_minimum_rgb SetDisplayMinimumRgbCmdHACK
set_semantic_visibility SetSemanticVisibilityCmd

Event strict

Defined in fuchsia.ui.gfx/events.fidl

These are all of the types of events which can be reported by a Session. Use SetEventMaskCmd to enable event delivery for a resource.

Removed: 17 Deprecated: 13
OrdinalVariantTypeDescription
metrics MetricsEvent

Events which are controlled by a mask.

size_change_hint SizeChangeHintEvent
import_unbound ImportUnboundEvent

Events which are always delivered, regardless of mask.

view_connected ViewConnectedEvent
view_disconnected ViewDisconnectedEvent
view_holder_disconnected ViewHolderDisconnectedEvent
view_attached_to_scene ViewAttachedToSceneEvent
view_detached_from_scene ViewDetachedFromSceneEvent
view_properties_changed ViewPropertiesChangedEvent
view_state_changed ViewStateChangedEvent
view_holder_connected ViewHolderConnectedEvent

RendererParam strict

Defined in fuchsia.ui.gfx/renderer.fidl

These are all of the types of parameters that can be set to configure a Renderer.

Removed: 17 Deprecated: 13
OrdinalVariantTypeDescription
shadow_technique ShadowTechnique
reserved RenderFrequency

DEPRECATED

enable_debugging bool

ResourceArgs strict resource

Defined in fuchsia.ui.gfx/resources.fidl

These are all of the types of resources that can be created within a Session. Add new fields only to the bottom of the list.

Removed: 17 Deprecated: 13
OrdinalVariantTypeDescription
memory MemoryArgs
image ImageArgs
buffer BufferArgs
view ViewArgs
view_holder ViewHolderArgs
rectangle RectangleArgs
rounded_rectangle RoundedRectangleArgs
circle CircleArgs
mesh MeshArgs
shape_node ShapeNodeArgs
clip_node ClipNodeArgs
entity_node EntityNodeArgs
opacity_node OpacityNodeArgsHACK
material MaterialArgs
compositor CompositorArgs
display_compositor DisplayCompositorArgs
layer_stack LayerStackArgs
layer LayerArgs
scene SceneArgs
camera CameraArgs
stereo_camera StereoCameraArgs
renderer RendererArgs
ambient_light AmbientLightArgs
directional_light DirectionalLightArgs
variable VariableArgs
point_light PointLightArgs
view3 ViewArgs3
image_pipe2 ImagePipe2Args
image2 ImageArgs2
image3 ImageArgs3

Value strict

Defined in fuchsia.ui.gfx/types.fidl

Removed: 17 Deprecated: 13
OrdinalVariantTypeDescription
vector1 float32
vector2 vec2
vector3 vec3
vector4 vec4
matrix4x4 mat4
color_rgba ColorRgba
color_rgb ColorRgb
degrees float32

Degrees of counter-clockwise rotation in the XY plane.

quaternion Quaternion
transform FactoredTransform
variable_id uint32

ID of a value-producing resource (an animation or an expression). The type of this value matches the type produced by the named resource.

CONSTANTS

NameValueTypeDescription
kLabelMaxLength 32 uint32

Maximum length for a resource label.

Removed: 17 Deprecated: 13
kMetricsEventMask 1 uint32

Reports metrics information. This event type is only reported for node resources.

Removed: 17 Deprecated: 13
kSizeChangeHintEventMask 2 uint32
Removed: 17 Deprecated: 13