1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. 2 3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_VIEWROOTIMPL_PROTO_H_ 4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_VIEWROOTIMPL_PROTO_H_ 5 6 #include <stddef.h> 7 #include <stdint.h> 8 9 #include "perfetto/protozero/field_writer.h" 10 #include "perfetto/protozero/message.h" 11 #include "perfetto/protozero/packed_repeated_fields.h" 12 #include "perfetto/protozero/proto_decoder.h" 13 #include "perfetto/protozero/proto_utils.h" 14 15 namespace perfetto { 16 namespace protos { 17 namespace pbzero { 18 class DisplayCutoutProto; 19 class RectProto; 20 class WindowLayoutParamsProto; 21 } // Namespace pbzero. 22 } // Namespace protos. 23 } // Namespace perfetto. 24 25 namespace perfetto { 26 namespace protos { 27 namespace pbzero { 28 29 class ViewRootImplProto_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/17, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> { 30 public: ViewRootImplProto_Decoder(const uint8_t * data,size_t len)31 ViewRootImplProto_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {} ViewRootImplProto_Decoder(const std::string & raw)32 explicit ViewRootImplProto_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {} ViewRootImplProto_Decoder(const::protozero::ConstBytes & raw)33 explicit ViewRootImplProto_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {} has_view()34 bool has_view() const { return at<1>().valid(); } view()35 ::protozero::ConstChars view() const { return at<1>().as_string(); } has_display_id()36 bool has_display_id() const { return at<2>().valid(); } display_id()37 int32_t display_id() const { return at<2>().as_int32(); } has_app_visible()38 bool has_app_visible() const { return at<3>().valid(); } app_visible()39 bool app_visible() const { return at<3>().as_bool(); } has_width()40 bool has_width() const { return at<4>().valid(); } width()41 int32_t width() const { return at<4>().as_int32(); } has_height()42 bool has_height() const { return at<5>().valid(); } height()43 int32_t height() const { return at<5>().as_int32(); } has_is_animating()44 bool has_is_animating() const { return at<6>().valid(); } is_animating()45 bool is_animating() const { return at<6>().as_bool(); } has_visible_rect()46 bool has_visible_rect() const { return at<7>().valid(); } visible_rect()47 ::protozero::ConstBytes visible_rect() const { return at<7>().as_bytes(); } has_is_drawing()48 bool has_is_drawing() const { return at<8>().valid(); } is_drawing()49 bool is_drawing() const { return at<8>().as_bool(); } has_added()50 bool has_added() const { return at<9>().valid(); } added()51 bool added() const { return at<9>().as_bool(); } has_win_frame()52 bool has_win_frame() const { return at<10>().valid(); } win_frame()53 ::protozero::ConstBytes win_frame() const { return at<10>().as_bytes(); } has_pending_display_cutout()54 bool has_pending_display_cutout() const { return at<11>().valid(); } pending_display_cutout()55 ::protozero::ConstBytes pending_display_cutout() const { return at<11>().as_bytes(); } has_last_window_insets()56 bool has_last_window_insets() const { return at<12>().valid(); } last_window_insets()57 ::protozero::ConstChars last_window_insets() const { return at<12>().as_string(); } has_soft_input_mode()58 bool has_soft_input_mode() const { return at<13>().valid(); } soft_input_mode()59 ::protozero::ConstChars soft_input_mode() const { return at<13>().as_string(); } has_scroll_y()60 bool has_scroll_y() const { return at<14>().valid(); } scroll_y()61 int32_t scroll_y() const { return at<14>().as_int32(); } has_cur_scroll_y()62 bool has_cur_scroll_y() const { return at<15>().valid(); } cur_scroll_y()63 int32_t cur_scroll_y() const { return at<15>().as_int32(); } has_removed()64 bool has_removed() const { return at<16>().valid(); } removed()65 bool removed() const { return at<16>().as_bool(); } has_window_attributes()66 bool has_window_attributes() const { return at<17>().valid(); } window_attributes()67 ::protozero::ConstBytes window_attributes() const { return at<17>().as_bytes(); } 68 }; 69 70 class ViewRootImplProto : public ::protozero::Message { 71 public: 72 using Decoder = ViewRootImplProto_Decoder; 73 enum : int32_t { 74 kViewFieldNumber = 1, 75 kDisplayIdFieldNumber = 2, 76 kAppVisibleFieldNumber = 3, 77 kWidthFieldNumber = 4, 78 kHeightFieldNumber = 5, 79 kIsAnimatingFieldNumber = 6, 80 kVisibleRectFieldNumber = 7, 81 kIsDrawingFieldNumber = 8, 82 kAddedFieldNumber = 9, 83 kWinFrameFieldNumber = 10, 84 kPendingDisplayCutoutFieldNumber = 11, 85 kLastWindowInsetsFieldNumber = 12, 86 kSoftInputModeFieldNumber = 13, 87 kScrollYFieldNumber = 14, 88 kCurScrollYFieldNumber = 15, 89 kRemovedFieldNumber = 16, 90 kWindowAttributesFieldNumber = 17, 91 }; GetName()92 static constexpr const char* GetName() { return ".perfetto.protos.ViewRootImplProto"; } 93 94 95 using FieldMetadata_View = 96 ::protozero::proto_utils::FieldMetadata< 97 1, 98 ::protozero::proto_utils::RepetitionType::kNotRepeated, 99 ::protozero::proto_utils::ProtoSchemaType::kString, 100 std::string, 101 ViewRootImplProto>; 102 103 static constexpr FieldMetadata_View kView{}; set_view(const char * data,size_t size)104 void set_view(const char* data, size_t size) { 105 AppendBytes(FieldMetadata_View::kFieldId, data, size); 106 } set_view(::protozero::ConstChars chars)107 void set_view(::protozero::ConstChars chars) { 108 AppendBytes(FieldMetadata_View::kFieldId, chars.data, chars.size); 109 } set_view(std::string value)110 void set_view(std::string value) { 111 static constexpr uint32_t field_id = FieldMetadata_View::kFieldId; 112 // Call the appropriate protozero::Message::Append(field_id, ...) 113 // method based on the type of the field. 114 ::protozero::internal::FieldWriter< 115 ::protozero::proto_utils::ProtoSchemaType::kString> 116 ::Append(*this, field_id, value); 117 } 118 119 using FieldMetadata_DisplayId = 120 ::protozero::proto_utils::FieldMetadata< 121 2, 122 ::protozero::proto_utils::RepetitionType::kNotRepeated, 123 ::protozero::proto_utils::ProtoSchemaType::kInt32, 124 int32_t, 125 ViewRootImplProto>; 126 127 static constexpr FieldMetadata_DisplayId kDisplayId{}; set_display_id(int32_t value)128 void set_display_id(int32_t value) { 129 static constexpr uint32_t field_id = FieldMetadata_DisplayId::kFieldId; 130 // Call the appropriate protozero::Message::Append(field_id, ...) 131 // method based on the type of the field. 132 ::protozero::internal::FieldWriter< 133 ::protozero::proto_utils::ProtoSchemaType::kInt32> 134 ::Append(*this, field_id, value); 135 } 136 137 using FieldMetadata_AppVisible = 138 ::protozero::proto_utils::FieldMetadata< 139 3, 140 ::protozero::proto_utils::RepetitionType::kNotRepeated, 141 ::protozero::proto_utils::ProtoSchemaType::kBool, 142 bool, 143 ViewRootImplProto>; 144 145 static constexpr FieldMetadata_AppVisible kAppVisible{}; set_app_visible(bool value)146 void set_app_visible(bool value) { 147 static constexpr uint32_t field_id = FieldMetadata_AppVisible::kFieldId; 148 // Call the appropriate protozero::Message::Append(field_id, ...) 149 // method based on the type of the field. 150 ::protozero::internal::FieldWriter< 151 ::protozero::proto_utils::ProtoSchemaType::kBool> 152 ::Append(*this, field_id, value); 153 } 154 155 using FieldMetadata_Width = 156 ::protozero::proto_utils::FieldMetadata< 157 4, 158 ::protozero::proto_utils::RepetitionType::kNotRepeated, 159 ::protozero::proto_utils::ProtoSchemaType::kInt32, 160 int32_t, 161 ViewRootImplProto>; 162 163 static constexpr FieldMetadata_Width kWidth{}; set_width(int32_t value)164 void set_width(int32_t value) { 165 static constexpr uint32_t field_id = FieldMetadata_Width::kFieldId; 166 // Call the appropriate protozero::Message::Append(field_id, ...) 167 // method based on the type of the field. 168 ::protozero::internal::FieldWriter< 169 ::protozero::proto_utils::ProtoSchemaType::kInt32> 170 ::Append(*this, field_id, value); 171 } 172 173 using FieldMetadata_Height = 174 ::protozero::proto_utils::FieldMetadata< 175 5, 176 ::protozero::proto_utils::RepetitionType::kNotRepeated, 177 ::protozero::proto_utils::ProtoSchemaType::kInt32, 178 int32_t, 179 ViewRootImplProto>; 180 181 static constexpr FieldMetadata_Height kHeight{}; set_height(int32_t value)182 void set_height(int32_t value) { 183 static constexpr uint32_t field_id = FieldMetadata_Height::kFieldId; 184 // Call the appropriate protozero::Message::Append(field_id, ...) 185 // method based on the type of the field. 186 ::protozero::internal::FieldWriter< 187 ::protozero::proto_utils::ProtoSchemaType::kInt32> 188 ::Append(*this, field_id, value); 189 } 190 191 using FieldMetadata_IsAnimating = 192 ::protozero::proto_utils::FieldMetadata< 193 6, 194 ::protozero::proto_utils::RepetitionType::kNotRepeated, 195 ::protozero::proto_utils::ProtoSchemaType::kBool, 196 bool, 197 ViewRootImplProto>; 198 199 static constexpr FieldMetadata_IsAnimating kIsAnimating{}; set_is_animating(bool value)200 void set_is_animating(bool value) { 201 static constexpr uint32_t field_id = FieldMetadata_IsAnimating::kFieldId; 202 // Call the appropriate protozero::Message::Append(field_id, ...) 203 // method based on the type of the field. 204 ::protozero::internal::FieldWriter< 205 ::protozero::proto_utils::ProtoSchemaType::kBool> 206 ::Append(*this, field_id, value); 207 } 208 209 using FieldMetadata_VisibleRect = 210 ::protozero::proto_utils::FieldMetadata< 211 7, 212 ::protozero::proto_utils::RepetitionType::kNotRepeated, 213 ::protozero::proto_utils::ProtoSchemaType::kMessage, 214 RectProto, 215 ViewRootImplProto>; 216 217 static constexpr FieldMetadata_VisibleRect kVisibleRect{}; set_visible_rect()218 template <typename T = RectProto> T* set_visible_rect() { 219 return BeginNestedMessage<T>(7); 220 } 221 222 223 using FieldMetadata_IsDrawing = 224 ::protozero::proto_utils::FieldMetadata< 225 8, 226 ::protozero::proto_utils::RepetitionType::kNotRepeated, 227 ::protozero::proto_utils::ProtoSchemaType::kBool, 228 bool, 229 ViewRootImplProto>; 230 231 static constexpr FieldMetadata_IsDrawing kIsDrawing{}; set_is_drawing(bool value)232 void set_is_drawing(bool value) { 233 static constexpr uint32_t field_id = FieldMetadata_IsDrawing::kFieldId; 234 // Call the appropriate protozero::Message::Append(field_id, ...) 235 // method based on the type of the field. 236 ::protozero::internal::FieldWriter< 237 ::protozero::proto_utils::ProtoSchemaType::kBool> 238 ::Append(*this, field_id, value); 239 } 240 241 using FieldMetadata_Added = 242 ::protozero::proto_utils::FieldMetadata< 243 9, 244 ::protozero::proto_utils::RepetitionType::kNotRepeated, 245 ::protozero::proto_utils::ProtoSchemaType::kBool, 246 bool, 247 ViewRootImplProto>; 248 249 static constexpr FieldMetadata_Added kAdded{}; set_added(bool value)250 void set_added(bool value) { 251 static constexpr uint32_t field_id = FieldMetadata_Added::kFieldId; 252 // Call the appropriate protozero::Message::Append(field_id, ...) 253 // method based on the type of the field. 254 ::protozero::internal::FieldWriter< 255 ::protozero::proto_utils::ProtoSchemaType::kBool> 256 ::Append(*this, field_id, value); 257 } 258 259 using FieldMetadata_WinFrame = 260 ::protozero::proto_utils::FieldMetadata< 261 10, 262 ::protozero::proto_utils::RepetitionType::kNotRepeated, 263 ::protozero::proto_utils::ProtoSchemaType::kMessage, 264 RectProto, 265 ViewRootImplProto>; 266 267 static constexpr FieldMetadata_WinFrame kWinFrame{}; set_win_frame()268 template <typename T = RectProto> T* set_win_frame() { 269 return BeginNestedMessage<T>(10); 270 } 271 272 273 using FieldMetadata_PendingDisplayCutout = 274 ::protozero::proto_utils::FieldMetadata< 275 11, 276 ::protozero::proto_utils::RepetitionType::kNotRepeated, 277 ::protozero::proto_utils::ProtoSchemaType::kMessage, 278 DisplayCutoutProto, 279 ViewRootImplProto>; 280 281 static constexpr FieldMetadata_PendingDisplayCutout kPendingDisplayCutout{}; set_pending_display_cutout()282 template <typename T = DisplayCutoutProto> T* set_pending_display_cutout() { 283 return BeginNestedMessage<T>(11); 284 } 285 286 287 using FieldMetadata_LastWindowInsets = 288 ::protozero::proto_utils::FieldMetadata< 289 12, 290 ::protozero::proto_utils::RepetitionType::kNotRepeated, 291 ::protozero::proto_utils::ProtoSchemaType::kString, 292 std::string, 293 ViewRootImplProto>; 294 295 static constexpr FieldMetadata_LastWindowInsets kLastWindowInsets{}; set_last_window_insets(const char * data,size_t size)296 void set_last_window_insets(const char* data, size_t size) { 297 AppendBytes(FieldMetadata_LastWindowInsets::kFieldId, data, size); 298 } set_last_window_insets(::protozero::ConstChars chars)299 void set_last_window_insets(::protozero::ConstChars chars) { 300 AppendBytes(FieldMetadata_LastWindowInsets::kFieldId, chars.data, chars.size); 301 } set_last_window_insets(std::string value)302 void set_last_window_insets(std::string value) { 303 static constexpr uint32_t field_id = FieldMetadata_LastWindowInsets::kFieldId; 304 // Call the appropriate protozero::Message::Append(field_id, ...) 305 // method based on the type of the field. 306 ::protozero::internal::FieldWriter< 307 ::protozero::proto_utils::ProtoSchemaType::kString> 308 ::Append(*this, field_id, value); 309 } 310 311 using FieldMetadata_SoftInputMode = 312 ::protozero::proto_utils::FieldMetadata< 313 13, 314 ::protozero::proto_utils::RepetitionType::kNotRepeated, 315 ::protozero::proto_utils::ProtoSchemaType::kString, 316 std::string, 317 ViewRootImplProto>; 318 319 static constexpr FieldMetadata_SoftInputMode kSoftInputMode{}; set_soft_input_mode(const char * data,size_t size)320 void set_soft_input_mode(const char* data, size_t size) { 321 AppendBytes(FieldMetadata_SoftInputMode::kFieldId, data, size); 322 } set_soft_input_mode(::protozero::ConstChars chars)323 void set_soft_input_mode(::protozero::ConstChars chars) { 324 AppendBytes(FieldMetadata_SoftInputMode::kFieldId, chars.data, chars.size); 325 } set_soft_input_mode(std::string value)326 void set_soft_input_mode(std::string value) { 327 static constexpr uint32_t field_id = FieldMetadata_SoftInputMode::kFieldId; 328 // Call the appropriate protozero::Message::Append(field_id, ...) 329 // method based on the type of the field. 330 ::protozero::internal::FieldWriter< 331 ::protozero::proto_utils::ProtoSchemaType::kString> 332 ::Append(*this, field_id, value); 333 } 334 335 using FieldMetadata_ScrollY = 336 ::protozero::proto_utils::FieldMetadata< 337 14, 338 ::protozero::proto_utils::RepetitionType::kNotRepeated, 339 ::protozero::proto_utils::ProtoSchemaType::kInt32, 340 int32_t, 341 ViewRootImplProto>; 342 343 static constexpr FieldMetadata_ScrollY kScrollY{}; set_scroll_y(int32_t value)344 void set_scroll_y(int32_t value) { 345 static constexpr uint32_t field_id = FieldMetadata_ScrollY::kFieldId; 346 // Call the appropriate protozero::Message::Append(field_id, ...) 347 // method based on the type of the field. 348 ::protozero::internal::FieldWriter< 349 ::protozero::proto_utils::ProtoSchemaType::kInt32> 350 ::Append(*this, field_id, value); 351 } 352 353 using FieldMetadata_CurScrollY = 354 ::protozero::proto_utils::FieldMetadata< 355 15, 356 ::protozero::proto_utils::RepetitionType::kNotRepeated, 357 ::protozero::proto_utils::ProtoSchemaType::kInt32, 358 int32_t, 359 ViewRootImplProto>; 360 361 static constexpr FieldMetadata_CurScrollY kCurScrollY{}; set_cur_scroll_y(int32_t value)362 void set_cur_scroll_y(int32_t value) { 363 static constexpr uint32_t field_id = FieldMetadata_CurScrollY::kFieldId; 364 // Call the appropriate protozero::Message::Append(field_id, ...) 365 // method based on the type of the field. 366 ::protozero::internal::FieldWriter< 367 ::protozero::proto_utils::ProtoSchemaType::kInt32> 368 ::Append(*this, field_id, value); 369 } 370 371 using FieldMetadata_Removed = 372 ::protozero::proto_utils::FieldMetadata< 373 16, 374 ::protozero::proto_utils::RepetitionType::kNotRepeated, 375 ::protozero::proto_utils::ProtoSchemaType::kBool, 376 bool, 377 ViewRootImplProto>; 378 379 static constexpr FieldMetadata_Removed kRemoved{}; set_removed(bool value)380 void set_removed(bool value) { 381 static constexpr uint32_t field_id = FieldMetadata_Removed::kFieldId; 382 // Call the appropriate protozero::Message::Append(field_id, ...) 383 // method based on the type of the field. 384 ::protozero::internal::FieldWriter< 385 ::protozero::proto_utils::ProtoSchemaType::kBool> 386 ::Append(*this, field_id, value); 387 } 388 389 using FieldMetadata_WindowAttributes = 390 ::protozero::proto_utils::FieldMetadata< 391 17, 392 ::protozero::proto_utils::RepetitionType::kNotRepeated, 393 ::protozero::proto_utils::ProtoSchemaType::kMessage, 394 WindowLayoutParamsProto, 395 ViewRootImplProto>; 396 397 static constexpr FieldMetadata_WindowAttributes kWindowAttributes{}; set_window_attributes()398 template <typename T = WindowLayoutParamsProto> T* set_window_attributes() { 399 return BeginNestedMessage<T>(17); 400 } 401 402 }; 403 404 } // Namespace. 405 } // Namespace. 406 } // Namespace. 407 #endif // Include guard. 408