John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 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. |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 4 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 7 | #ifndef PUBLIC_FPDF_FORMFILL_H_ |
| 8 | #define PUBLIC_FPDF_FORMFILL_H_ |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 9 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 10 | #include "fpdfview.h" |
| 11 | |
| 12 | typedef void* FPDF_FORMHANDLE; |
| 13 | |
Jun Fang | e118ce9 | 2015-02-17 06:50:08 -0800 | [diff] [blame] | 14 | #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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 18 | // Exported Functions |
| 19 | #ifdef __cplusplus |
| 20 | extern "C" { |
| 21 | #endif |
| 22 | |
| 23 | typedef struct _IPDF_JsPlatform |
| 24 | { |
| 25 | /** |
| 26 | * Version number of the interface. Currently must be 1. |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 27 | **/ |
| 28 | int version; |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 29 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 30 | /** |
| 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 Sepez | 621d4de | 2014-07-29 14:01:21 -0700 | [diff] [blame] | 52 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 53 | * 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 Sepez | 621d4de | 2014-07-29 14:01:21 -0700 | [diff] [blame] | 61 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 62 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 81 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 82 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 107 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 108 | /* |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 129 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 130 | |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 231 | } IPDF_JSPLATFORM; |
| 232 | |
| 233 | // Flags for Cursor type |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 234 | #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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 240 | |
| 241 | /** |
| 242 | * Declares of a pointer type to the callback function for the FFI_SetTimer method. |
| 243 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 244 | * idEvent - Identifier of the timer. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 245 | * Return value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 246 | * None. |
| 247 | **/ |
| 248 | typedef void (*TimerCallback)(int idEvent); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 249 | |
| 250 | /** |
| 251 | * Declares of a struct type to the local system time. |
| 252 | **/ |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 253 | typedef struct _FPDF_SYSTEMTIME |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 254 | { |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 255 | 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 263 | }FPDF_SYSTEMTIME; |
| 264 | |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 265 | //XFA |
| 266 | /** |
| 267 | * @name Pageview event flags |
| 268 | */ |
| 269 | /*@{*/ |
| 270 | /** @brief After a new pageview is added. */ |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 271 | #define FXFA_PAGEVIEWEVENT_POSTADDED 1 |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 272 | /** @brief After a pageview is removed. */ |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 273 | #define FXFA_PAGEVIEWEVENT_POSTREMOVED 3 |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 274 | /*@}*/ |
| 275 | |
| 276 | // menu |
| 277 | /** |
| 278 | * @name Macro Definitions for Right Context Menu Features Of XFA Fields |
| 279 | */ |
| 280 | /*@{*/ |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 281 | #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 Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 287 | /*@}*/ |
| 288 | |
| 289 | // file type |
| 290 | /** |
| 291 | * @name Macro Definitions for File Type. |
| 292 | */ |
| 293 | /*@{*/ |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 294 | #define FXFA_SAVEAS_XML 1 |
| 295 | #define FXFA_SAVEAS_XDP 2 |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 296 | /*@}*/ |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 297 | |
| 298 | typedef struct _FPDF_FORMFILLINFO |
| 299 | { |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 300 | /** |
| 301 | * Version number of the interface. Currently must be 2 (with XFA module). |
| 302 | **/ |
| 303 | int version; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 304 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 305 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 319 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 320 | void (*Release)(struct _FPDF_FORMFILLINFO* pThis); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 321 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 322 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 344 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 345 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 370 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 371 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 385 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 386 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 420 | |
| 421 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 422 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 435 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 436 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 449 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 450 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 468 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 469 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 483 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 484 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 498 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 499 | /** |
| 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 528 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 529 | |
| 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 Xu | bb5ef88 | 2014-11-06 16:13:33 -0800 | [diff] [blame] | 566 | |
| 567 | /** |
| 568 | * pointer to IPDF_JSPLATFORM interface |
| 569 | **/ |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 570 | IPDF_JSPLATFORM* m_pJsPlatform; |
Bo Xu | bb5ef88 | 2014-11-06 16:13:33 -0800 | [diff] [blame] | 571 | |
| 572 | /** |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 573 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 801 | |
| 802 | } FPDF_FORMFILLINFO; |
| 803 | |
| 804 | |
| 805 | |
| 806 | /** |
Bo Xu | 2b7a49d | 2014-11-14 17:40:50 -0800 | [diff] [blame] | 807 | * Function: FPDFDOC_InitFormFillEnvironment |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 808 | * Init form fill environment. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 809 | * Comments: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 810 | * This function should be called before any form fill operation. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 811 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 812 | * document - Handle to document. Returned by FPDF_LoadDocument function. |
| 813 | * pFormFillInfo - Pointer to a FPDF_FORMFILLINFO structure. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 814 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 815 | * Return handler to the form fill module. NULL means fails. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 816 | **/ |
Bo Xu | 2b7a49d | 2014-11-14 17:40:50 -0800 | [diff] [blame] | 817 | DLLEXPORT FPDF_FORMHANDLE STDCALL FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document, FPDF_FORMFILLINFO* formInfo); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 818 | |
| 819 | /** |
Bo Xu | 2b7a49d | 2014-11-14 17:40:50 -0800 | [diff] [blame] | 820 | * Function: FPDFDOC_ExitFormFillEnvironment |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 821 | * Exit form fill environment. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 822 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 823 | * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 824 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 825 | * NULL. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 826 | **/ |
Bo Xu | 2b7a49d | 2014-11-14 17:40:50 -0800 | [diff] [blame] | 827 | DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 828 | |
| 829 | /** |
| 830 | * Function: FORM_OnAfterLoadPage |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 831 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 833 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 834 | * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 835 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 836 | * NONE. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 837 | **/ |
| 838 | DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page, FPDF_FORMHANDLE hHandle); |
| 839 | |
| 840 | /** |
| 841 | * Function: FORM_OnBeforeClosePage |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 842 | * This method is required for implementing all the form related functions. Should be invoked before user |
| 843 | * close the PDF page. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 844 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 845 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 847 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 848 | * NONE. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 849 | **/ |
| 850 | DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page, FPDF_FORMHANDLE hHandle); |
| 851 | |
| 852 | /** |
| 853 | * Function: FORM_DoDocumentJSAction |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 854 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 856 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 857 | * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 858 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 859 | * NONE |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 860 | * Comments: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 861 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 863 | **/ |
| 864 | DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle); |
| 865 | |
| 866 | |
| 867 | /** |
| 868 | * Function: FORM_DoDocumentOpenAction |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 869 | * This method is required for performing open-action when the document is opened. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 870 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 871 | * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 872 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 873 | * NONE |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 874 | * Comments: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 875 | * This method will do nothing if there is no open-actions embedded in the document. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 876 | **/ |
| 877 | DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle); |
| 878 | |
| 879 | |
| 880 | // additional actions type of document. |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 881 | #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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 886 | /** |
| 887 | * Function: FORM_DoDocumentAAction |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 888 | * This method is required for performing the document's additional-action. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 889 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 890 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 892 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 893 | * NONE |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 894 | * Comments: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 895 | * This method will do nothing if there is no document additional-action corresponding to the specified aaType. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 896 | **/ |
| 897 | |
| 898 | DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaType); |
| 899 | |
| 900 | // Additional-action types of page object |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 901 | #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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 903 | |
| 904 | /** |
| 905 | * Function: FORM_DoPageAAction |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 906 | * This method is required for performing the page object's additional-action when opened or closed. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 907 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 908 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 911 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 912 | * NONE |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 913 | * Comments: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 914 | * This method will do nothing if no additional-action corresponding to the specified aaType exists. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 915 | **/ |
| 916 | DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, FPDF_FORMHANDLE hHandle, int aaType); |
| 917 | |
| 918 | /** |
| 919 | * Function: FORM_OnMouseMove |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 920 | * You can call this member function when the mouse cursor moves. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 921 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 922 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 927 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 928 | * TRUE indicates success; otherwise false. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 929 | **/ |
| 930 | DLLEXPORT 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 Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 934 | * You can call this member function when the user presses the left mouse button. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 935 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 936 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 941 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 942 | * TRUE indicates success; otherwise false. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 943 | **/ |
| 944 | DLLEXPORT 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 Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 948 | * You can call this member function when the user releases the left mouse button. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 949 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 950 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 955 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 956 | * TRUE indicates success; otherwise false. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 957 | **/ |
| 958 | DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int modifier, double page_x, double page_y); |
| 959 | |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 960 | DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle, FPDF_PAGE page, int modifier, double page_x, double page_y); |
| 961 | DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonUp(FPDF_FORMHANDLE hHandle, FPDF_PAGE page, int modifier, double page_x, double page_y); |
| 962 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 963 | /** |
| 964 | * Function: FORM_OnKeyDown |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 965 | * You can call this member function when a nonsystem key is pressed. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 966 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 967 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 971 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 972 | * TRUE indicates success; otherwise false. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 973 | **/ |
| 974 | DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int nKeyCode, int modifier); |
| 975 | |
| 976 | /** |
| 977 | * Function: FORM_OnKeyUp |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 978 | * You can call this member function when a nonsystem key is released. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 979 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 980 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 984 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 985 | * TRUE indicates success; otherwise false. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 986 | **/ |
| 987 | DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int nKeyCode, int modifier); |
| 988 | |
| 989 | /** |
| 990 | * Function: FORM_OnChar |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 991 | * You can call this member function when a keystroke translates to a nonsystem character. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 992 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 993 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 997 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 998 | * TRUE indicates success; otherwise false. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 999 | **/ |
| 1000 | DLLEXPORT FPDF_BOOL STDCALL FORM_OnChar(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int nChar, int modifier); |
| 1001 | |
| 1002 | /** |
| 1003 | * Function: FORM_ForceToKillFocus. |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1004 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1006 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1007 | * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1008 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1009 | * TRUE indicates success; otherwise false. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1010 | **/ |
| 1011 | DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle); |
| 1012 | |
| 1013 | // Field Types |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1014 | #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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1023 | /** |
| 1024 | * Function: FPDPage_HasFormFieldAtPoint |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1025 | * Check the form filed position by point. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1026 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1027 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1031 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1032 | * Return the type of the formfiled; -1 indicates no fields. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1033 | **/ |
| 1034 | DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,FPDF_PAGE page,double page_x, double page_y); |
| 1035 | |
| 1036 | /** |
| 1037 | * Function: FPDF_SetFormFieldHighlightColor |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1038 | * Set the highlight color of specified or all the form fields in the document. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1039 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1040 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1044 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1045 | * NONE. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1046 | * Comments: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1047 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1050 | **/ |
| 1051 | DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle, int fieldType, unsigned long color); |
| 1052 | |
| 1053 | /** |
| 1054 | * Function: FPDF_SetFormFieldHighlightAlpha |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1055 | * Set the transparency of the form field highlight color in the document. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1056 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1057 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1060 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1061 | * NONE. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1062 | **/ |
| 1063 | DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle, unsigned char alpha); |
| 1064 | |
| 1065 | |
| 1066 | /** |
| 1067 | * Function: FPDF_RemoveFormFieldHighlight |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1068 | * Remove the form field highlight color in the document. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1069 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1070 | * hHandle - Handle to the form fill module. Returned by FPDFDOC_InitFormFillEnvironment. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1071 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1072 | * NONE. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1073 | * Comments: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1074 | * Please refresh the client window to remove the highlight immediately if necessary. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1075 | **/ |
| 1076 | DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle); |
| 1077 | |
| 1078 | /** |
| 1079 | * Function: FPDF_FFLDraw |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1080 | * Render FormFeilds on a page to a device independent bitmap. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1081 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1082 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1093 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1094 | * 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-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1099 | **/ |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1100 | DLLEXPORT 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 Fang | e118ce9 | 2015-02-17 06:50:08 -0800 | [diff] [blame] | 1102 | /** |
| 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 Sepez | cf22eb8 | 2015-05-12 17:28:08 -0700 | [diff] [blame] | 1111 | DLLEXPORT FPDF_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document, int* docType); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1112 | |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1113 | /** |
| 1114 | * Function: FPDF_LoadXFA |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1115 | * If the document consists of XFA fields, there should call this method to load XFA fields. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1116 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1117 | * document - Handle to document. Returned by FPDF_LoadDocument function. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1118 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1119 | * TRUE indicates success,otherwise FALSE. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1120 | **/ |
| 1121 | DLLEXPORT FPDF_BOOL STDCALL FPDF_LoadXFA(FPDF_DOCUMENT document); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1122 | |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1123 | /** |
| 1124 | * Function: FPDF_Widget_Undo |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1125 | * This method will implement the undo feature for the specified xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1126 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1127 | * document - Handle to document. Returned by FPDF_LoadDocument function. |
| 1128 | * hWidget - Handle to the xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1129 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1130 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1131 | **/ |
| 1132 | DLLEXPORT void STDCALL FPDF_Widget_Undo(FPDF_DOCUMENT document, FPDF_WIDGET hWidget); |
| 1133 | /** |
| 1134 | * Function: FPDF_Widget_Redo |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1135 | * This method will implement the redo feature for the specified xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1136 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1137 | * document - Handle to document. Returned by FPDF_LoadDocument function. |
| 1138 | * hWidget - Handle to the xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1139 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1140 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1141 | **/ |
| 1142 | DLLEXPORT void STDCALL FPDF_Widget_Redo(FPDF_DOCUMENT document, FPDF_WIDGET hWidget); |
| 1143 | /** |
| 1144 | * Function: FPDF_Widget_SelectAll |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1145 | * This method will implement the select all feature for the specified xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1146 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1147 | * document - Handle to document. Returned by FPDF_LoadDocument function. |
| 1148 | * hWidget - Handle to the xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1149 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1150 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1151 | **/ |
| 1152 | DLLEXPORT void STDCALL FPDF_Widget_SelectAll(FPDF_DOCUMENT document, FPDF_WIDGET hWidget); |
| 1153 | /** |
| 1154 | * Function: FPDF_Widget_Copy |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1155 | * This method will implement the copy feature for the specified xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1156 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1157 | * 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 Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1161 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1162 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1163 | **/ |
| 1164 | DLLEXPORT void STDCALL FPDF_Widget_Copy(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, FPDF_WIDESTRING wsText, FPDF_DWORD* size); |
| 1165 | /** |
| 1166 | * Function: FPDF_Widget_Cut |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1167 | * This method will implement the cut feature for the specified xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1168 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1169 | * 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 Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1173 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1174 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1175 | **/ |
| 1176 | DLLEXPORT void STDCALL FPDF_Widget_Cut(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, FPDF_WIDESTRING wsText, FPDF_DWORD* size); |
| 1177 | /** |
| 1178 | * Function: FPDF_Widget_Paste |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1179 | * This method will implement the paste feature for the specified xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1180 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1181 | * 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 Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1185 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1186 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1187 | **/ |
| 1188 | DLLEXPORT void STDCALL FPDF_Widget_Paste(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, FPDF_WIDESTRING wsText, FPDF_DWORD size); |
| 1189 | /** |
| 1190 | * Function: FPDF_Widget_ReplaceSpellCheckWord |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1191 | * This method will implement the spell check feature for the specified xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1192 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1193 | * 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 Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1198 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1199 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1200 | **/ |
| 1201 | DLLEXPORT 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 Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1204 | * This method will implement the spell check feature for the specified xfa field. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1205 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1206 | * 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 Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1211 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1212 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1213 | **/ |
| 1214 | DLLEXPORT void STDCALL FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, float x, float y, FPDF_STRINGHANDLE* stringHandle); |
| 1215 | /** |
| 1216 | * Function: FPDF_StringHandleCounts |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1217 | * This method will get the count of the text buffer. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1218 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1219 | * stringHandle - Pointer to FPDF_STRINGHANDLE. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1220 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1221 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1222 | **/ |
| 1223 | DLLEXPORT int STDCALL FPDF_StringHandleCounts(FPDF_STRINGHANDLE stringHandle); |
| 1224 | /** |
| 1225 | * Function: FPDF_StringHandleGetStringByIndex |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1226 | * This method will get the specified index of the text buffer. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1227 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1228 | * 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 Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1232 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1233 | * TRUE indicates success, otherwise FALSE. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1234 | **/ |
| 1235 | DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE stringHandle, int index, FPDF_BYTESTRING bsText, FPDF_DWORD* size); |
| 1236 | /** |
| 1237 | * Function: FPDF_StringHandleRelease |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1238 | * This method will release the FPDF_STRINGHANDLE. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1239 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1240 | * stringHandle - Pointer to FPDF_STRINGHANDLE. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1241 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1242 | * None. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1243 | **/ |
| 1244 | DLLEXPORT void STDCALL FPDF_StringHandleRelease(FPDF_STRINGHANDLE stringHandle); |
| 1245 | /** |
| 1246 | * Function: FPDF_StringHandleAddString |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1247 | * This method will add the specified text buffer. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1248 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1249 | * 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 Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1252 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1253 | * TRUE indicates success, otherwise FALSE. |
Bo Xu | fdc00a7 | 2014-10-28 23:03:33 -0700 | [diff] [blame] | 1254 | **/ |
| 1255 | DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle, FPDF_BYTESTRING bsText, FPDF_DWORD size); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1256 | |
| 1257 | #ifdef __cplusplus |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1258 | } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1259 | #endif |
| 1260 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame^] | 1261 | #endif // PUBLIC_FPDF_FORMFILL_H_ |