Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: public/fpdf_formfill.h

Issue 1265503005: clang-format all pdfium code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: sigh Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef PUBLIC_FPDF_FORMFILL_H_ 7 #ifndef PUBLIC_FPDF_FORMFILL_H_
8 #define PUBLIC_FPDF_FORMFILL_H_ 8 #define PUBLIC_FPDF_FORMFILL_H_
9 9
10 #include "fpdfview.h" 10 #include "fpdfview.h"
11 11
12 typedef void* FPDF_FORMHANDLE; 12 typedef void* FPDF_FORMHANDLE;
13 13
14 // Exported Functions 14 // Exported Functions
15 #ifdef __cplusplus 15 #ifdef __cplusplus
16 extern "C" { 16 extern "C" {
17 #endif 17 #endif
18 18
19 typedef struct _IPDF_JsPlatform 19 typedef struct _IPDF_JsPlatform {
20 { 20 /**
21 /** 21 * Version number of the interface. Currently must be 2.
22 * Version number of the interface. Currently must be 2. 22 **/
23 **/ 23 int version;
24 int version; 24
25 25 /* Version 1. */
26 /* Version 1. */ 26
27 27 /**
28 /** 28 * Method: app_alert
29 * Method: app_alert 29 * pop up a dialog to show warning or hint.
30 * pop up a dialog to show warning or hint. 30 * Interface Version:
31 * Interface Version: 31 * 1
32 * 1 32 * Implementation Required:
33 * Implementation Required: 33 * yes
34 * yes 34 * Parameters:
35 * Parameters: 35 * pThis - Pointer to the interface structure itself
36 * pThis - Pointer to the interface structure itself 36 * Msg - A string containing the message to be displayed.
37 * Msg - A string containing the message to be displayed. 37 * Title - The title of the dialog.
38 * Title - The title of the dialog. 38 * Type - The stype of button group.
39 * Type - The stype of button group. 39 * 0-OK(default);
40 * 0-OK(default); 40 * 1-OK,Cancel;
41 * 1-OK,Cancel; 41 * 2-Yes,NO;
42 * 2-Yes,NO; 42 * 3-Yes, NO, Cancel.
43 * 3-Yes, NO, Cancel. 43 * nIcon - The Icon type.
44 * nIcon - The Icon type. 44 * 0-Error(default);
45 * 0-Error(default); 45 * 1-Warning;
46 * 1-Warning; 46 * 2-Question;
47 * 2-Question; 47 * 3-Status.
48 * 3-Status. 48 * Return Value:
49 * Return Value: 49 * The return value could be the folowing type:
50 * The return value could be the folowing type: 50 * 1-OK;
51 * 1-OK; 51 * 2-Cancel;
52 * 2-Cancel; 52 * 3-NO;
53 * 3-NO; 53 * 4-Yes;
54 * 4-Yes; 54 */
55 */ 55 int (*app_alert)(struct _IPDF_JsPlatform* pThis,
56 int (*app_alert)(struct _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Msg, FPDF_W IDESTRING Title, int Type, int Icon); 56 FPDF_WIDESTRING Msg,
57 57 FPDF_WIDESTRING Title,
58 /** 58 int Type,
59 * Method: app_beep 59 int Icon);
60 * Causes the system to play a sound. 60
61 * Interface Version: 61 /**
62 * 1 62 * Method: app_beep
63 * Implementation Required: 63 * Causes the system to play a sound.
64 * yes 64 * Interface Version:
65 * Parameters: 65 * 1
66 * pThis - Pointer to the interface structure itself 66 * Implementation Required:
67 * nType - The sound type. 67 * yes
68 * 0 - Error 68 * Parameters:
69 * 1 - Warning 69 * pThis - Pointer to the interface structure itself
70 * 2 - Question 70 * nType - The sound type.
71 * 3 - Status 71 * 0 - Error
72 * 4 - Default (default value) 72 * 1 - Warning
73 * Return Value: 73 * 2 - Question
74 * None 74 * 3 - Status
75 */ 75 * 4 - Default (default value)
76 void (*app_beep)(struct _IPDF_JsPlatform* pThis, int nType); 76 * Return Value:
77 77 * None
78 /** 78 */
79 * Method: app_response 79 void (*app_beep)(struct _IPDF_JsPlatform* pThis, int nType);
80 * Displays a dialog box containing a question and an entry field f or the user to reply to the question. 80
81 * Interface Version: 81 /**
82 * 1 82 * Method: app_response
83 * Implementation Required: 83 * Displays a dialog box containing a question and an entry field for
84 * yes 84 * the user to reply to the question.
85 * Parameters: 85 * Interface Version:
86 * pThis - Pointer to the interface structure itself 86 * 1
87 * Question - The question to be posed to the user. 87 * Implementation Required:
88 * Title - The title of the dialog box. 88 * yes
89 * Default - A default value for the answer to the question. If not specified, no default value is presented. 89 * Parameters:
90 * cLabel - A short string to appear in front of and on the same line as the edit text field. 90 * pThis - Pointer to the interface structure itself
91 * bPassword - If true, indicates that the user's response shou ld show as asterisks (*) or bullets (?) to mask the response, which might be sen sitive information. The default is false. 91 * Question - The question to be posed to the user.
92 * response - A string buffer allocated by SDK, to receive the user's response. 92 * Title - The title of the dialog box.
93 * length - The length of the buffer, number of bytes. Curre ntly, It's always be 2048. 93 * Default - A default value for the answer to the question. If
94 * Return Value: 94 * not specified, no default value is presented.
95 * Number of bytes the complete user input would actually require, not including trailing zeros, regardless of the value of the length 95 * cLabel - A short string to appear in front of and on the
96 * parameter or the presence of the response buffer. 96 * same line as the edit text field.
97 * Comments: 97 * bPassword - If true, indicates that the user's response should
98 * No matter on what platform, the response buffer should be always wri tten using UTF-16LE encoding. If a response buffer is 98 * show as asterisks (*) or bullets (?) to mask the response, which might be
99 * present and the size of the user input exceeds the capacity of the b uffer as specified by the length parameter, only the 99 * sensitive information. The default is false.
100 * first "length" bytes of the user input are to be written to the buff er. 100 * response - A string buffer allocated by SDK, to receive the
101 */ 101 * user's response.
102 int (*app_response)(struct _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Question , FPDF_WIDESTRING Title, FPDF_WIDESTRING Default, FPDF_WIDESTRING cLabel, FPDF_B OOL bPassword, void* response, int length); 102 * length - The length of the buffer, number of bytes.
103 103 * Currently, It's always be 2048.
104 /* 104 * Return Value:
105 * Method: Doc_getFilePath 105 * Number of bytes the complete user input would actually require, not
106 * Get the file path of the current document. 106 * including trailing zeros, regardless of the value of the length
107 * Interface Version: 107 * parameter or the presence of the response buffer.
108 * 1 108 * Comments:
109 * Implementation Required: 109 * No matter on what platform, the response buffer should be always
110 * yes 110 * written using UTF-16LE encoding. If a response buffer is
111 * Parameters: 111 * present and the size of the user input exceeds the capacity of the
112 * pThis - Pointer to the interface structure itself 112 * buffer as specified by the length parameter, only the
113 * filePath - The string buffer to receive the file path. Can be NULL. 113 * first "length" bytes of the user input are to be written to the
114 * length - The length of the buffer, number of bytes. Can b e 0. 114 * buffer.
115 * Return Value: 115 */
116 * Number of bytes the filePath consumes, including trailing zeros. 116 int (*app_response)(struct _IPDF_JsPlatform* pThis,
117 * Comments: 117 FPDF_WIDESTRING Question,
118 * The filePath should be always input in local encoding. 118 FPDF_WIDESTRING Title,
119 * 119 FPDF_WIDESTRING Default,
120 * The return value always indicated number of bytes required for the b uffer, even when there is 120 FPDF_WIDESTRING cLabel,
121 * no buffer specified, or the buffer size is less then required. In th is case, the buffer will not 121 FPDF_BOOL bPassword,
122 * be modified. 122 void* response,
123 */ 123 int length);
124 int (*Doc_getFilePath)(struct _IPDF_JsPlatform* pThis, void* filePath, int l ength); 124
125 125 /*
126 126 * Method: Doc_getFilePath
127 /* 127 * Get the file path of the current document.
128 * Method: Doc_mail 128 * Interface Version:
129 * Mails the data buffer as an attachment to all recipients, with o r without user interaction. 129 * 1
130 * Interface Version: 130 * Implementation Required:
131 * 1 131 * yes
132 * Implementation Required: 132 * Parameters:
133 * yes 133 * pThis - Pointer to the interface structure itself
134 * Parameters: 134 * filePath - The string buffer to receive the file path. Can be
135 * pThis - Pointer to the interface structure itself 135 * NULL.
136 * mailData - Pointer to the data buffer to be sent.Can be NUL L. 136 * length - The length of the buffer, number of bytes. Can be
137 * length - The size,in bytes, of the buffer pointed by mail Data parameter.Can be 0. 137 * 0.
138 * 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 pa rameter is required and all others are optional. 138 * Return Value:
139 * To - A semicolon-delimited list of recipients for the message. 139 * Number of bytes the filePath consumes, including trailing zeros.
140 * Subject - The subject of the message. The length limit is 64 KB. 140 * Comments:
141 * CC - A semicolon-delimited list of CC recipients for the message. 141 * The filePath should be always input in local encoding.
142 * BCC - A semicolon-delimited list of BCC recipients for the message. 142 *
143 * Msg - The content of the message. The length limit is 64 KB. 143 * The return value always indicated number of bytes required for the
144 * Return Value: 144 * buffer, even when there is
145 * None. 145 * no buffer specified, or the buffer size is less then required. In this
146 * Comments: 146 * case, the buffer will not
147 * If the parameter mailData is NULL or length is 0, the current do cument will be mailed as an attachment to all recipients. 147 * be modified.
148 */ 148 */
149 void (*Doc_mail)(struct _IPDF_JsPlatform* pThis,void* mailData, int length,F PDF_BOOL bUI, FPDF_WIDESTRING To, FPDF_WIDESTRING Subject, FPDF_WIDESTRING CC, F PDF_WIDESTRING BCC, FPDF_WIDESTRING Msg); 149 int (*Doc_getFilePath)(struct _IPDF_JsPlatform* pThis,
150 150 void* filePath,
151 151 int length);
152 /* 152
153 * Method: Doc_print 153 /*
154 * Prints all or a specific number of pages of the document. 154 * Method: Doc_mail
155 * Interface Version: 155 * Mails the data buffer as an attachment to all recipients, with or
156 * 1 156 * without user interaction.
157 * Implementation Required: 157 * Interface Version:
158 * yes 158 * 1
159 * Parameters: 159 * Implementation Required:
160 * pThis - Pointer to the interface structure itself. 160 * yes
161 * bUI - If true, will cause a UI to be presented to the user to obtain printing information and confirm the action. 161 * Parameters:
162 * nStart - A 0-based index that defines the start of an inc lusive range of pages. 162 * pThis - Pointer to the interface structure itself
163 * nEnd - A 0-based index that defines the end of an inclu sive page range. 163 * mailData - Pointer to the data buffer to be sent.Can be NULL.
164 * bSilent - If true, suppresses the cancel dialog box while the document is printing. The default is false. 164 * length - The size,in bytes, of the buffer pointed by
165 * bShrinkToFit - If true, the page is shrunk (if necessary) t o fit within the imageable area of the printed page. 165 * mailData parameter.Can be 0.
166 * bPrintAsImage - If true, print pages as an image. 166 * bUI - If true, the rest of the parameters are used in a
167 * bReverse - If true, print from nEnd to nStart. 167 * compose-new-message window that is displayed to the user. If false, the cTo
168 * bAnnotations - If true (the default), annotations are print ed. 168 * parameter is required and all others are optional.
169 */ 169 * To - A semicolon-delimited list of recipients for the
170 void (*Doc_print)(struct _IPDF_JsPlatform* pThis, FPDF_BOOL bUI, int nStart, int nEnd, FPDF_BOOL bSilent ,FPDF_BOOL bShrinkToFit,FPDF_BOOL bPrintAsImage ,FP DF_BOOL bReverse ,FPDF_BOOL bAnnotations); 170 * message.
171 171 * Subject - The subject of the message. The length limit is 64
172 /* 172 * KB.
173 * Method: Doc_submitForm 173 * CC - A semicolon-delimited list of CC recipients for
174 * Send the form data to a specified URL. 174 * the message.
175 * Interface Version: 175 * BCC - A semicolon-delimited list of BCC recipients for
176 * 1 176 * the message.
177 * Implementation Required: 177 * Msg - The content of the message. The length limit is 64
178 * yes 178 * KB.
179 * Parameters: 179 * Return Value:
180 * pThis - Pointer to the interface structure itself 180 * None.
181 * formData - Pointer to the data buffer to be sent. 181 * Comments:
182 * length - The size,in bytes, of the buffer pointed by form Data parameter. 182 * If the parameter mailData is NULL or length is 0, the current
183 * URL - The URL to send to. 183 * document will be mailed as an attachment to all recipients.
184 * Return Value: 184 */
185 * None. 185 void (*Doc_mail)(struct _IPDF_JsPlatform* pThis,
186 * 186 void* mailData,
187 */ 187 int length,
188 void (*Doc_submitForm)(struct _IPDF_JsPlatform* pThis,void* formData, int le ngth, FPDF_WIDESTRING URL); 188 FPDF_BOOL bUI,
189 189 FPDF_WIDESTRING To,
190 /* 190 FPDF_WIDESTRING Subject,
191 * Method: Doc_gotoPage 191 FPDF_WIDESTRING CC,
192 * Jump to a specified page. 192 FPDF_WIDESTRING BCC,
193 * Interface Version: 193 FPDF_WIDESTRING Msg);
194 * 1 194
195 * Implementation Required: 195 /*
196 * yes 196 * Method: Doc_print
197 * Parameters: 197 * Prints all or a specific number of pages of the document.
198 * pThis - Pointer to the interface structure itself 198 * Interface Version:
199 * nPageNum - The specified page number, zero for the first pa ge. 199 * 1
200 * Return Value: 200 * Implementation Required:
201 * None. 201 * yes
202 * 202 * Parameters:
203 */ 203 * pThis - Pointer to the interface structure itself.
204 void (*Doc_gotoPage)(struct _IPDF_JsPlatform* pThis, int nPageNum); 204 * bUI - If true, will cause a UI to be presented to the
205 /* 205 * user to obtain printing information and confirm the action.
206 * Method: Field_browse 206 * nStart - A 0-based index that defines the start of an
207 * Show a file selection dialog, and return the selected file path. 207 * inclusive range of pages.
208 * Interface Version: 208 * nEnd - A 0-based index that defines the end of an
209 * 1 209 * inclusive page range.
210 * Implementation Required: 210 * bSilent - If true, suppresses the cancel dialog box while
211 * yes 211 * the document is printing. The default is false.
212 * Parameters: 212 * bShrinkToFit - If true, the page is shrunk (if necessary) to
213 * pThis - Pointer to the interface structure itself. 213 * fit within the imageable area of the printed page.
214 * filePath - Pointer to the data buffer to receive the file p ath.Can be NULL. 214 * bPrintAsImage - If true, print pages as an image.
215 * length - The length of the buffer, number of bytes. Can b e 0. 215 * bReverse - If true, print from nEnd to nStart.
216 * Return Value: 216 * bAnnotations - If true (the default), annotations are
217 * Number of bytes the filePath consumes, including trailing zeros. 217 * printed.
218 * Comments: 218 */
219 * The filePath shoule be always input in local encoding. 219 void (*Doc_print)(struct _IPDF_JsPlatform* pThis,
220 */ 220 FPDF_BOOL bUI,
221 int (*Field_browse)(struct _IPDF_JsPlatform* pThis,void* filePath, int leng th); 221 int nStart,
222 222 int nEnd,
223 /** 223 FPDF_BOOL bSilent,
224 * pointer to FPDF_FORMFILLINFO interface. 224 FPDF_BOOL bShrinkToFit,
225 **/ 225 FPDF_BOOL bPrintAsImage,
226 void* m_pFormfillinfo; 226 FPDF_BOOL bReverse,
227 227 FPDF_BOOL bAnnotations);
228 /* Version 2. */ 228
229 229 /*
230 /** 230 * Method: Doc_submitForm
231 * pointer to the v8::Isolate to use, or NULL to force PDFium to create one . 231 * Send the form data to a specified URL.
232 **/ 232 * Interface Version:
233 void* m_isolate; 233 * 1
234 234 * Implementation Required:
235 /** 235 * yes
236 * The embedder data slot to use in the v8::Isolate to store PDFium's 236 * Parameters:
237 * per-isolate data. The value needs to be between 0 and 237 * pThis - Pointer to the interface structure itself
238 * v8::Internals::kNumIsolateDataLots (exclusive). 238 * formData - Pointer to the data buffer to be sent.
239 */ 239 * length - The size,in bytes, of the buffer pointed by
240 unsigned int m_v8EmbedderSlot; 240 * formData parameter.
241 * URL - The URL to send to.
242 * Return Value:
243 * None.
244 *
245 */
246 void (*Doc_submitForm)(struct _IPDF_JsPlatform* pThis,
247 void* formData,
248 int length,
249 FPDF_WIDESTRING URL);
250
251 /*
252 * Method: Doc_gotoPage
253 * Jump to a specified page.
254 * Interface Version:
255 * 1
256 * Implementation Required:
257 * yes
258 * Parameters:
259 * pThis - Pointer to the interface structure itself
260 * nPageNum - The specified page number, zero for the first
261 * page.
262 * Return Value:
263 * None.
264 *
265 */
266 void (*Doc_gotoPage)(struct _IPDF_JsPlatform* pThis, int nPageNum);
267 /*
268 * Method: Field_browse
269 * Show a file selection dialog, and return the selected file path.
270 * Interface Version:
271 * 1
272 * Implementation Required:
273 * yes
274 * Parameters:
275 * pThis - Pointer to the interface structure itself.
276 * filePath - Pointer to the data buffer to receive the file
277 * path.Can be NULL.
278 * length - The length of the buffer, number of bytes. Can be
279 * 0.
280 * Return Value:
281 * Number of bytes the filePath consumes, including trailing zeros.
282 * Comments:
283 * The filePath shoule be always input in local encoding.
284 */
285 int (*Field_browse)(struct _IPDF_JsPlatform* pThis,
286 void* filePath,
287 int length);
288
289 /**
290 * pointer to FPDF_FORMFILLINFO interface.
291 **/
292 void* m_pFormfillinfo;
293
294 /* Version 2. */
295
296 /**
297 * pointer to the v8::Isolate to use, or NULL to force PDFium to create one.
298 **/
299 void* m_isolate;
300
301 /**
302 * The embedder data slot to use in the v8::Isolate to store PDFium's
303 * per-isolate data. The value needs to be between 0 and
304 * v8::Internals::kNumIsolateDataLots (exclusive).
305 */
306 unsigned int m_v8EmbedderSlot;
241 } IPDF_JSPLATFORM; 307 } IPDF_JSPLATFORM;
242 308
243 // Flags for Cursor type 309 // Flags for Cursor type
244 #define FXCT_ARROW 0 310 #define FXCT_ARROW 0
245 #define FXCT_NESW 1 311 #define FXCT_NESW 1
246 #define FXCT_NWSE 2 312 #define FXCT_NWSE 2
247 #define FXCT_VBEAM 3 313 #define FXCT_VBEAM 3
248 #define FXCT_HBEAM 4 314 #define FXCT_HBEAM 4
249 #define FXCT_HAND 5 315 #define FXCT_HAND 5
250 316
251 /** 317 /**
252 * Declares of a pointer type to the callback function for the FFI_SetTimer meth od. 318 * Declares of a pointer type to the callback function for the FFI_SetTimer
319 *method.
253 * Parameters: 320 * Parameters:
254 * idEvent - Identifier of the timer. 321 * idEvent - Identifier of the timer.
255 * Return value: 322 * Return value:
256 * None. 323 * None.
257 **/ 324 **/
258 typedef void (*TimerCallback)(int idEvent); 325 typedef void (*TimerCallback)(int idEvent);
259 326
260 /** 327 /**
261 * Declares of a struct type to the local system time. 328 * Declares of a struct type to the local system time.
262 **/ 329 **/
263 typedef struct _FPDF_SYSTEMTIME 330 typedef struct _FPDF_SYSTEMTIME {
264 { 331 unsigned short wYear; /* years since 1900 */
265 unsigned short wYear; /* years since 1900 */ 332 unsigned short wMonth; /* months since January - [0,11] */
266 unsigned short wMonth; /* months since January - [0,11] */ 333 unsigned short wDayOfWeek; /* days since Sunday - [0,6] */
267 unsigned short wDayOfWeek; /* days since Sunday - [0,6] */ 334 unsigned short wDay; /* day of the month - [1,31] */
268 unsigned short wDay; /* day of the month - [1,31] */ 335 unsigned short wHour; /* hours since midnight - [0,23] */
269 unsigned short wHour; /* hours since midnight - [0,23] */ 336 unsigned short wMinute; /* minutes after the hour - [0,59] */
270 unsigned short wMinute; /* minutes after the hour - [0,59] */ 337 unsigned short wSecond; /* seconds after the minute - [0,59] */
271 unsigned short wSecond; /* seconds after the minute - [0,59] */ 338 unsigned short wMilliseconds; /* milliseconds after the second - [0,999] */
272 unsigned short wMilliseconds; /* milliseconds after the second - [0,999] * / 339 } FPDF_SYSTEMTIME;
273 }FPDF_SYSTEMTIME; 340
274 341 typedef struct _FPDF_FORMFILLINFO {
275 342 /**
276 typedef struct _FPDF_FORMFILLINFO 343 * Version number of the interface. Currently must be 1.
277 { 344 **/
278 /** 345 int version;
279 * Version number of the interface. Currently must be 1. 346
280 **/ 347 /**
281 int version; 348 *Method: Release
282 349 * Give implementation a chance to release any data after the interface
283 /** 350 * is no longer used
284 * Method: Release 351 *Interface Version:
285 * Give implementation a chance to release any data after the inter face is no longer used 352 * 1
286 * Interface Version: 353 *Implementation Required:
287 * 1 354 * No
288 * Implementation Required: 355 *Comments:
289 * No 356 * Called by Foxit SDK during the final cleanup process.
290 * Comments: 357 *Parameters:
291 * Called by Foxit SDK during the final cleanup process. 358 * pThis - Pointer to the interface structure itself
292 * Parameters: 359 *Return Value:
293 * pThis - Pointer to the interface structure itself 360 * None
294 * Return Value: 361 */
295 * None 362
296 */ 363 void (*Release)(struct _FPDF_FORMFILLINFO* pThis);
297 364
298 void (*Release)(struct _FPDF_FORMFILLINFO* pThis); 365 /**
299 366 * Method: FFI_Invalidate
300 /** 367 * Invalidate the client area within the specified rectangle.
301 * Method: FFI_Invalidate 368 * Interface Version:
302 * Invalidate the client area within the specified rectangle. 369 * 1
303 * Interface Version: 370 * Implementation Required:
304 * 1 371 * yes
305 * Implementation Required: 372 * Parameters:
306 * yes 373 * pThis - Pointer to the interface structure itself.
307 * Parameters: 374 * page - Handle to the page. Returned by FPDF_LoadPage
308 * pThis - Pointer to the interface structure itself. 375 *function.
309 * page - Handle to the page. Returned by FPDF_LoadPage fu nction. 376 * left - Left position of the client area in PDF page
310 * left - Left position of the client area in PDF page coo rdinate. 377 *coordinate.
311 * top - Top position of the client area in PDF page coo rdinate. 378 * top - Top position of the client area in PDF page
312 * right - Right position of the client area in PDF page c oordinate. 379 *coordinate.
313 * bottom - Bottom position of the client area in PDF page c oordinate. 380 * right - Right position of the client area in PDF page
314 * Return Value: 381 *coordinate.
315 * None. 382 * bottom - Bottom position of the client area in PDF page
316 * 383 *coordinate.
317 *comments: 384 * Return Value:
318 * All positions are measured in PDF "user space". 385 * None.
319 * Implementation should call FPDF_RenderPageBitmap() function for repainting a specified page area. 386 *
320 */ 387 *comments:
321 void (*FFI_Invalidate)(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE page, doub le left, double top, double right, double bottom); 388 * All positions are measured in PDF "user space".
322 389 * Implementation should call FPDF_RenderPageBitmap() function for
323 /** 390 *repainting a specified page area.
324 * Method: FFI_OutputSelectedRect 391 */
325 * When user is taking the mouse to select texts on a form field, t his callback function will keep 392 void (*FFI_Invalidate)(struct _FPDF_FORMFILLINFO* pThis,
326 * returning the selected areas to the implementation. 393 FPDF_PAGE page,
327 * 394 double left,
328 * Interface Version: 395 double top,
329 * 1 396 double right,
330 * Implementation Required: 397 double bottom);
331 * No 398
332 * Parameters: 399 /**
333 * pThis - Pointer to the interface structure itself. 400 * Method: FFI_OutputSelectedRect
334 * page - Handle to the page. Returned by FPDF_LoadPage fu nction. 401 * When user is taking the mouse to select texts on a form field,
335 * left - Left position of the client area in PDF page coo rdinate. 402 * this callback function will keep
336 * top - Top position of the client area in PDF page coo rdinate. 403 * returning the selected areas to the implementation.
337 * right - Right position of the client area in PDF page c oordinate. 404 *
338 * bottom - Bottom position of the client area in PDF page c oordinate. 405 * Interface Version:
339 * Return Value: 406 * 1
340 * None. 407 * Implementation Required:
341 * 408 * No
342 * comments: 409 * Parameters:
343 * This CALLBACK function is useful for implementing special text s election effect. Implementation should 410 * pThis - Pointer to the interface structure itself.
344 * first records the returned rectangles, then draw them one by one at the painting period, last,remove all 411 * page - Handle to the page. Returned by FPDF_LoadPage
345 * the recorded rectangles when finish painting. 412 * function.
346 */ 413 * left - Left position of the client area in PDF page
347 void (*FFI_OutputSelectedRect)(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE pa ge, double left, double top, double right, double bottom); 414 * coordinate.
348 415 * top - Top position of the client area in PDF page
349 /** 416 * coordinate.
350 * Method: FFI_SetCursor 417 * right - Right position of the client area in PDF page
351 * Set the Cursor shape. 418 * coordinate.
352 * Interface Version: 419 * bottom - Bottom position of the client area in PDF page
353 * 1 420 * coordinate.
354 * Implementation Required: 421 * Return Value:
355 * yes 422 * None.
356 * Parameters: 423 *
357 * pThis - Pointer to the interface structure itself. 424 * comments:
358 * nCursorType - Cursor type. see Flags for Cursor type for the detai ls. 425 * This CALLBACK function is useful for implementing special text
359 * Return value: 426 * selection effect. Implementation should
360 * None. 427 * first records the returned rectangles, then draw them one by one
361 * */ 428 * at the painting period, last,remove all
362 void (*FFI_SetCursor)(struct _FPDF_FORMFILLINFO* pThis, int nCursorType); 429 * the recorded rectangles when finish painting.
363 430 */
364 /** 431 void (*FFI_OutputSelectedRect)(struct _FPDF_FORMFILLINFO* pThis,
365 * Method: FFI_SetTimer 432 FPDF_PAGE page,
366 * This method installs a system timer. A time-out value is specifi ed, 433 double left,
367 * and every time a time-out occurs, the system passes a message to 434 double top,
368 * the TimerProc callback function. 435 double right,
369 * Interface Version: 436 double bottom);
370 * 1 437
371 * Implementation Required: 438 /**
372 * yes 439 * Method: FFI_SetCursor
373 * Parameters: 440 * Set the Cursor shape.
374 * pThis - Pointer to the interface structure itself. 441 * Interface Version:
375 * uElapse - Specifies the time-out value, in milliseconds. 442 * 1
376 * lpTimerFunc - A pointer to the callback function-TimerCallback. 443 * Implementation Required:
377 * Return value: 444 * yes
378 * The timer identifier of the new timer if the function is successful. 445 * Parameters:
379 * An application passes this value to the FFI_KillTimer method to kill 446 * pThis - Pointer to the interface structure itself.
380 * the timer. Nonzero if it is successful; otherwise, it is zero. 447 * nCursorType - Cursor type. see Flags for Cursor type for the
381 * */ 448 * details.
382 int (*FFI_SetTimer)(struct _FPDF_FORMFILLINFO* pThis, int uElapse, TimerCal lback lpTimerFunc); 449 * Return value:
383 450 * None.
384 /** 451 * */
385 * Method: FFI_KillTimer 452 void (*FFI_SetCursor)(struct _FPDF_FORMFILLINFO* pThis, int nCursorType);
386 * This method kills the timer event identified by nIDEvent, set by an earlier call to FFI_SetTimer. 453
387 * Interface Version: 454 /**
388 * 1 455 * Method: FFI_SetTimer
389 * Implementation Required: 456 * This method installs a system timer. A time-out value is
390 * yes 457 * specified,
391 * Parameters: 458 * and every time a time-out occurs, the system passes a message to
392 * pThis - Pointer to the interface structure itself. 459 * the TimerProc callback function.
393 * nTimerID - The timer ID return by FFI_SetTimer function. 460 * Interface Version:
394 * Return value: 461 * 1
395 * None. 462 * Implementation Required:
396 * */ 463 * yes
397 void (*FFI_KillTimer)(struct _FPDF_FORMFILLINFO* pThis, int nTimerID); 464 * Parameters:
398 465 * pThis - Pointer to the interface structure itself.
399 466 * uElapse - Specifies the time-out value, in milliseconds.
400 /** 467 * lpTimerFunc - A pointer to the callback function-TimerCallback.
401 * Method: FFI_GetLocalTime 468 * Return value:
402 * This method receives the current local time on the system. 469 * The timer identifier of the new timer if the function is successful.
403 * Interface Version: 470 * An application passes this value to the FFI_KillTimer method to kill
404 * 1 471 * the timer. Nonzero if it is successful; otherwise, it is zero.
405 * Implementation Required: 472 * */
406 * yes 473 int (*FFI_SetTimer)(struct _FPDF_FORMFILLINFO* pThis,
407 * Parameters: 474 int uElapse,
408 * pThis - Pointer to the interface structure itself. 475 TimerCallback lpTimerFunc);
409 * Return value: 476
410 * None. 477 /**
411 * */ 478 * Method: FFI_KillTimer
412 FPDF_SYSTEMTIME (*FFI_GetLocalTime)(struct _FPDF_FORMFILLINFO* pThis); 479 * This method kills the timer event identified by nIDEvent, set by
413 480 * an earlier call to FFI_SetTimer.
414 /** 481 * Interface Version:
415 * Method: FFI_OnChange 482 * 1
416 * This method will be invoked to notify implementation when the va lue of any FormField on the document had been changed. 483 * Implementation Required:
417 * Interface Version: 484 * yes
418 * 1 485 * Parameters:
419 * Implementation Required: 486 * pThis - Pointer to the interface structure itself.
420 * no 487 * nTimerID - The timer ID return by FFI_SetTimer function.
421 * Parameters: 488 * Return value:
422 * pThis - Pointer to the interface structure itself. 489 * None.
423 * Return value: 490 * */
424 * None. 491 void (*FFI_KillTimer)(struct _FPDF_FORMFILLINFO* pThis, int nTimerID);
425 * */ 492
426 void (*FFI_OnChange)(struct _FPDF_FORMFILLINFO* pThis); 493 /**
427 494 * Method: FFI_GetLocalTime
428 /** 495 * This method receives the current local time on the system.
429 * Method: FFI_GetPage 496 * Interface Version:
430 * This method receives the page pointer associated with a specifie d page index. 497 * 1
431 * Interface Version: 498 * Implementation Required:
432 * 1 499 * yes
433 * Implementation Required: 500 * Parameters:
434 * yes 501 * pThis - Pointer to the interface structure itself.
435 * Parameters: 502 * Return value:
436 * pThis - Pointer to the interface structure itself. 503 * None.
437 * document - Handle to document. Returned by FPDF_LoadDocument fu nction. 504 * */
438 * nPageIndex - Index number of the page. 0 for the first page. 505 FPDF_SYSTEMTIME (*FFI_GetLocalTime)(struct _FPDF_FORMFILLINFO* pThis);
439 * Return value: 506
440 * Handle to the page. Returned by FPDF_LoadPage function. 507 /**
441 * Comments: 508 * Method: FFI_OnChange
442 * In some cases, the document-level JavaScript action may refer to a p age which hadn't been loaded yet. 509 * This method will be invoked to notify implementation when the
443 * To successfully run the javascript action, implementation need to lo ad the page for SDK. 510 * value of any FormField on the document had been changed.
444 * */ 511 * Interface Version:
445 FPDF_PAGE (*FFI_GetPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT d ocument, int nPageIndex); 512 * 1
446 513 * Implementation Required:
447 /** 514 * no
448 * Method: FFI_GetCurrentPage 515 * Parameters:
449 * This method receives the current page pointer. 516 * pThis - Pointer to the interface structure itself.
450 * Interface Version: 517 * Return value:
451 * 1 518 * None.
452 * Implementation Required: 519 * */
453 * yes 520 void (*FFI_OnChange)(struct _FPDF_FORMFILLINFO* pThis);
454 * Parameters: 521
455 * pThis - Pointer to the interface structure itself. 522 /**
456 * document - Handle to document. Returned by FPDF_LoadDocument fu nction. 523 * Method: FFI_GetPage
457 * Return value: 524 * This method receives the page pointer associated with a specified
458 * Handle to the page. Returned by FPDF_LoadPage function. 525 * page index.
459 * */ 526 * Interface Version:
460 FPDF_PAGE (*FFI_GetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOC UMENT document); 527 * 1
461 528 * Implementation Required:
462 /** 529 * yes
463 * Method: FFI_GetRotation 530 * Parameters:
464 * This method receives currently rotation of the page view. 531 * pThis - Pointer to the interface structure itself.
465 * Interface Version: 532 * document - Handle to document. Returned by FPDF_LoadDocument
466 * 1 533 * function.
467 * Implementation Required: 534 * nPageIndex - Index number of the page. 0 for the first page.
468 * yes 535 * Return value:
469 * Parameters: 536 * Handle to the page. Returned by FPDF_LoadPage function.
470 * pThis - Pointer to the interface structure itself. 537 * Comments:
471 * page - Handle to page. Returned by FPDF_LoadPage function. 538 * In some cases, the document-level JavaScript action may refer to a
472 * Return value: 539 * page which hadn't been loaded yet.
473 * The page rotation. Should be 0(0 degree),1(90 degree),2(180 degree), 3(270 degree), in a clockwise direction. 540 * To successfully run the javascript action, implementation need to load
474 * */ 541 * the page for SDK.
475 int (*FFI_GetRotation)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page) ; 542 * */
476 543 FPDF_PAGE (*FFI_GetPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT doc ument, int nPageIndex);
477 /** 544
478 * Method: FFI_ExecuteNamedAction 545 /**
479 * This method will execute an named action. 546 * Method: FFI_GetCurrentPage
480 * Interface Version: 547 * This method receives the current page pointer.
481 * 1 548 * Interface Version:
482 * Implementation Required: 549 * 1
483 * yes 550 * Implementation Required:
484 * Parameters: 551 * yes
485 * pThis - Pointer to the interface structure itself. 552 * Parameters:
486 * namedAction - A byte string which indicates the named action, terminated by 0. 553 * pThis - Pointer to the interface structure itself.
487 * Return value: 554 * document - Handle to document. Returned by FPDF_LoadDocument
488 * None. 555 * function.
489 * Comments: 556 * Return value:
490 * See the named actions description of <<PDF Reference, version 1.7>> for more details. 557 * Handle to the page. Returned by FPDF_LoadPage function.
491 * */ 558 * */
492 void (*FFI_ExecuteNamedAction)(struct _FPDF_FORMFILLINFO* pThis, FPDF_BYT ESTRING namedAction); 559 FPDF_PAGE (*FFI_GetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUM ENT document);
493 /** 560
494 * @brief This method will be called when a text field is getting or losing a focus. 561 /**
495 * 562 * Method: FFI_GetRotation
496 * @param[in] pThis Pointer to the interface structure itself. 563 * This method receives currently rotation of the page view.
497 * @param[in] value The string value of the form field, in UTF-16LE form at. 564 * Interface Version:
498 * @param[in] valueLen The length of the string value, number of characters (not bytes). 565 * 1
499 * @param[in] is_focus True if the form field is getting a focus, False for losing a focus. 566 * Implementation Required:
500 * 567 * yes
501 * @return None. 568 * Parameters:
502 * 569 * pThis - Pointer to the interface structure itself.
503 * @note Currently,only support text field and combobox field. 570 * page - Handle to page. Returned by FPDF_LoadPage function.
504 * */ 571 * Return value:
505 void (*FFI_SetTextFieldFocus)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDE STRING value, FPDF_DWORD valueLen, FPDF_BOOL is_focus); 572 * The page rotation. Should be 0(0 degree),1(90 degree),2(180
506 573 * degree),3(270 degree), in a clockwise direction.
507 574 * */
508 /** 575 int (*FFI_GetRotation)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page);
509 * Method: FFI_DoURIAction 576
510 * This action resolves to a uniform resource identifier. 577 /**
511 * Interface Version: 578 * Method: FFI_ExecuteNamedAction
512 * 1 579 * This method will execute an named action.
513 * Implementation Required: 580 * Interface Version:
514 * No 581 * 1
515 * Parameters: 582 * Implementation Required:
516 * pThis - Pointer to the interface structure itself. 583 * yes
517 * bsURI - A byte string which indicates the uniform resour ce identifier, terminated by 0. 584 * Parameters:
518 * Return value: 585 * pThis - Pointer to the interface structure itself.
519 * None. 586 * namedAction - A byte string which indicates the named action,
520 * Comments: 587 * terminated by 0.
521 * See the URI actions description of <<PDF Reference, version 1.7>> fo r more details. 588 * Return value:
522 * */ 589 * None.
523 void (*FFI_DoURIAction)(struct _FPDF_FORMFILLINFO* pThis, FPDF_BYTESTRING bsURI); 590 * Comments:
524 591 * See the named actions description of <<PDF Reference, version 1.7>>
525 /** 592 * for more details.
526 * Method: FFI_DoGoToAction 593 * */
527 * This action changes the view to a specified destination. 594 void (*FFI_ExecuteNamedAction)(struct _FPDF_FORMFILLINFO* pThis,
528 * Interface Version: 595 FPDF_BYTESTRING namedAction);
529 * 1 596 /**
530 * Implementation Required: 597 * @brief This method will be called when a text field is getting or losing a
531 * No 598 * focus.
532 * Parameters: 599 *
533 * pThis - Pointer to the interface structure itself. 600 * @param[in] pThis Pointer to the interface structure itself.
534 * nPageIndex - The index of the PDF page. 601 * @param[in] value The string value of the form field, in UTF-16LE
535 * zoomMode - The zoom mode for viewing page.See Macros "PDFZO OM_XXX" defined in "fpdfdoc.h". 602 * format.
536 * fPosArray - The float array which carries the position info. 603 * @param[in] valueLen The length of the string value, number of characters
537 * sizeofArray - The size of float array. 604 * (not bytes).
538 * Return value: 605 * @param[in] is_focus True if the form field is getting a focus, False for
539 * None. 606 * losing a focus.
540 * Comments: 607 *
541 * See the Destinations description of <<PDF Reference, version 1.7>> i n 8.2.1 for more details. 608 * @return None.
542 **/ 609 *
543 void (*FFI_DoGoToAction)(struct _FPDF_FORMFILLINFO* pThis, int nPageIndex , int zoomMode, float* fPosArray, int sizeofArray); 610 * @note Currently,only support text field and combobox field.
544 /** 611 * */
545 * pointer to IPDF_JSPLATFORM interface 612 void (*FFI_SetTextFieldFocus)(struct _FPDF_FORMFILLINFO* pThis,
546 **/ 613 FPDF_WIDESTRING value,
547 IPDF_JSPLATFORM* m_pJsPlatform; 614 FPDF_DWORD valueLen,
615 FPDF_BOOL is_focus);
616
617 /**
618 * Method: FFI_DoURIAction
619 * This action resolves to a uniform resource identifier.
620 * Interface Version:
621 * 1
622 * Implementation Required:
623 * No
624 * Parameters:
625 * pThis - Pointer to the interface structure itself.
626 * bsURI - A byte string which indicates the uniform resource
627 * identifier, terminated by 0.
628 * Return value:
629 * None.
630 * Comments:
631 * See the URI actions description of <<PDF Reference, version 1.7>> for
632 * more details.
633 * */
634 void (*FFI_DoURIAction)(struct _FPDF_FORMFILLINFO* pThis,
635 FPDF_BYTESTRING bsURI);
636
637 /**
638 * Method: FFI_DoGoToAction
639 * This action changes the view to a specified destination.
640 * Interface Version:
641 * 1
642 * Implementation Required:
643 * No
644 * Parameters:
645 * pThis - Pointer to the interface structure itself.
646 * nPageIndex - The index of the PDF page.
647 * zoomMode - The zoom mode for viewing page.See Macros
648 *"PDFZOOM_XXX" defined in "fpdfdoc.h".
649 * fPosArray - The float array which carries the position info.
650 * sizeofArray - The size of float array.
651 * Return value:
652 * None.
653 * Comments:
654 * See the Destinations description of <<PDF Reference, version 1.7>> in
655 *8.2.1 for more details.
656 **/
657 void (*FFI_DoGoToAction)(struct _FPDF_FORMFILLINFO* pThis,
658 int nPageIndex,
659 int zoomMode,
660 float* fPosArray,
661 int sizeofArray);
662 /**
663 * pointer to IPDF_JSPLATFORM interface
664 **/
665 IPDF_JSPLATFORM* m_pJsPlatform;
548 666
549 } FPDF_FORMFILLINFO; 667 } FPDF_FORMFILLINFO;
550 668
551
552
553 /** 669 /**
554 * Function: FPDFDOC_InitFormFillEnvironment 670 * Function: FPDFDOC_InitFormFillEnvironment
555 * Init form fill environment. 671 * Init form fill environment.
556 * Comments: 672 * Comments:
557 * This function should be called before any form fill operation. 673 * This function should be called before any form fill operation.
558 * Parameters: 674 * Parameters:
559 * document - Handle to document. Returned by FPDF_LoadDocumen t function. 675 * document - Handle to document. Returned by
676 *FPDF_LoadDocument function.
560 * pFormFillInfo - Pointer to a FPDF_FORMFILLINFO structure. 677 * pFormFillInfo - Pointer to a FPDF_FORMFILLINFO structure.
561 * Return Value: 678 * Return Value:
562 * Return handler to the form fill module. NULL means fails. 679 * Return handler to the form fill module. NULL means fails.
563 **/ 680 **/
564 DLLEXPORT FPDF_FORMHANDLE STDCALL FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document, FPDF_FORMFILLINFO* formInfo); 681 DLLEXPORT FPDF_FORMHANDLE STDCALL
682 FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document,
683 FPDF_FORMFILLINFO* formInfo);
565 684
566 /** 685 /**
567 * Function: FPDFDOC_ExitFormFillEnvironment 686 * Function: FPDFDOC_ExitFormFillEnvironment
568 * Exit form fill environment. 687 * Exit form fill environment.
569 * Parameters: 688 * Parameters:
570 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 689 * hHandle - Handle to the form fill module. Returned by
690 *FPDFDOC_InitFormFillEnvironment.
571 * Return Value: 691 * Return Value:
572 * NULL. 692 * NULL.
573 **/ 693 **/
574 DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle); 694 DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle);
575 695
576 /** 696 /**
577 * Function: FORM_OnAfterLoadPage 697 * Function: FORM_OnAfterLoadPage
578 * This method is required for implementing all the form related functi ons. Should be invoked after user 698 * This method is required for implementing all the form related
579 * successfully loaded a PDF page, and method FPDFDOC_InitFormFillEnvir onment had been invoked. 699 *functions. Should be invoked after user
580 * Parameters: 700 * successfully loaded a PDF page, and method
581 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 701 *FPDFDOC_InitFormFillEnvironment had been invoked.
582 * Return Value: 702 * Parameters:
583 * NONE. 703 * hHandle - Handle to the form fill module. Returned by
584 **/ 704 *FPDFDOC_InitFormFillEnvironment.
585 DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page, FPDF_FORMHANDLE hHan dle); 705 * Return Value:
706 * NONE.
707 **/
708 DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page,
709 FPDF_FORMHANDLE hHandle);
586 710
587 /** 711 /**
588 * Function: FORM_OnBeforeClosePage 712 * Function: FORM_OnBeforeClosePage
589 * This method is required for implementing all the form related functi ons. Should be invoked before user 713 * This method is required for implementing all the form related
714 *functions. Should be invoked before user
590 * close the PDF page. 715 * close the PDF page.
591 * Parameters: 716 * Parameters:
592 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 717 * page - Handle to the page. Returned by FPDF_LoadPage
593 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 718 *function.
594 * Return Value: 719 * hHandle - Handle to the form fill module. Returned by
595 * NONE. 720 *FPDFDOC_InitFormFillEnvironment.
596 **/ 721 * Return Value:
597 DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page, FPDF_FORMHANDLE hH andle); 722 * NONE.
723 **/
724 DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page,
725 FPDF_FORMHANDLE hHandle);
598 726
599 /** 727 /**
600 * Function: FORM_DoDocumentJSAction 728 * Function: FORM_DoDocumentJSAction
601 * This method is required for performing Document-level JavaScript act ion. It should be invoked after the PDF document 729 * This method is required for performing Document-level JavaScript
730 *action. It should be invoked after the PDF document
602 * had been loaded. 731 * had been loaded.
603 * Parameters: 732 * Parameters:
604 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 733 * hHandle - Handle to the form fill module. Returned by
734 *FPDFDOC_InitFormFillEnvironment.
605 * Return Value: 735 * Return Value:
606 * NONE 736 * NONE
607 * Comments: 737 * Comments:
608 * If there is Document-level JavaScript action embedded in the documen t, this method will execute the javascript action; 738 * If there is Document-level JavaScript action embedded in the
739 *document, this method will execute the javascript action;
609 * otherwise, the method will do nothing. 740 * otherwise, the method will do nothing.
610 **/ 741 **/
611 DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle); 742 DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle);
612 743
613
614 /** 744 /**
615 * Function: FORM_DoDocumentOpenAction 745 * Function: FORM_DoDocumentOpenAction
616 * This method is required for performing open-action when the document is opened. 746 * This method is required for performing open-action when the document
747 *is opened.
617 * Parameters: 748 * Parameters:
618 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 749 * hHandle - Handle to the form fill module. Returned by
750 *FPDFDOC_InitFormFillEnvironment.
619 * Return Value: 751 * Return Value:
620 * NONE 752 * NONE
621 * Comments: 753 * Comments:
622 * This method will do nothing if there is no open-actions embedded in the document. 754 * This method will do nothing if there is no open-actions embedded in
755 *the document.
623 **/ 756 **/
624 DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle); 757 DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle);
625 758
626
627 // additional actions type of document. 759 // additional actions type of document.
628 #define FPDFDOC_AACTION_WC 0x10 //WC, before closing document, JavaS cript action. 760 #define FPDFDOC_AACTION_WC \
629 #define FPDFDOC_AACTION_WS 0x11 //WS, before saving document, JavaSc ript action. 761 0x10 // WC, before closing document, JavaScript action.
630 #define FPDFDOC_AACTION_DS 0x12 //DS, after saving document, JavaScr ipt action. 762 #define FPDFDOC_AACTION_WS \
631 #define FPDFDOC_AACTION_WP 0x13 //WP, before printing document, Java Script action. 763 0x11 // WS, before saving document, JavaScript action.
632 #define FPDFDOC_AACTION_DP 0x14 //DP, after printing document, JavaS cript action. 764 #define FPDFDOC_AACTION_DS 0x12 // DS, after saving document, JavaScript
765 // action.
766 #define FPDFDOC_AACTION_WP \
767 0x13 // WP, before printing document, JavaScript action.
768 #define FPDFDOC_AACTION_DP \
769 0x14 // DP, after printing document, JavaScript action.
633 /** 770 /**
634 * Function: FORM_DoDocumentAAction 771 * Function: FORM_DoDocumentAAction
635 * This method is required for performing the document's additional-act ion. 772 * This method is required for performing the document's
773 *additional-action.
636 * Parameters: 774 * Parameters:
637 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 775 * hHandle - Handle to the form fill module. Returned by
638 * aaType - The type of the additional-actions which defined abo ve. 776 *FPDFDOC_InitFormFillEnvironment.
777 * aaType - The type of the additional-actions which defined
778 *above.
639 * Return Value: 779 * Return Value:
640 * NONE 780 * NONE
641 * Comments: 781 * Comments:
642 * This method will do nothing if there is no document additional-actio n corresponding to the specified aaType. 782 * This method will do nothing if there is no document
783 *additional-action corresponding to the specified aaType.
643 **/ 784 **/
644 785
645 DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaTyp e); 786 DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle,
787 int aaType);
646 788
647 // Additional-action types of page object 789 // Additional-action types of page object
648 #define FPDFPAGE_AACTION_OPEN 0 // /O -- An action to be performed w hen the page is opened 790 #define FPDFPAGE_AACTION_OPEN \
649 #define FPDFPAGE_AACTION_CLOSE 1 // /C -- An action to be performed w hen the page is closed 791 0 // /O -- An action to be performed when the page is opened
792 #define FPDFPAGE_AACTION_CLOSE \
793 1 // /C -- An action to be performed when the page is closed
650 794
651 /** 795 /**
652 * Function: FORM_DoPageAAction 796 * Function: FORM_DoPageAAction
653 * This method is required for performing the page object's additional- action when opened or closed. 797 * This method is required for performing the page object's
798 *additional-action when opened or closed.
654 * Parameters: 799 * Parameters:
655 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 800 * page - Handle to the page. Returned by FPDF_LoadPage
656 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 801 *function.
657 * aaType - The type of the page object's additional-actions whi ch defined above. 802 * hHandle - Handle to the form fill module. Returned by
803 *FPDFDOC_InitFormFillEnvironment.
804 * aaType - The type of the page object's additional-actions
805 *which defined above.
658 * Return Value: 806 * Return Value:
659 * NONE 807 * NONE
660 * Comments: 808 * Comments:
661 * This method will do nothing if no additional-action corresponding to the specified aaType exists. 809 * This method will do nothing if no additional-action corresponding to
810 *the specified aaType exists.
662 **/ 811 **/
663 DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, FPDF_FORMHANDLE hHandl e, int aaType); 812 DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page,
813 FPDF_FORMHANDLE hHandle,
814 int aaType);
664 815
665 /** 816 /**
666 * Function: FORM_OnMouseMove 817 * Function: FORM_OnMouseMove
667 * You can call this member function when the mouse cursor moves. 818 * You can call this member function when the mouse cursor moves.
668 * Parameters: 819 * Parameters:
669 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 820 * hHandle - Handle to the form fill module. Returned by
670 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 821 *FPDFDOC_InitFormFillEnvironment.
822 * page - Handle to the page. Returned by FPDF_LoadPage
823 *function.
671 * modifier - Indicates whether various virtual keys are down. 824 * modifier - Indicates whether various virtual keys are down.
672 * page_x - Specifies the x-coordinate of the cursor in PDF user space. 825 * page_x - Specifies the x-coordinate of the cursor in PDF user
673 * page_y - Specifies the y-coordinate of the cursor in PDF user space. 826 *space.
674 * Return Value: 827 * page_y - Specifies the y-coordinate of the cursor in PDF user
675 * TRUE indicates success; otherwise false. 828 *space.
676 **/ 829 * Return Value:
677 DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle,FPDF_PAGE p age, int modifier, double page_x, double page_y); 830 * TRUE indicates success; otherwise false.
831 **/
832 DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle,
833 FPDF_PAGE page,
834 int modifier,
835 double page_x,
836 double page_y);
678 837
679 /** 838 /**
680 * Function: FORM_OnLButtonDown 839 * Function: FORM_OnLButtonDown
681 * You can call this member function when the user presses the left mou se button. 840 * You can call this member function when the user presses the left
682 * Parameters: 841 *mouse button.
683 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 842 * Parameters:
684 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 843 * hHandle - Handle to the form fill module. Returned by
844 *FPDFDOC_InitFormFillEnvironment.
845 * page - Handle to the page. Returned by FPDF_LoadPage
846 *function.
685 * modifier - Indicates whether various virtual keys are down. 847 * modifier - Indicates whether various virtual keys are down.
686 * page_x - Specifies the x-coordinate of the cursor in PDF user space. 848 * page_x - Specifies the x-coordinate of the cursor in PDF user
687 * page_y - Specifies the y-coordinate of the cursor in PDF user space. 849 *space.
688 * Return Value: 850 * page_y - Specifies the y-coordinate of the cursor in PDF user
689 * TRUE indicates success; otherwise false. 851 *space.
690 **/ 852 * Return Value:
691 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int modifier, double page_x, double page_y); 853 * TRUE indicates success; otherwise false.
854 **/
855 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle,
856 FPDF_PAGE page,
857 int modifier,
858 double page_x,
859 double page_y);
692 860
693 /** 861 /**
694 * Function: FORM_OnLButtonUp 862 * Function: FORM_OnLButtonUp
695 * You can call this member function when the user releases the left mo use button. 863 * You can call this member function when the user releases the left
696 * Parameters: 864 *mouse button.
697 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 865 * Parameters:
698 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 866 * hHandle - Handle to the form fill module. Returned by
867 *FPDFDOC_InitFormFillEnvironment.
868 * page - Handle to the page. Returned by FPDF_LoadPage
869 *function.
699 * modifier - Indicates whether various virtual keys are down. 870 * modifier - Indicates whether various virtual keys are down.
700 * page_x - Specifies the x-coordinate of the cursor in device. 871 * page_x - Specifies the x-coordinate of the cursor in device.
701 * page_y - Specifies the y-coordinate of the cursor in device. 872 * page_y - Specifies the y-coordinate of the cursor in device.
702 * Return Value: 873 * Return Value:
703 * TRUE indicates success; otherwise false. 874 * TRUE indicates success; otherwise false.
704 **/ 875 **/
705 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE p age, int modifier, double page_x, double page_y); 876 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,
877 FPDF_PAGE page,
878 int modifier,
879 double page_x,
880 double page_y);
706 881
707 /** 882 /**
708 * Function: FORM_OnKeyDown 883 * Function: FORM_OnKeyDown
709 * You can call this member function when a nonsystem key is pressed. 884 * You can call this member function when a nonsystem key is pressed.
710 * Parameters: 885 * Parameters:
711 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 886 * hHandle - Handle to the form fill module. Returned by
712 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 887 *FPDFDOC_InitFormFillEnvironment.
888 * page - Handle to the page. Returned by FPDF_LoadPage
889 *function.
713 * nKeyCode - Indicates whether various virtual keys are down. 890 * nKeyCode - Indicates whether various virtual keys are down.
714 * modifier - Contains the scan code, key-transition code, previou s key state, and context code. 891 * modifier - Contains the scan code, key-transition code,
715 * Return Value: 892 *previous key state, and context code.
716 * TRUE indicates success; otherwise false. 893 * Return Value:
717 **/ 894 * TRUE indicates success; otherwise false.
718 DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE pag e, int nKeyCode, int modifier); 895 **/
896 DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle,
897 FPDF_PAGE page,
898 int nKeyCode,
899 int modifier);
719 900
720 /** 901 /**
721 * Function: FORM_OnKeyUp 902 * Function: FORM_OnKeyUp
722 * You can call this member function when a nonsystem key is released. 903 * You can call this member function when a nonsystem key is released.
723 * Parameters: 904 * Parameters:
724 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 905 * hHandle - Handle to the form fill module. Returned by
725 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 906 *FPDFDOC_InitFormFillEnvironment.
907 * page - Handle to the page. Returned by FPDF_LoadPage
908 *function.
726 * nKeyCode - The virtual-key code of the given key. 909 * nKeyCode - The virtual-key code of the given key.
727 * modifier - Contains the scan code, key-transition code, previou s key state, and context code. 910 * modifier - Contains the scan code, key-transition code,
728 * Return Value: 911 *previous key state, and context code.
729 * TRUE indicates success; otherwise false. 912 * Return Value:
730 **/ 913 * TRUE indicates success; otherwise false.
731 DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int nKeyCode, int modifier); 914 **/
915 DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle,
916 FPDF_PAGE page,
917 int nKeyCode,
918 int modifier);
732 919
733 /** 920 /**
734 * Function: FORM_OnChar 921 * Function: FORM_OnChar
735 * You can call this member function when a keystroke translates to a n onsystem character. 922 * You can call this member function when a keystroke translates to a
736 * Parameters: 923 *nonsystem character.
737 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 924 * Parameters:
738 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 925 * hHandle - Handle to the form fill module. Returned by
926 *FPDFDOC_InitFormFillEnvironment.
927 * page - Handle to the page. Returned by FPDF_LoadPage
928 *function.
739 * nChar - The character code value of the key. 929 * nChar - The character code value of the key.
740 * modifier - Contains the scan code, key-transition code, previou s key state, and context code. 930 * modifier - Contains the scan code, key-transition code,
741 * Return Value: 931 *previous key state, and context code.
742 * TRUE indicates success; otherwise false. 932 * Return Value:
743 **/ 933 * TRUE indicates success; otherwise false.
744 DLLEXPORT FPDF_BOOL STDCALL FORM_OnChar(FPDF_FORMHANDLE hHandle,FPDF_PAGE page, int nChar, int modifier); 934 **/
935 DLLEXPORT FPDF_BOOL STDCALL FORM_OnChar(FPDF_FORMHANDLE hHandle,
936 FPDF_PAGE page,
937 int nChar,
938 int modifier);
745 939
746 /** 940 /**
747 * Function: FORM_ForceToKillFocus. 941 * Function: FORM_ForceToKillFocus.
748 * You can call this member function to force to kill the focus of the form field which got focus. 942 * You can call this member function to force to kill the focus of the
749 * It would kill the focus on the form field, save the value of form fi eld if it's changed by user. 943 *form field which got focus.
750 * Parameters: 944 * It would kill the focus on the form field, save the value of form
751 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 945 *field if it's changed by user.
946 * Parameters:
947 * hHandle - Handle to the form fill module. Returned by
948 *FPDFDOC_InitFormFillEnvironment.
752 * Return Value: 949 * Return Value:
753 * TRUE indicates success; otherwise false. 950 * TRUE indicates success; otherwise false.
754 **/ 951 **/
755 DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle); 952 DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle);
756 953
757 // Field Types 954 // Field Types
758 #define FPDF_FORMFIELD_UNKNOWN 0 // Unknown. 955 #define FPDF_FORMFIELD_UNKNOWN 0 // Unknown.
759 #define FPDF_FORMFIELD_PUSHBUTTON 1 // push button type. 956 #define FPDF_FORMFIELD_PUSHBUTTON 1 // push button type.
760 #define FPDF_FORMFIELD_CHECKBOX 2 // check box type. 957 #define FPDF_FORMFIELD_CHECKBOX 2 // check box type.
761 #define FPDF_FORMFIELD_RADIOBUTTON 3 // radio button type. 958 #define FPDF_FORMFIELD_RADIOBUTTON 3 // radio button type.
762 #define FPDF_FORMFIELD_COMBOBOX 4 // combo box type. 959 #define FPDF_FORMFIELD_COMBOBOX 4 // combo box type.
763 #define FPDF_FORMFIELD_LISTBOX 5 // list box type. 960 #define FPDF_FORMFIELD_LISTBOX 5 // list box type.
764 #define FPDF_FORMFIELD_TEXTFIELD 6 // text field type. 961 #define FPDF_FORMFIELD_TEXTFIELD 6 // text field type.
765 962
766 /** 963 /**
767 * Function: FPDPage_HasFormFieldAtPoint 964 * Function: FPDPage_HasFormFieldAtPoint
768 * Check the form filed position by point. 965 * Check the form filed position by point.
769 * Parameters: 966 * Parameters:
770 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 967 * hHandle - Handle to the form fill module. Returned by
771 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 968 *FPDFDOC_InitFormFillEnvironment.
969 * page - Handle to the page. Returned by FPDF_LoadPage
970 *function.
772 * page_x - X position in PDF "user space". 971 * page_x - X position in PDF "user space".
773 * page_y - Y position in PDF "user space". 972 * page_y - Y position in PDF "user space".
774 * Return Value: 973 * Return Value:
775 * Return the type of the formfiled; -1 indicates no fields. 974 * Return the type of the formfiled; -1 indicates no fields.
776 **/ 975 **/
777 DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,FPDF_P AGE page,double page_x, double page_y); 976 DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
977 FPDF_PAGE page,
978 double page_x,
979 double page_y);
778 980
779 /** 981 /**
780 * Function: FPDF_SetFormFieldHighlightColor 982 * Function: FPDF_SetFormFieldHighlightColor
781 * Set the highlight color of specified or all the form fields in the d ocument. 983 * Set the highlight color of specified or all the form fields in the
782 * Parameters: 984 *document.
783 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 985 * Parameters:
784 * doc - Handle to the document. Returned by FPDF_LoadDocumen t function. 986 * hHandle - Handle to the form fill module. Returned by
785 * fieldType - A 32-bit integer indicating the type of a form field (defined above). 987 *FPDFDOC_InitFormFillEnvironment.
786 * color - The highlight color of the form field.Constructed by 0xxxrrggbb. 988 * doc - Handle to the document. Returned by
989 *FPDF_LoadDocument function.
990 * fieldType - A 32-bit integer indicating the type of a form
991 *field(defined above).
992 * color - The highlight color of the form field.Constructed by
993 *0xxxrrggbb.
787 * Return Value: 994 * Return Value:
788 * NONE. 995 * NONE.
789 * Comments: 996 * Comments:
790 * When the parameter fieldType is set to zero, the highlight color wil l be applied to all the form fields in the 997 * When the parameter fieldType is set to zero, the highlight color
998 *will be applied to all the form fields in the
791 * document. 999 * document.
792 * Please refresh the client window to show the highlight immediately i f necessary. 1000 * Please refresh the client window to show the highlight immediately
793 **/ 1001 *if necessary.
794 DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle, int fieldType, unsigned long color); 1002 **/
1003 DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle,
1004 int fieldType,
1005 unsigned long color);
795 1006
796 /** 1007 /**
797 * Function: FPDF_SetFormFieldHighlightAlpha 1008 * Function: FPDF_SetFormFieldHighlightAlpha
798 * Set the transparency of the form field highlight color in the docume nt. 1009 * Set the transparency of the form field highlight color in the
799 * Parameters: 1010 *document.
800 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 1011 * Parameters:
801 * doc - Handle to the document. Returned by FPDF_LoadDocumen t function. 1012 * hHandle - Handle to the form fill module. Returned by
802 * alpha - The transparency of the form field highlight color. between 0-255. 1013 *FPDFDOC_InitFormFillEnvironment.
803 * Return Value: 1014 * doc - Handle to the document. Returned by
804 * NONE. 1015 *FPDF_LoadDocument function.
805 **/ 1016 * alpha - The transparency of the form field highlight color.
806 DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle, unsigned char alpha); 1017 *between 0-255.
807 1018 * Return Value:
1019 * NONE.
1020 **/
1021 DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle,
1022 unsigned char alpha);
808 1023
809 /** 1024 /**
810 * Function: FPDF_RemoveFormFieldHighlight 1025 * Function: FPDF_RemoveFormFieldHighlight
811 * Remove the form field highlight color in the document. 1026 * Remove the form field highlight color in the document.
812 * Parameters: 1027 * Parameters:
813 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 1028 * hHandle - Handle to the form fill module. Returned by
1029 *FPDFDOC_InitFormFillEnvironment.
814 * Return Value: 1030 * Return Value:
815 * NONE. 1031 * NONE.
816 * Comments: 1032 * Comments:
817 * Please refresh the client window to remove the highlight immediately if necessary. 1033 * Please refresh the client window to remove the highlight immediately
1034 *if necessary.
818 **/ 1035 **/
819 DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle); 1036 DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle);
820 1037
821 /** 1038 /**
822 * Function: FPDF_FFLDraw 1039 * Function: FPDF_FFLDraw
823 * Render FormFeilds on a page to a device independent bitmap. 1040 * Render FormFeilds on a page to a device independent bitmap.
824 * Parameters: 1041 * Parameters:
825 * hHandle - Handle to the form fill module. Returned by FPDFDOC_ InitFormFillEnvironment. 1042 * hHandle - Handle to the form fill module. Returned by
826 * bitmap - Handle to the device independent bitmap (as the outp ut buffer). 1043 *FPDFDOC_InitFormFillEnvironment.
827 * Bitmap handle can be created by FPDFBitmap_Create fu nction. 1044 * bitmap - Handle to the device independent bitmap (as the
828 * page - Handle to the page. Returned by FPDF_LoadPage functi on. 1045 *output buffer).
829 * start_x - Left pixel position of the display area in the devic e coordinate. 1046 * Bitmap handle can be created by FPDFBitmap_Create
830 * start_y - Top pixel position of the display area in the device coordinate. 1047 *function.
1048 * page - Handle to the page. Returned by FPDF_LoadPage
1049 *function.
1050 * start_x - Left pixel position of the display area in the
1051 *device coordinate.
1052 * start_y - Top pixel position of the display area in the device
1053 *coordinate.
831 * size_x - Horizontal size (in pixels) for displaying the page. 1054 * size_x - Horizontal size (in pixels) for displaying the page.
832 * size_y - Vertical size (in pixels) for displaying the page. 1055 * size_y - Vertical size (in pixels) for displaying the page.
833 * rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 1056 * rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees
834 * 2 (rotated 180 degrees), 3 (rotated 90 degrees c ounter-clockwise). 1057 *clockwise),
835 * flags - 0 for normal display, or combination of flags define d above. 1058 * 2 (rotated 180 degrees), 3 (rotated 90 degrees
1059 *counter-clockwise).
1060 * flags - 0 for normal display, or combination of flags
1061 *defined above.
836 * Return Value: 1062 * Return Value:
837 * None. 1063 * None.
838 * Comments: 1064 * Comments:
839 * This method is designed to only render annotations and FormFields on the page. 1065 * This method is designed to only render annotations and FormFields on
840 * Without FPDF_ANNOT specified for flags, Rendering functions such as FPDF_RenderPageBitmap or FPDF_RenderPageBitmap_Start will only render page conte nts(without annotations) to a bitmap. 1066 *the page.
841 * In order to implement the FormFill functions,Implementation should c all this method after rendering functions finish rendering the page contents. 1067 * Without FPDF_ANNOT specified for flags, Rendering functions such as
1068 *FPDF_RenderPageBitmap or FPDF_RenderPageBitmap_Start will only render page
1069 *contents(without annotations) to a bitmap.
1070 * In order to implement the FormFill functions,Implementation should
1071 *call this method after rendering functions finish rendering the page contents.
842 **/ 1072 **/
843 DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, 1073 DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,
844 int size_x, int size_y, int rotate, int flags); 1074 FPDF_BITMAP bitmap,
845 1075 FPDF_PAGE page,
1076 int start_x,
1077 int start_y,
1078 int size_x,
1079 int size_y,
1080 int rotate,
1081 int flags);
846 1082
847 #ifdef __cplusplus 1083 #ifdef __cplusplus
848 } 1084 }
849 #endif 1085 #endif
850 1086
851 #endif // PUBLIC_FPDF_FORMFILL_H_ 1087 #endif // PUBLIC_FPDF_FORMFILL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698