summaryrefslogtreecommitdiffstats
path: root/chromium/pdf/accessibility.h
blob: a06d42a695677d47eea85d39e4d071246b3f7ed3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PDF_ACCESSIBILITY_H_
#define PDF_ACCESSIBILITY_H_

#include <stdint.h>

#include <vector>

namespace chrome_pdf {

class PDFEngine;
struct AccessibilityCharInfo;
struct AccessibilityPageInfo;
struct AccessibilityPageObjects;
struct AccessibilityTextRunInfo;

// Retrieve `page_info`, `text_runs`, `chars`, and `page_objects` from
// `engine` for the page at 0-indexed `page_index`. Returns true on success with
// all out parameters filled, or false on failure with all out parameters
// untouched.
bool GetAccessibilityInfo(PDFEngine* engine,
                          int32_t page_index,
                          AccessibilityPageInfo& page_info,
                          std::vector<AccessibilityTextRunInfo>& text_runs,
                          std::vector<AccessibilityCharInfo>& chars,
                          AccessibilityPageObjects& page_objects);

}  // namespace chrome_pdf

#endif  // PDF_ACCESSIBILITY_H_