• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium 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 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef PUBLIC_FPDF_SEARCHEX_H_
8 #define PUBLIC_FPDF_SEARCHEX_H_
9 
10 // NOLINTNEXTLINE(build/include)
11 #include "fpdfview.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif  // __cplusplus
16 
17 // Get the character index in |text_page| internal character list.
18 //
19 //   text_page  - a text page information structure.
20 //   nTextIndex - index of the text returned from |FPDFText_GetText|.
21 //
22 // Returns the index of the character in internal character list. -1 for error.
23 FPDF_EXPORT int FPDF_CALLCONV
24 FPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex);
25 
26 // Get the text index in |text_page| internal character list.
27 //
28 //   text_page  - a text page information structure.
29 //   nCharIndex - index of the character in internal character list.
30 //
31 // Returns the index of the text returned from |FPDFText_GetText|. -1 for error.
32 FPDF_EXPORT int FPDF_CALLCONV
33 FPDFText_GetTextIndexFromCharIndex(FPDF_TEXTPAGE text_page, int nCharIndex);
34 
35 #ifdef __cplusplus
36 }  // extern "C"
37 #endif  // __cplusplus
38 
39 #endif  // PUBLIC_FPDF_SEARCHEX_H_
40