blob: a65b4cf5ddc0eedf492a53641a8d50db65d4d78b [file] [log] [blame]
// gtx.proto
// Definitions for protobufs used by GTXiLib.
syntax = "proto3";
package gtxilib.oopclasses.protos;
import "enums.proto";
option java_multiple_files = true;
option objc_class_prefix = "GTX";
// Definition for Point data in 2D space.
// Next index: 3
message Point {
optional float x = 1;
optional float y = 2;
}
// Definition for 2D size data.
// Next index: 3
message Size {
optional float width = 1;
optional float height = 2;
}
// Definition for 2D rectangle data.
// Next index: 3
message Rect {
optional Point origin = 1;
optional Size size = 2;
}
// An RGBA color.
// Next index: 5
message Color {
optional float r = 1;
optional float g = 2;
optional float b = 3;
optional float a = 4;
}
// Definition for UI element data. Note that the properties are intentionally
// named to differ from UIAccessibility properties of NSObject to avoid
// conflicts when proto is used in Objective-C.
// Next index: 36
message UIElement {
optional int32 id = 1;
optional int32 parent_id = 2;
repeated int32 child_ids = 3;
// Accessibility properties
optional bool is_ax_element = 4;
optional uint64 ax_traits = 5;
optional string ax_label = 6;
optional string ax_hint = 7;
optional Rect ax_frame = 8;
optional string ax_identifier = 9;
// XCUIElement
optional bool hittable = 10;
optional bool exists = 11;
optional bool xc_selected = 12;
optional bool xc_enabled = 13;
optional ElementType.ElementTypeEnum element_type = 14;
// UIView
repeated string class_names_hierarchy = 15;
optional Color background_color = 16;
optional bool hidden = 17;
optional float alpha = 18;
optional bool opaque = 20;
optional Color tint_color = 21;
optional bool clips_to_bounds = 22;
optional bool user_interaction_enabled = 23;
optional bool multiple_touch_enabled = 24;
optional bool exclusive_touch = 25;
optional Rect frame = 26;
optional Rect bounds = 27;
// UIControl
optional uint64 control_state = 28;
optional bool enabled = 29;
optional bool selected = 30;
optional bool highlighted = 31;
optional string title = 32;
optional string text = 33; // UITextField and UITextView
optional bool on = 34; // UISwitch
optional float value = 35; // UIStepper and UISlider
}
// Metrics about the device, such as screen dimensions.
// Next index: 4.
message DisplayMetrics {
optional int32 screen_width = 1;
optional int32 screen_height = 2;
optional float screen_scale = 3;
}
// Global device state at a snapshot in time.
// Next index: 3.
message DeviceState {
optional DisplayMetrics display_metrics = 1;
optional string ios_version = 2;
}
// The state of the accessibility hierarchy of an app at a snapshot in time.
// Contains a tree of accessibility elements and related device metrics.
// Next index: 3.
message AccessibilityHierarchy {
optional DeviceState device_state = 1;
repeated UIElement elements = 2;
}