OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef PUBLIC_FPDF_FORMFILL_H_ | 7 #ifndef PUBLIC_FPDF_FORMFILL_H_ |
8 #define PUBLIC_FPDF_FORMFILL_H_ | 8 #define PUBLIC_FPDF_FORMFILL_H_ |
9 | 9 |
10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
11 | 11 |
12 typedef void* FPDF_FORMHANDLE; | 12 typedef void* FPDF_FORMHANDLE; |
13 | 13 |
14 #define DOCTYPE_PDF 0 //Normal pdf Document | 14 #define DOCTYPE_PDF 0 //Normal pdf Document |
15 #define DOCTYPE_DYNIMIC_XFA 1 //Dynimic xfa Document Type | 15 #define DOCTYPE_DYNIMIC_XFA 1 //Dynimic xfa Document Type |
16 #define DOCTYPE_STATIC_XFA 2 //Static xfa Document Type | 16 #define DOCTYPE_STATIC_XFA 2 //Static xfa Document Type |
17 | 17 |
18 // Exported Functions | 18 // Exported Functions |
19 #ifdef __cplusplus | 19 #ifdef __cplusplus |
20 extern "C" { | 20 extern "C" { |
21 #endif | 21 #endif |
22 | 22 |
23 typedef struct _IPDF_JsPlatform | 23 typedef struct _IPDF_JsPlatform |
24 { | 24 { |
25 /** | 25 /** |
26 * Version number of the interface. Currently must be 1. | 26 * Version number of the interface. Currently must be 2. |
27 **/ | 27 **/ |
28 int version; | 28 int version; |
29 | 29 |
| 30 /* Version 1. */ |
| 31 |
30 /** | 32 /** |
31 * Method: app_alert | 33 * Method: app_alert |
32 * pop up a dialog to show warning or hint. | 34 * pop up a dialog to show warning or hint. |
33 * Interface Version: | 35 * Interface Version: |
34 * 1 | 36 * 1 |
35 * Implementation Required: | 37 * Implementation Required: |
36 * yes | 38 * yes |
37 * Parameters: | 39 * Parameters: |
38 * pThis - Pointer to the interface structure itself | 40 * pThis - Pointer to the interface structure itself |
39 * Msg - A string containing the message to be displayed. | 41 * Msg - A string containing the message to be displayed. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 * Number of bytes the filePath consumes, including trailing zeros. | 223 * Number of bytes the filePath consumes, including trailing zeros. |
222 * Comments: | 224 * Comments: |
223 * The filePath shoule be always input in local encoding. | 225 * The filePath shoule be always input in local encoding. |
224 */ | 226 */ |
225 int (*Field_browse)(struct _IPDF_JsPlatform* pThis, void* filePath, int len
gth); | 227 int (*Field_browse)(struct _IPDF_JsPlatform* pThis, void* filePath, int len
gth); |
226 | 228 |
227 /** | 229 /** |
228 * pointer to FPDF_FORMFILLINFO interface. | 230 * pointer to FPDF_FORMFILLINFO interface. |
229 **/ | 231 **/ |
230 void* m_pFormfillinfo; | 232 void* m_pFormfillinfo; |
| 233 |
| 234 /* Version 2. */ |
| 235 |
| 236 /** |
| 237 * pointer to the v8::Isolate to use, or NULL to force PDFium to create one
. |
| 238 **/ |
| 239 void* m_isolate; |
| 240 |
| 241 /** |
| 242 * The embedder data slot to use in the v8::Isolate to store PDFium's |
| 243 * per-isolate data. The value needs to be between 0 and |
| 244 * v8::Internals::kNumIsolateDataLots (exclusive). |
| 245 */ |
| 246 unsigned int m_v8EmbedderSlot; |
231 } IPDF_JSPLATFORM; | 247 } IPDF_JSPLATFORM; |
232 | 248 |
233 // Flags for Cursor type | 249 // Flags for Cursor type |
234 #define FXCT_ARROW 0 | 250 #define FXCT_ARROW 0 |
235 #define FXCT_NESW 1 | 251 #define FXCT_NESW 1 |
236 #define FXCT_NWSE 2 | 252 #define FXCT_NWSE 2 |
237 #define FXCT_VBEAM 3 | 253 #define FXCT_VBEAM 3 |
238 #define FXCT_HBEAM 4 | 254 #define FXCT_HBEAM 4 |
239 #define FXCT_HAND 5 | 255 #define FXCT_HAND 5 |
240 | 256 |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 * Return Value: | 1268 * Return Value: |
1253 * TRUE indicates success, otherwise FALSE. | 1269 * TRUE indicates success, otherwise FALSE. |
1254 **/ | 1270 **/ |
1255 DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringH
andle, FPDF_BYTESTRING bsText, FPDF_DWORD size); | 1271 DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringH
andle, FPDF_BYTESTRING bsText, FPDF_DWORD size); |
1256 | 1272 |
1257 #ifdef __cplusplus | 1273 #ifdef __cplusplus |
1258 } | 1274 } |
1259 #endif | 1275 #endif |
1260 | 1276 |
1261 #endif // PUBLIC_FPDF_FORMFILL_H_ | 1277 #endif // PUBLIC_FPDF_FORMFILL_H_ |
OLD | NEW |