[scenic] Format graphics-related FIDL interfaces
This is a rebase and reland of 6624dac809333fde6c4d26fa48a13dc287863ab5
TEST=cq, manual testing with Chromium
Change-Id: I084e7e558639af44692ee1a5637a75abb8a6a326
diff --git a/public/fidl/fuchsia.ui.app/view_provider.fidl b/public/fidl/fuchsia.ui.app/view_provider.fidl
index 0e1dbda..45e5f14 100644
--- a/public/fidl/fuchsia.ui.app/view_provider.fidl
+++ b/public/fidl/fuchsia.ui.app/view_provider.fidl
@@ -41,7 +41,7 @@
//
// Modules can use these mechanisms to establish a distributed,
// inter-process scene graph.
- 1: CreateView(handle<eventpair> token,
- request<fuchsia.sys.ServiceProvider>? incoming_services,
- fuchsia.sys.ServiceProvider? outgoing_services);
+ CreateView(handle<eventpair> token,
+ request<fuchsia.sys.ServiceProvider>? incoming_services,
+ fuchsia.sys.ServiceProvider? outgoing_services);
};
diff --git a/public/fidl/fuchsia.ui.gfx/commands.fidl b/public/fidl/fuchsia.ui.gfx/commands.fidl
index 5ff97e8..f3fe2ac 100644
--- a/public/fidl/fuchsia.ui.gfx/commands.fidl
+++ b/public/fidl/fuchsia.ui.gfx/commands.fidl
@@ -204,7 +204,7 @@
};
interface SnapshotCallbackHACK {
- 1: OnData(fuchsia.mem.Buffer data);
+ OnData(fuchsia.mem.Buffer data);
};
struct TakeSnapshotCmdHACK {
diff --git a/public/fidl/fuchsia.ui.gfx/display_info.fidl b/public/fidl/fuchsia.ui.gfx/display_info.fidl
index 1fb1cc2..51e8b66 100644
--- a/public/fidl/fuchsia.ui.gfx/display_info.fidl
+++ b/public/fidl/fuchsia.ui.gfx/display_info.fidl
@@ -6,7 +6,7 @@
// Provides information about a display.
struct DisplayInfo {
- // The size of the display, in physical pixels.
- uint32 width_in_px;
- uint32 height_in_px;
+ // The size of the display, in physical pixels.
+ uint32 width_in_px;
+ uint32 height_in_px;
};
diff --git a/public/fidl/fuchsia.ui.gfx/events.fidl b/public/fidl/fuchsia.ui.gfx/events.fidl
index 98a2495..6d6292f 100644
--- a/public/fidl/fuchsia.ui.gfx/events.fidl
+++ b/public/fidl/fuchsia.ui.gfx/events.fidl
@@ -12,20 +12,20 @@
// These are all of the types of events which can be reported by a |Session|.
// Use |SetEventMaskCmd| to enable event delivery for a resource.
union Event {
- // Events which are controlled by a mask.
- MetricsEvent metrics;
+ // Events which are controlled by a mask.
+ MetricsEvent metrics;
- SizeChangeHintEvent size_change_hint;
+ SizeChangeHintEvent size_change_hint;
- // Events which are always delivered, regardless of mask.
- ImportUnboundEvent import_unbound;
- ViewConnectedEvent view_connected;
- ViewDisconnectedEvent view_disconnected;
- ViewHolderDisconnectedEvent view_holder_disconnected;
- ViewAttachedToSceneEvent view_attached_to_scene;
- ViewDetachedFromSceneEvent view_detached_from_scene;
- ViewPropertiesChangedEvent view_properties_changed;
- ViewStateChangedEvent view_state_changed;
+ // Events which are always delivered, regardless of mask.
+ ImportUnboundEvent import_unbound;
+ ViewConnectedEvent view_connected;
+ ViewDisconnectedEvent view_disconnected;
+ ViewHolderDisconnectedEvent view_holder_disconnected;
+ ViewAttachedToSceneEvent view_attached_to_scene;
+ ViewDetachedFromSceneEvent view_detached_from_scene;
+ ViewPropertiesChangedEvent view_properties_changed;
+ ViewStateChangedEvent view_state_changed;
};
// Provides rendering target metrics information about the specified node.
@@ -39,8 +39,8 @@
// Subscribe to this event to receive information about the scale factors you
// should apply when generating textures for your nodes.
struct MetricsEvent {
- uint32 node_id;
- Metrics metrics;
+ uint32 node_id;
+ Metrics metrics;
};
// Delivered in response to a size change hint from a parent node
@@ -54,21 +54,21 @@
// will need in the near future for your nodes. The canonical use case is to
// pre-allocate memory to avoid repeated re-allocations.
struct SizeChangeHintEvent {
- uint32 node_id;
- float32 width_change_factor;
- float32 height_change_factor;
+ uint32 node_id;
+ float32 width_change_factor;
+ float32 height_change_factor;
};
// 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.
struct ImportUnboundEvent {
- uint32 resource_id;
+ uint32 resource_id;
};
// Delivered to a ViewHolder's Session when its peer View is connected.
struct ViewConnectedEvent {
- uint32 view_holder_id;
+ uint32 view_holder_id;
};
// Delivered to a ViewHolder's Session when its peer View is disconnected or
@@ -77,7 +77,7 @@
// If the View is destroyed before the connection is established, then this
// event will be delivered immediately when the ViewHolder attempts to connect.
struct ViewDisconnectedEvent {
- uint32 view_holder_id;
+ uint32 view_holder_id;
};
// Delivered to a View's Session when its peer ViewHolder is disconnected or
@@ -86,7 +86,7 @@
// If the ViewHolder is destroyed before the connection is established, then
// this event will be delivered immediately when the View attempts to connect.
struct ViewHolderDisconnectedEvent {
- uint32 view_id;
+ uint32 view_id;
};
// Delivered to a View's Session when the parent ViewHolder for the given View
@@ -96,8 +96,8 @@
// chain of parent-child relationships between the Scene node and the
// ViewHolder node.
struct ViewAttachedToSceneEvent {
- uint32 view_id;
- ViewProperties properties;
+ uint32 view_id;
+ ViewProperties properties;
};
// Delivered to a View's Session when the parent ViewHolder for the given View
@@ -110,18 +110,18 @@
// chain of parent-child relationships between the Scene node and the
// ViewHolder node.
struct ViewDetachedFromSceneEvent {
- uint32 view_id;
+ uint32 view_id;
};
// Delivered when the parent ViewHolder for the given View makes a change to
// the View's properties.
struct ViewPropertiesChangedEvent {
- uint32 view_id;
- ViewProperties properties;
+ uint32 view_id;
+ ViewProperties properties;
};
// Delivered to a ViewHolder's Session when its peer View's state has changed.
struct ViewStateChangedEvent {
- uint32 view_holder_id;
- ViewState state;
+ uint32 view_holder_id;
+ ViewState state;
};
diff --git a/public/fidl/fuchsia.ui.gfx/hit.fidl b/public/fidl/fuchsia.ui.gfx/hit.fidl
index d96a44c..4d3385e 100644
--- a/public/fidl/fuchsia.ui.gfx/hit.fidl
+++ b/public/fidl/fuchsia.ui.gfx/hit.fidl
@@ -14,23 +14,23 @@
// hit_point = ray.origin + (hit.distance * ray.direction)
// local_point = hit.inverse_transform * hit_point
struct Hit {
- // The node's tag value.
- uint32 tag_value;
+ // The node's tag value.
+ uint32 tag_value;
- // The origin of the ray that was used for the hit test, in the hit
- // node's coordinate system.
- vec4 ray_origin;
+ // The origin of the ray that was used for the hit test, in the hit
+ // node's coordinate system.
+ vec4 ray_origin;
- // The direction of the ray that was used for the hit test, in the hit
- // node's coordinate system.
- vec4 ray_direction;
+ // The direction of the ray that was used for the hit test, in the hit
+ // node's coordinate system.
+ vec4 ray_direction;
- // The inverse transformation matrix which maps the coordinate system of
- // the node at which the hit test was initiated into the local coordinate
- // system of the node which was hit.
- mat4 inverse_transform;
+ // The inverse transformation matrix which maps the coordinate system of
+ // the node at which the hit test was initiated into the local coordinate
+ // system of the node which was hit.
+ mat4 inverse_transform;
- // The distance from the ray's origin to the closest point of intersection
- // in multiples of the ray's direction vector.
- float32 distance;
+ // The distance from the ray's origin to the closest point of intersection
+ // in multiples of the ray's direction vector.
+ float32 distance;
};
diff --git a/public/fidl/fuchsia.ui.gfx/nodes.fidl b/public/fidl/fuchsia.ui.gfx/nodes.fidl
index 33e46c7..6645696 100644
--- a/public/fidl/fuchsia.ui.gfx/nodes.fidl
+++ b/public/fidl/fuchsia.ui.gfx/nodes.fidl
@@ -30,8 +30,8 @@
// - has_shape
// - has_material
struct ShapeNodeArgs {
- // TODO(SCN-694): Clean up dummy args.
- uint32 unused = 0;
+ // TODO(SCN-694): Clean up dummy args.
+ uint32 unused = 0;
};
// Characteristics:
@@ -39,8 +39,8 @@
// - is_clip
// - has_parts
struct ClipNodeArgs {
- // TODO(SCN-694): Clean up dummy args.
- uint32 unused = 0;
+ // TODO(SCN-694): Clean up dummy args.
+ uint32 unused = 0;
};
// Characteristics:
@@ -60,6 +60,6 @@
// - has_parts
// - has_clip
struct EntityNodeArgs {
- // TODO(SCN-694): Clean up dummy args.
- uint32 unused = 0;
+ // TODO(SCN-694): Clean up dummy args.
+ uint32 unused = 0;
};
diff --git a/public/fidl/fuchsia.ui.gfx/pose_buffer_provider.fidl b/public/fidl/fuchsia.ui.gfx/pose_buffer_provider.fidl
index 8fcadc1..2e5c57f 100644
--- a/public/fidl/fuchsia.ui.gfx/pose_buffer_provider.fidl
+++ b/public/fidl/fuchsia.ui.gfx/pose_buffer_provider.fidl
@@ -7,8 +7,8 @@
[Discoverable]
// A minimal fidl interface to allow sourcing the contents of a PoseBuffer from another service.
interface PoseBufferProvider {
- // Sets the PoseBuffer and the parameters PoseBufferProvider will use to fill that PoseBuffer.
- // Setting this when it is already set will replace the previously set parameters with the new
- // parameters, which will release the provider's reference to the buffer.
- 1: SetPoseBuffer(handle<vmo> buffer, uint32 num_entries, int64 base_time, uint64 time_interval);
+ // Sets the PoseBuffer and the parameters PoseBufferProvider will use to fill that PoseBuffer.
+ // Setting this when it is already set will replace the previously set parameters with the new
+ // parameters, which will release the provider's reference to the buffer.
+ SetPoseBuffer(handle<vmo> buffer, uint32 num_entries, int64 base_time, uint64 time_interval);
};
diff --git a/public/fidl/fuchsia.ui.gfx/shapes.fidl b/public/fidl/fuchsia.ui.gfx/shapes.fidl
index 5734af1..3679d13 100644
--- a/public/fidl/fuchsia.ui.gfx/shapes.fidl
+++ b/public/fidl/fuchsia.ui.gfx/shapes.fidl
@@ -9,8 +9,8 @@
// Rectangle centered at (0,0).
struct RectangleArgs {
- Value width; // float32
- Value height; // float32
+ Value width; // float32
+ Value height; // float32
};
// RoundedRectangle centered at (0,0). Legal parameter values must satisfy the
@@ -21,16 +21,16 @@
// - top_left_radius + bottom_left_radius <= height
// - top_right_radius + bottom_right_radius <= height
struct RoundedRectangleArgs {
- Value width; // float32
- Value height; // float32
- Value top_left_radius; // float32
- Value top_right_radius; // float32
- Value bottom_right_radius; // float32
- Value bottom_left_radius; // float32
+ Value width; // float32
+ Value height; // float32
+ Value top_left_radius; // float32
+ Value top_right_radius; // float32
+ Value bottom_right_radius; // float32
+ Value bottom_left_radius; // float32
};
struct CircleArgs {
- Value radius; // float32
+ Value radius; // float32
};
// A Mesh cannot be rendered until it has been bound to vertex/index buffers;
diff --git a/public/fidl/fuchsia.ui.input/commands.fidl b/public/fidl/fuchsia.ui.input/commands.fidl
index 098ccb0..b417d0a 100644
--- a/public/fidl/fuchsia.ui.input/commands.fidl
+++ b/public/fidl/fuchsia.ui.input/commands.fidl
@@ -5,26 +5,26 @@
library fuchsia.ui.input;
union Command {
- // Commands for conveying input events to a |Session|.
- // Structs defined in input_events.fidl.
- SendKeyboardInputCmd send_keyboard_input;
- SendPointerInputCmd send_pointer_input;
+ // Commands for conveying input events to a |Session|.
+ // Structs defined in input_events.fidl.
+ SendKeyboardInputCmd send_keyboard_input;
+ SendPointerInputCmd send_pointer_input;
- // Command to enable/disable delivery of hard keyboard events.
- SetHardKeyboardDeliveryCmd set_hard_keyboard_delivery;
+ // Command to enable/disable delivery of hard keyboard events.
+ SetHardKeyboardDeliveryCmd set_hard_keyboard_delivery;
- // Command to enable/disable parallel delivery of input events.
- SetParallelDispatchCmd set_parallel_dispatch;
+ // Command to enable/disable parallel delivery of input events.
+ SetParallelDispatchCmd set_parallel_dispatch;
};
struct SendKeyboardInputCmd {
- uint32 compositor_id;
- KeyboardEvent keyboard_event; // Defined in input_events.fidl
+ uint32 compositor_id;
+ KeyboardEvent keyboard_event; // Defined in input_events.fidl
};
struct SendPointerInputCmd {
- uint32 compositor_id;
- PointerEvent pointer_event; // Defined in input_events.fidl
+ uint32 compositor_id;
+ PointerEvent pointer_event; // Defined in input_events.fidl
};
// Typically, clients should receive text inputs from an IME.
@@ -34,7 +34,7 @@
//
// By default, Scenic will *not* deliver hard keyboard events to a client.
struct SetHardKeyboardDeliveryCmd {
- bool delivery_request;
+ bool delivery_request;
};
// Typically, clients that participate in the hit test should receive input
@@ -44,5 +44,5 @@
// dispatch; it is part of the input v2 transition work.
// TODO(SCN-1047): Remove after gesture disambiguation is implemented.
struct SetParallelDispatchCmd {
- bool parallel_dispatch;
+ bool parallel_dispatch;
};
diff --git a/public/fidl/fuchsia.ui.input/ime_service.fidl b/public/fidl/fuchsia.ui.input/ime_service.fidl
index 3ee5b58..6ae2036 100644
--- a/public/fidl/fuchsia.ui.input/ime_service.fidl
+++ b/public/fidl/fuchsia.ui.input/ime_service.fidl
@@ -7,19 +7,19 @@
// The service provided by an IME
[Discoverable]
interface ImeService {
- 1: GetInputMethodEditor(KeyboardType keyboard_type,
+ GetInputMethodEditor(KeyboardType keyboard_type,
InputMethodAction action,
TextInputState initial_state,
InputMethodEditorClient client,
request<InputMethodEditor> editor);
- 2: ShowKeyboard();
- 3: HideKeyboard();
- 4: InjectInput(InputEvent event);
+ ShowKeyboard();
+ HideKeyboard();
+ InjectInput(InputEvent event);
};
// Onscreen keyboard containers connect to this to know when a keyboard
// should be shown or hidden.
[Discoverable]
interface ImeVisibilityService {
- 1: -> OnKeyboardVisibilityChanged(bool visible);
+ -> OnKeyboardVisibilityChanged(bool visible);
};
diff --git a/public/fidl/fuchsia.ui.input/input_device_registry.fidl b/public/fidl/fuchsia.ui.input/input_device_registry.fidl
index 84fca873..6debdc8 100644
--- a/public/fidl/fuchsia.ui.input/input_device_registry.fidl
+++ b/public/fidl/fuchsia.ui.input/input_device_registry.fidl
@@ -11,10 +11,10 @@
[Discoverable]
interface InputDeviceRegistry {
// Register a device with the capabilities described by |DeviceDescriptor|
- 1: RegisterDevice(DeviceDescriptor descriptor, request<InputDevice> input_device);
+ RegisterDevice(DeviceDescriptor descriptor, request<InputDevice> input_device);
};
interface InputDevice {
// Dispatch an |InputReport| from the device |token|
- 1: DispatchReport(InputReport report);
+ DispatchReport(InputReport report);
};
diff --git a/public/fidl/fuchsia.ui.input/input_event_constants.fidl b/public/fidl/fuchsia.ui.input/input_event_constants.fidl
index 3131664..0a76a5c 100644
--- a/public/fidl/fuchsia.ui.input/input_event_constants.fidl
+++ b/public/fidl/fuchsia.ui.input/input_event_constants.fidl
@@ -5,27 +5,27 @@
library fuchsia.ui.input;
// Keyboard modifiers
-const uint32 kModifierCapsLock = 1;
-const uint32 kModifierLeftShift = 2;
-const uint32 kModifierRightShift = 4;
-const uint32 kModifierShift = 6; // (kModifierLeftShift | kModifierRightShift);
-const uint32 kModifierLeftControl = 8;
+const uint32 kModifierCapsLock = 1;
+const uint32 kModifierLeftShift = 2;
+const uint32 kModifierRightShift = 4;
+const uint32 kModifierShift = 6; // (kModifierLeftShift | kModifierRightShift);
+const uint32 kModifierLeftControl = 8;
const uint32 kModifierRightControl = 16;
-const uint32 kModifierControl = 24; // (kModifierLeftControl | kModifierRightControl);
-const uint32 kModifierLeftAlt = 32;
-const uint32 kModifierRightAlt = 64;
-const uint32 kModifierAlt = 96; // (kModifierLeftAlt | kModifierRightAlt);
-const uint32 kModifierLeftSuper = 128;
-const uint32 kModifierRightSuper = 256;
-const uint32 kModifierSuper = 384; // (kModifierLeftSuper | kModifierRightSuper);
+const uint32 kModifierControl = 24; // (kModifierLeftControl | kModifierRightControl);
+const uint32 kModifierLeftAlt = 32;
+const uint32 kModifierRightAlt = 64;
+const uint32 kModifierAlt = 96; // (kModifierLeftAlt | kModifierRightAlt);
+const uint32 kModifierLeftSuper = 128;
+const uint32 kModifierRightSuper = 256;
+const uint32 kModifierSuper = 384; // (kModifierLeftSuper | kModifierRightSuper);
// Mouse buttons
-const uint32 kMousePrimaryButton = 1;
+const uint32 kMousePrimaryButton = 1;
const uint32 kMouseSecondaryButton = 2;
-const uint32 kMouseTertiaryButton = 4;
+const uint32 kMouseTertiaryButton = 4;
// Stylus buttons
-const uint32 kStylusPrimaryButton = 1;
+const uint32 kStylusPrimaryButton = 1;
const uint32 kStylusSecondaryButton = 2;
// end-no-format
diff --git a/public/fidl/fuchsia.ui.input/input_events.fidl b/public/fidl/fuchsia.ui.input/input_events.fidl
index fb3c386..90f54f922 100644
--- a/public/fidl/fuchsia.ui.input/input_events.fidl
+++ b/public/fidl/fuchsia.ui.input/input_events.fidl
@@ -5,14 +5,14 @@
library fuchsia.ui.input;
enum KeyboardEventPhase {
- // When key is pressed down.
- PRESSED = 0;
- // When key is released.
- RELEASED = 1;
- // This key |PRESSED| is not directed to this input client anymore.
- CANCELLED = 2;
- // Whether this is an automatically generated key repeat
- REPEAT = 3;
+ // When key is pressed down.
+ PRESSED = 0;
+ // When key is released.
+ RELEASED = 1;
+ // This key |PRESSED| is not directed to this input client anymore.
+ CANCELLED = 2;
+ // Whether this is an automatically generated key repeat
+ REPEAT = 3;
};
// |KeyboardEvent| represents event generated by a user's interaction with a
@@ -28,80 +28,80 @@
// The input system will repeat those events automatically when a code_point is
// available.
struct KeyboardEvent {
- // Time the event was delivered. The time is in nanoseconds and corresponds
- // to the uptime of the machine.
- uint64 event_time;
+ // Time the event was delivered. The time is in nanoseconds and corresponds
+ // to the uptime of the machine.
+ uint64 event_time;
- uint32 device_id;
+ uint32 device_id;
- KeyboardEventPhase phase;
+ KeyboardEventPhase phase;
- // Keyboard HID Usage
- // See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
- uint32 hid_usage;
+ // Keyboard HID Usage
+ // See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
+ uint32 hid_usage;
- // The unicode code point represented by this key event, if any.
- // Dead keys are represented as Unicode combining characters.
- //
- // If there is no unicode code point, this value is zero.
- uint32 code_point;
+ // The unicode code point represented by this key event, if any.
+ // Dead keys are represented as Unicode combining characters.
+ //
+ // If there is no unicode code point, this value is zero.
+ uint32 code_point;
- // Key modifiers as defined by the different kModifier constants such as
- // |kModifierCapsLock| currently pressed
- uint32 modifiers;
+ // Key modifiers as defined by the different kModifier constants such as
+ // |kModifierCapsLock| currently pressed
+ uint32 modifiers;
};
enum PointerEventType {
- // A touch-based pointer device.
- TOUCH = 0;
+ // A touch-based pointer device.
+ TOUCH = 0;
- // A pointer device with a stylus.
- STYLUS = 1;
+ // A pointer device with a stylus.
+ STYLUS = 1;
- // A pointer device with a stylus that has been inverted.
- INVERTED_STYLUS = 2;
+ // A pointer device with a stylus that has been inverted.
+ INVERTED_STYLUS = 2;
- // A pointer device without a stylus.
- MOUSE = 3;
+ // A pointer device without a stylus.
+ MOUSE = 3;
};
enum PointerEventPhase {
- // The device has started tracking the pointer.
- //
- // For example, the pointer might be hovering above the device, having not yet
- // made contact with the surface of the device.
- ADD = 0;
+ // The device has started tracking the pointer.
+ //
+ // For example, the pointer might be hovering above the device, having not yet
+ // made contact with the surface of the device.
+ ADD = 0;
- // The pointer has moved with respect to the device while not in contact with
- // the device.
- HOVER = 1;
+ // The pointer has moved with respect to the device while not in contact with
+ // the device.
+ HOVER = 1;
- // The pointer has made contact with the device.
- //
- // For |MOUSE| devices, this is triggered when the primary button is pressed
- // down to emulate a touch on the screen.
- DOWN = 2;
+ // The pointer has made contact with the device.
+ //
+ // For |MOUSE| devices, this is triggered when the primary button is pressed
+ // down to emulate a touch on the screen.
+ DOWN = 2;
- // The pointer has moved with respect to the device while in contact with the
- // device.
- MOVE = 3;
+ // The pointer has moved with respect to the device while in contact with the
+ // device.
+ MOVE = 3;
- // The pointer has stopped making contact with the device.
- //
- // For |MOUSE| devices, this is triggered when the primary button is
- // released.
- UP = 4;
+ // The pointer has stopped making contact with the device.
+ //
+ // For |MOUSE| devices, this is triggered when the primary button is
+ // released.
+ UP = 4;
- // The device is no longer tracking the pointer.
- //
- // For example, the pointer might have drifted out of the device's hover
- // detection range or might have been disconnected from the system entirely.
- REMOVE = 5;
+ // The device is no longer tracking the pointer.
+ //
+ // For example, the pointer might have drifted out of the device's hover
+ // detection range or might have been disconnected from the system entirely.
+ REMOVE = 5;
- // The input from the pointer is no longer directed towards this receiver.
- CANCEL = 6;
+ // The input from the pointer is no longer directed towards this receiver.
+ CANCEL = 6;
- // TODO: add phases to indicate button press / release
+ // TODO: add phases to indicate button press / release
};
// Pointers represent raw data about the user's interaction with the screen.
@@ -111,48 +111,48 @@
//
// At any point after the initial ADD, a transition to CANCEL is also possible.
struct PointerEvent {
- // Time the event was delivered. The time is in nanoseconds and corresponds
- // to the uptime of the machine.
- uint64 event_time;
+ // Time the event was delivered. The time is in nanoseconds and corresponds
+ // to the uptime of the machine.
+ uint64 event_time;
- uint32 device_id;
+ uint32 device_id;
- uint32 pointer_id;
+ uint32 pointer_id;
- PointerEventType type;
+ PointerEventType type;
- PointerEventPhase phase;
+ PointerEventPhase phase;
- // |x| and |y| are in the coordinate system of the View.
- float32 x;
- float32 y;
+ // |x| and |y| are in the coordinate system of the View.
+ float32 x;
+ float32 y;
- // TODO(jpoichet) float32 vx;
- // TODO(jpoichet) float32 vy;
+ // TODO(jpoichet) float32 vx;
+ // TODO(jpoichet) float32 vy;
- float32 radius_major;
- float32 radius_minor;
- // TODO(jpoichet) float32 orientation;
- // TODO(jpoichet) float32 tilt;
- // TODO(jpoichet) float32 altitude;
- // TODO(jpichet) float32 amplitude;
+ float32 radius_major;
+ float32 radius_minor;
+ // TODO(jpoichet) float32 orientation;
+ // TODO(jpoichet) float32 tilt;
+ // TODO(jpoichet) float32 altitude;
+ // TODO(jpichet) float32 amplitude;
- // Currently pressed buttons as defined the kButton constants such as
- // |kMousePrimaryButton|
- uint32 buttons;
+ // Currently pressed buttons as defined the kButton constants such as
+ // |kMousePrimaryButton|
+ uint32 buttons;
};
struct FocusEvent {
- // Time the event was delivered. The time is in nanoseconds and corresponds
- // to the uptime of the machine.
- uint64 event_time;
+ // Time the event was delivered. The time is in nanoseconds and corresponds
+ // to the uptime of the machine.
+ uint64 event_time;
- // Whether the view has gained input focused or not.
- bool focused;
+ // Whether the view has gained input focused or not.
+ bool focused;
};
union InputEvent {
- PointerEvent pointer;
- KeyboardEvent keyboard;
- FocusEvent focus;
+ PointerEvent pointer;
+ KeyboardEvent keyboard;
+ FocusEvent focus;
};
diff --git a/public/fidl/fuchsia.ui.input/input_reports.fidl b/public/fidl/fuchsia.ui.input/input_reports.fidl
index 0cff1e2..4114c47 100644
--- a/public/fidl/fuchsia.ui.input/input_reports.fidl
+++ b/public/fidl/fuchsia.ui.input/input_reports.fidl
@@ -17,159 +17,159 @@
// Describe a |Range| of values
struct Range {
- int32 min;
- int32 max;
+ int32 min;
+ int32 max;
};
struct RangeF {
- float32 min;
- float32 max;
+ float32 min;
+ float32 max;
};
enum AxisScale {
- LINEAR = 0;
- LOGARITHMIC = 1;
+ LINEAR = 0;
+ LOGARITHMIC = 1;
};
// An |Axis| is defined as a |range| and |resolution|.
struct Axis {
- Range range;
- int32 resolution = 1;
- AxisScale scale = LINEAR;
+ Range range;
+ int32 resolution = 1;
+ AxisScale scale = LINEAR;
};
struct AxisF {
- RangeF range;
- float32 resolution = 1.0;
- AxisScale scale = LINEAR;
+ RangeF range;
+ float32 resolution = 1.0;
+ AxisScale scale = LINEAR;
};
// |ButtonsDescriptor| describes the buttons.
struct ButtonsDescriptor {
- // The list of buttons available.
- uint32 buttons;
+ // The list of buttons available.
+ uint32 buttons;
};
// Keyboards
// |KeyboardDescriptor| describes the capabilities of a keyboard.
struct KeyboardDescriptor {
- // The list of HID keyboard usages that this keyboard can generate.
- vector<uint32> keys;
+ // The list of HID keyboard usages that this keyboard can generate.
+ vector<uint32> keys;
};
// |KeyboardReport| lists the keys currently pressed down.
struct KeyboardReport {
- // |pressed_keys| is the list of HID usage that are currently pressed down on
- // the keyboard.
- vector<uint32> pressed_keys;
+ // |pressed_keys| is the list of HID usage that are currently pressed down on
+ // the keyboard.
+ vector<uint32> pressed_keys;
};
// Mouse
// |MouseDescriptor| describes the capabilities of a mouse.
struct MouseDescriptor {
- // The range of relative X and Y movement which can be described by a mouse
- // report.
- Axis rel_x;
- Axis rel_y;
+ // The range of relative X and Y movement which can be described by a mouse
+ // report.
+ Axis rel_x;
+ Axis rel_y;
- // The range of relative vertical and horizontal scroll which can be
- // described by a mouse report.
- Axis? vscroll;
- Axis? hscroll;
+ // The range of relative vertical and horizontal scroll which can be
+ // described by a mouse report.
+ Axis? vscroll;
+ Axis? hscroll;
- // The list of HID mouse usages that this mouse can generate.
- uint32 buttons;
+ // The list of HID mouse usages that this mouse can generate.
+ uint32 buttons;
};
// |MouseReport| gives the relative mouvement of the mouse and currently
// pressed buttons.
struct MouseReport {
- // Relative X and Y positional displacement.
- int32 rel_x;
- int32 rel_y;
+ // Relative X and Y positional displacement.
+ int32 rel_x;
+ int32 rel_y;
- // Relative horizontal and vertical scrolling displacement.
- int32 rel_hscroll;
- int32 rel_vscroll;
+ // Relative horizontal and vertical scrolling displacement.
+ int32 rel_hscroll;
+ int32 rel_vscroll;
- // buttons currently down
- uint32 pressed_buttons;
+ // buttons currently down
+ uint32 pressed_buttons;
};
// Stylus
// |Stylus| describes the capabilities of a stylus.
struct StylusDescriptor {
- // Ranges for the |x| and |y| axis of the stylus.
- Axis x;
- Axis y;
+ // Ranges for the |x| and |y| axis of the stylus.
+ Axis x;
+ Axis y;
- // Range for the pressure of the tip
- Axis? pressure;
+ // Range for the pressure of the tip
+ Axis? pressure;
- bool is_invertible = false;
+ bool is_invertible = false;
- // The list of HID button usages that this stylus can generate.
- uint32 buttons;
+ // The list of HID button usages that this stylus can generate.
+ uint32 buttons;
};
// |StylusReport| describes the current state of the stylus.
struct StylusReport {
- // Current position of the stylus within the range described in
- // |StylusDescriptor|
- int32 x;
- int32 y;
+ // Current position of the stylus within the range described in
+ // |StylusDescriptor|
+ int32 x;
+ int32 y;
- // Pressure applied on the stylus tip
- uint32 pressure;
+ // Pressure applied on the stylus tip
+ uint32 pressure;
- // Whether the stylus has made contact with the surface.
- bool is_in_contact;
+ // Whether the stylus has made contact with the surface.
+ bool is_in_contact;
- // Whether the stylus is within range. If |is_in_contact| is false, then the stylus
- // is hovering.
- bool in_range;
+ // Whether the stylus is within range. If |is_in_contact| is false, then the stylus
+ // is hovering.
+ bool in_range;
- // Whether the stylus is thought to be inverted.
- bool is_inverted;
+ // Whether the stylus is thought to be inverted.
+ bool is_inverted;
- // List of buttons currently pressed down.
- uint32 pressed_buttons;
+ // List of buttons currently pressed down.
+ uint32 pressed_buttons;
};
// Touchscreen
// |TouchscreenDescriptor| describes the capabilities of a touchscreen.
struct TouchscreenDescriptor {
- // Ranges of the |x| and |y| axis.
- Axis x;
- Axis y;
- uint32 max_finger_id;
+ // Ranges of the |x| and |y| axis.
+ Axis x;
+ Axis y;
+ uint32 max_finger_id;
};
// |Touch| describes one touch on a touchscreen, which should correspond to
// one finger.
struct Touch {
- // Identifier for a finger that is down.
- // Note: |finger_id| might not be sequential and will range from 0 to
- // |max_finger_id|
- uint32 finger_id;
+ // Identifier for a finger that is down.
+ // Note: |finger_id| might not be sequential and will range from 0 to
+ // |max_finger_id|
+ uint32 finger_id;
- // Location within the axis defined in |TouchscreenDescriptor|
- int32 x;
- int32 y;
+ // Location within the axis defined in |TouchscreenDescriptor|
+ int32 x;
+ int32 y;
- // Area pressed.
- uint32 width;
- uint32 height;
+ // Area pressed.
+ uint32 width;
+ uint32 height;
};
// |TouchscreenReport| describes the current touches recorded by the touchscreen
// and holds a |Touch| per finger down.
struct TouchscreenReport {
- vector<Touch> touches;
+ vector<Touch> touches;
};
// Motion Sensors
@@ -178,82 +178,82 @@
// We assume that each (SensorType,SensorLocation) pair is unique to the system.
enum SensorType {
- ACCELEROMETER = 0;
- GYROSCOPE = 1;
- MAGNETOMETER = 2;
- LIGHTMETER = 3;
+ ACCELEROMETER = 0;
+ GYROSCOPE = 1;
+ MAGNETOMETER = 2;
+ LIGHTMETER = 3;
};
enum SensorLocation {
- UNKNOWN = 0;
- BASE = 1;
- LID = 2;
+ UNKNOWN = 0;
+ BASE = 1;
+ LID = 2;
};
// |SensorDescriptor| describes the capabilities of a sensor device. It does
// not capture properties that can be changed after initialization, such as the
// current sampling frequency.
struct SensorDescriptor {
- SensorType type;
- SensorLocation loc;
+ SensorType type;
+ SensorLocation loc;
- // Min and max sampling frequencies for a sensor.
- uint32 min_sampling_freq;
- uint32 max_sampling_freq;
- // Max number of sensor events that could be in hardware FIFO.
- uint32 fifo_max_event_count;
+ // Min and max sampling frequencies for a sensor.
+ uint32 min_sampling_freq;
+ uint32 max_sampling_freq;
+ // Max number of sensor events that could be in hardware FIFO.
+ uint32 fifo_max_event_count;
- // Physical range of a specific sensor.
- // Accelerometer ranges are given in Gs.
- // Gyroscope ranges are given in deg/s.
- // Magnetometer ranges are given in multiples of 1/16 uT.
- // Light meter ranges can be given in Lux or units not specified.
- int32 phys_min;
- int32 phys_max;
+ // Physical range of a specific sensor.
+ // Accelerometer ranges are given in Gs.
+ // Gyroscope ranges are given in deg/s.
+ // Magnetometer ranges are given in multiples of 1/16 uT.
+ // Light meter ranges can be given in Lux or units not specified.
+ int32 phys_min;
+ int32 phys_max;
};
// |SensorReport| describes the sensor event delivered from the event stream.
union SensorReport {
- array<int16>:3 vector;
- uint16 scalar;
+ array<int16>:3 vector;
+ uint16 scalar;
};
// |ButtonsReport| describes the buttons event delivered from the event stream.
union ButtonsReport {
- // Volume changes +1/-1 for volume up/down, this is a relative value.
- int8 volume;
- bool mic_mute;
+ // Volume changes +1/-1 for volume up/down, this is a relative value.
+ int8 volume;
+ bool mic_mute;
};
// Device and Report
struct DeviceInfo {
- uint32 vendor_id;
- uint32 product_id;
- uint32 version;
- string name;
+ uint32 vendor_id;
+ uint32 product_id;
+ uint32 version;
+ string name;
};
// |DeviceDescriptor| describes one input device.
struct DeviceDescriptor {
- DeviceInfo? device_info;
- KeyboardDescriptor? keyboard;
- ButtonsDescriptor? buttons;
- MouseDescriptor? mouse;
- StylusDescriptor? stylus;
- TouchscreenDescriptor? touchscreen;
- SensorDescriptor? sensor;
+ DeviceInfo? device_info;
+ KeyboardDescriptor? keyboard;
+ ButtonsDescriptor? buttons;
+ MouseDescriptor? mouse;
+ StylusDescriptor? stylus;
+ TouchscreenDescriptor? touchscreen;
+ SensorDescriptor? sensor;
};
// |InputReport| is an input |report| triggered by an input device.
struct InputReport {
- // |event_time| is in nanoseconds when the event was recorded.
- uint64 event_time;
+ // |event_time| is in nanoseconds when the event was recorded.
+ uint64 event_time;
- KeyboardReport? keyboard;
- ButtonsReport? buttons;
- MouseReport? mouse;
- StylusReport? stylus;
- TouchscreenReport? touchscreen;
- SensorReport? sensor;
+ KeyboardReport? keyboard;
+ ButtonsReport? buttons;
+ MouseReport? mouse;
+ StylusReport? stylus;
+ TouchscreenReport? touchscreen;
+ SensorReport? sensor;
};
diff --git a/public/fidl/fuchsia.ui.input/text_input.fidl b/public/fidl/fuchsia.ui.input/text_input.fidl
index 6d38423..867419a 100644
--- a/public/fidl/fuchsia.ui.input/text_input.fidl
+++ b/public/fidl/fuchsia.ui.input/text_input.fidl
@@ -5,52 +5,52 @@
library fuchsia.ui.input;
enum KeyboardType {
- TEXT = 0;
- NUMBER = 1;
- PHONE = 2;
- DATETIME = 3;
+ TEXT = 0;
+ NUMBER = 1;
+ PHONE = 2;
+ DATETIME = 3;
};
enum InputMethodAction {
- UNSPECIFIED = 0;
- NONE = 1;
- GO = 2;
- SEARCH = 3;
- SEND = 4;
- NEXT = 5;
- DONE = 6;
- PREVIOUS = 7;
+ UNSPECIFIED = 0;
+ NONE = 1;
+ GO = 2;
+ SEARCH = 3;
+ SEND = 4;
+ NEXT = 5;
+ DONE = 6;
+ PREVIOUS = 7;
};
// The current text, selection, and composing state for editing a run of text.
struct TextInputState {
- // Current state revision to avoid race conditions.
- uint32 revision;
+ // Current state revision to avoid race conditions.
+ uint32 revision;
- // The current text being edited.
- string text;
+ // The current text being edited.
+ string text;
- // The range of text that is currently selected.
- TextSelection selection;
+ // The range of text that is currently selected.
+ TextSelection selection;
- // The range of text that is still being composed.
- TextRange composing;
+ // The range of text that is still being composed.
+ TextRange composing;
};
// A interface for interacting with a text input control.
interface InputMethodEditor {
- 1: SetKeyboardType(KeyboardType keyboard_type);
- 2: SetState(TextInputState state);
- 3: InjectInput(InputEvent event);
+ SetKeyboardType(KeyboardType keyboard_type);
+ SetState(TextInputState state);
+ InjectInput(InputEvent event);
- // TODO(TEXT-19): remove these in a later change, after PlatformView has been
- // switched over to open/close on the input_connection_ instead.
- 4: Show();
- 5: Hide();
+ // TODO(TEXT-19): remove these in a later change, after PlatformView has been
+ // switched over to open/close on the input_connection_ instead.
+ Show();
+ Hide();
};
// An interface to receive information from |TextInputService|.
interface InputMethodEditorClient {
- 1: DidUpdateState(TextInputState state, InputEvent? event);
- 2: OnAction(InputMethodAction action);
+ DidUpdateState(TextInputState state, InputEvent? event);
+ OnAction(InputMethodAction action);
};
diff --git a/public/fidl/fuchsia.ui.input/usages.fidl b/public/fidl/fuchsia.ui.input/usages.fidl
index 2fd70e1..2739183 100644
--- a/public/fidl/fuchsia.ui.input/usages.fidl
+++ b/public/fidl/fuchsia.ui.input/usages.fidl
@@ -5,14 +5,14 @@
library fuchsia.ui.input;
// Common mouse buttons report constants
-const uint32 kMouseButtonPrimary = 1;
-const uint32 kMouseButtonSecondary = 2;
-const uint32 kMouseButtonTertiary = 4;
+const uint32 kMouseButtonPrimary = 1;
+const uint32 kMouseButtonSecondary = 2;
+const uint32 kMouseButtonTertiary = 4;
// Common stylus buttons report constants
-const uint32 kStylusBarrel = 1;
+const uint32 kStylusBarrel = 1;
// Used as mask bits (2^N) against ButtonDescriptor.buttons.
-const uint32 kVolumeUp = 1;
-const uint32 kVolumeDown = 2;
-const uint32 kMicMute = 4;
+const uint32 kVolumeUp = 1;
+const uint32 kVolumeDown = 2;
+const uint32 kMicMute = 4;
diff --git a/public/fidl/fuchsia.ui.scenic/commands.fidl b/public/fidl/fuchsia.ui.scenic/commands.fidl
index 46c54f3..219ffca 100644
--- a/public/fidl/fuchsia.ui.scenic/commands.fidl
+++ b/public/fidl/fuchsia.ui.scenic/commands.fidl
@@ -10,8 +10,8 @@
using fuchsia.ui.views;
union Command {
- fuchsia.ui.gfx.Command gfx;
- fuchsia.ui.vectorial.Command vectorial;
- fuchsia.ui.views.Command views;
- fuchsia.ui.input.Command input;
+ fuchsia.ui.gfx.Command gfx;
+ fuchsia.ui.vectorial.Command vectorial;
+ fuchsia.ui.views.Command views;
+ fuchsia.ui.input.Command input;
};
diff --git a/public/fidl/fuchsia.ui.scenic/events.fidl b/public/fidl/fuchsia.ui.scenic/events.fidl
index f296622..976ceb2 100644
--- a/public/fidl/fuchsia.ui.scenic/events.fidl
+++ b/public/fidl/fuchsia.ui.scenic/events.fidl
@@ -8,7 +8,7 @@
using fuchsia.ui.gfx;
union Event {
- fuchsia.ui.gfx.Event gfx;
- fuchsia.ui.input.InputEvent input;
- Command unhandled;
+ fuchsia.ui.gfx.Event gfx;
+ fuchsia.ui.input.InputEvent input;
+ Command unhandled;
};
diff --git a/public/fidl/fuchsia.ui.scenic/scenic.fidl b/public/fidl/fuchsia.ui.scenic/scenic.fidl
index 74a88cc..10967aa1 100644
--- a/public/fidl/fuchsia.ui.scenic/scenic.fidl
+++ b/public/fidl/fuchsia.ui.scenic/scenic.fidl
@@ -10,28 +10,28 @@
// Scenic.TakeScreenshot() returns a raw BGRA formatted image in this struct.
struct ScreenshotData {
- fuchsia.images.ImageInfo info;
- fuchsia.mem.Buffer data;
+ fuchsia.images.ImageInfo info;
+ fuchsia.mem.Buffer data;
};
[Discoverable]
interface Scenic {
- // Create a new Session, which is the primary way to interact with Mozart.
- 1: CreateSession(request<Session> session, SessionListener? listener);
+ // Create a new Session, which is the primary way to interact with Mozart.
+ CreateSession(request<Session> session, SessionListener? listener);
- // Get information about the SceneManager's primary display.
- // TODO(MZ-453): in the future there will probably be a DisplayManager, and
- // info about which displays to use will be provided to the SceneManager.
- 2: GetDisplayInfo() -> (fuchsia.ui.gfx.DisplayInfo info);
- // Gets an event signaled with displayOwnedSignal or displayNotOwnedSignal
- // when display ownership changes.
- 3: GetDisplayOwnershipEvent() -> (handle<event> ownership_event);
+ // Get information about the SceneManager's primary display.
+ // TODO(MZ-453): in the future there will probably be a DisplayManager, and
+ // info about which displays to use will be provided to the SceneManager.
+ GetDisplayInfo() -> (fuchsia.ui.gfx.DisplayInfo info);
+ // Gets an event signaled with displayOwnedSignal or displayNotOwnedSignal
+ // when display ownership changes.
+ GetDisplayOwnershipEvent() -> (handle<event> ownership_event);
- // Take a screenshot and return the data in |img_data|. |img_data| will
- // not contain BGRA data if |success| is false.
- // TODO(SCN-678): The permissions here are too wide (anyone can take a
- // screenshot), we should narrow them.
- 4: TakeScreenshot() -> (ScreenshotData img_data, bool success);
+ // Take a screenshot and return the data in |img_data|. |img_data| will
+ // not contain BGRA data if |success| is false.
+ // TODO(SCN-678): The permissions here are too wide (anyone can take a
+ // screenshot), we should narrow them.
+ TakeScreenshot() -> (ScreenshotData img_data, bool success);
};
const uint32 displayOwnedSignal = 0x02000000;
diff --git a/public/fidl/fuchsia.ui.scenic/session.fidl b/public/fidl/fuchsia.ui.scenic/session.fidl
index a1dcdbf..33b6e2e 100644
--- a/public/fidl/fuchsia.ui.scenic/session.fidl
+++ b/public/fidl/fuchsia.ui.scenic/session.fidl
@@ -10,7 +10,7 @@
// Client use Sessions to interact with a Mozart instance by enqueuing commands
// that create or modify resources.
interface Session {
- 1: Enqueue(vector<Command> cmds);
+ Enqueue(vector<Command> cmds);
// Present all previously enqueued operations. In order to pipeline the
// preparation of the resources required to render the scene, two lists of
@@ -123,28 +123,28 @@
// e.g. that all frames based on previous presentations are completely done,
// and subsequent frames will be rendered based on the most recent presented
// content?
- 2: Present(uint64 presentation_time,
- vector<handle<event>> acquire_fences, vector<handle<event>> release_fences)
- -> (fuchsia.images.PresentationInfo presentation_info);
+ Present(uint64 presentation_time,
+ vector<handle<event>> acquire_fences, vector<handle<event>> release_fences)
+ -> (fuchsia.images.PresentationInfo presentation_info);
// TODO(MZ-422) Remove these methods from the FIDL; they should just be
// exposed to View Manager directly using a C++ interface.
- 3: HitTest(uint32 node_id, fuchsia.ui.gfx.vec3 ray_origin, fuchsia.ui.gfx.vec3 ray_direction)
- -> (vector<fuchsia.ui.gfx.Hit>? hits);
- 4: HitTestDeviceRay(fuchsia.ui.gfx.vec3 ray_origin, fuchsia.ui.gfx.vec3 ray_direction)
- -> (vector<fuchsia.ui.gfx.Hit>? hits);
+ HitTest(uint32 node_id, fuchsia.ui.gfx.vec3 ray_origin, fuchsia.ui.gfx.vec3 ray_direction)
+ -> (vector<fuchsia.ui.gfx.Hit>? hits);
+ HitTestDeviceRay(fuchsia.ui.gfx.vec3 ray_origin, fuchsia.ui.gfx.vec3 ray_direction)
+ -> (vector<fuchsia.ui.gfx.Hit>? hits);
// Set an optional debug name for the session. The debug name will be
// output in things such as logging and trace events.
- 5: SetDebugName(string debug_name);
+ SetDebugName(string debug_name);
};
// Listens for events which occur within the session.
interface SessionListener {
// Called when an error has occurred and the session will be torn down.
- 1: OnScenicError(string error);
+ OnScenicError(string error);
// Called to deliver a batch of one or more events to the listener.
// Use |SetEventMaskCmd| to enable event delivery for a resource.
- 2: OnScenicEvent(vector<Event> events);
+ OnScenicEvent(vector<Event> events);
};
diff --git a/public/fidl/fuchsia.ui.sketchy/canvas.fidl b/public/fidl/fuchsia.ui.sketchy/canvas.fidl
index b2651e7..c92ddea 100644
--- a/public/fidl/fuchsia.ui.sketchy/canvas.fidl
+++ b/public/fidl/fuchsia.ui.sketchy/canvas.fidl
@@ -10,29 +10,29 @@
// and inserted into the global Scenic scene-graph.
[Discoverable]
interface Canvas {
- // Init() must be called once, before invoking any other operations.
- 1: Init(CanvasListener? listener);
+ // Init() must be called once, before invoking any other operations.
+ Init(CanvasListener? listener);
- // Enqueue a list of operations, which will not take effect until Present() is
- // called. It is allowable to call Enqueue() several times before calling
- // Present(); the effect is the same as if all operations had been
- // concatenated into a single Enqueue() call.
- //
- // Akin to fuchsia::ui::gfx::Session.Enqueue(); see scenic/session.fidl for details.
- 2: Enqueue(vector<Command> commands);
+ // Enqueue a list of operations, which will not take effect until Present() is
+ // called. It is allowable to call Enqueue() several times before calling
+ // Present(); the effect is the same as if all operations had been
+ // concatenated into a single Enqueue() call.
+ //
+ // Akin to fuchsia::ui::gfx::Session.Enqueue(); see scenic/session.fidl for details.
+ Enqueue(vector<Command> commands);
- // Present all previously enqueued operations. In order to pipeline the
- // preparation of the resources required to render the scene, two lists of
- // fences (implemented as events) are passed.
- //
- // Akin to fuchsia::ui::gfx::Session.Present(); see scenic/session.fidl for details.
- 3: Present(uint64 presentation_time) ->
- (fuchsia.images.PresentationInfo presentation_info);
+ // Present all previously enqueued operations. In order to pipeline the
+ // preparation of the resources required to render the scene, two lists of
+ // fences (implemented as events) are passed.
+ //
+ // Akin to fuchsia::ui::gfx::Session.Present(); see scenic/session.fidl for details.
+ Present(uint64 presentation_time)
+ -> (fuchsia.images.PresentationInfo presentation_info);
};
// Allows clients to observe canvas events.
interface CanvasListener {
- 1: OnError(string description);
- 2: OnStrokeFinished(uint32 stroke_id, StrokePath path);
- 3: OnPageViewerInvalidated(uint32 viewer_id);
+ OnError(string description);
+ OnStrokeFinished(uint32 stroke_id, StrokePath path);
+ OnPageViewerInvalidated(uint32 viewer_id);
};
diff --git a/public/fidl/fuchsia.ui.sketchy/commands.fidl b/public/fidl/fuchsia.ui.sketchy/commands.fidl
index 1708835..232239f 100644
--- a/public/fidl/fuchsia.ui.sketchy/commands.fidl
+++ b/public/fidl/fuchsia.ui.sketchy/commands.fidl
@@ -7,55 +7,55 @@
using fuchsia.ui.gfx;
union Command {
- // Resource creation and lifecycle.
- CreateResourceCmd create_resource;
- ReleaseResourceCmd release_resource;
+ // Resource creation and lifecycle.
+ CreateResourceCmd create_resource;
+ ReleaseResourceCmd release_resource;
- // Stroke commands.
- ClearStrokeCmd clear_stroke;
- BeginStrokeCmd begin_stroke;
- ExtendStrokeCmd extend_stroke;
- FinishStrokeCmd finish_stroke;
- SetStrokeStyleCmd set_style;
- SetStrokePathCmd set_path;
+ // Stroke commands.
+ ClearStrokeCmd clear_stroke;
+ BeginStrokeCmd begin_stroke;
+ ExtendStrokeCmd extend_stroke;
+ FinishStrokeCmd finish_stroke;
+ SetStrokeStyleCmd set_style;
+ SetStrokePathCmd set_path;
- // StrokeGroup commands.
- AddStrokeCmd add_stroke;
- RemoveStrokeCmd remove_stroke;
- ClearGroupCmd clear_group;
+ // StrokeGroup commands.
+ AddStrokeCmd add_stroke;
+ RemoveStrokeCmd remove_stroke;
+ ClearGroupCmd clear_group;
- // Pen commands.
- SetPenStyleCmd set_pen_style;
+ // Pen commands.
+ SetPenStyleCmd set_pen_style;
- // Interaction with Scenic scene-graph:
+ // Interaction with Scenic scene-graph:
- // Import the specified Scenic resource. Currently only the following
- // resource types are supported:
- // - NODE: imported nodes enable the use of ui.fuchsia.ui.gfx.AddChildCmd to insert
- // stroke-groups into a Scenic scene-graph.
- // - MATERIAL: imported materials can be applied to a stroke-style.
- fuchsia.ui.gfx.ImportResourceCmd scenic_import_resource;
+ // Import the specified Scenic resource. Currently only the following
+ // resource types are supported:
+ // - NODE: imported nodes enable the use of ui.fuchsia.ui.gfx.AddChildCmd to insert
+ // stroke-groups into a Scenic scene-graph.
+ // - MATERIAL: imported materials can be applied to a stroke-style.
+ fuchsia.ui.gfx.ImportResourceCmd scenic_import_resource;
- // Attach a stroke-group as a child of the specified imported Scenic node.
- fuchsia.ui.gfx.AddChildCmd scenic_add_child;
+ // Attach a stroke-group as a child of the specified imported Scenic node.
+ fuchsia.ui.gfx.AddChildCmd scenic_add_child;
- // Detach a stroke-group from the Scenic node that it is attached to, if any.
- fuchsia.ui.gfx.DetachCmd scenic_detach;
+ // Detach a stroke-group from the Scenic node that it is attached to, if any.
+ fuchsia.ui.gfx.DetachCmd scenic_detach;
- // Set the material of a stroke-style. This material will be applied to any
- // strokes/stroke-groups that use this style.
- fuchsia.ui.gfx.SetMaterialCmd scenic_set_material;
+ // Set the material of a stroke-style. This material will be applied to any
+ // strokes/stroke-groups that use this style.
+ fuchsia.ui.gfx.SetMaterialCmd scenic_set_material;
};
// Instantiates a new resource.
struct CreateResourceCmd {
- // The ID of the resource to create; this ID must not currently be used within
- // the session. The client may use this ID to refer to the resource in
- // subsequent commands.
- uint32 id;
- // Specifies the type of resource to construct, as well as any other required
- // data.
- ResourceArgs args;
+ // The ID of the resource to create; this ID must not currently be used within
+ // the session. The client may use this ID to refer to the resource in
+ // subsequent commands.
+ uint32 id;
+ // Specifies the type of resource to construct, as well as any other required
+ // data.
+ ResourceArgs args;
};
// Releases the client's reference to the resource; it is then illegal to use
@@ -68,95 +68,95 @@
// TODO: edge cases. What about releasing a stroke that is currently being
// drawn by Begin/Extend/FinishStrokeCmd?
struct ReleaseResourceCmd {
- // The ID of the resource to be dereferenced. The ID must currently reference
- // a resource (i.e. it must match one from a previous CreateResourceCmd, and
- // must not have match one from a subsequent ReleaseResourceCmd).
- uint32 id;
+ // The ID of the resource to be dereferenced. The ID must currently reference
+ // a resource (i.e. it must match one from a previous CreateResourceCmd, and
+ // must not have match one from a subsequent ReleaseResourceCmd).
+ uint32 id;
};
// Clear the path of the specified stroke. Must not be called in the middle of
// Begin/Extend/FinishStroke.
struct ClearStrokeCmd {
- uint32 stroke_id;
+ uint32 stroke_id;
};
// Start drawing a stroke with a pen.
struct BeginStrokeCmd {
- // ID of the stroke to draw with the pen. This must be a new stroke, or one
- // which has been cleared via ClearStrokeCmd.
- uint32 stroke_id;
- // ID of the pen to draw the stroke with.
- uint32 pen_id;
- // Describes the time, position, etc. that the stroke was started.
- Touch touch;
+ // ID of the stroke to draw with the pen. This must be a new stroke, or one
+ // which has been cleared via ClearStrokeCmd.
+ uint32 stroke_id;
+ // ID of the pen to draw the stroke with.
+ uint32 pen_id;
+ // Describes the time, position, etc. that the stroke was started.
+ Touch touch;
};
// Continue drawing a stroke with a pen. The stroke must have previously been
// started (via BeginStrokeCmd), but not finished.
struct ExtendStrokeCmd {
- // ID of the stroke that is being drawn.
- uint32 stroke_id;
- // ID of the pen that is drawing the stroke. Must match the ID provided
- // to BeginStrokeCmd.
- uint32 pen_id;
- // Touch events that describe the trajectory of the stroke since the previous
- // BeginStrokeCmd or ExtendStrokeCmd.
- vector<Touch> touches;
- // Procedurally-generated touch events that describe the predicted future
- // trajectory of the stroke. Sketchy uses these to improve perceived latency
- // while the stroke is being drawn, but they have no impact on the finished
- // stroke.
- // TODO: this may change to reflect however Mozart exposes predicted events.
- vector<Touch> predicted_touches;
+ // ID of the stroke that is being drawn.
+ uint32 stroke_id;
+ // ID of the pen that is drawing the stroke. Must match the ID provided
+ // to BeginStrokeCmd.
+ uint32 pen_id;
+ // Touch events that describe the trajectory of the stroke since the previous
+ // BeginStrokeCmd or ExtendStrokeCmd.
+ vector<Touch> touches;
+ // Procedurally-generated touch events that describe the predicted future
+ // trajectory of the stroke. Sketchy uses these to improve perceived latency
+ // while the stroke is being drawn, but they have no impact on the finished
+ // stroke.
+ // TODO: this may change to reflect however Mozart exposes predicted events.
+ vector<Touch> predicted_touches;
};
// Finish drawing a stroke with a pen.
struct FinishStrokeCmd {
- // ID of the stroke that is being drawn.
- uint32 stroke_id;
- // ID of the pen that is drawing the stroke. Must match the ID provided
- // to BeginStrokeCmd.
- uint32 pen_id;
+ // ID of the stroke that is being drawn.
+ uint32 stroke_id;
+ // ID of the pen that is drawing the stroke. Must match the ID provided
+ // to BeginStrokeCmd.
+ uint32 pen_id;
};
// Set the style of the specified stroke.
struct SetStrokeStyleCmd {
- uint32 stroke_id;
- uint32 style_id;
+ uint32 stroke_id;
+ uint32 style_id;
};
// Set the path of a stroke. This cannot be applied to a stroke that is in the
// middle of Begin/Extend/FinishStroke.
struct SetStrokePathCmd {
- // ID of the stroke whose path is to be set.
- uint32 stroke_id;
- // Describes the stroke's new path.
- StrokePath path;
+ // ID of the stroke whose path is to be set.
+ uint32 stroke_id;
+ // Describes the stroke's new path.
+ StrokePath path;
};
// Add a stroke to a stroke-group. The stroke must not currently be a member of
// any group, including the specified group.
struct AddStrokeCmd {
- uint32 group_id;
- uint32 stroke_id;
+ uint32 group_id;
+ uint32 stroke_id;
};
// Remove a stroke from a stroke-group. The stroke must currently be a member
// of that group.
struct RemoveStrokeCmd {
- uint32 group_id;
- uint32 stroke_id;
+ uint32 group_id;
+ uint32 stroke_id;
};
// Remove all strokes from the specified stroke-group. These strokes may be
// re-added later to the same group, or a different one.
struct ClearGroupCmd {
- uint32 group_id;
+ uint32 group_id;
};
// Set the style that is applied to strokes that are subsequently drawn by the
// specified pen.
struct SetPenStyleCmd {
- uint32 pen_id;
- uint32 style_id;
+ uint32 pen_id;
+ uint32 style_id;
};
diff --git a/public/fidl/fuchsia.ui.sketchy/resources.fidl b/public/fidl/fuchsia.ui.sketchy/resources.fidl
index 0a8176c..1c980a3 100644
--- a/public/fidl/fuchsia.ui.sketchy/resources.fidl
+++ b/public/fidl/fuchsia.ui.sketchy/resources.fidl
@@ -7,12 +7,12 @@
// Specifies the type of a resource created via CreateResourceCmd, along with
// any other required data.
union ResourceArgs {
- Stroke stroke;
- StrokeGroup stroke_group;
- Pen pen;
+ Stroke stroke;
+ StrokeGroup stroke_group;
+ Pen pen;
- WobblyStyle wobbly_style;
- ExplicitWidthStyle explicit_width_style;
+ WobblyStyle wobbly_style;
+ ExplicitWidthStyle explicit_width_style;
};
// A stroke has a path which is tessellated and rendered as a Mesh when its
@@ -34,7 +34,7 @@
// - ExtendStroke (as arg)
// - FinishStroke (as arg)
struct Stroke {
- uint8 unused;
+ uint8 unused;
};
// A stroke-group is a container of strokes, which can be inserted into a Scenic
@@ -47,10 +47,9 @@
// - fuchsia.ui.gfx.Detach
// - fuchsia.ui.gfx.AddChild (as arg)
struct StrokeGroup {
- uint8 unused;
+ uint8 unused;
};
-
// A pen handles user input to create a path for a stroke.
// TODO(MZ-246): expose access to stroke-fitter parameters.
//
@@ -60,25 +59,24 @@
// - FinishStroke
// - SetPenStyle
struct Pen {
- uint8 unused;
+ uint8 unused;
};
-
// The classic Escher Sketcy Demo wobbly style that you know and love.
//
// Commands:
// - SetPenStyle (as arg).
// - SetStrokeStyle (as arg).
struct WobblyStyle {
- float32 speed1;
- float32 amplitude1;
- float32 frequency1;
- float32 speed2;
- float32 amplitude2;
- float32 frequency2;
- float32 speed3;
- float32 amplitude3;
- float32 frequency3;
+ float32 speed1;
+ float32 amplitude1;
+ float32 frequency1;
+ float32 speed2;
+ float32 amplitude2;
+ float32 frequency2;
+ float32 speed3;
+ float32 amplitude3;
+ float32 frequency3;
};
// Allows clients to provide a list of float32s that are sampled along the stroke,
@@ -89,5 +87,5 @@
// - SetPenStyle (as arg)
// - SetStrokeStyle (as arg).
struct ExplicitWidthStyle {
- vector<float32> vals;
+ vector<float32> vals;
};
diff --git a/public/fidl/fuchsia.ui.sketchy/types.fidl b/public/fidl/fuchsia.ui.sketchy/types.fidl
index 45373038..469221b 100644
--- a/public/fidl/fuchsia.ui.sketchy/types.fidl
+++ b/public/fidl/fuchsia.ui.sketchy/types.fidl
@@ -7,18 +7,18 @@
using fuchsia.ui.gfx;
struct Touch {
- fuchsia.ui.gfx.vec2 position;
- uint32 nanoseconds;
- float32 pressure;
+ fuchsia.ui.gfx.vec2 position;
+ uint32 nanoseconds;
+ float32 pressure;
};
struct CubicBezier2 {
- fuchsia.ui.gfx.vec2 pt0;
- fuchsia.ui.gfx.vec2 pt1;
- fuchsia.ui.gfx.vec2 pt2;
- fuchsia.ui.gfx.vec2 pt3;
+ fuchsia.ui.gfx.vec2 pt0;
+ fuchsia.ui.gfx.vec2 pt1;
+ fuchsia.ui.gfx.vec2 pt2;
+ fuchsia.ui.gfx.vec2 pt3;
};
struct StrokePath {
- vector<CubicBezier2> segments;
+ vector<CubicBezier2> segments;
};
diff --git a/public/fidl/fuchsia.ui.vectorial/commands.fidl b/public/fidl/fuchsia.ui.vectorial/commands.fidl
index 7067240..3905a19 100644
--- a/public/fidl/fuchsia.ui.vectorial/commands.fidl
+++ b/public/fidl/fuchsia.ui.vectorial/commands.fidl
@@ -5,5 +5,5 @@
library fuchsia.ui.vectorial;
union Command {
- bool placeHolder;
+ bool placeHolder;
};
diff --git a/public/fidl/fuchsia.ui.vectorial/events.fidl b/public/fidl/fuchsia.ui.vectorial/events.fidl
index 14fddb0..99c2336 100644
--- a/public/fidl/fuchsia.ui.vectorial/events.fidl
+++ b/public/fidl/fuchsia.ui.vectorial/events.fidl
@@ -5,5 +5,5 @@
library fuchsia.ui.vectorial;
union Event {
- bool placeHolder;
+ bool placeHolder;
};
diff --git a/public/fidl/fuchsia.ui.views/commands.fidl b/public/fidl/fuchsia.ui.views/commands.fidl
index f138081..bb45d40 100644
--- a/public/fidl/fuchsia.ui.views/commands.fidl
+++ b/public/fidl/fuchsia.ui.views/commands.fidl
@@ -5,29 +5,29 @@
library fuchsia.ui.views;
union Command {
- CreateViewCmd create_view;
- CreateViewHolderCmd create_view_holder;
+ CreateViewCmd create_view;
+ CreateViewHolderCmd create_view_holder;
- AddChildViewCmd add_child_view;
- RemoveChildViewCmd remove_child_view;
+ AddChildViewCmd add_child_view;
+ RemoveChildViewCmd remove_child_view;
};
struct CreateViewCmd {
- uint32 id;
- handle<eventpair> token;
+ uint32 id;
+ handle<eventpair> token;
};
struct CreateViewHolderCmd {
- uint32 id;
- handle<eventpair> token;
+ uint32 id;
+ handle<eventpair> token;
};
struct AddChildViewCmd {
- uint32 view_id;
- uint32 view_holder_id;
+ uint32 view_id;
+ uint32 view_holder_id;
};
struct RemoveChildViewCmd {
- uint32 view_id;
- uint32 view_holder_id;
+ uint32 view_id;
+ uint32 view_holder_id;
};
diff --git a/public/fidl/fuchsia.ui.views/events.fidl b/public/fidl/fuchsia.ui.views/events.fidl
index f737e57..eaceb03 100644
--- a/public/fidl/fuchsia.ui.views/events.fidl
+++ b/public/fidl/fuchsia.ui.views/events.fidl
@@ -7,13 +7,13 @@
using fuchsia.ui.gfx;
union Event {
- ChildViewAttachedEvent child_view_attached;
- ChildViewUnavailableEvent child_view_unavailable;
+ ChildViewAttachedEvent child_view_attached;
+ ChildViewUnavailableEvent child_view_unavailable;
};
// Called when a child view is attached.
struct ChildViewAttachedEvent {
- uint32 view_holder_id;
+ uint32 view_holder_id;
};
// Called when a child view has become unavailable.
@@ -28,5 +28,5 @@
// The implementation should invoke the callback once the event has
// been handled.
struct ChildViewUnavailableEvent {
- uint32 view_holder_id;
+ uint32 view_holder_id;
};
diff --git a/public/fidl/fuchsia.ui.viewsv1/view_containers.fidl b/public/fidl/fuchsia.ui.viewsv1/view_containers.fidl
index ee503e9..b79dfb6 100644
--- a/public/fidl/fuchsia.ui.viewsv1/view_containers.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1/view_containers.fidl
@@ -47,153 +47,153 @@
// them, as otherwise the children cannot be rendered (since they lack enough
// context to know what to draw).
interface ViewContainer {
- // Sets the view container listener, or null to remove.
- 1: SetListener(ViewContainerListener? listener);
+ // Sets the view container listener, or null to remove.
+ SetListener(ViewContainerListener? listener);
- // Adds the view referenced by |child_view_owner| as a child and assigns
- // it the provided |child_key| to identify it among its children.
- // The container may remove the child later by passing the same |child_key|
- // to |RemoveChild()|.
- //
- // This method takes ownership of the view.
- //
- // It is important for the container to choose locally unique values for
- // |child_key| to ensure that each child can be distinguished even as
- // more children are added or removed. We recommend using a simple
- // counter which is incremented on each (re-)addition.
- //
- // If the child becomes unavailable at any time prior to being removed
- // then an |OnChildUnavailable()| message will be sent.
- //
- // If |child_view_owner| refers to a view which is already unavailable or
- // if adding the view would create a cycle in the view tree then the
- // call proceeds as if it succeeded but an |OnChildUnavailable()| message
- // will be sent.
- //
- // If |child_view_owner| refers to a view which already has a container or is
- // the root of a view tree then an |OnChildUnavailable()| message will
- // be sent to its old container or root and the view will be
- // (re-)added to its new container as usual. This special case also
- // applies when the specified view is already a child of this view, in which
- // case the behavior is similar to the view having been transferred to
- // some other container and then back again.
- //
- // Note that an unavailable child will remain in its container's list of
- // children until its container explicitly calls |RemoveChild()| to remove
- // it.
- //
- // |host_import_token| is an import token which the view manager will
- // use to import the node to which the child view's content should
- // be attached.
- //
- // To establish the graphical embedding relation, the container view
- // must create an event pair, bind one endpoint to an |ExportResourceOp|
- // associated with the node to which the child's content nodes will be
- // attached as descendants, and pass the other endpoint to this method as
- // |host_import_token|.
- //
- // It is an error to add a view whose |child_key| already appears
- // in the view's list of children; the connection will be closed.
- //
- // It is an error to add more than one child to a |ViewTree|'s container;
- // it can only have at most one child (its root).
- //
- // This method is deprecated in favor of the eventpair-based one below.
- // TODO(SCN-1018): Remove this.
- 2: AddChild(uint32 child_key,
- fuchsia.ui.viewsv1token.ViewOwner child_view_owner,
- handle<eventpair> host_import_token);
+ // Adds the view referenced by |child_view_owner| as a child and assigns
+ // it the provided |child_key| to identify it among its children.
+ // The container may remove the child later by passing the same |child_key|
+ // to |RemoveChild()|.
+ //
+ // This method takes ownership of the view.
+ //
+ // It is important for the container to choose locally unique values for
+ // |child_key| to ensure that each child can be distinguished even as
+ // more children are added or removed. We recommend using a simple
+ // counter which is incremented on each (re-)addition.
+ //
+ // If the child becomes unavailable at any time prior to being removed
+ // then an |OnChildUnavailable()| message will be sent.
+ //
+ // If |child_view_owner| refers to a view which is already unavailable or
+ // if adding the view would create a cycle in the view tree then the
+ // call proceeds as if it succeeded but an |OnChildUnavailable()| message
+ // will be sent.
+ //
+ // If |child_view_owner| refers to a view which already has a container or is
+ // the root of a view tree then an |OnChildUnavailable()| message will
+ // be sent to its old container or root and the view will be
+ // (re-)added to its new container as usual. This special case also
+ // applies when the specified view is already a child of this view, in which
+ // case the behavior is similar to the view having been transferred to
+ // some other container and then back again.
+ //
+ // Note that an unavailable child will remain in its container's list of
+ // children until its container explicitly calls |RemoveChild()| to remove
+ // it.
+ //
+ // |host_import_token| is an import token which the view manager will
+ // use to import the node to which the child view's content should
+ // be attached.
+ //
+ // To establish the graphical embedding relation, the container view
+ // must create an event pair, bind one endpoint to an |ExportResourceOp|
+ // associated with the node to which the child's content nodes will be
+ // attached as descendants, and pass the other endpoint to this method as
+ // |host_import_token|.
+ //
+ // It is an error to add a view whose |child_key| already appears
+ // in the view's list of children; the connection will be closed.
+ //
+ // It is an error to add more than one child to a |ViewTree|'s container;
+ // it can only have at most one child (its root).
+ //
+ // This method is deprecated in favor of the eventpair-based one below.
+ // TODO(SCN-1018): Remove this.
+ AddChild(uint32 child_key,
+ fuchsia.ui.viewsv1token.ViewOwner child_view_owner,
+ handle<eventpair> host_import_token);
- 3: AddChild2(uint32 child_key,
- handle<eventpair> view_holder_token,
- handle<eventpair> host_import_token);
+ AddChild2(uint32 child_key,
+ handle<eventpair> view_holder_token,
+ handle<eventpair> host_import_token);
- // Removes the view referenced by |child_key| from the view's
- // list of children.
- //
- // If |transferred_view_owner| is not null, associates it with the
- // previously added child to allow it to be transferred elsewhere or
- // closes the |transferred_view_owner| channel if there was none.
- //
- // It is an error to remove a view whose |child_key| does not appear
- // in the container's list of children; the connection will be closed.
- //
- // This method is deprecated in favor of the eventpair-based one below.
- // TODO(SCN-1018): Remove this.
- 4: RemoveChild(uint32 child_key,
- request<fuchsia.ui.viewsv1token.ViewOwner>? transferred_view_owner);
+ // Removes the view referenced by |child_key| from the view's
+ // list of children.
+ //
+ // If |transferred_view_owner| is not null, associates it with the
+ // previously added child to allow it to be transferred elsewhere or
+ // closes the |transferred_view_owner| channel if there was none.
+ //
+ // It is an error to remove a view whose |child_key| does not appear
+ // in the container's list of children; the connection will be closed.
+ //
+ // This method is deprecated in favor of the eventpair-based one below.
+ // TODO(SCN-1018): Remove this.
+ RemoveChild(uint32 child_key,
+ request<fuchsia.ui.viewsv1token.ViewOwner>? transferred_view_owner);
- 5: RemoveChild2(uint32 child_key,
- handle<eventpair>? transferred_view_holder_token);
+ RemoveChild2(uint32 child_key,
+ handle<eventpair>? transferred_view_holder_token);
- // Sets view properties for the child, such as layout constraints.
- //
- // This method must be called at least once after a child is added to
- // set the view's properties before it can be rendered. Rendering for
- // children without properties is blocked until properties are set.
- //
- // The |child_view_properties| specifies the properties for the child, or
- // null to remove the properties from the child which will cause rendering
- // of the child's scene to be blocked until new properties are set.
- //
- // It is an error to specify a |child_key| that does not appear in
- // the container's list of children; the connection will be closed.
- //
- // It is an error to specify malformed |child_view_properties| such
- // as invalid layout properties; the connection will be closed.
- 6: SetChildProperties(uint32 child_key, ViewProperties? child_view_properties);
+ // Sets view properties for the child, such as layout constraints.
+ //
+ // This method must be called at least once after a child is added to
+ // set the view's properties before it can be rendered. Rendering for
+ // children without properties is blocked until properties are set.
+ //
+ // The |child_view_properties| specifies the properties for the child, or
+ // null to remove the properties from the child which will cause rendering
+ // of the child's scene to be blocked until new properties are set.
+ //
+ // It is an error to specify a |child_key| that does not appear in
+ // the container's list of children; the connection will be closed.
+ //
+ // It is an error to specify malformed |child_view_properties| such
+ // as invalid layout properties; the connection will be closed.
+ SetChildProperties(uint32 child_key, ViewProperties? child_view_properties);
- // WIP API
- // 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.
- //
- // It is an error to specify a |child_key| that does not appear in
- // the container's list of children; the connection will be closed.
- //
- 7: SendSizeChangeHintHACK(uint32 child_key, float32 width_change_factor,
- float32 height_change_factor);
+ // WIP API
+ // 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.
+ //
+ // It is an error to specify a |child_key| that does not appear in
+ // the container's list of children; the connection will be closed.
+ //
+ SendSizeChangeHintHACK(uint32 child_key, float32 width_change_factor,
+ float32 height_change_factor);
- // Request the snapshot of the child view.
- 9: RequestSnapshotHACK(uint32 child_key)-> (fuchsia.mem.Buffer data);
+ // Request the snapshot of the child view.
+ RequestSnapshotHACK(uint32 child_key)-> (fuchsia.mem.Buffer data);
};
// An interface clients may implement to receive events from a view container.
interface ViewContainerListener {
- // Called when a child view is attached along with embedding information.
- //
- // This method will be called at most once after the child is added.
- //
- // The implementation should invoke the callback once the event has
- // been handled.
- 1: OnChildAttached(uint32 child_key, ViewInfo child_view_info) -> ();
+ // Called when a child view is attached along with embedding information.
+ //
+ // This method will be called at most once after the child is added.
+ //
+ // The implementation should invoke the callback once the event has
+ // been handled.
+ OnChildAttached(uint32 child_key, ViewInfo child_view_info) -> ();
- // Called when a child view has become unavailable.
- //
- // A child may become unavailable for many reasons such being unregistered
- // by its application, abnormal termination of its application, or
- // cycles being introduced in the view tree.
- //
- // To complete removal of an unavailable child, this view component must
- // call RemoveChild() on its view with |child_key|.
- //
- // The implementation should invoke the callback once the event has
- // been handled.
- 2: OnChildUnavailable(uint32 child_key) -> ();
+ // Called when a child view has become unavailable.
+ //
+ // A child may become unavailable for many reasons such being unregistered
+ // by its application, abnormal termination of its application, or
+ // cycles being introduced in the view tree.
+ //
+ // To complete removal of an unavailable child, this view component must
+ // call RemoveChild() on its view with |child_key|.
+ //
+ // The implementation should invoke the callback once the event has
+ // been handled.
+ OnChildUnavailable(uint32 child_key) -> ();
- // TODO(jeffbrown): Once we figure out measurement, add a |OnChildResized|
- // event or similar to allow the container to get the size along with the
- // scene version.
+ // TODO(jeffbrown): Once we figure out measurement, add a |OnChildResized|
+ // event or similar to allow the container to get the size along with the
+ // scene version.
};
// Provides embedding information about a view for use by its container.
//
// This information is valid until the container removes the view.
struct ViewInfo {
- // There is currently no information here but we have preserved the
- // plumbing for now. May remove later.
- uint8 dummy;
+ // There is currently no information here but we have preserved the
+ // plumbing for now. May remove later.
+ uint8 dummy;
};
diff --git a/public/fidl/fuchsia.ui.viewsv1/view_manager.fidl b/public/fidl/fuchsia.ui.viewsv1/view_manager.fidl
index 5013d8b..a95e783 100644
--- a/public/fidl/fuchsia.ui.viewsv1/view_manager.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1/view_manager.fidl
@@ -23,70 +23,70 @@
[Discoverable]
interface ViewManager {
- // Gets the scenic instance associated with this view manager.
- // All graphical content for this view manager's views and view trees
- // must come from sessions created by this |scenic| instance.
- 1: GetScenic(request<fuchsia.ui.scenic.Scenic> scenic);
+ // Gets the scenic instance associated with this view manager.
+ // All graphical content for this view manager's views and view trees
+ // must come from sessions created by this |scenic| instance.
+ GetScenic(request<fuchsia.ui.scenic.Scenic> scenic);
- // Creates a view.
- //
- // The |view| is used to configure the view and interact with its
- // local environment.
- //
- // The |view_owner| is used as a transferable reference which can
- // be passed to the view's intended container as part of a request to
- // add the view as a child. The view manager itself does not describe
- // how this interaction should take place, only that ownership should
- // eventually be passed back through the container's view interface
- // as an argument to |View.AddChild()|.
- //
- // The |view_listener| is used to receive events from the view.
- //
- // The |label| is an optional name to associate with the view for
- // diagnostic purposes. The label will be truncated if it is longer
- // than |kLabelMaxLength|.
- //
- // |parent_export_token| is an export token which the view manager
- // will use to export the node to which the view's content should be
- // attached.
- //
- // To present graphical content, the view must obtain a |Session| from
- // |Mozart|, create an event pair, bind one endpoint to an
- // |ImportResourceOp| using |ImportSpec.NODE|, attach its content nodes as
- // descendants of the imported node, and pass the other endpoint of the
- // event pair to this method as |parent_export_token|.
- //
- // To destroy the view and cause it to be removed from the view tree,
- // simply close the |view|, |view_listener|, or |view_owner| channels.
- //
- // This method is deprecated in favor of the eventpair-based one below.
- // TODO(SCN-1018): Remove this.
- 2: CreateView(request<View> view,
+ // Creates a view.
+ //
+ // The |view| is used to configure the view and interact with its
+ // local environment.
+ //
+ // The |view_owner| is used as a transferable reference which can
+ // be passed to the view's intended container as part of a request to
+ // add the view as a child. The view manager itself does not describe
+ // how this interaction should take place, only that ownership should
+ // eventually be passed back through the container's view interface
+ // as an argument to |View.AddChild()|.
+ //
+ // The |view_listener| is used to receive events from the view.
+ //
+ // The |label| is an optional name to associate with the view for
+ // diagnostic purposes. The label will be truncated if it is longer
+ // than |kLabelMaxLength|.
+ //
+ // |parent_export_token| is an export token which the view manager
+ // will use to export the node to which the view's content should be
+ // attached.
+ //
+ // To present graphical content, the view must obtain a |Session| from
+ // |Mozart|, create an event pair, bind one endpoint to an
+ // |ImportResourceOp| using |ImportSpec.NODE|, attach its content nodes as
+ // descendants of the imported node, and pass the other endpoint of the
+ // event pair to this method as |parent_export_token|.
+ //
+ // To destroy the view and cause it to be removed from the view tree,
+ // simply close the |view|, |view_listener|, or |view_owner| channels.
+ //
+ // This method is deprecated in favor of the eventpair-based one below.
+ // TODO(SCN-1018): Remove this.
+ CreateView(request<View> view,
request<fuchsia.ui.viewsv1token.ViewOwner> view_owner,
ViewListener view_listener,
handle<eventpair> parent_export_token,
string? label);
- 3: CreateView2(request<View> view,
+ CreateView2(request<View> view,
handle<eventpair> view_token,
ViewListener view_listener,
handle<eventpair> parent_export_token,
string? label);
- // Creates a view tree.
- //
- // The |view_tree| is used to configure the view tree and interact
- // with the views it contains.
- //
- // The |view_tree_listener| is used to receive events from the view tree.
- //
- // The |label| is an optional name to associate with the view tree for
- // diagnostic purposes. The label will be truncated if it is longer
- // than |kLabelMaxLength|.
- //
- // To destroy the view tree simply close the |view_tree| or
- // |view_tree_listener| channels.
- 4: CreateViewTree(request<ViewTree> view_tree,
+ // Creates a view tree.
+ //
+ // The |view_tree| is used to configure the view tree and interact
+ // with the views it contains.
+ //
+ // The |view_tree_listener| is used to receive events from the view tree.
+ //
+ // The |label| is an optional name to associate with the view tree for
+ // diagnostic purposes. The label will be truncated if it is longer
+ // than |kLabelMaxLength|.
+ //
+ // To destroy the view tree simply close the |view_tree| or
+ // |view_tree_listener| channels.
+ CreateViewTree(request<ViewTree> view_tree,
ViewTreeListener view_tree_listener,
string? label);
};
diff --git a/public/fidl/fuchsia.ui.viewsv1/view_properties.fidl b/public/fidl/fuchsia.ui.viewsv1/view_properties.fidl
index 3d106a1..c9f4dd9 100644
--- a/public/fidl/fuchsia.ui.viewsv1/view_properties.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1/view_properties.fidl
@@ -11,12 +11,12 @@
// When a container sets properties for its children, any properties which
// are set to null are inherited from the container's own ancestors.
struct ViewProperties {
- ViewLayout? view_layout;
- CustomFocusBehavior? custom_focus_behavior;
+ ViewLayout? view_layout;
+ CustomFocusBehavior? custom_focus_behavior;
};
struct CustomFocusBehavior {
- bool allow_focus = true;
+ bool allow_focus = true;
};
// Provides layout constraints for a view.
@@ -25,11 +25,11 @@
// bring back |BoxConstraints| or introduce some other protocol just for
// measurement.
struct ViewLayout {
- // The size of the view in logical pixels.
- // Must be non-negative.
- fuchsia.math.SizeF size;
+ // The size of the view in logical pixels.
+ // Must be non-negative.
+ fuchsia.math.SizeF size;
- // The inset of the view in logical pixels.
- // Must be non-negative.
- fuchsia.math.InsetF inset;
+ // The inset of the view in logical pixels.
+ // Must be non-negative.
+ fuchsia.math.InsetF inset;
};
diff --git a/public/fidl/fuchsia.ui.viewsv1/view_provider.fidl b/public/fidl/fuchsia.ui.viewsv1/view_provider.fidl
index 0545653..821310d7 100644
--- a/public/fidl/fuchsia.ui.viewsv1/view_provider.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1/view_provider.fidl
@@ -13,16 +13,16 @@
// expose views to be embedded into other applications.
[Discoverable]
interface ViewProvider {
- // Creates and registers a view with the view manager and returns its
- // view owner which may subsequently be passed to |View.AddChild()|
- // to attach the view to a view hierarchy.
- //
- // Implementors of this interface are responsible for creating the view
- // and forwarding the |view_owner| interface request to
- // |ViewManager.CreateView()|.
- //
- // The caller may request services from the created view via the |services|
- // service provider.
- 1: CreateView(request<fuchsia.ui.viewsv1token.ViewOwner> view_owner,
+ // Creates and registers a view with the view manager and returns its
+ // view owner which may subsequently be passed to |View.AddChild()|
+ // to attach the view to a view hierarchy.
+ //
+ // Implementors of this interface are responsible for creating the view
+ // and forwarding the |view_owner| interface request to
+ // |ViewManager.CreateView()|.
+ //
+ // The caller may request services from the created view via the |services|
+ // service provider.
+ CreateView(request<fuchsia.ui.viewsv1token.ViewOwner> view_owner,
request<fuchsia.sys.ServiceProvider>? services);
};
diff --git a/public/fidl/fuchsia.ui.viewsv1/view_snapshot.fidl b/public/fidl/fuchsia.ui.viewsv1/view_snapshot.fidl
index a5100d4..cd323d0 100644
--- a/public/fidl/fuchsia.ui.viewsv1/view_snapshot.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1/view_snapshot.fidl
@@ -10,13 +10,13 @@
// Defines an interface to take view snapshots.
[Discoverable]
interface ViewSnapshot {
- // TODO(SCN-1019): Use zx::eventpair instead of koid.
- // Takes a snapshot of a view and returns it in a callback.
- //
- // The |view_koid| identifies the view whose snapshot needs to be taken.
- //
- // The callback is invoked with the VMO buffer containing the snapshot.
- // If successful, the buffer size is non-zero, otherwise it is 0.
- 1: TakeSnapshot(uint64 view_koid) ->
- (fuchsia.mem.Buffer snapshot);
+ // TODO(SCN-1019): Use zx::eventpair instead of koid.
+ // Takes a snapshot of a view and returns it in a callback.
+ //
+ // The |view_koid| identifies the view whose snapshot needs to be taken.
+ //
+ // The callback is invoked with the VMO buffer containing the snapshot.
+ // If successful, the buffer size is non-zero, otherwise it is 0.
+ TakeSnapshot(uint64 view_koid)
+ -> (fuchsia.mem.Buffer snapshot);
};
diff --git a/public/fidl/fuchsia.ui.viewsv1/view_tree_token.fidl b/public/fidl/fuchsia.ui.viewsv1/view_tree_token.fidl
index 3fb8a7a..ccfecfd 100644
--- a/public/fidl/fuchsia.ui.viewsv1/view_tree_token.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1/view_tree_token.fidl
@@ -16,5 +16,5 @@
// TODO(jeffbrown): This implementation is a temporary placeholder until
// we provide a way to create tokens which cannot be forged.
struct ViewTreeToken {
- uint32 value;
+ uint32 value;
};
diff --git a/public/fidl/fuchsia.ui.viewsv1/view_trees.fidl b/public/fidl/fuchsia.ui.viewsv1/view_trees.fidl
index 7a159bf..76bb7bc 100644
--- a/public/fidl/fuchsia.ui.viewsv1/view_trees.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1/view_trees.fidl
@@ -45,24 +45,24 @@
//
// 3. Send input events to the dispatcher for delivery to views.
interface ViewTree {
- // Gets the view tree's token.
- 1: GetToken() -> (ViewTreeToken token);
+ // Gets the view tree's token.
+ GetToken() -> (ViewTreeToken token);
- // Gets a service provider to access services which are associated with
- // the view tree such as input, accessibility and editing capabilities.
- // The view tree service provider is private to the view tree and should
- // not be shared with anyone else.
- //
- // See |InputDispatcher|.
- 2: GetServiceProvider(request<fuchsia.sys.ServiceProvider> service_provider);
+ // Gets a service provider to access services which are associated with
+ // the view tree such as input, accessibility and editing capabilities.
+ // The view tree service provider is private to the view tree and should
+ // not be shared with anyone else.
+ //
+ // See |InputDispatcher|.
+ GetServiceProvider(request<fuchsia.sys.ServiceProvider> service_provider);
- // Gets an interface for managing the view tree's root.
- 3: GetContainer(request<ViewContainer> container);
+ // Gets an interface for managing the view tree's root.
+ GetContainer(request<ViewContainer> container);
};
// An interface clients may implement to receive events from a view tree.
interface ViewTreeListener {
- // There are currently no events defined but we have preserved the
- // plumbing for the future when ViewContainer will merge into ViewTree
- // along with its listener.
+ // There are currently no events defined but we have preserved the
+ // plumbing for the future when ViewContainer will merge into ViewTree
+ // along with its listener.
};
diff --git a/public/fidl/fuchsia.ui.viewsv1/views.fidl b/public/fidl/fuchsia.ui.viewsv1/views.fidl
index 9e09136..f3f4726 100644
--- a/public/fidl/fuchsia.ui.viewsv1/views.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1/views.fidl
@@ -30,35 +30,35 @@
//
// See |ViewContainer| for more information.
interface View {
- // Gets a service provider to access services which are associated with
- // the view.
- // The view service provider is private to the view and should not be
- // shared with anyone else.
- 1: GetServiceProvider(request<fuchsia.sys.ServiceProvider> service_provider);
+ // Gets a service provider to access services which are associated with
+ // the view.
+ // The view service provider is private to the view and should not be
+ // shared with anyone else.
+ GetServiceProvider(request<fuchsia.sys.ServiceProvider> service_provider);
- // This is a way for an app to offer services that are associated with a
- // particular view. Used to expose services to the compositor
- //
- // In particular this should be used to let know which view is implementing
- // the ability to show an IME
- //
- // |service_names| should contain a list of service names as defined with the
- // FIDL syntax [Discoverable]
- //
- // The list of services will be used by the compositor to filter service
- // providers when looking for a particular service.
- 2: OfferServiceProvider(fuchsia.sys.ServiceProvider service_provider,
+ // This is a way for an app to offer services that are associated with a
+ // particular view. Used to expose services to the compositor
+ //
+ // In particular this should be used to let know which view is implementing
+ // the ability to show an IME
+ //
+ // |service_names| should contain a list of service names as defined with the
+ // FIDL syntax [Discoverable]
+ //
+ // The list of services will be used by the compositor to filter service
+ // providers when looking for a particular service.
+ OfferServiceProvider(fuchsia.sys.ServiceProvider service_provider,
vector<string> service_names);
- // Gets an interface for managing the view's children.
- 3: GetContainer(request<ViewContainer> container);
+ // Gets an interface for managing the view's children.
+ GetContainer(request<ViewContainer> container);
};
// An interface clients may implement to receive events from a view.
interface ViewListener {
- // Called when the view receives new properties from its ancestors.
- // Initially the view has no properties so this method will be called
- // as soon as properties first become available and whenever they change
- // thereafter.
- 1: OnPropertiesChanged(ViewProperties properties) -> ();
+ // Called when the view receives new properties from its ancestors.
+ // Initially the view has no properties so this method will be called
+ // as soon as properties first become available and whenever they change
+ // thereafter.
+ OnPropertiesChanged(ViewProperties properties) -> ();
};
diff --git a/public/fidl/fuchsia.ui.viewsv1token/view_token.fidl b/public/fidl/fuchsia.ui.viewsv1token/view_token.fidl
index 005b36b..7135ea6 100644
--- a/public/fidl/fuchsia.ui.viewsv1token/view_token.fidl
+++ b/public/fidl/fuchsia.ui.viewsv1token/view_token.fidl
@@ -8,4 +8,5 @@
//
// This interface is only intended to be used as a token, analogous to how
// Scenic View/ViewHolder resources use eventpairs as tokens.
-interface ViewOwner {};
+interface ViewOwner {
+};
diff --git a/public/fidl/fuchsia.vulkan.loader/loader.fidl b/public/fidl/fuchsia.vulkan.loader/loader.fidl
index 63ed1c2..bcee247 100644
--- a/public/fidl/fuchsia.vulkan.loader/loader.fidl
+++ b/public/fidl/fuchsia.vulkan.loader/loader.fidl
@@ -5,10 +5,10 @@
library fuchsia.vulkan.loader;
// Service to provide Vulkan libraries to the loader.
-[Discoverable, Layout="Simple"]
+[Discoverable, Layout = "Simple"]
interface Loader {
- // Requests a client driver library with the given name from the Vulkan loader
- // service. Returns a VMO suitable for loading as a dynamic library on
- // success, a null handle on failure.
- 1: Get(string:64 name) -> (handle<vmo>? lib);
+ // Requests a client driver library with the given name from the Vulkan loader
+ // service. Returns a VMO suitable for loading as a dynamic library on
+ // success, a null handle on failure.
+ Get(string:64 name) -> (handle<vmo>? lib);
};