xref: /aosp_15_r20/external/pdfium/public/fpdf_searchex.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1*3ac0a46fSAndroid Build Coastguard Worker // Copyright 2014 The PDFium Authors
2*3ac0a46fSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*3ac0a46fSAndroid Build Coastguard Worker // found in the LICENSE file.
4*3ac0a46fSAndroid Build Coastguard Worker 
5*3ac0a46fSAndroid Build Coastguard Worker // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6*3ac0a46fSAndroid Build Coastguard Worker 
7*3ac0a46fSAndroid Build Coastguard Worker #ifndef PUBLIC_FPDF_SEARCHEX_H_
8*3ac0a46fSAndroid Build Coastguard Worker #define PUBLIC_FPDF_SEARCHEX_H_
9*3ac0a46fSAndroid Build Coastguard Worker 
10*3ac0a46fSAndroid Build Coastguard Worker // NOLINTNEXTLINE(build/include)
11*3ac0a46fSAndroid Build Coastguard Worker #include "fpdfview.h"
12*3ac0a46fSAndroid Build Coastguard Worker 
13*3ac0a46fSAndroid Build Coastguard Worker #ifdef __cplusplus
14*3ac0a46fSAndroid Build Coastguard Worker extern "C" {
15*3ac0a46fSAndroid Build Coastguard Worker #endif  // __cplusplus
16*3ac0a46fSAndroid Build Coastguard Worker 
17*3ac0a46fSAndroid Build Coastguard Worker // Get the character index in |text_page| internal character list.
18*3ac0a46fSAndroid Build Coastguard Worker //
19*3ac0a46fSAndroid Build Coastguard Worker //   text_page  - a text page information structure.
20*3ac0a46fSAndroid Build Coastguard Worker //   nTextIndex - index of the text returned from FPDFText_GetText().
21*3ac0a46fSAndroid Build Coastguard Worker //
22*3ac0a46fSAndroid Build Coastguard Worker // Returns the index of the character in internal character list. -1 for error.
23*3ac0a46fSAndroid Build Coastguard Worker FPDF_EXPORT int FPDF_CALLCONV
24*3ac0a46fSAndroid Build Coastguard Worker FPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex);
25*3ac0a46fSAndroid Build Coastguard Worker 
26*3ac0a46fSAndroid Build Coastguard Worker // Get the text index in |text_page| internal character list.
27*3ac0a46fSAndroid Build Coastguard Worker //
28*3ac0a46fSAndroid Build Coastguard Worker //   text_page  - a text page information structure.
29*3ac0a46fSAndroid Build Coastguard Worker //   nCharIndex - index of the character in internal character list.
30*3ac0a46fSAndroid Build Coastguard Worker //
31*3ac0a46fSAndroid Build Coastguard Worker // Returns the index of the text returned from FPDFText_GetText(). -1 for error.
32*3ac0a46fSAndroid Build Coastguard Worker FPDF_EXPORT int FPDF_CALLCONV
33*3ac0a46fSAndroid Build Coastguard Worker FPDFText_GetTextIndexFromCharIndex(FPDF_TEXTPAGE text_page, int nCharIndex);
34*3ac0a46fSAndroid Build Coastguard Worker 
35*3ac0a46fSAndroid Build Coastguard Worker #ifdef __cplusplus
36*3ac0a46fSAndroid Build Coastguard Worker }  // extern "C"
37*3ac0a46fSAndroid Build Coastguard Worker #endif  // __cplusplus
38*3ac0a46fSAndroid Build Coastguard Worker 
39*3ac0a46fSAndroid Build Coastguard Worker #endif  // PUBLIC_FPDF_SEARCHEX_H_
40