blob: 4b0db76fcb3d8d9432159c34e025abce793a82c6 [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001// 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.
Tom Sepez9857e202015-05-13 17:09:26 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Tom Sepez9857e202015-05-13 17:09:26 -07007#ifndef PUBLIC_FPDF_FORMFILL_H_
8#define PUBLIC_FPDF_FORMFILL_H_
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07009
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070010#include "fpdfview.h"
11
12typedef void* FPDF_FORMHANDLE;
13
Jun Fange118ce92015-02-17 06:50:08 -080014#define DOCTYPE_PDF 0 //Normal pdf Document
15#define DOCTYPE_DYNIMIC_XFA 1 //Dynimic xfa Document Type
16#define DOCTYPE_STATIC_XFA 2 //Static xfa Document Type
17
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070018// Exported Functions
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23typedef struct _IPDF_JsPlatform
24{
25/**
26* Version number of the interface. Currently must be 1.
Tom Sepez9857e202015-05-13 17:09:26 -070027**/
28 int version;
Bo Xufdc00a72014-10-28 23:03:33 -070029
Tom Sepez9857e202015-05-13 17:09:26 -070030 /**
31 * Method: app_alert
32 * pop up a dialog to show warning or hint.
33 * Interface Version:
34 * 1
35 * Implementation Required:
36 * yes
37 * Parameters:
38 * pThis - Pointer to the interface structure itself
39 * Msg - A string containing the message to be displayed.
40 * Title - The title of the dialog.
41 * Type - The stype of button group.
42 * 0-OK(default);
43 * 1-OK,Cancel;
44 * 2-Yes,NO;
45 * 3-Yes, NO, Cancel.
46 * nIcon - The Icon type.
47 * 0-Error(default);
48 * 1-Warning;
49 * 2-Question;
50 * 3-Status.
51 * 4-Asterisk
Tom Sepez621d4de2014-07-29 14:01:21 -070052
Tom Sepez9857e202015-05-13 17:09:26 -070053 * Return Value:
54 * The return value could be the folowing type:
55 * 1-OK;
56 * 2-Cancel;
57 * 3-NO;
58 * 4-Yes;
59 */
60 int (*app_alert)(struct _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Msg, FPDF_WIDESTRING Title, int Type, int Icon);
Tom Sepez621d4de2014-07-29 14:01:21 -070061
Tom Sepez9857e202015-05-13 17:09:26 -070062 /**
63 * Method: app_beep
64 * Causes the system to play a sound.
65 * Interface Version:
66 * 1
67 * Implementation Required:
68 * yes
69 * Parameters:
70 * pThis - Pointer to the interface structure itself
71 * nType - The sound type.
72 * 0 - Error
73 * 1 - Warning
74 * 2 - Question
75 * 3 - Status
76 * 4 - Default (default value)
77 * Return Value:
78 * None
79 */
80 void (*app_beep)(struct _IPDF_JsPlatform* pThis, int nType);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070081
Tom Sepez9857e202015-05-13 17:09:26 -070082 /**
83 * Method: app_response
84 * Displays a dialog box containing a question and an entry field for the user to reply to the question.
85 * Interface Version:
86 * 1
87 * Implementation Required:
88 * yes
89 * Parameters:
90 * pThis - Pointer to the interface structure itself
91 * Question - The question to be posed to the user.
92 * Title - The title of the dialog box.
93 * Default - A default value for the answer to the question. If not specified, no default value is presented.
94 * cLabel - A short string to appear in front of and on the same line as the edit text field.
95 * bPassword - If true, indicates that the user's response should show as asterisks (*) or bullets (?) to mask the response, which might be sensitive information. The default is false.
96 * response - A string buffer allocated by SDK, to receive the user's response.
97 * length - The length of the buffer, number of bytes. Currently, It's always be 2048.
98 * Return Value:
99 * Number of bytes the complete user input would actually require, not including trailing zeros, regardless of the value of the length
100 * parameter or the presence of the response buffer.
101 * Comments:
102 * No matter on what platform, the response buffer should be always written using UTF-16LE encoding. If a response buffer is
103 * present and the size of the user input exceeds the capacity of the buffer as specified by the length parameter, only the
104 * first "length" bytes of the user input are to be written to the buffer.
105 */
106 int (*app_response)(struct _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Question, FPDF_WIDESTRING Title, FPDF_WIDESTRING Default, FPDF_WIDESTRING cLabel, FPDF_BOOL bPassword, void* response, int length);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700107
Tom Sepez9857e202015-05-13 17:09:26 -0700108 /*
109 * Method: Doc_getFilePath
110 * Get the file path of the current document.
111 * Interface Version:
112 * 1
113 * Implementation Required:
114 * yes
115 * Parameters:
116 * pThis - Pointer to the interface structure itself
117 * filePath - The string buffer to receive the file path. Can be NULL.
118 * length - The length of the buffer, number of bytes. Can be 0.
119 * Return Value:
120 * Number of bytes the filePath consumes, including trailing zeros.
121 * Comments:
122 * The filePath should be always input in local encoding.
123 *
124 * The return value always indicated number of bytes required for the buffer, even when there is
125 * no buffer specified, or the buffer size is less then required. In this case, the buffer will not
126 * be modified.
127 */
128 int (*Doc_getFilePath)(struct _IPDF_JsPlatform* pThis, void* filePath, int length);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700129
Tom Sepez9857e202015-05-13 17:09:26 -0700130
131 /*
132 * Method: Doc_mail
133 * Mails the data buffer as an attachment to all recipients, with or without user interaction.
134 * Interface Version:
135 * 1
136 * Implementation Required:
137 * yes
138 * Parameters:
139 * pThis - Pointer to the interface structure itself
140 * mailData - Pointer to the data buffer to be sent.Can be NULL.
141 * length - The size,in bytes, of the buffer pointed by mailData parameter.Can be 0.
142 * bUI - If true, the rest of the parameters are used in a compose-new-message window that is displayed to the user. If false, the cTo parameter is required and all others are optional.
143 * To - A semicolon-delimited list of recipients for the message.
144 * Subject - The subject of the message. The length limit is 64 KB.
145 * CC - A semicolon-delimited list of CC recipients for the message.
146 * BCC - A semicolon-delimited list of BCC recipients for the message.
147 * Msg - The content of the message. The length limit is 64 KB.
148 * Return Value:
149 * None.
150 * Comments:
151 * If the parameter mailData is NULL or length is 0, the current document will be mailed as an attachment to all recipients.
152 */
153 void (*Doc_mail)(struct _IPDF_JsPlatform* pThis,void* mailData, int length,FPDF_BOOL bUI, FPDF_WIDESTRING To, FPDF_WIDESTRING Subject, FPDF_WIDESTRING CC, FPDF_WIDESTRING BCC, FPDF_WIDESTRING Msg);
154
155
156 /*
157 * Method: Doc_print
158 * Prints all or a specific number of pages of the document.
159 * Interface Version:
160 * 1
161 * Implementation Required:
162 * yes
163 * Parameters:
164 * pThis - Pointer to the interface structure itself.
165 * bUI - If true, will cause a UI to be presented to the user to obtain printing information and confirm the action.
166 * nStart - A 0-based index that defines the start of an inclusive range of pages.
167 * nEnd - A 0-based index that defines the end of an inclusive page range.
168 * bSilent - If true, suppresses the cancel dialog box while the document is printing. The default is false.
169 * bShrinkToFit - If true, the page is shrunk (if necessary) to fit within the imageable area of the printed page.
170 * bPrintAsImage - If true, print pages as an image.
171 * bReverse - If true, print from nEnd to nStart.
172 * bAnnotations - If true (the default), annotations are printed.
173 */
174 void (*Doc_print)(struct _IPDF_JsPlatform* pThis, FPDF_BOOL bUI, int nStart, int nEnd, FPDF_BOOL bSilent ,FPDF_BOOL bShrinkToFit,FPDF_BOOL bPrintAsImage ,FPDF_BOOL bReverse ,FPDF_BOOL bAnnotations);
175
176 /*
177 * Method: Doc_submitForm
178 * Send the form data to a specified URL.
179 * Interface Version:
180 * 1
181 * Implementation Required:
182 * yes
183 * Parameters:
184 * pThis - Pointer to the interface structure itself
185 * formData - Pointer to the data buffer to be sent.
186 * length - The size,in bytes, of the buffer pointed by formData parameter.
187 * URL - The URL to send to.
188 * Return Value:
189 * None.
190 *
191 */
192 void (*Doc_submitForm)(struct _IPDF_JsPlatform* pThis,void* formData, int length, FPDF_WIDESTRING URL);
193
194 /*
195 * Method: Doc_gotoPage
196 * Jump to a specified page.
197 * Interface Version:
198 * 1
199 * Implementation Required:
200 * yes
201 * Parameters:
202 * pThis - Pointer to the interface structure itself
203 * nPageNum - The specified page number, zero for the first page.
204 * Return Value:
205 * None.
206 *
207 */
208 void (*Doc_gotoPage)(struct _IPDF_JsPlatform* pThis, int nPageNum);
209 /*
210 * Method: Field_browse
211 * Show a file selection dialog, and return the selected file path.
212 * Interface Version:
213 * 1
214 * Implementation Required:
215 * yes
216 * Parameters:
217 * pThis - Pointer to the interface structure itself.
218 * filePath - Pointer to the data buffer to receive the file path.Can be NULL.
219 * length - The length of the buffer, number of bytes. Can be 0.
220 * Return Value:
221 * Number of bytes the filePath consumes, including trailing zeros.
222 * Comments:
223 * The filePath shoule be always input in local encoding.
224 */
225 int (*Field_browse)(struct _IPDF_JsPlatform* pThis, void* filePath, int length);
226
227 /**
228 * pointer to FPDF_FORMFILLINFO interface.
229 **/
230 void* m_pFormfillinfo;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700231} IPDF_JSPLATFORM;
232
233// Flags for Cursor type
Tom Sepez9857e202015-05-13 17:09:26 -0700234#define FXCT_ARROW 0
235#define FXCT_NESW 1
236#define FXCT_NWSE 2
237#define FXCT_VBEAM 3
238#define FXCT_HBEAM 4
239#define FXCT_HAND 5
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700240
241/**
242 * Declares of a pointer type to the callback function for the FFI_SetTimer method.
243 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700244 * idEvent - Identifier of the timer.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700245 * Return value:
Tom Sepez9857e202015-05-13 17:09:26 -0700246 * None.
247 **/
248typedef void (*TimerCallback)(int idEvent);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700249
250/**
251 * Declares of a struct type to the local system time.
252**/
Tom Sepez9857e202015-05-13 17:09:26 -0700253typedef struct _FPDF_SYSTEMTIME
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700254{
Tom Sepez9857e202015-05-13 17:09:26 -0700255 unsigned short wYear; /* years since 1900 */
256 unsigned short wMonth; /* months since January - [0,11] */
257 unsigned short wDayOfWeek; /* days since Sunday - [0,6] */
258 unsigned short wDay; /* day of the month - [1,31] */
259 unsigned short wHour; /* hours since midnight - [0,23] */
260 unsigned short wMinute; /* minutes after the hour - [0,59] */
261 unsigned short wSecond; /* seconds after the minute - [0,59] */
262 unsigned short wMilliseconds; /* milliseconds after the second - [0,999] */
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700263}FPDF_SYSTEMTIME;
264
Bo Xufdc00a72014-10-28 23:03:33 -0700265//XFA
266/**
267 * @name Pageview event flags
268 */
269/*@{*/
270/** @brief After a new pageview is added. */
Tom Sepez9857e202015-05-13 17:09:26 -0700271#define FXFA_PAGEVIEWEVENT_POSTADDED 1
Bo Xufdc00a72014-10-28 23:03:33 -0700272/** @brief After a pageview is removed. */
Tom Sepez9857e202015-05-13 17:09:26 -0700273#define FXFA_PAGEVIEWEVENT_POSTREMOVED 3
Bo Xufdc00a72014-10-28 23:03:33 -0700274/*@}*/
275
276// menu
277/**
278 * @name Macro Definitions for Right Context Menu Features Of XFA Fields
279 */
280/*@{*/
Tom Sepez9857e202015-05-13 17:09:26 -0700281#define FXFA_MEMU_COPY 1
282#define FXFA_MEMU_CUT 2
283#define FXFA_MEMU_SELECTALL 4
284#define FXFA_MEMU_UNDO 8
285#define FXFA_MEMU_REDO 16
286#define FXFA_MEMU_PASTE 32
Bo Xufdc00a72014-10-28 23:03:33 -0700287/*@}*/
288
289// file type
290/**
291 * @name Macro Definitions for File Type.
292 */
293/*@{*/
Tom Sepez9857e202015-05-13 17:09:26 -0700294#define FXFA_SAVEAS_XML 1
295#define FXFA_SAVEAS_XDP 2
Bo Xufdc00a72014-10-28 23:03:33 -0700296/*@}*/
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700297
298typedef struct _FPDF_FORMFILLINFO
299{
Tom Sepez9857e202015-05-13 17:09:26 -0700300 /**
301 * Version number of the interface. Currently must be 2 (with XFA module).
302 **/
303 int version;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700304
Tom Sepez9857e202015-05-13 17:09:26 -0700305 /**
306 * Method: Release
307 * Give implementation a chance to release any data after the interface is no longer used
308 * Interface Version:
309 * 1
310 * Implementation Required:
311 * No
312 * Comments:
313 * Called by Foxit SDK during the final cleanup process.
314 * Parameters:
315 * pThis - Pointer to the interface structure itself
316 * Return Value:
317 * None
318 */
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700319
Tom Sepez9857e202015-05-13 17:09:26 -0700320 void (*Release)(struct _FPDF_FORMFILLINFO* pThis);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700321
Tom Sepez9857e202015-05-13 17:09:26 -0700322 /**
323 * Method: FFI_Invalidate
324 * Invalidate the client area within the specified rectangle.
325 * Interface Version:
326 * 1
327 * Implementation Required:
328 * yes
329 * Parameters:
330 * pThis - Pointer to the interface structure itself.
331 * page - Handle to the page. Returned by FPDF_LoadPage function.
332 * left - Left position of the client area in PDF page coordinate.
333 * top - Top position of the client area in PDF page coordinate.
334 * right - Right position of the client area in PDF page coordinate.
335 * bottom - Bottom position of the client area in PDF page coordinate.
336 * Return Value:
337 * None.
338 *
339 *comments:
340 * All positions are measured in PDF "user space".
341 * Implementation should call FPDF_RenderPageBitmap() function for repainting a specified page area.
342 */
343 void (*FFI_Invalidate)(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE page, double left, double top, double right, double bottom);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700344
Tom Sepez9857e202015-05-13 17:09:26 -0700345 /**
346 * Method: FFI_OutputSelectedRect
347 * When user is taking the mouse to select texts on a form field, this callback function will keep
348 * returning the selected areas to the implementation.
349 *
350 * Interface Version:
351 * 1
352 * Implementation Required:
353 * No
354 * Parameters:
355 * pThis - Pointer to the interface structure itself.
356 * page - Handle to the page. Returned by FPDF_LoadPage function.
357 * left - Left position of the client area in PDF page coordinate.
358 * top - Top position of the client area in PDF page coordinate.
359 * right - Right position of the client area in PDF page coordinate.
360 * bottom - Bottom position of the client area in PDF page coordinate.
361 * Return Value:
362 * None.
363 *
364 * comments:
365 * This CALLBACK function is useful for implementing special text selection effect. Implementation should
366 * first records the returned rectangles, then draw them one by one at the painting period, last,remove all
367 * the recorded rectangles when finish painting.
368 */
369 void (*FFI_OutputSelectedRect)(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE page, double left, double top, double right, double bottom);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700370
Tom Sepez9857e202015-05-13 17:09:26 -0700371 /**
372 * Method: FFI_SetCursor
373 * Set the Cursor shape.
374 * Interface Version:
375 * 1
376 * Implementation Required:
377 * yes
378 * Parameters:
379 * pThis - Pointer to the interface structure itself.
380 * nCursorType - Cursor type. see Flags for Cursor type for the details.
381 * Return value:
382 * None.
383 * */
384 void (*FFI_SetCursor)(struct _FPDF_FORMFILLINFO* pThis, int nCursorType);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700385
Tom Sepez9857e202015-05-13 17:09:26 -0700386 /**
387 * Method: FFI_SetTimer
388 * This method installs a system timer. A time-out value is specified,
389 * and every time a time-out occurs, the system passes a message to
390 * the TimerProc callback function.
391 * Interface Version:
392 * 1
393 * Implementation Required:
394 * yes
395 * Parameters:
396 * pThis - Pointer to the interface structure itself.
397 * uElapse - Specifies the time-out value, in milliseconds.
398 * lpTimerFunc - A pointer to the callback function-TimerCallback.
399 * Return value:
400 * The timer identifier of the new timer if the function is successful.
401 * An application passes this value to the FFI_KillTimer method to kill
402 * the timer. Nonzero if it is successful; otherwise, it is zero.
403 * */
404 int (*FFI_SetTimer)(struct _FPDF_FORMFILLINFO* pThis, int uElapse, TimerCallback lpTimerFunc);
405
406 /**
407 * Method: FFI_KillTimer
408 * This method kills the timer event identified by nIDEvent, set by an earlier call to FFI_SetTimer.
409 * Interface Version:
410 * 1
411 * Implementation Required:
412 * yes
413 * Parameters:
414 * pThis - Pointer to the interface structure itself.
415 * nTimerID - The timer ID return by FFI_SetTimer function.
416 * Return value:
417 * None.
418 * */
419 void (*FFI_KillTimer)(struct _FPDF_FORMFILLINFO* pThis, int nTimerID);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700420
421
Tom Sepez9857e202015-05-13 17:09:26 -0700422 /**
423 * Method: FFI_GetLocalTime
424 * This method receives the current local time on the system.
425 * Interface Version:
426 * 1
427 * Implementation Required:
428 * yes
429 * Parameters:
430 * pThis - Pointer to the interface structure itself.
431 * Return value:
432 * None.
433 * */
434 FPDF_SYSTEMTIME (*FFI_GetLocalTime)(struct _FPDF_FORMFILLINFO* pThis);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700435
Tom Sepez9857e202015-05-13 17:09:26 -0700436 /**
437 * Method: FFI_OnChange
438 * This method will be invoked to notify implementation when the value of any FormField on the document had been changed.
439 * Interface Version:
440 * 1
441 * Implementation Required:
442 * no
443 * Parameters:
444 * pThis - Pointer to the interface structure itself.
445 * Return value:
446 * None.
447 * */
448 void (*FFI_OnChange)(struct _FPDF_FORMFILLINFO* pThis);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700449
Tom Sepez9857e202015-05-13 17:09:26 -0700450 /**
451 * Method: FFI_GetPage
452 * This method receives the page pointer associated with a specified page index.
453 * Interface Version:
454 * 1
455 * Implementation Required:
456 * yes
457 * Parameters:
458 * pThis - Pointer to the interface structure itself.
459 * document - Handle to document. Returned by FPDF_LoadDocument function.
460 * nPageIndex - Index number of the page. 0 for the first page.
461 * Return value:
462 * Handle to the page. Returned by FPDF_LoadPage function.
463 * Comments:
464 * In some cases, the document-level JavaScript action may refer to a page which hadn't been loaded yet.
465 * To successfully run the javascript action, implementation need to load the page for SDK.
466 * */
467 FPDF_PAGE (*FFI_GetPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, int nPageIndex);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700468
Tom Sepez9857e202015-05-13 17:09:26 -0700469 /**
470 * Method: FFI_GetCurrentPage
471 * This method receives the current page pointer.
472 * Interface Version:
473 * 1
474 * Implementation Required:
475 * yes
476 * Parameters:
477 * pThis - Pointer to the interface structure itself.
478 * document - Handle to document. Returned by FPDF_LoadDocument function.
479 * Return value:
480 * Handle to the page. Returned by FPDF_LoadPage function.
481 * */
482 FPDF_PAGE (*FFI_GetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700483
Tom Sepez9857e202015-05-13 17:09:26 -0700484 /**
485 * Method: FFI_GetRotation
486 * This method receives currently rotation of the page view.
487 * Interface Version:
488 * 1
489 * Implementation Required:
490 * yes
491 * Parameters:
492 * pThis - Pointer to the interface structure itself.
493 * page - Handle to page. Returned by FPDF_LoadPage function.
494 * Return value:
495 * The page rotation. Should be 0(0 degree),1(90 degree),2(180 degree),3(270 degree), in a clockwise direction.
496 * */
497 int (*FFI_GetRotation)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700498
Tom Sepez9857e202015-05-13 17:09:26 -0700499 /**
500 * Method: FFI_ExecuteNamedAction
501 * This method will execute an named action.
502 * Interface Version:
503 * 1
504 * Implementation Required:
505 * yes
506 * Parameters:
507 * pThis - Pointer to the interface structure itself.
508 * namedAction - A byte string which indicates the named action, terminated by 0.
509 * Return value:
510 * None.
511 * Comments:
512 * See the named actions description of <<PDF Reference, version 1.7>> for more details.
513 * */
514 void (*FFI_ExecuteNamedAction)(struct _FPDF_FORMFILLINFO* pThis, FPDF_BYTESTRING namedAction);
515 /**
516 * @brief This method will be called when a text field is getting or losing a focus.
517 *
518 * @param[in] pThis Pointer to the interface structure itself.
519 * @param[in] value The string value of the form field, in UTF-16LE format.
520 * @param[in] valueLen The length of the string value, number of characters (not bytes).
521 * @param[in] is_focus True if the form field is getting a focus, False for losing a focus.
522 *
523 * @return None.
524 *
525 * @note Currently,only support text field and combobox field.
526 * */
527 void (*FFI_SetTextFieldFocus)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING value, FPDF_DWORD valueLen, FPDF_BOOL is_focus);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700528
Tom Sepez9857e202015-05-13 17:09:26 -0700529
530 /**
531 * Method: FFI_DoURIAction
532 * This action resolves to a uniform resource identifier.
533 * Interface Version:
534 * 1
535 * Implementation Required:
536 * No
537 * Parameters:
538 * pThis - Pointer to the interface structure itself.
539 * bsURI - A byte string which indicates the uniform resource identifier, terminated by 0.
540 * Return value:
541 * None.
542 * Comments:
543 * See the URI actions description of <<PDF Reference, version 1.7>> for more details.
544 * */
545 void (*FFI_DoURIAction)(struct _FPDF_FORMFILLINFO* pThis, FPDF_BYTESTRING bsURI);
546
547 /**
548 * Method: FFI_DoGoToAction
549 * This action changes the view to a specified destination.
550 * Interface Version:
551 * 1
552 * Implementation Required:
553 * No
554 * Parameters:
555 * pThis - Pointer to the interface structure itself.
556 * nPageIndex - The index of the PDF page.
557 * zoomMode - The zoom mode for viewing page.See Macros "PDFZOOM_XXX" defined in "fpdfdoc.h".
558 * fPosArray - The float array which carries the position info.
559 * sizeofArray - The size of float array.
560 * Return value:
561 * None.
562 * Comments:
563 * See the Destinations description of <<PDF Reference, version 1.7>> in 8.2.1 for more details.
564 **/
565 void (*FFI_DoGoToAction)(struct _FPDF_FORMFILLINFO* pThis, int nPageIndex, int zoomMode, float* fPosArray, int sizeofArray);
Bo Xubb5ef882014-11-06 16:13:33 -0800566
567 /**
568 * pointer to IPDF_JSPLATFORM interface
569 **/
Tom Sepez9857e202015-05-13 17:09:26 -0700570 IPDF_JSPLATFORM* m_pJsPlatform;
Bo Xubb5ef882014-11-06 16:13:33 -0800571
572 /**
Tom Sepez9857e202015-05-13 17:09:26 -0700573 * Method: FFI_DisplayCaret
574 * This method will show the caret at specified position.
575 * Interface Version:
576 * 1
577 * Implementation Required:
578 * yes
579 * Parameters:
580 * pThis - Pointer to the interface structure itself.
581 * page - Handle to page. Returned by FPDF_LoadPage function.
582 * left - Left position of the client area in PDF page coordinate.
583 * top - Top position of the client area in PDF page coordinate.
584 * right - Right position of the client area in PDF page coordinate.
585 * bottom - Bottom position of the client area in PDF page coordinate.
586 * Return value:
587 * None.
588 **/
589 void (*FFI_DisplayCaret)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_BOOL bVisible, double left, double top, double right, double bottom);
590 /**
591 * Method: FFI_GetCurrentPageIndex
592 * This method will get the current page index.
593 * Interface Version:
594 * 1
595 * Implementation Required:
596 * yes
597 * Parameters:
598 * pThis - Pointer to the interface structure itself.
599 * document - Handle to document. Returned by FPDF_LoadDocument function.
600 * Return value:
601 * The index of current page.
602 **/
603 int (*FFI_GetCurrentPageIndex)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document);
604 /**
605 * Method: FFI_SetCurrentPage
606 * This method will set the current page.
607 * Interface Version:
608 * 1
609 * Implementation Required:
610 * yes
611 * Parameters:
612 * pThis - Pointer to the interface structure itself.
613 * document - Handle to document. Returned by FPDF_LoadDocument function.
614 * iCurPage - The index of the PDF page.
615 * Return value:
616 * None.
617 **/
618 void (*FFI_SetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, int iCurPage);
619 /**
620 * Method: FFI_GotoURL
621 * This method will link to the specified URL.
622 * Interface Version:
623 * 1
624 * Implementation Required:
625 * no
626 * Parameters:
627 * pThis - Pointer to the interface structure itself.
628 * document - Handle to document. Returned by FPDF_LoadDocument function.
629 * wsURL - The string value of the URL, in UTF-16LE format.
630 * Return value:
631 * None.
632 **/
633 void (*FFI_GotoURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, FPDF_WIDESTRING wsURL);
634 /**
635 * Method: FFI_GetPageViewRect
636 * This method will get the current page view rectangle.
637 * Interface Version:
638 * 1
639 * Implementation Required:
640 * yes
641 * Parameters:
642 * pThis - Pointer to the interface structure itself.
643 * page - Handle to page. Returned by FPDF_LoadPage function.
644 * left - The pointer to receive left position of the page view area in PDF page coordinate.
645 * top - The pointer to receive top position of the page view area in PDF page coordinate.
646 * right - The pointer to receive right position of the client area in PDF page coordinate.
647 * bottom - The pointer to receive bottom position of the client area in PDF page coordinate.
648 * Return value:
649 * None.
650 **/
651 void (*FFI_GetPageViewRect)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, double* left, double* top, double* right, double* bottom);
652 /**
653 * Method: FFI_PopupMenu
654 * This method will track the right context menu for XFA fields.
655 * Interface Version:
656 * 1
657 * Implementation Required:
658 * yes
659 * Parameters:
660 * pThis - Pointer to the interface structure itself.
661 * page - Handle to page. Returned by FPDF_LoadPage function.
662 * hWidget - Handle to XFA fields.
663 * menuFlag - The menu flags. Please refer to macro definition of FXFA_MEMU_XXX and this can be one or a combination of these macros.
664 * x - X position of the client area in PDF page coordinate.
665 * y - Y position of the client area in PDF page coordinate.
666 * Return value:
667 * TRUE indicates success; otherwise false.
668 **/
669 FPDF_BOOL (*FFI_PopupMenu)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_WIDGET hWidget, int menuFlag, float x, float y);
670 /**
671 * Method: FFI_OpenFile
672 * This method will open the specified file with the specified mode.
673 * Interface Version
674 * 1
675 * Implementation Required:
676 * yes
677 * Parameters:
678 * pThis - Pointer to the interface structure itself.
679 * fileFlag - The file flag.Please refer to macro definition of FXFA_SAVEAS_XXX and this can be one of these macros.
680 * wsURL - The string value of the file URL, in UTF-16LE format.
681 * mode - The mode for open file.
682 * Return value:
683 * The handle to FPDF_FILEHANDLER.
684 **/
685 FPDF_FILEHANDLER* (*FFI_OpenFile)(struct _FPDF_FORMFILLINFO* pThis, int fileFlag, FPDF_WIDESTRING wsURL, const char* mode);
686 /**
687 * Method: FFI_EmailTo
688 * This method will email the specified file stream to the specified contacter.
689 * Interface Version:
690 * 1
691 * Implementation Required:
692 * yes
693 * Parameters:
694 * pThis - Pointer to the interface structure itself.
695 * pFileHandler - Handle to the FPDF_FILEHANDLER.
696 * pTo - A semicolon-delimited list of recipients for the message,in UTF-16LE format.
697 * pSubject - The subject of the message,in UTF-16LE format.
698 * pCC - A semicolon-delimited list of CC recipients for the message,in UTF-16LE format.
699 * pBcc - A semicolon-delimited list of BCC recipients for the message,in UTF-16LE format.
700 * pMsg - Pointer to the data buffer to be sent.Can be NULL,in UTF-16LE format.
701 * Return value:
702 * None.
703 **/
704 void (*FFI_EmailTo)(struct _FPDF_FORMFILLINFO* pThis, FPDF_FILEHANDLER* fileHandler, FPDF_WIDESTRING pTo, FPDF_WIDESTRING pSubject, FPDF_WIDESTRING pCC, FPDF_WIDESTRING pBcc, FPDF_WIDESTRING pMsg);
705 /**
706 * Method: FFI_UploadTo
707 * This method will get upload the specified file stream to the specified URL.
708 * Interface Version:
709 * 1
710 * Implementation Required:
711 * yes
712 * Parameters:
713 * pThis - Pointer to the interface structure itself.
714 * pFileHandler - Handle to the FPDF_FILEHANDLER.
715 * fileFlag - The file flag.Please refer to macro definition of FXFA_SAVEAS_XXX and this can be one of these macros.
716 * uploadTo - Pointer to the URL path, in UTF-16LE format.
717 * Return value:
718 * None.
719 **/
720 void (*FFI_UploadTo)(struct _FPDF_FORMFILLINFO* pThis, FPDF_FILEHANDLER* fileHandler, int fileFlag, FPDF_WIDESTRING uploadTo);
721
722 /**
723 * Method: FFI_GetPlatform
724 * This method will get the current platform.
725 * Interface Version:
726 * 1
727 * Implementation Required:
728 * yes
729 * Parameters:
730 * pThis - Pointer to the interface structure itself.
731 * platform - Pointer to the data buffer to receive the platform.Can be NULL,in UTF-16LE format.
732 * length - The length of the buffer, number of bytes. Can be 0.
733 * Return value:
734 * The length of the buffer, number of bytes.
735 **/
736 int (*FFI_GetPlatform)(struct _FPDF_FORMFILLINFO* pThis, void* platform, int length);
737 /**
738 * Method: FFI_GetLanguage
739 * This method will get the current language.
740 * Interface Version:
741 * 1
742 * Implementation Required:
743 * yes
744 * Parameters:
745 * pThis - Pointer to the interface structure itself.
746 * language - Pointer to the data buffer to receive the current language.Can be NULL.
747 * length - The length of the buffer, number of bytes. Can be 0.
748 * Return value:
749 * The length of the buffer, number of bytes.
750 **/
751 int (*FFI_GetLanguage)(struct _FPDF_FORMFILLINFO* pThis, void* language, int length);
752 /**
753 * Method: FFI_DownloadFromURL
754 * This method will download the specified file from the URL.
755 * Interface Version:
756 * 1
757 * Implementation Required:
758 * yes
759 * Parameters:
760 * pThis - Pointer to the interface structure itself.
761 * URL - The string value of the file URL, in UTF-16LE format.
762 * Return value:
763 * The handle to FPDF_FILEHANDLER.
764 **/
765 FPDF_LPFILEHANDLER (*FFI_DownloadFromURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING URL);
766 /**
767 * Method: FFI_PostRequestURL
768 * This method will post the request to the server URL.
769 * Interface Version:
770 * 1
771 * Implementation Required:
772 * yes
773 * Parameters:
774 * pThis - Pointer to the interface structure itself.
775 * wsURL - The string value of the server URL, in UTF-16LE format.
776 * wsData - The post data,in UTF-16LE format.
777 * wsContentType - The content type of the request data,in UTF-16LE format.
778 * wsEncode - The encode type,in UTF-16LE format.
779 * wsHeader - The request header,in UTF-16LE format.
780 * response - Pointer to the FPDF_BSTR to receive the response data from server,,in UTF-16LE format.
781 * Return value:
782 * TRUE indicates success, otherwise FALSE.
783 **/
784 FPDF_BOOL (*FFI_PostRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsContentType, FPDF_WIDESTRING wsEncode, FPDF_WIDESTRING wsHeader, FPDF_BSTR* respone);
785 /**
786 * Method: FFI_PutRequestURL
787 * This method will put the request to the server URL.
788 * Interface Version:
789 * 1
790 * Implementation Required:
791 * yes
792 * Parameters:
793 * pThis - Pointer to the interface structure itself.
794 * wsURL - The string value of the server URL, in UTF-16LE format.
795 * wsData - The put data, in UTF-16LE format.
796 * wsEncode - The encode type, in UTR-16LE format.
797 * Return value:
798 * TRUE indicates success, otherwise FALSE.
799 **/
800 FPDF_BOOL (*FFI_PutRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsEncode);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700801
802} FPDF_FORMFILLINFO;
803
804
805
806/**
Bo Xu2b7a49d2014-11-14 17:40:50 -0800807 * Function: FPDFDOC_InitFormFillEnvironment
Tom Sepez9857e202015-05-13 17:09:26 -0700808 * Init form fill environment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700809 * Comments:
Tom Sepez9857e202015-05-13 17:09:26 -0700810 * This function should be called before any form fill operation.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700811 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700812 * document - Handle to document. Returned by FPDF_LoadDocument function.
813 * pFormFillInfo - Pointer to a FPDF_FORMFILLINFO structure.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700814 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700815 * Return handler to the form fill module. NULL means fails.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700816 **/
Bo Xu2b7a49d2014-11-14 17:40:50 -0800817DLLEXPORT FPDF_FORMHANDLE STDCALL FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document, FPDF_FORMFILLINFO* formInfo);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700818
819/**
Bo Xu2b7a49d2014-11-14 17:40:50 -0800820 * Function: FPDFDOC_ExitFormFillEnvironment
Tom Sepez9857e202015-05-13 17:09:26 -0700821 * Exit form fill environment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700822 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700823 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700824 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700825 * NULL.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700826 **/
Bo Xu2b7a49d2014-11-14 17:40:50 -0800827DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700828
829/**
830 * Function: FORM_OnAfterLoadPage
Tom Sepez9857e202015-05-13 17:09:26 -0700831 * This method is required for implementing all the form related functions. Should be invoked after user
832 * successfully loaded a PDF page, and method FPDFDOC_InitFormFillEnvironment had been invoked.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700833 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700834 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700835 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700836 * NONE.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700837 **/
838DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page, FPDF_FORMHANDLE hHandle);
839
840/**
841 * Function: FORM_OnBeforeClosePage
Tom Sepez9857e202015-05-13 17:09:26 -0700842 * This method is required for implementing all the form related functions. Should be invoked before user
843 * close the PDF page.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700844 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700845 * page - Handle to the page. Returned by FPDF_LoadPage function.
846 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700847 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700848 * NONE.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700849 **/
850DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page, FPDF_FORMHANDLE hHandle);
851
852/**
853* Function: FORM_DoDocumentJSAction
Tom Sepez9857e202015-05-13 17:09:26 -0700854* This method is required for performing Document-level JavaScript action. It should be invoked after the PDF document
855* had been loaded.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700856* Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700857* hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700858* Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700859* NONE
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700860* Comments:
Tom Sepez9857e202015-05-13 17:09:26 -0700861* If there is Document-level JavaScript action embedded in the document, this method will execute the javascript action;
862* otherwise, the method will do nothing.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700863**/
864DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle);
865
866
867/**
868* Function: FORM_DoDocumentOpenAction
Tom Sepez9857e202015-05-13 17:09:26 -0700869* This method is required for performing open-action when the document is opened.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700870* Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700871* hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700872* Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700873* NONE
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700874* Comments:
Tom Sepez9857e202015-05-13 17:09:26 -0700875* This method will do nothing if there is no open-actions embedded in the document.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700876**/
877DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle);
878
879
880// additional actions type of document.
Tom Sepez9857e202015-05-13 17:09:26 -0700881#define FPDFDOC_AACTION_WC 0x10 //WC, before closing document, JavaScript action.
882#define FPDFDOC_AACTION_WS 0x11 //WS, before saving document, JavaScript action.
883#define FPDFDOC_AACTION_DS 0x12 //DS, after saving document, JavaScript action.
884#define FPDFDOC_AACTION_WP 0x13 //WP, before printing document, JavaScript action.
885#define FPDFDOC_AACTION_DP 0x14 //DP, after printing document, JavaScript action.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700886/**
887* Function: FORM_DoDocumentAAction
Tom Sepez9857e202015-05-13 17:09:26 -0700888* This method is required for performing the document's additional-action.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700889* Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700890* hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
891* aaType - The type of the additional-actions which defined above.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700892* Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700893* NONE
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700894* Comments:
Tom Sepez9857e202015-05-13 17:09:26 -0700895* This method will do nothing if there is no document additional-action corresponding to the specified aaType.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700896**/
897
898DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaType);
899
900// Additional-action types of page object
Tom Sepez9857e202015-05-13 17:09:26 -0700901#define FPDFPAGE_AACTION_OPEN 0 // /O -- An action to be performed when the page is opened
902#define FPDFPAGE_AACTION_CLOSE 1 // /C -- An action to be performed when the page is closed
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700903
904/**
905* Function: FORM_DoPageAAction
Tom Sepez9857e202015-05-13 17:09:26 -0700906* This method is required for performing the page object's additional-action when opened or closed.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700907* Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700908* page - Handle to the page. Returned by FPDF_LoadPage function.
909* hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
910* aaType - The type of the page object's additional-actions which defined above.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700911* Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700912* NONE
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700913* Comments:
Tom Sepez9857e202015-05-13 17:09:26 -0700914* This method will do nothing if no additional-action corresponding to the specified aaType exists.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700915**/
916DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, FPDF_FORMHANDLE hHandle, int aaType);
917
918/**
919 * Function: FORM_OnMouseMove
Tom Sepez9857e202015-05-13 17:09:26 -0700920 * You can call this member function when the mouse cursor moves.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700921 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700922 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
923 * page - Handle to the page. Returned by FPDF_LoadPage function.
924 * modifier - Indicates whether various virtual keys are down.
925 * page_x - Specifies the x-coordinate of the cursor in PDF user space.
926 * page_y - Specifies the y-coordinate of the cursor in PDF user space.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700927 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700928 * TRUE indicates success; otherwise false.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700929 **/
930DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int modifier, double page_x, double page_y);
931
932/**
933 * Function: FORM_OnLButtonDown
Tom Sepez9857e202015-05-13 17:09:26 -0700934 * You can call this member function when the user presses the left mouse button.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700935 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700936 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
937 * page - Handle to the page. Returned by FPDF_LoadPage function.
938 * modifier - Indicates whether various virtual keys are down.
939 * page_x - Specifies the x-coordinate of the cursor in PDF user space.
940 * page_y - Specifies the y-coordinate of the cursor in PDF user space.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700941 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700942 * TRUE indicates success; otherwise false.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700943 **/
944DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int modifier, double page_x, double page_y);
945
946/**
947 * Function: FORM_OnLButtonUp
Tom Sepez9857e202015-05-13 17:09:26 -0700948 * You can call this member function when the user releases the left mouse button.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700949 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700950 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
951 * page - Handle to the page. Returned by FPDF_LoadPage function.
952 * modifier - Indicates whether various virtual keys are down.
953 * page_x - Specifies the x-coordinate of the cursor in device.
954 * page_y - Specifies the y-coordinate of the cursor in device.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700955 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700956 * TRUE indicates success; otherwise false.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700957 **/
958DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int modifier, double page_x, double page_y);
959
Bo Xufdc00a72014-10-28 23:03:33 -0700960DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle, FPDF_PAGE page, int modifier, double page_x, double page_y);
961DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonUp(FPDF_FORMHANDLE hHandle, FPDF_PAGE page, int modifier, double page_x, double page_y);
962
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700963/**
964 * Function: FORM_OnKeyDown
Tom Sepez9857e202015-05-13 17:09:26 -0700965 * You can call this member function when a nonsystem key is pressed.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700966 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700967 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
968 * page - Handle to the page. Returned by FPDF_LoadPage function.
969 * nKeyCode - Indicates whether various virtual keys are down.
970 * modifier - Contains the scan code, key-transition code, previous key state, and context code.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700971 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700972 * TRUE indicates success; otherwise false.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700973 **/
974DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int nKeyCode, int modifier);
975
976/**
977 * Function: FORM_OnKeyUp
Tom Sepez9857e202015-05-13 17:09:26 -0700978 * You can call this member function when a nonsystem key is released.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700979 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700980 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
981 * page - Handle to the page. Returned by FPDF_LoadPage function.
982 * nKeyCode - The virtual-key code of the given key.
983 * modifier - Contains the scan code, key-transition code, previous key state, and context code.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700984 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700985 * TRUE indicates success; otherwise false.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700986 **/
987DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int nKeyCode, int modifier);
988
989/**
990 * Function: FORM_OnChar
Tom Sepez9857e202015-05-13 17:09:26 -0700991 * You can call this member function when a keystroke translates to a nonsystem character.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700992 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -0700993 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
994 * page - Handle to the page. Returned by FPDF_LoadPage function.
995 * nChar - The character code value of the key.
996 * modifier - Contains the scan code, key-transition code, previous key state, and context code.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700997 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -0700998 * TRUE indicates success; otherwise false.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700999 **/
1000DLLEXPORT FPDF_BOOL STDCALL FORM_OnChar(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int nChar, int modifier);
1001
1002/**
1003 * Function: FORM_ForceToKillFocus.
Tom Sepez9857e202015-05-13 17:09:26 -07001004 * You can call this member function to force to kill the focus of the form field which got focus.
1005 * It would kill the focus on the form field, save the value of form field if it's changed by user.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001006 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001007 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001008 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001009 * TRUE indicates success; otherwise false.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001010 **/
1011DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle);
1012
1013// Field Types
Tom Sepez9857e202015-05-13 17:09:26 -07001014#define FPDF_FORMFIELD_UNKNOWN 0 // Unknown.
1015#define FPDF_FORMFIELD_PUSHBUTTON 1 // push button type.
1016#define FPDF_FORMFIELD_CHECKBOX 2 // check box type.
1017#define FPDF_FORMFIELD_RADIOBUTTON 3 // radio button type.
1018#define FPDF_FORMFIELD_COMBOBOX 4 // combo box type.
1019#define FPDF_FORMFIELD_LISTBOX 5 // list box type.
1020#define FPDF_FORMFIELD_TEXTFIELD 6 // text field type.
1021#define FPDF_FORMFIELD_XFA 7 // text field type.
1022
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001023/**
1024 * Function: FPDPage_HasFormFieldAtPoint
Tom Sepez9857e202015-05-13 17:09:26 -07001025 * Check the form filed position by point.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001026 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001027 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
1028 * page - Handle to the page. Returned by FPDF_LoadPage function.
1029 * page_x - X position in PDF "user space".
1030 * page_y - Y position in PDF "user space".
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001031 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001032 * Return the type of the formfiled; -1 indicates no fields.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001033 **/
1034DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,FPDF_PAGE page,double page_x, double page_y);
1035
1036/**
1037 * Function: FPDF_SetFormFieldHighlightColor
Tom Sepez9857e202015-05-13 17:09:26 -07001038 * Set the highlight color of specified or all the form fields in the document.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001039 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001040 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
1041 * doc - Handle to the document. Returned by FPDF_LoadDocument function.
1042 * fieldType - A 32-bit integer indicating the type of a form field(defined above).
1043 * color - The highlight color of the form field.Constructed by 0xxxrrggbb.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001044 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001045 * NONE.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001046 * Comments:
Tom Sepez9857e202015-05-13 17:09:26 -07001047 * When the parameter fieldType is set to zero, the highlight color will be applied to all the form fields in the
1048 * document.
1049 * Please refresh the client window to show the highlight immediately if necessary.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001050 **/
1051DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle, int fieldType, unsigned long color);
1052
1053/**
1054 * Function: FPDF_SetFormFieldHighlightAlpha
Tom Sepez9857e202015-05-13 17:09:26 -07001055 * Set the transparency of the form field highlight color in the document.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001056 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001057 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
1058 * doc - Handle to the document. Returned by FPDF_LoadDocument function.
1059 * alpha - The transparency of the form field highlight color. between 0-255.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001060 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001061 * NONE.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001062 **/
1063DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle, unsigned char alpha);
1064
1065
1066/**
1067 * Function: FPDF_RemoveFormFieldHighlight
Tom Sepez9857e202015-05-13 17:09:26 -07001068 * Remove the form field highlight color in the document.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001069 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001070 * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001071 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001072 * NONE.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001073 * Comments:
Tom Sepez9857e202015-05-13 17:09:26 -07001074 * Please refresh the client window to remove the highlight immediately if necessary.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001075 **/
1076DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle);
1077
1078/**
1079* Function: FPDF_FFLDraw
Tom Sepez9857e202015-05-13 17:09:26 -07001080* Render FormFeilds on a page to a device independent bitmap.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001081* Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001082* hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment.
1083* bitmap - Handle to the device independent bitmap (as the output buffer).
1084* Bitmap handle can be created by FPDFBitmap_Create function.
1085* page - Handle to the page. Returned by FPDF_LoadPage function.
1086* start_x - Left pixel position of the display area in the device coordinate.
1087* start_y - Top pixel position of the display area in the device coordinate.
1088* size_x - Horizontal size (in pixels) for displaying the page.
1089* size_y - Vertical size (in pixels) for displaying the page.
1090* rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),
1091* 2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise).
1092* flags - 0 for normal display, or combination of flags defined above.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001093* Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001094* None.
1095* Comments:
1096* This method is designed to only render annotations and FormFields on the page.
1097* Without FPDF_ANNOT specified for flags, Rendering functions such as FPDF_RenderPageBitmap or FPDF_RenderPageBitmap_Start will only render page contents(without annotations) to a bitmap.
1098* In order to implement the FormFill functions,Implementation should call this method after rendering functions finish rendering the page contents.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001099**/
Tom Sepez9857e202015-05-13 17:09:26 -07001100DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y,
1101 int size_x, int size_y, int rotate, int flags);
Jun Fange118ce92015-02-17 06:50:08 -08001102/**
1103 * Function: FPDF_HasXFAField
1104 * This method is designed to check whether a pdf document has XFA fields.
1105 * Parameters:
1106 * document - Handle to document. Returned by FPDF_LoadDocument function.
1107 * docType - Document type defined as DOCTYPE_xxx.
1108 * Return Value:
1109 * TRUE indicates that the input document has XFA fields, otherwise FALSE.
1110 **/
Tom Sepezcf22eb82015-05-12 17:28:08 -07001111DLLEXPORT FPDF_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document, int* docType);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001112
Bo Xufdc00a72014-10-28 23:03:33 -07001113/**
1114 * Function: FPDF_LoadXFA
Tom Sepez9857e202015-05-13 17:09:26 -07001115 * If the document consists of XFA fields, there should call this method to load XFA fields.
Bo Xufdc00a72014-10-28 23:03:33 -07001116 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001117 * document - Handle to document. Returned by FPDF_LoadDocument function.
Bo Xufdc00a72014-10-28 23:03:33 -07001118 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001119 * TRUE indicates success,otherwise FALSE.
Bo Xufdc00a72014-10-28 23:03:33 -07001120 **/
1121DLLEXPORT FPDF_BOOL STDCALL FPDF_LoadXFA(FPDF_DOCUMENT document);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001122
Bo Xufdc00a72014-10-28 23:03:33 -07001123/**
1124 * Function: FPDF_Widget_Undo
Tom Sepez9857e202015-05-13 17:09:26 -07001125 * This method will implement the undo feature for the specified xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001126 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001127 * document - Handle to document. Returned by FPDF_LoadDocument function.
1128 * hWidget - Handle to the xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001129 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001130 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001131 **/
1132DLLEXPORT void STDCALL FPDF_Widget_Undo(FPDF_DOCUMENT document, FPDF_WIDGET hWidget);
1133/**
1134 * Function: FPDF_Widget_Redo
Tom Sepez9857e202015-05-13 17:09:26 -07001135 * This method will implement the redo feature for the specified xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001136 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001137 * document - Handle to document. Returned by FPDF_LoadDocument function.
1138 * hWidget - Handle to the xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001139 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001140 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001141 **/
1142DLLEXPORT void STDCALL FPDF_Widget_Redo(FPDF_DOCUMENT document, FPDF_WIDGET hWidget);
1143/**
1144 * Function: FPDF_Widget_SelectAll
Tom Sepez9857e202015-05-13 17:09:26 -07001145 * This method will implement the select all feature for the specified xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001146 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001147 * document - Handle to document. Returned by FPDF_LoadDocument function.
1148 * hWidget - Handle to the xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001149 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001150 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001151 **/
1152DLLEXPORT void STDCALL FPDF_Widget_SelectAll(FPDF_DOCUMENT document, FPDF_WIDGET hWidget);
1153/**
1154 * Function: FPDF_Widget_Copy
Tom Sepez9857e202015-05-13 17:09:26 -07001155 * This method will implement the copy feature for the specified xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001156 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001157 * document - Handle to document. Returned by FPDF_LoadDocument function.
1158 * hWidget - Handle to the xfa field.
1159 * wsText - Pointer to data buffer to receive the copied data, in UTF-16LE format.
1160 * size - The data buffer size.
Bo Xufdc00a72014-10-28 23:03:33 -07001161 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001162 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001163 **/
1164DLLEXPORT void STDCALL FPDF_Widget_Copy(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, FPDF_WIDESTRING wsText, FPDF_DWORD* size);
1165/**
1166 * Function: FPDF_Widget_Cut
Tom Sepez9857e202015-05-13 17:09:26 -07001167 * This method will implement the cut feature for the specified xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001168 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001169 * document - Handle to document. Returned by FPDF_LoadDocument function.
1170 * hWidget - Handle to the xfa field.
1171 * wsText - Pointer to data buffer to receive the cut data,in UTF-16LE format.
1172 * size - The data buffer size,not the byte number.
Bo Xufdc00a72014-10-28 23:03:33 -07001173 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001174 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001175 **/
1176DLLEXPORT void STDCALL FPDF_Widget_Cut(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, FPDF_WIDESTRING wsText, FPDF_DWORD* size);
1177/**
1178 * Function: FPDF_Widget_Paste
Tom Sepez9857e202015-05-13 17:09:26 -07001179 * This method will implement the paste feature for the specified xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001180 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001181 * document - Handle to document. Returned by FPDF_LoadDocument function.
1182 * hWidget - Handle to the xfa field.
1183 * wsText - The paste text buffer, in UTF-16LE format.
1184 * size - The data buffer size,not the byte number.
Bo Xufdc00a72014-10-28 23:03:33 -07001185 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001186 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001187 **/
1188DLLEXPORT void STDCALL FPDF_Widget_Paste(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, FPDF_WIDESTRING wsText, FPDF_DWORD size);
1189/**
1190 * Function: FPDF_Widget_ReplaceSpellCheckWord
Tom Sepez9857e202015-05-13 17:09:26 -07001191 * This method will implement the spell check feature for the specified xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001192 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001193 * document - Handle to document. Returned by FPDF_LoadDocument function.
1194 * hWidget - Handle to the xfa field.
1195 * x - The x value of the specified point.
1196 * y - The y value of the specified point.
1197 * bsText - The text buffer needed to be speck check, in UTF-16LE format.
Bo Xufdc00a72014-10-28 23:03:33 -07001198 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001199 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001200 **/
1201DLLEXPORT void STDCALL FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, float x, float y, FPDF_BYTESTRING bsText);
1202/**
1203 * Function: FPDF_Widget_GetSpellCheckWords
Tom Sepez9857e202015-05-13 17:09:26 -07001204 * This method will implement the spell check feature for the specified xfa field.
Bo Xufdc00a72014-10-28 23:03:33 -07001205 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001206 * document - Handle to document. Returned by FPDF_LoadDocument function.
1207 * hWidget - Handle to the xfa field.
1208 * x - The x value of the specified point.
1209 * y - The y value of the specified point.
1210 * stringHandle - Pointer to FPDF_STRINGHANDLE to receive the speck check text buffer, in UTF-16LE format.
Bo Xufdc00a72014-10-28 23:03:33 -07001211 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001212 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001213 **/
1214DLLEXPORT void STDCALL FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, float x, float y, FPDF_STRINGHANDLE* stringHandle);
1215/**
1216 * Function: FPDF_StringHandleCounts
Tom Sepez9857e202015-05-13 17:09:26 -07001217 * This method will get the count of the text buffer.
Bo Xufdc00a72014-10-28 23:03:33 -07001218 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001219 * stringHandle - Pointer to FPDF_STRINGHANDLE.
Bo Xufdc00a72014-10-28 23:03:33 -07001220 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001221 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001222 **/
1223DLLEXPORT int STDCALL FPDF_StringHandleCounts(FPDF_STRINGHANDLE stringHandle);
1224/**
1225 * Function: FPDF_StringHandleGetStringByIndex
Tom Sepez9857e202015-05-13 17:09:26 -07001226 * This method will get the specified index of the text buffer.
Bo Xufdc00a72014-10-28 23:03:33 -07001227 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001228 * stringHandle - Pointer to FPDF_STRINGHANDLE.
1229 * index - The specified index of text buffer.
1230 * bsText - Pointer to data buffer to receive the text buffer, in UTF-16LE format.
1231 * size - The byte size of data buffer.
Bo Xufdc00a72014-10-28 23:03:33 -07001232 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001233 * TRUE indicates success, otherwise FALSE.
Bo Xufdc00a72014-10-28 23:03:33 -07001234 **/
1235DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE stringHandle, int index, FPDF_BYTESTRING bsText, FPDF_DWORD* size);
1236/**
1237 * Function: FPDF_StringHandleRelease
Tom Sepez9857e202015-05-13 17:09:26 -07001238 * This method will release the FPDF_STRINGHANDLE.
Bo Xufdc00a72014-10-28 23:03:33 -07001239 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001240 * stringHandle - Pointer to FPDF_STRINGHANDLE.
Bo Xufdc00a72014-10-28 23:03:33 -07001241 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001242 * None.
Bo Xufdc00a72014-10-28 23:03:33 -07001243 **/
1244DLLEXPORT void STDCALL FPDF_StringHandleRelease(FPDF_STRINGHANDLE stringHandle);
1245/**
1246 * Function: FPDF_StringHandleAddString
Tom Sepez9857e202015-05-13 17:09:26 -07001247 * This method will add the specified text buffer.
Bo Xufdc00a72014-10-28 23:03:33 -07001248 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -07001249 * stringHandle - Pointer to FPDF_STRINGHANDLE.
1250 * bsText - Pointer to data buffer of the text buffer, in UTF-16LE format.
1251 * size - The byte size of data buffer.
Bo Xufdc00a72014-10-28 23:03:33 -07001252 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -07001253 * TRUE indicates success, otherwise FALSE.
Bo Xufdc00a72014-10-28 23:03:33 -07001254 **/
1255DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle, FPDF_BYTESTRING bsText, FPDF_DWORD size);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001256
1257#ifdef __cplusplus
Tom Sepez9857e202015-05-13 17:09:26 -07001258}
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001259#endif
1260
Tom Sepez9857e202015-05-13 17:09:26 -07001261#endif // PUBLIC_FPDF_FORMFILL_H_