OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PDF_PDFIUM_PDFIUM_PAGE_H_ | 5 #ifndef PDF_PDFIUM_PDFIUM_PAGE_H_ |
6 #define PDF_PDFIUM_PDFIUM_PAGE_H_ | 6 #define PDF_PDFIUM_PDFIUM_PAGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // That prevents us from using union here. | 57 // That prevents us from using union here. |
58 std::string url; // Valid for WEBLINK_AREA only. | 58 std::string url; // Valid for WEBLINK_AREA only. |
59 int page; // Valid for DOCLINK_AREA only. | 59 int page; // Valid for DOCLINK_AREA only. |
60 }; | 60 }; |
61 | 61 |
62 // Given a point in the document that's in this page, returns its character | 62 // Given a point in the document that's in this page, returns its character |
63 // index if it's near a character, and also the type of text. | 63 // index if it's near a character, and also the type of text. |
64 // Target is optional. It will be filled in for WEBLINK_AREA or | 64 // Target is optional. It will be filled in for WEBLINK_AREA or |
65 // DOCLINK_AREA only. | 65 // DOCLINK_AREA only. |
66 Area GetCharIndex(const pp::Point& point, int rotation, int* char_index, | 66 Area GetCharIndex(const pp::Point& point, int rotation, int* char_index, |
67 LinkTarget* target); | 67 int* form_type, LinkTarget* target); |
68 | 68 |
69 // Gets the character at the given index. | 69 // Gets the character at the given index. |
70 base::char16 GetCharAtIndex(int index); | 70 base::char16 GetCharAtIndex(int index); |
71 | 71 |
72 // Gets the number of characters in the page. | 72 // Gets the number of characters in the page. |
73 int GetCharCount(); | 73 int GetCharCount(); |
74 | 74 |
75 // Converts from page coordinates to screen coordinates. | 75 // Converts from page coordinates to screen coordinates. |
76 pp::Rect PageToScreen(const pp::Point& offset, | 76 pp::Rect PageToScreen(const pp::Point& offset, |
77 double zoom, | 77 double zoom, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 int loading_count_; | 137 int loading_count_; |
138 pp::Rect rect_; | 138 pp::Rect rect_; |
139 bool calculated_links_; | 139 bool calculated_links_; |
140 std::vector<Link> links_; | 140 std::vector<Link> links_; |
141 bool available_; | 141 bool available_; |
142 }; | 142 }; |
143 | 143 |
144 } // namespace chrome_pdf | 144 } // namespace chrome_pdf |
145 | 145 |
146 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ | 146 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ |
OLD | NEW |