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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 double* out_font_size, | 45 double* out_font_size, |
46 pp::FloatRect* out_bounds); | 46 pp::FloatRect* out_bounds); |
47 // Get a unicode character from the page. | 47 // Get a unicode character from the page. |
48 uint32_t GetCharUnicode(int char_index); | 48 uint32_t GetCharUnicode(int char_index); |
49 // Get the bounds of a character in page pixels. | 49 // Get the bounds of a character in page pixels. |
50 pp::FloatRect GetCharBounds(int char_index); | 50 pp::FloatRect GetCharBounds(int char_index); |
51 | 51 |
52 enum Area { | 52 enum Area { |
53 NONSELECTABLE_AREA, | 53 NONSELECTABLE_AREA, |
54 TEXT_AREA, | 54 TEXT_AREA, |
55 WEBLINK_AREA, // Area is a hyperlink. | 55 WEBLINK_AREA, // Area is a hyperlink. |
56 DOCLINK_AREA, // Area is a link to a different part of the same document. | 56 DOCLINK_AREA, // Area is a link to a different part of the same document. |
57 FORM_TEXT_AREA, // Area is a form field text field. | |
Lei Zhang
2017/06/10 01:55:49
It may be helpful to add a comment to TEXT_AREA ab
drgage
2017/06/12 18:57:47
Done.
| |
57 }; | 58 }; |
58 | 59 |
59 struct LinkTarget { | 60 struct LinkTarget { |
60 // We are using std::string here which have a copy contructor. | 61 // We are using std::string here which have a copy contructor. |
61 // That prevents us from using union here. | 62 // That prevents us from using union here. |
62 std::string url; // Valid for WEBLINK_AREA only. | 63 std::string url; // Valid for WEBLINK_AREA only. |
63 int page; // Valid for DOCLINK_AREA only. | 64 int page; // Valid for DOCLINK_AREA only. |
64 }; | 65 }; |
65 | 66 |
66 // Given a point in the document that's in this page, returns its character | 67 // Given a point in the document that's in this page, returns its character |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 int loading_count_; | 140 int loading_count_; |
140 pp::Rect rect_; | 141 pp::Rect rect_; |
141 bool calculated_links_; | 142 bool calculated_links_; |
142 std::vector<Link> links_; | 143 std::vector<Link> links_; |
143 bool available_; | 144 bool available_; |
144 }; | 145 }; |
145 | 146 |
146 } // namespace chrome_pdf | 147 } // namespace chrome_pdf |
147 | 148 |
148 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ | 149 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ |
OLD | NEW |