ax_coordinate_system.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2019 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_COORDINATE_SYSTEM_H_
  5. #define UI_ACCESSIBILITY_AX_COORDINATE_SYSTEM_H_
  6. namespace ui {
  7. // The coordinate system of bounds or points. The origin for all coordinate
  8. // systems is the upper left hand corner of the region. Frame coordinates
  9. // correspond to the current frame and root frame coordinates are relative to
  10. // the topmost accessibility tree of the same type. For web content, root frame
  11. // coordinates are relative to the root frame of the web page. From within an
  12. // accessibility tree whose root is an iframe, frame coordinates are relative to
  13. // the region of the iframe. From an iframe leaf accessibility node, frame
  14. // coordinates are relative to the containing accessibility tree. For native UI,
  15. // frame coordinates are relative to the current window whereas root frame
  16. // coordinates are relative to the top-level window. The frame coordinates are
  17. // equivalent to the root frame coordinates when the current accessibility tree
  18. // is the root accessibility tree.
  19. // kScreenPhysicalPixels: Relative to screen space in hardware pixels
  20. // kScreenDIPs: Relative to screen space in device-independent pixels
  21. // (i.e. accounting for display DPI)
  22. // kRootFrame: Relative to the top-level accessibility tree of
  23. // the same type
  24. // kFrame: Relative to the current accessibility tree
  25. enum class AXCoordinateSystem {
  26. kScreenPhysicalPixels,
  27. kScreenDIPs,
  28. kRootFrame,
  29. kFrame
  30. };
  31. } // namespace ui
  32. #endif // UI_ACCESSIBILITY_AX_COORDINATE_SYSTEM_H_