ax_param_traits_macros.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef UI_ACCESSIBILITY_AX_PARAM_TRAITS_MACROS_H_
  5. #define UI_ACCESSIBILITY_AX_PARAM_TRAITS_MACROS_H_
  6. #include "build/build_config.h"
  7. #include "ipc/ipc_message_macros.h"
  8. #include "ui/accessibility/ax_enums.mojom-shared.h"
  9. #include "ui/accessibility/ax_event.h"
  10. #include "ui/accessibility/ax_event_intent.h"
  11. #include "ui/accessibility/ax_export.h"
  12. #include "ui/accessibility/ax_node_data.h"
  13. #include "ui/accessibility/ax_tree_id.h"
  14. #include "ui/accessibility/ax_tree_update.h"
  15. #include "ui/gfx/ipc/geometry/gfx_param_traits.h"
  16. #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
  17. #undef IPC_MESSAGE_EXPORT
  18. #define IPC_MESSAGE_EXPORT AX_EXPORT
  19. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::Event, ax::mojom::Event::kMaxValue)
  20. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::Role, ax::mojom::Role::kMaxValue)
  21. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::BoolAttribute,
  22. ax::mojom::BoolAttribute::kMaxValue)
  23. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::FloatAttribute,
  24. ax::mojom::FloatAttribute::kMaxValue)
  25. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::IntAttribute,
  26. ax::mojom::IntAttribute::kMaxValue)
  27. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::IntListAttribute,
  28. ax::mojom::IntListAttribute::kMaxValue)
  29. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::StringListAttribute,
  30. ax::mojom::StringListAttribute::kMaxValue)
  31. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::StringAttribute,
  32. ax::mojom::StringAttribute::kMaxValue)
  33. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::TextAffinity,
  34. ax::mojom::TextAffinity::kMaxValue)
  35. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::EventFrom, ax::mojom::EventFrom::kMaxValue)
  36. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::Command, ax::mojom::Command::kMaxValue)
  37. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::InputEventType,
  38. ax::mojom::InputEventType::kMaxValue)
  39. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::TextBoundary,
  40. ax::mojom::TextBoundary::kMaxValue)
  41. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::MoveDirection,
  42. ax::mojom::MoveDirection::kMaxValue)
  43. IPC_ENUM_TRAITS_MAX_VALUE(ax::mojom::Action, ax::mojom::Action::kMaxValue)
  44. IPC_STRUCT_TRAITS_BEGIN(ui::AXRelativeBounds)
  45. IPC_STRUCT_TRAITS_MEMBER(offset_container_id)
  46. IPC_STRUCT_TRAITS_MEMBER(bounds)
  47. IPC_STRUCT_TRAITS_MEMBER(transform)
  48. IPC_STRUCT_TRAITS_END()
  49. IPC_STRUCT_TRAITS_BEGIN(ui::AXEvent)
  50. IPC_STRUCT_TRAITS_MEMBER(event_type)
  51. IPC_STRUCT_TRAITS_MEMBER(id)
  52. IPC_STRUCT_TRAITS_MEMBER(event_from)
  53. IPC_STRUCT_TRAITS_MEMBER(event_from_action)
  54. IPC_STRUCT_TRAITS_MEMBER(event_intents)
  55. IPC_STRUCT_TRAITS_MEMBER(action_request_id)
  56. IPC_STRUCT_TRAITS_END()
  57. IPC_STRUCT_TRAITS_BEGIN(ui::AXEventIntent)
  58. IPC_STRUCT_TRAITS_MEMBER(command)
  59. IPC_STRUCT_TRAITS_MEMBER(input_event_type)
  60. IPC_STRUCT_TRAITS_MEMBER(text_boundary)
  61. IPC_STRUCT_TRAITS_MEMBER(move_direction)
  62. IPC_STRUCT_TRAITS_END()
  63. IPC_STRUCT_TRAITS_BEGIN(ui::AXNodeData)
  64. IPC_STRUCT_TRAITS_MEMBER(id)
  65. IPC_STRUCT_TRAITS_MEMBER(role)
  66. IPC_STRUCT_TRAITS_MEMBER(state)
  67. IPC_STRUCT_TRAITS_MEMBER(actions)
  68. IPC_STRUCT_TRAITS_MEMBER(string_attributes)
  69. IPC_STRUCT_TRAITS_MEMBER(int_attributes)
  70. IPC_STRUCT_TRAITS_MEMBER(float_attributes)
  71. IPC_STRUCT_TRAITS_MEMBER(bool_attributes)
  72. IPC_STRUCT_TRAITS_MEMBER(intlist_attributes)
  73. IPC_STRUCT_TRAITS_MEMBER(stringlist_attributes)
  74. IPC_STRUCT_TRAITS_MEMBER(html_attributes)
  75. IPC_STRUCT_TRAITS_MEMBER(child_ids)
  76. IPC_STRUCT_TRAITS_MEMBER(relative_bounds)
  77. IPC_STRUCT_TRAITS_END()
  78. IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeData)
  79. IPC_STRUCT_TRAITS_MEMBER(tree_id)
  80. IPC_STRUCT_TRAITS_MEMBER(parent_tree_id)
  81. IPC_STRUCT_TRAITS_MEMBER(focused_tree_id)
  82. IPC_STRUCT_TRAITS_MEMBER(url)
  83. IPC_STRUCT_TRAITS_MEMBER(title)
  84. IPC_STRUCT_TRAITS_MEMBER(mimetype)
  85. IPC_STRUCT_TRAITS_MEMBER(doctype)
  86. IPC_STRUCT_TRAITS_MEMBER(loaded)
  87. IPC_STRUCT_TRAITS_MEMBER(loading_progress)
  88. IPC_STRUCT_TRAITS_MEMBER(focus_id)
  89. IPC_STRUCT_TRAITS_MEMBER(sel_is_backward)
  90. IPC_STRUCT_TRAITS_MEMBER(sel_anchor_object_id)
  91. IPC_STRUCT_TRAITS_MEMBER(sel_anchor_offset)
  92. IPC_STRUCT_TRAITS_MEMBER(sel_anchor_affinity)
  93. IPC_STRUCT_TRAITS_MEMBER(sel_focus_object_id)
  94. IPC_STRUCT_TRAITS_MEMBER(sel_focus_offset)
  95. IPC_STRUCT_TRAITS_MEMBER(sel_focus_affinity)
  96. IPC_STRUCT_TRAITS_END()
  97. IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeUpdate)
  98. IPC_STRUCT_TRAITS_MEMBER(has_tree_data)
  99. IPC_STRUCT_TRAITS_MEMBER(tree_data)
  100. IPC_STRUCT_TRAITS_MEMBER(node_id_to_clear)
  101. IPC_STRUCT_TRAITS_MEMBER(root_id)
  102. IPC_STRUCT_TRAITS_MEMBER(nodes)
  103. IPC_STRUCT_TRAITS_MEMBER(event_from)
  104. IPC_STRUCT_TRAITS_MEMBER(event_from_action)
  105. IPC_STRUCT_TRAITS_MEMBER(event_intents)
  106. IPC_STRUCT_TRAITS_END()
  107. #undef IPC_MESSAGE_EXPORT
  108. #define IPC_MESSAGE_EXPORT
  109. #endif // UI_ACCESSIBILITY_AX_PARAM_TRAITS_MACROS_H_