accessibility.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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 PDF_ACCESSIBILITY_H_
  5. #define PDF_ACCESSIBILITY_H_
  6. #include <stdint.h>
  7. #include <vector>
  8. namespace chrome_pdf {
  9. class PDFEngine;
  10. struct AccessibilityCharInfo;
  11. struct AccessibilityPageInfo;
  12. struct AccessibilityPageObjects;
  13. struct AccessibilityTextRunInfo;
  14. // Retrieve `page_info`, `text_runs`, `chars`, and `page_objects` from
  15. // `engine` for the page at 0-indexed `page_index`. Returns true on success with
  16. // all out parameters filled, or false on failure with all out parameters
  17. // untouched.
  18. bool GetAccessibilityInfo(PDFEngine* engine,
  19. int32_t page_index,
  20. AccessibilityPageInfo& page_info,
  21. std::vector<AccessibilityTextRunInfo>& text_runs,
  22. std::vector<AccessibilityCharInfo>& chars,
  23. AccessibilityPageObjects& page_objects);
  24. } // namespace chrome_pdf
  25. #endif // PDF_ACCESSIBILITY_H_