pub enum PuppetRequest {
EmbedRemoteView {
payload: PuppetEmbedRemoteViewRequest,
responder: PuppetEmbedRemoteViewResponder,
},
SetEmbeddedViewProperties {
payload: PuppetSetEmbeddedViewPropertiesRequest,
responder: PuppetSetEmbeddedViewPropertiesResponder,
},
DrawImage {
payload: PuppetDrawImageRequest,
responder: PuppetDrawImageResponder,
},
SetImageProperties {
payload: PuppetSetImagePropertiesRequest,
responder: PuppetSetImagePropertiesResponder,
},
}
Expand description
******************************* PLEASE READ *******************************
A tool to help developers write generalizable tests against a well-defined client application (“the puppet”). This API is not intended to cover every possible UI platform API use case.
TOPOLOGY
Each puppet is assumed to own exactly one view.
Each piece of content added is assumed to be a “direct child” of this view; and a sibling of the rest of the view’s contents. In other words, all embedded views, filled rects, etc. are considered to have “sibling” semantics; for example, repositioning or resizing one piece of content should not reposition/resize any other piece of content.
Z-ORDERING
The contents of a puppet’s view are z-ordered according to the order in which they were created. The first piece of content created appears at the “bottom”, and the last piece of content created appears at the “top”.
IDS
All ids must be globally unique, e.g. a “filled rect” id belongs to the same id space as an “embedded view” id.
SYNCHRONIZATION
All methods should block until the frame containing the requested changes has rendered to the display, if a new frame is required.
RETURN VALUES
See documentation on the Result
enum above.
UNKNOWN INTERACTIONS
Puppet implementations may live outside of fuchsia.git, so they will encounter
unknown methods and/or fields any time we extend the puppet API. In these cases,
the puppet should always return UNSUPPORTED
.
Variants§
EmbedRemoteView
Embeds a view owned elsewhere.
The puppet should create a (ViewportCreationToken, ViewCreationToken) pair
and use the former to create a viewport with the specified properties
.
Once the puppet has presented a frame containing the new viewport, it should
return the view creation token to the caller.
SetEmbeddedViewProperties
Updates the properties of an embedded view.
Fields
responder: PuppetSetEmbeddedViewPropertiesResponder
DrawImage
Draws an image composed of solid, monochrome-filled rectangles.
SetImageProperties
Updates the properties of an image.
Implementations§
Source§impl PuppetRequest
impl PuppetRequest
pub fn into_embed_remote_view( self, ) -> Option<(PuppetEmbedRemoteViewRequest, PuppetEmbedRemoteViewResponder)>
pub fn into_set_embedded_view_properties( self, ) -> Option<(PuppetSetEmbeddedViewPropertiesRequest, PuppetSetEmbeddedViewPropertiesResponder)>
pub fn into_draw_image( self, ) -> Option<(PuppetDrawImageRequest, PuppetDrawImageResponder)>
pub fn into_set_image_properties( self, ) -> Option<(PuppetSetImagePropertiesRequest, PuppetSetImagePropertiesResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL