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

Side by Side Diff: fpdfsdk/include/fpdfformfill.h

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

Powered by Google App Engine
This is Rietveld 408576698