1pub const FPDF_OBJECT_UNKNOWN: u32 = 0;
4pub const FPDF_OBJECT_BOOLEAN: u32 = 1;
5pub const FPDF_OBJECT_NUMBER: u32 = 2;
6pub const FPDF_OBJECT_STRING: u32 = 3;
7pub const FPDF_OBJECT_NAME: u32 = 4;
8pub const FPDF_OBJECT_ARRAY: u32 = 5;
9pub const FPDF_OBJECT_DICTIONARY: u32 = 6;
10pub const FPDF_OBJECT_STREAM: u32 = 7;
11pub const FPDF_OBJECT_NULLOBJ: u32 = 8;
12pub const FPDF_OBJECT_REFERENCE: u32 = 9;
13pub const FPDF_POLICY_MACHINETIME_ACCESS: u32 = 0;
14pub const FPDF_ERR_SUCCESS: u32 = 0;
15pub const FPDF_ERR_UNKNOWN: u32 = 1;
16pub const FPDF_ERR_FILE: u32 = 2;
17pub const FPDF_ERR_FORMAT: u32 = 3;
18pub const FPDF_ERR_PASSWORD: u32 = 4;
19pub const FPDF_ERR_SECURITY: u32 = 5;
20pub const FPDF_ERR_PAGE: u32 = 6;
21pub const FPDF_ERR_XFALOAD: u32 = 7;
22pub const FPDF_ERR_XFALAYOUT: u32 = 8;
23pub const FPDF_ANNOT: u32 = 1;
24pub const FPDF_LCD_TEXT: u32 = 2;
25pub const FPDF_NO_NATIVETEXT: u32 = 4;
26pub const FPDF_GRAYSCALE: u32 = 8;
27pub const FPDF_DEBUG_INFO: u32 = 128;
28pub const FPDF_NO_CATCH: u32 = 256;
29pub const FPDF_RENDER_LIMITEDIMAGECACHE: u32 = 512;
30pub const FPDF_RENDER_FORCEHALFTONE: u32 = 1024;
31pub const FPDF_PRINTING: u32 = 2048;
32pub const FPDF_RENDER_NO_SMOOTHTEXT: u32 = 4096;
33pub const FPDF_RENDER_NO_SMOOTHIMAGE: u32 = 8192;
34pub const FPDF_RENDER_NO_SMOOTHPATH: u32 = 16384;
35pub const FPDF_REVERSE_BYTE_ORDER: u32 = 16;
36pub const FPDF_CONVERT_FILL_TO_STROKE: u32 = 32;
37pub const FPDFBitmap_Unknown: u32 = 0;
38pub const FPDFBitmap_Gray: u32 = 1;
39pub const FPDFBitmap_BGR: u32 = 2;
40pub const FPDFBitmap_BGRx: u32 = 3;
41pub const FPDFBitmap_BGRA: u32 = 4;
42pub const FPDFBitmap_BGRA_Premul: u32 = 5;
43pub const FPDF_INCREMENTAL: u32 = 1;
44pub const FPDF_NO_INCREMENTAL: u32 = 2;
45pub const FPDF_REMOVE_SECURITY: u32 = 3;
46pub const _STDINT_H: u32 = 1;
47pub const _FEATURES_H: u32 = 1;
48pub const _DEFAULT_SOURCE: u32 = 1;
49pub const __GLIBC_USE_ISOC2Y: u32 = 0;
50pub const __GLIBC_USE_ISOC23: u32 = 0;
51pub const __USE_ISOC11: u32 = 1;
52pub const __USE_ISOC99: u32 = 1;
53pub const __USE_ISOC95: u32 = 1;
54pub const __USE_POSIX_IMPLICITLY: u32 = 1;
55pub const _POSIX_SOURCE: u32 = 1;
56pub const _POSIX_C_SOURCE: u32 = 200809;
57pub const __USE_POSIX: u32 = 1;
58pub const __USE_POSIX2: u32 = 1;
59pub const __USE_POSIX199309: u32 = 1;
60pub const __USE_POSIX199506: u32 = 1;
61pub const __USE_XOPEN2K: u32 = 1;
62pub const __USE_XOPEN2K8: u32 = 1;
63pub const _ATFILE_SOURCE: u32 = 1;
64pub const __WORDSIZE: u32 = 64;
65pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
66pub const __SYSCALL_WORDSIZE: u32 = 64;
67pub const __TIMESIZE: u32 = 64;
68pub const __USE_TIME_BITS64: u32 = 1;
69pub const __USE_MISC: u32 = 1;
70pub const __USE_ATFILE: u32 = 1;
71pub const __USE_FORTIFY_LEVEL: u32 = 0;
72pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
73pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
74pub const __GLIBC_USE_C23_STRTOL: u32 = 0;
75pub const _STDC_PREDEF_H: u32 = 1;
76pub const __STDC_IEC_559__: u32 = 1;
77pub const __STDC_IEC_60559_BFP__: u32 = 201404;
78pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
79pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
80pub const __STDC_ISO_10646__: u32 = 201706;
81pub const __GNU_LIBRARY__: u32 = 6;
82pub const __GLIBC__: u32 = 2;
83pub const __GLIBC_MINOR__: u32 = 42;
84pub const _SYS_CDEFS_H: u32 = 1;
85pub const __glibc_c99_flexarr_available: u32 = 1;
86pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
87pub const __HAVE_GENERIC_SELECTION: u32 = 1;
88pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
89pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
90pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0;
91pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
92pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
93pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0;
94pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
95pub const _BITS_TYPES_H: u32 = 1;
96pub const _BITS_TYPESIZES_H: u32 = 1;
97pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
98pub const __INO_T_MATCHES_INO64_T: u32 = 1;
99pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
100pub const __STATFS_MATCHES_STATFS64: u32 = 1;
101pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
102pub const __FD_SETSIZE: u32 = 1024;
103pub const _BITS_TIME64_H: u32 = 1;
104pub const _BITS_WCHAR_H: u32 = 1;
105pub const _BITS_STDINT_INTN_H: u32 = 1;
106pub const _BITS_STDINT_UINTN_H: u32 = 1;
107pub const _BITS_STDINT_LEAST_H: u32 = 1;
108pub const INT8_MIN: i32 = -128;
109pub const INT16_MIN: i32 = -32768;
110pub const INT32_MIN: i32 = -2147483648;
111pub const INT8_MAX: u32 = 127;
112pub const INT16_MAX: u32 = 32767;
113pub const INT32_MAX: u32 = 2147483647;
114pub const UINT8_MAX: u32 = 255;
115pub const UINT16_MAX: u32 = 65535;
116pub const UINT32_MAX: u32 = 4294967295;
117pub const INT_LEAST8_MIN: i32 = -128;
118pub const INT_LEAST16_MIN: i32 = -32768;
119pub const INT_LEAST32_MIN: i32 = -2147483648;
120pub const INT_LEAST8_MAX: u32 = 127;
121pub const INT_LEAST16_MAX: u32 = 32767;
122pub const INT_LEAST32_MAX: u32 = 2147483647;
123pub const UINT_LEAST8_MAX: u32 = 255;
124pub const UINT_LEAST16_MAX: u32 = 65535;
125pub const UINT_LEAST32_MAX: u32 = 4294967295;
126pub const INT_FAST8_MIN: i32 = -128;
127pub const INT_FAST16_MIN: i64 = -9223372036854775808;
128pub const INT_FAST32_MIN: i64 = -9223372036854775808;
129pub const INT_FAST8_MAX: u32 = 127;
130pub const INT_FAST16_MAX: u64 = 9223372036854775807;
131pub const INT_FAST32_MAX: u64 = 9223372036854775807;
132pub const UINT_FAST8_MAX: u32 = 255;
133pub const UINT_FAST16_MAX: i32 = -1;
134pub const UINT_FAST32_MAX: i32 = -1;
135pub const INTPTR_MIN: i64 = -9223372036854775808;
136pub const INTPTR_MAX: u64 = 9223372036854775807;
137pub const UINTPTR_MAX: i32 = -1;
138pub const PTRDIFF_MIN: i64 = -9223372036854775808;
139pub const PTRDIFF_MAX: u64 = 9223372036854775807;
140pub const SIG_ATOMIC_MIN: i32 = -2147483648;
141pub const SIG_ATOMIC_MAX: u32 = 2147483647;
142pub const SIZE_MAX: i32 = -1;
143pub const WINT_MIN: u32 = 0;
144pub const WINT_MAX: u32 = 4294967295;
145pub const FPDF_COLORSPACE_UNKNOWN: u32 = 0;
146pub const FPDF_COLORSPACE_DEVICEGRAY: u32 = 1;
147pub const FPDF_COLORSPACE_DEVICERGB: u32 = 2;
148pub const FPDF_COLORSPACE_DEVICECMYK: u32 = 3;
149pub const FPDF_COLORSPACE_CALGRAY: u32 = 4;
150pub const FPDF_COLORSPACE_CALRGB: u32 = 5;
151pub const FPDF_COLORSPACE_LAB: u32 = 6;
152pub const FPDF_COLORSPACE_ICCBASED: u32 = 7;
153pub const FPDF_COLORSPACE_SEPARATION: u32 = 8;
154pub const FPDF_COLORSPACE_DEVICEN: u32 = 9;
155pub const FPDF_COLORSPACE_INDEXED: u32 = 10;
156pub const FPDF_COLORSPACE_PATTERN: u32 = 11;
157pub const FPDF_PAGEOBJ_UNKNOWN: u32 = 0;
158pub const FPDF_PAGEOBJ_TEXT: u32 = 1;
159pub const FPDF_PAGEOBJ_PATH: u32 = 2;
160pub const FPDF_PAGEOBJ_IMAGE: u32 = 3;
161pub const FPDF_PAGEOBJ_SHADING: u32 = 4;
162pub const FPDF_PAGEOBJ_FORM: u32 = 5;
163pub const FPDF_SEGMENT_UNKNOWN: i32 = -1;
164pub const FPDF_SEGMENT_LINETO: u32 = 0;
165pub const FPDF_SEGMENT_BEZIERTO: u32 = 1;
166pub const FPDF_SEGMENT_MOVETO: u32 = 2;
167pub const FPDF_FILLMODE_NONE: u32 = 0;
168pub const FPDF_FILLMODE_ALTERNATE: u32 = 1;
169pub const FPDF_FILLMODE_WINDING: u32 = 2;
170pub const FPDF_FONT_TYPE1: u32 = 1;
171pub const FPDF_FONT_TRUETYPE: u32 = 2;
172pub const FPDF_LINECAP_BUTT: u32 = 0;
173pub const FPDF_LINECAP_ROUND: u32 = 1;
174pub const FPDF_LINECAP_PROJECTING_SQUARE: u32 = 2;
175pub const FPDF_LINEJOIN_MITER: u32 = 0;
176pub const FPDF_LINEJOIN_ROUND: u32 = 1;
177pub const FPDF_LINEJOIN_BEVEL: u32 = 2;
178pub const FPDF_PRINTMODE_EMF: u32 = 0;
179pub const FPDF_PRINTMODE_TEXTONLY: u32 = 1;
180pub const FPDF_PRINTMODE_POSTSCRIPT2: u32 = 2;
181pub const FPDF_PRINTMODE_POSTSCRIPT3: u32 = 3;
182pub const FPDF_PRINTMODE_POSTSCRIPT2_PASSTHROUGH: u32 = 4;
183pub const FPDF_PRINTMODE_POSTSCRIPT3_PASSTHROUGH: u32 = 5;
184pub const FPDF_PRINTMODE_EMF_IMAGE_MASKS: u32 = 6;
185pub const FPDF_PRINTMODE_POSTSCRIPT3_TYPE42: u32 = 7;
186pub const FPDF_PRINTMODE_POSTSCRIPT3_TYPE42_PASSTHROUGH: u32 = 8;
187pub const FXFONT_ANSI_CHARSET: u32 = 0;
188pub const FXFONT_DEFAULT_CHARSET: u32 = 1;
189pub const FXFONT_SYMBOL_CHARSET: u32 = 2;
190pub const FXFONT_SHIFTJIS_CHARSET: u32 = 128;
191pub const FXFONT_HANGEUL_CHARSET: u32 = 129;
192pub const FXFONT_GB2312_CHARSET: u32 = 134;
193pub const FXFONT_CHINESEBIG5_CHARSET: u32 = 136;
194pub const FXFONT_GREEK_CHARSET: u32 = 161;
195pub const FXFONT_VIETNAMESE_CHARSET: u32 = 163;
196pub const FXFONT_HEBREW_CHARSET: u32 = 177;
197pub const FXFONT_ARABIC_CHARSET: u32 = 178;
198pub const FXFONT_CYRILLIC_CHARSET: u32 = 204;
199pub const FXFONT_THAI_CHARSET: u32 = 222;
200pub const FXFONT_EASTERNEUROPEAN_CHARSET: u32 = 238;
201pub const FXFONT_FF_FIXEDPITCH: u32 = 1;
202pub const FXFONT_FF_ROMAN: u32 = 16;
203pub const FXFONT_FF_SCRIPT: u32 = 64;
204pub const FXFONT_FW_NORMAL: u32 = 400;
205pub const FXFONT_FW_BOLD: u32 = 700;
206pub const _TIME_H: u32 = 1;
207pub const _BITS_TIME_H: u32 = 1;
208pub const CLOCK_REALTIME: u32 = 0;
209pub const CLOCK_MONOTONIC: u32 = 1;
210pub const CLOCK_PROCESS_CPUTIME_ID: u32 = 2;
211pub const CLOCK_THREAD_CPUTIME_ID: u32 = 3;
212pub const CLOCK_MONOTONIC_RAW: u32 = 4;
213pub const CLOCK_REALTIME_COARSE: u32 = 5;
214pub const CLOCK_MONOTONIC_COARSE: u32 = 6;
215pub const CLOCK_BOOTTIME: u32 = 7;
216pub const CLOCK_REALTIME_ALARM: u32 = 8;
217pub const CLOCK_BOOTTIME_ALARM: u32 = 9;
218pub const CLOCK_TAI: u32 = 11;
219pub const TIMER_ABSTIME: u32 = 1;
220pub const __clock_t_defined: u32 = 1;
221pub const __time_t_defined: u32 = 1;
222pub const __struct_tm_defined: u32 = 1;
223pub const _STRUCT_TIMESPEC: u32 = 1;
224pub const _BITS_ENDIAN_H: u32 = 1;
225pub const __LITTLE_ENDIAN: u32 = 1234;
226pub const __BIG_ENDIAN: u32 = 4321;
227pub const __PDP_ENDIAN: u32 = 3412;
228pub const _BITS_ENDIANNESS_H: u32 = 1;
229pub const __BYTE_ORDER: u32 = 1234;
230pub const __FLOAT_WORD_ORDER: u32 = 1234;
231pub const __clockid_t_defined: u32 = 1;
232pub const __timer_t_defined: u32 = 1;
233pub const __itimerspec_defined: u32 = 1;
234pub const _BITS_TYPES_LOCALE_T_H: u32 = 1;
235pub const _BITS_TYPES___LOCALE_T_H: u32 = 1;
236pub const TIME_UTC: u32 = 1;
237pub const FPDF_UNSP_DOC_XFAFORM: u32 = 1;
238pub const FPDF_UNSP_DOC_PORTABLECOLLECTION: u32 = 2;
239pub const FPDF_UNSP_DOC_ATTACHMENT: u32 = 3;
240pub const FPDF_UNSP_DOC_SECURITY: u32 = 4;
241pub const FPDF_UNSP_DOC_SHAREDREVIEW: u32 = 5;
242pub const FPDF_UNSP_DOC_SHAREDFORM_ACROBAT: u32 = 6;
243pub const FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM: u32 = 7;
244pub const FPDF_UNSP_DOC_SHAREDFORM_EMAIL: u32 = 8;
245pub const FPDF_UNSP_ANNOT_3DANNOT: u32 = 11;
246pub const FPDF_UNSP_ANNOT_MOVIE: u32 = 12;
247pub const FPDF_UNSP_ANNOT_SOUND: u32 = 13;
248pub const FPDF_UNSP_ANNOT_SCREEN_MEDIA: u32 = 14;
249pub const FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA: u32 = 15;
250pub const FPDF_UNSP_ANNOT_ATTACHMENT: u32 = 16;
251pub const FPDF_UNSP_ANNOT_SIG: u32 = 17;
252pub const PAGEMODE_UNKNOWN: i32 = -1;
253pub const PAGEMODE_USENONE: u32 = 0;
254pub const PAGEMODE_USEOUTLINES: u32 = 1;
255pub const PAGEMODE_USETHUMBS: u32 = 2;
256pub const PAGEMODE_FULLSCREEN: u32 = 3;
257pub const PAGEMODE_USEOC: u32 = 4;
258pub const PAGEMODE_USEATTACHMENTS: u32 = 5;
259pub const FORMTYPE_NONE: u32 = 0;
260pub const FORMTYPE_ACRO_FORM: u32 = 1;
261pub const FORMTYPE_XFA_FULL: u32 = 2;
262pub const FORMTYPE_XFA_FOREGROUND: u32 = 3;
263pub const FORMTYPE_COUNT: u32 = 4;
264pub const JSPLATFORM_ALERT_BUTTON_OK: u32 = 0;
265pub const JSPLATFORM_ALERT_BUTTON_OKCANCEL: u32 = 1;
266pub const JSPLATFORM_ALERT_BUTTON_YESNO: u32 = 2;
267pub const JSPLATFORM_ALERT_BUTTON_YESNOCANCEL: u32 = 3;
268pub const JSPLATFORM_ALERT_BUTTON_DEFAULT: u32 = 0;
269pub const JSPLATFORM_ALERT_ICON_ERROR: u32 = 0;
270pub const JSPLATFORM_ALERT_ICON_WARNING: u32 = 1;
271pub const JSPLATFORM_ALERT_ICON_QUESTION: u32 = 2;
272pub const JSPLATFORM_ALERT_ICON_STATUS: u32 = 3;
273pub const JSPLATFORM_ALERT_ICON_ASTERISK: u32 = 4;
274pub const JSPLATFORM_ALERT_ICON_DEFAULT: u32 = 0;
275pub const JSPLATFORM_ALERT_RETURN_OK: u32 = 1;
276pub const JSPLATFORM_ALERT_RETURN_CANCEL: u32 = 2;
277pub const JSPLATFORM_ALERT_RETURN_NO: u32 = 3;
278pub const JSPLATFORM_ALERT_RETURN_YES: u32 = 4;
279pub const JSPLATFORM_BEEP_ERROR: u32 = 0;
280pub const JSPLATFORM_BEEP_WARNING: u32 = 1;
281pub const JSPLATFORM_BEEP_QUESTION: u32 = 2;
282pub const JSPLATFORM_BEEP_STATUS: u32 = 3;
283pub const JSPLATFORM_BEEP_DEFAULT: u32 = 4;
284pub const FXCT_ARROW: u32 = 0;
285pub const FXCT_NESW: u32 = 1;
286pub const FXCT_NWSE: u32 = 2;
287pub const FXCT_VBEAM: u32 = 3;
288pub const FXCT_HBEAM: u32 = 4;
289pub const FXCT_HAND: u32 = 5;
290pub const FXFA_PAGEVIEWEVENT_POSTADDED: u32 = 1;
291pub const FXFA_PAGEVIEWEVENT_POSTREMOVED: u32 = 3;
292pub const FXFA_MENU_COPY: u32 = 1;
293pub const FXFA_MENU_CUT: u32 = 2;
294pub const FXFA_MENU_SELECTALL: u32 = 4;
295pub const FXFA_MENU_UNDO: u32 = 8;
296pub const FXFA_MENU_REDO: u32 = 16;
297pub const FXFA_MENU_PASTE: u32 = 32;
298pub const FXFA_SAVEAS_XML: u32 = 1;
299pub const FXFA_SAVEAS_XDP: u32 = 2;
300pub const FPDFDOC_AACTION_WC: u32 = 16;
301pub const FPDFDOC_AACTION_WS: u32 = 17;
302pub const FPDFDOC_AACTION_DS: u32 = 18;
303pub const FPDFDOC_AACTION_WP: u32 = 19;
304pub const FPDFDOC_AACTION_DP: u32 = 20;
305pub const FPDFPAGE_AACTION_OPEN: u32 = 0;
306pub const FPDFPAGE_AACTION_CLOSE: u32 = 1;
307pub const FPDF_FORMFIELD_UNKNOWN: u32 = 0;
308pub const FPDF_FORMFIELD_PUSHBUTTON: u32 = 1;
309pub const FPDF_FORMFIELD_CHECKBOX: u32 = 2;
310pub const FPDF_FORMFIELD_RADIOBUTTON: u32 = 3;
311pub const FPDF_FORMFIELD_COMBOBOX: u32 = 4;
312pub const FPDF_FORMFIELD_LISTBOX: u32 = 5;
313pub const FPDF_FORMFIELD_TEXTFIELD: u32 = 6;
314pub const FPDF_FORMFIELD_SIGNATURE: u32 = 7;
315pub const FPDF_FORMFIELD_XFA: u32 = 8;
316pub const FPDF_FORMFIELD_XFA_CHECKBOX: u32 = 9;
317pub const FPDF_FORMFIELD_XFA_COMBOBOX: u32 = 10;
318pub const FPDF_FORMFIELD_XFA_IMAGEFIELD: u32 = 11;
319pub const FPDF_FORMFIELD_XFA_LISTBOX: u32 = 12;
320pub const FPDF_FORMFIELD_XFA_PUSHBUTTON: u32 = 13;
321pub const FPDF_FORMFIELD_XFA_SIGNATURE: u32 = 14;
322pub const FPDF_FORMFIELD_XFA_TEXTFIELD: u32 = 15;
323pub const FPDF_FORMFIELD_COUNT: u32 = 16;
324pub const FPDF_MATCHCASE: u32 = 1;
325pub const FPDF_MATCHWHOLEWORD: u32 = 2;
326pub const FPDF_CONSECUTIVE: u32 = 4;
327pub const FLATTEN_FAIL: u32 = 0;
328pub const FLATTEN_SUCCESS: u32 = 1;
329pub const FLATTEN_NOTHINGTODO: u32 = 2;
330pub const FLAT_NORMALDISPLAY: u32 = 0;
331pub const FLAT_PRINT: u32 = 1;
332pub const PDFACTION_UNSUPPORTED: u32 = 0;
333pub const PDFACTION_GOTO: u32 = 1;
334pub const PDFACTION_REMOTEGOTO: u32 = 2;
335pub const PDFACTION_URI: u32 = 3;
336pub const PDFACTION_LAUNCH: u32 = 4;
337pub const PDFACTION_EMBEDDEDGOTO: u32 = 5;
338pub const PDFDEST_VIEW_UNKNOWN_MODE: u32 = 0;
339pub const PDFDEST_VIEW_XYZ: u32 = 1;
340pub const PDFDEST_VIEW_FIT: u32 = 2;
341pub const PDFDEST_VIEW_FITH: u32 = 3;
342pub const PDFDEST_VIEW_FITV: u32 = 4;
343pub const PDFDEST_VIEW_FITR: u32 = 5;
344pub const PDFDEST_VIEW_FITB: u32 = 6;
345pub const PDFDEST_VIEW_FITBH: u32 = 7;
346pub const PDFDEST_VIEW_FITBV: u32 = 8;
347pub const PDF_LINEARIZATION_UNKNOWN: i32 = -1;
348pub const PDF_NOT_LINEARIZED: u32 = 0;
349pub const PDF_LINEARIZED: u32 = 1;
350pub const PDF_DATA_ERROR: i32 = -1;
351pub const PDF_DATA_NOTAVAIL: u32 = 0;
352pub const PDF_DATA_AVAIL: u32 = 1;
353pub const PDF_FORM_ERROR: i32 = -1;
354pub const PDF_FORM_NOTAVAIL: u32 = 0;
355pub const PDF_FORM_AVAIL: u32 = 1;
356pub const PDF_FORM_NOTEXIST: u32 = 2;
357pub const FPDF_ANNOT_UNKNOWN: u32 = 0;
358pub const FPDF_ANNOT_TEXT: u32 = 1;
359pub const FPDF_ANNOT_LINK: u32 = 2;
360pub const FPDF_ANNOT_FREETEXT: u32 = 3;
361pub const FPDF_ANNOT_LINE: u32 = 4;
362pub const FPDF_ANNOT_SQUARE: u32 = 5;
363pub const FPDF_ANNOT_CIRCLE: u32 = 6;
364pub const FPDF_ANNOT_POLYGON: u32 = 7;
365pub const FPDF_ANNOT_POLYLINE: u32 = 8;
366pub const FPDF_ANNOT_HIGHLIGHT: u32 = 9;
367pub const FPDF_ANNOT_UNDERLINE: u32 = 10;
368pub const FPDF_ANNOT_SQUIGGLY: u32 = 11;
369pub const FPDF_ANNOT_STRIKEOUT: u32 = 12;
370pub const FPDF_ANNOT_STAMP: u32 = 13;
371pub const FPDF_ANNOT_CARET: u32 = 14;
372pub const FPDF_ANNOT_INK: u32 = 15;
373pub const FPDF_ANNOT_POPUP: u32 = 16;
374pub const FPDF_ANNOT_FILEATTACHMENT: u32 = 17;
375pub const FPDF_ANNOT_SOUND: u32 = 18;
376pub const FPDF_ANNOT_MOVIE: u32 = 19;
377pub const FPDF_ANNOT_WIDGET: u32 = 20;
378pub const FPDF_ANNOT_SCREEN: u32 = 21;
379pub const FPDF_ANNOT_PRINTERMARK: u32 = 22;
380pub const FPDF_ANNOT_TRAPNET: u32 = 23;
381pub const FPDF_ANNOT_WATERMARK: u32 = 24;
382pub const FPDF_ANNOT_THREED: u32 = 25;
383pub const FPDF_ANNOT_RICHMEDIA: u32 = 26;
384pub const FPDF_ANNOT_XFAWIDGET: u32 = 27;
385pub const FPDF_ANNOT_REDACT: u32 = 28;
386pub const FPDF_ANNOT_FLAG_NONE: u32 = 0;
387pub const FPDF_ANNOT_FLAG_INVISIBLE: u32 = 1;
388pub const FPDF_ANNOT_FLAG_HIDDEN: u32 = 2;
389pub const FPDF_ANNOT_FLAG_PRINT: u32 = 4;
390pub const FPDF_ANNOT_FLAG_NOZOOM: u32 = 8;
391pub const FPDF_ANNOT_FLAG_NOROTATE: u32 = 16;
392pub const FPDF_ANNOT_FLAG_NOVIEW: u32 = 32;
393pub const FPDF_ANNOT_FLAG_READONLY: u32 = 64;
394pub const FPDF_ANNOT_FLAG_LOCKED: u32 = 128;
395pub const FPDF_ANNOT_FLAG_TOGGLENOVIEW: u32 = 256;
396pub const FPDF_ANNOT_APPEARANCEMODE_NORMAL: u32 = 0;
397pub const FPDF_ANNOT_APPEARANCEMODE_ROLLOVER: u32 = 1;
398pub const FPDF_ANNOT_APPEARANCEMODE_DOWN: u32 = 2;
399pub const FPDF_ANNOT_APPEARANCEMODE_COUNT: u32 = 3;
400pub const FPDF_FORMFLAG_NONE: u32 = 0;
401pub const FPDF_FORMFLAG_READONLY: u32 = 1;
402pub const FPDF_FORMFLAG_REQUIRED: u32 = 2;
403pub const FPDF_FORMFLAG_NOEXPORT: u32 = 4;
404pub const FPDF_FORMFLAG_TEXT_MULTILINE: u32 = 4096;
405pub const FPDF_FORMFLAG_TEXT_PASSWORD: u32 = 8192;
406pub const FPDF_FORMFLAG_CHOICE_COMBO: u32 = 131072;
407pub const FPDF_FORMFLAG_CHOICE_EDIT: u32 = 262144;
408pub const FPDF_FORMFLAG_CHOICE_MULTI_SELECT: u32 = 2097152;
409pub const FPDF_ANNOT_AACTION_KEY_STROKE: u32 = 12;
410pub const FPDF_ANNOT_AACTION_FORMAT: u32 = 13;
411pub const FPDF_ANNOT_AACTION_VALIDATE: u32 = 14;
412pub const FPDF_ANNOT_AACTION_CALCULATE: u32 = 15;
413pub const FPDF_RENDER_READY: u32 = 0;
414pub const FPDF_RENDER_TOBECONTINUED: u32 = 1;
415pub const FPDF_RENDER_DONE: u32 = 2;
416pub const FPDF_RENDER_FAILED: u32 = 3;
417pub type wchar_t = ::std::os::raw::c_int;
418#[doc = " Define 'max_align_t' to match the GCC definition."]
419#[repr(C)]
420#[repr(align(16))]
421#[derive(Debug, Copy, Clone)]
422pub struct max_align_t {
423 pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
424 pub __bindgen_padding_0: u64,
425 pub __clang_max_align_nonce2: u128,
426}
427pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_UNKNOWN: FPDF_TEXT_RENDERMODE = -1;
428pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_FILL: FPDF_TEXT_RENDERMODE = 0;
429pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_STROKE: FPDF_TEXT_RENDERMODE = 1;
430pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_FILL_STROKE: FPDF_TEXT_RENDERMODE = 2;
431pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_INVISIBLE: FPDF_TEXT_RENDERMODE = 3;
432pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_FILL_CLIP: FPDF_TEXT_RENDERMODE = 4;
433pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_STROKE_CLIP: FPDF_TEXT_RENDERMODE = 5;
434pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_FILL_STROKE_CLIP: FPDF_TEXT_RENDERMODE = 6;
435pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_CLIP: FPDF_TEXT_RENDERMODE = 7;
436pub const FPDF_TEXT_RENDERMODE_FPDF_TEXTRENDERMODE_LAST: FPDF_TEXT_RENDERMODE = 7;
437#[doc = " PDF text rendering modes"]
438pub type FPDF_TEXT_RENDERMODE = ::std::os::raw::c_int;
439#[repr(C)]
440#[derive(Debug, Copy, Clone)]
441pub struct fpdf_action_t__ {
442 _unused: [u8; 0],
443}
444#[doc = " PDF types - use incomplete types (never completed) to force API type safety."]
445pub type FPDF_ACTION = *mut fpdf_action_t__;
446#[repr(C)]
447#[derive(Debug, Copy, Clone)]
448pub struct fpdf_annotation_t__ {
449 _unused: [u8; 0],
450}
451pub type FPDF_ANNOTATION = *mut fpdf_annotation_t__;
452#[repr(C)]
453#[derive(Debug, Copy, Clone)]
454pub struct fpdf_attachment_t__ {
455 _unused: [u8; 0],
456}
457pub type FPDF_ATTACHMENT = *mut fpdf_attachment_t__;
458#[repr(C)]
459#[derive(Debug, Copy, Clone)]
460pub struct fpdf_avail_t__ {
461 _unused: [u8; 0],
462}
463pub type FPDF_AVAIL = *mut fpdf_avail_t__;
464#[repr(C)]
465#[derive(Debug, Copy, Clone)]
466pub struct fpdf_bitmap_t__ {
467 _unused: [u8; 0],
468}
469pub type FPDF_BITMAP = *mut fpdf_bitmap_t__;
470#[repr(C)]
471#[derive(Debug, Copy, Clone)]
472pub struct fpdf_bookmark_t__ {
473 _unused: [u8; 0],
474}
475pub type FPDF_BOOKMARK = *mut fpdf_bookmark_t__;
476#[repr(C)]
477#[derive(Debug, Copy, Clone)]
478pub struct fpdf_clippath_t__ {
479 _unused: [u8; 0],
480}
481pub type FPDF_CLIPPATH = *mut fpdf_clippath_t__;
482#[repr(C)]
483#[derive(Debug, Copy, Clone)]
484pub struct fpdf_dest_t__ {
485 _unused: [u8; 0],
486}
487pub type FPDF_DEST = *mut fpdf_dest_t__;
488#[repr(C)]
489#[derive(Debug, Copy, Clone)]
490pub struct fpdf_document_t__ {
491 _unused: [u8; 0],
492}
493pub type FPDF_DOCUMENT = *mut fpdf_document_t__;
494#[repr(C)]
495#[derive(Debug, Copy, Clone)]
496pub struct fpdf_font_t__ {
497 _unused: [u8; 0],
498}
499pub type FPDF_FONT = *mut fpdf_font_t__;
500#[repr(C)]
501#[derive(Debug, Copy, Clone)]
502pub struct fpdf_form_handle_t__ {
503 _unused: [u8; 0],
504}
505pub type FPDF_FORMHANDLE = *mut fpdf_form_handle_t__;
506#[repr(C)]
507#[derive(Debug, Copy, Clone)]
508pub struct fpdf_glyphpath_t__ {
509 _unused: [u8; 0],
510}
511pub type FPDF_GLYPHPATH = *const fpdf_glyphpath_t__;
512#[repr(C)]
513#[derive(Debug, Copy, Clone)]
514pub struct fpdf_javascript_action_t {
515 _unused: [u8; 0],
516}
517pub type FPDF_JAVASCRIPT_ACTION = *mut fpdf_javascript_action_t;
518#[repr(C)]
519#[derive(Debug, Copy, Clone)]
520pub struct fpdf_link_t__ {
521 _unused: [u8; 0],
522}
523pub type FPDF_LINK = *mut fpdf_link_t__;
524#[repr(C)]
525#[derive(Debug, Copy, Clone)]
526pub struct fpdf_page_t__ {
527 _unused: [u8; 0],
528}
529pub type FPDF_PAGE = *mut fpdf_page_t__;
530#[repr(C)]
531#[derive(Debug, Copy, Clone)]
532pub struct fpdf_pagelink_t__ {
533 _unused: [u8; 0],
534}
535pub type FPDF_PAGELINK = *mut fpdf_pagelink_t__;
536#[repr(C)]
537#[derive(Debug, Copy, Clone)]
538pub struct fpdf_pageobject_t__ {
539 _unused: [u8; 0],
540}
541pub type FPDF_PAGEOBJECT = *mut fpdf_pageobject_t__;
542#[repr(C)]
543#[derive(Debug, Copy, Clone)]
544pub struct fpdf_pageobjectmark_t__ {
545 _unused: [u8; 0],
546}
547pub type FPDF_PAGEOBJECTMARK = *mut fpdf_pageobjectmark_t__;
548#[repr(C)]
549#[derive(Debug, Copy, Clone)]
550pub struct fpdf_pagerange_t__ {
551 _unused: [u8; 0],
552}
553pub type FPDF_PAGERANGE = *const fpdf_pagerange_t__;
554#[repr(C)]
555#[derive(Debug, Copy, Clone)]
556pub struct fpdf_pathsegment_t {
557 _unused: [u8; 0],
558}
559pub type FPDF_PATHSEGMENT = *const fpdf_pathsegment_t;
560#[repr(C)]
561#[derive(Debug, Copy, Clone)]
562pub struct fpdf_schhandle_t__ {
563 _unused: [u8; 0],
564}
565pub type FPDF_SCHHANDLE = *mut fpdf_schhandle_t__;
566#[repr(C)]
567#[derive(Debug, Copy, Clone)]
568pub struct fpdf_signature_t__ {
569 _unused: [u8; 0],
570}
571pub type FPDF_SIGNATURE = *const fpdf_signature_t__;
572pub type FPDF_SKIA_CANVAS = *mut ::std::os::raw::c_void;
573#[repr(C)]
574#[derive(Debug, Copy, Clone)]
575pub struct fpdf_structelement_t__ {
576 _unused: [u8; 0],
577}
578pub type FPDF_STRUCTELEMENT = *mut fpdf_structelement_t__;
579#[repr(C)]
580#[derive(Debug, Copy, Clone)]
581pub struct fpdf_structelement_attr_t__ {
582 _unused: [u8; 0],
583}
584pub type FPDF_STRUCTELEMENT_ATTR = *const fpdf_structelement_attr_t__;
585#[repr(C)]
586#[derive(Debug, Copy, Clone)]
587pub struct fpdf_structelement_attr_value_t__ {
588 _unused: [u8; 0],
589}
590pub type FPDF_STRUCTELEMENT_ATTR_VALUE = *const fpdf_structelement_attr_value_t__;
591#[repr(C)]
592#[derive(Debug, Copy, Clone)]
593pub struct fpdf_structtree_t__ {
594 _unused: [u8; 0],
595}
596pub type FPDF_STRUCTTREE = *mut fpdf_structtree_t__;
597#[repr(C)]
598#[derive(Debug, Copy, Clone)]
599pub struct fpdf_textpage_t__ {
600 _unused: [u8; 0],
601}
602pub type FPDF_TEXTPAGE = *mut fpdf_textpage_t__;
603#[repr(C)]
604#[derive(Debug, Copy, Clone)]
605pub struct fpdf_widget_t__ {
606 _unused: [u8; 0],
607}
608pub type FPDF_WIDGET = *mut fpdf_widget_t__;
609#[repr(C)]
610#[derive(Debug, Copy, Clone)]
611pub struct fpdf_xobject_t__ {
612 _unused: [u8; 0],
613}
614pub type FPDF_XOBJECT = *mut fpdf_xobject_t__;
615#[doc = " Basic data types"]
616pub type FPDF_BOOL = ::std::os::raw::c_int;
617pub type FPDF_RESULT = ::std::os::raw::c_int;
618pub type FPDF_DWORD = ::std::os::raw::c_ulong;
619pub type FS_FLOAT = f32;
620pub const _FPDF_DUPLEXTYPE__DuplexUndefined: _FPDF_DUPLEXTYPE_ = 0;
621pub const _FPDF_DUPLEXTYPE__Simplex: _FPDF_DUPLEXTYPE_ = 1;
622pub const _FPDF_DUPLEXTYPE__DuplexFlipShortEdge: _FPDF_DUPLEXTYPE_ = 2;
623pub const _FPDF_DUPLEXTYPE__DuplexFlipLongEdge: _FPDF_DUPLEXTYPE_ = 3;
624#[doc = " Duplex types"]
625pub type _FPDF_DUPLEXTYPE_ = ::std::os::raw::c_uint;
626#[doc = " Duplex types"]
627pub use self::_FPDF_DUPLEXTYPE_ as FPDF_DUPLEXTYPE;
628#[doc = " String types"]
629pub type FPDF_WCHAR = ::std::os::raw::c_ushort;
630#[doc = " Public PDFium API type for byte strings."]
631pub type FPDF_BYTESTRING = *const ::std::os::raw::c_char;
632#[doc = " The public PDFium API always uses UTF-16LE encoded wide strings, each\n character uses 2 bytes (except surrogation), with the low byte first."]
633pub type FPDF_WIDESTRING = *const FPDF_WCHAR;
634#[doc = " Structure for persisting a string beyond the duration of a callback.\n Note: although represented as a char*, string may be interpreted as\n a UTF-16LE formated string. Used only by XFA callbacks."]
635#[repr(C)]
636#[derive(Debug, Copy, Clone)]
637pub struct FPDF_BSTR_ {
638 #[doc = " String buffer, manipulate only with FPDF_BStr_* methods."]
639 pub str_: *mut ::std::os::raw::c_char,
640 #[doc = " Length of the string, in bytes."]
641 pub len: ::std::os::raw::c_int,
642}
643#[doc = " Structure for persisting a string beyond the duration of a callback.\n Note: although represented as a char*, string may be interpreted as\n a UTF-16LE formated string. Used only by XFA callbacks."]
644pub type FPDF_BSTR = FPDF_BSTR_;
645#[doc = " For Windows programmers: In most cases it's OK to treat FPDF_WIDESTRING as a\n Windows unicode string, however, special care needs to be taken if you\n expect to process Unicode larger than 0xffff.\n\n For Linux/Unix programmers: most compiler/library environments use 4 bytes\n for a Unicode character, and you have to convert between FPDF_WIDESTRING and\n system wide string by yourself."]
646pub type FPDF_STRING = *const ::std::os::raw::c_char;
647#[doc = " Matrix for transformation, in the form [a b c d e f], equivalent to:\n | a b 0 |\n | c d 0 |\n | e f 1 |\n\n Translation is performed with [1 0 0 1 tx ty].\n Scaling is performed with [sx 0 0 sy 0 0].\n See PDF Reference 1.7, 4.2.2 Common Transformations for more."]
648#[repr(C)]
649#[derive(Debug, Copy, Clone)]
650pub struct _FS_MATRIX_ {
651 pub a: f32,
652 pub b: f32,
653 pub c: f32,
654 pub d: f32,
655 pub e: f32,
656 pub f: f32,
657}
658#[doc = " Matrix for transformation, in the form [a b c d e f], equivalent to:\n | a b 0 |\n | c d 0 |\n | e f 1 |\n\n Translation is performed with [1 0 0 1 tx ty].\n Scaling is performed with [sx 0 0 sy 0 0].\n See PDF Reference 1.7, 4.2.2 Common Transformations for more."]
659pub type FS_MATRIX = _FS_MATRIX_;
660#[doc = " Rectangle area(float) in device or page coordinate system."]
661#[repr(C)]
662#[derive(Debug, Copy, Clone)]
663pub struct _FS_RECTF_ {
664 #[doc = " The x-coordinate of the left-top corner."]
665 pub left: f32,
666 #[doc = " The y-coordinate of the left-top corner."]
667 pub top: f32,
668 #[doc = " The x-coordinate of the right-bottom corner."]
669 pub right: f32,
670 #[doc = " The y-coordinate of the right-bottom corner."]
671 pub bottom: f32,
672}
673#[doc = " Rectangle area(float) in device or page coordinate system."]
674pub type FS_LPRECTF = *mut _FS_RECTF_;
675#[doc = " Rectangle area(float) in device or page coordinate system."]
676pub type FS_RECTF = _FS_RECTF_;
677#[doc = " Const Pointer to FS_RECTF structure."]
678pub type FS_LPCRECTF = *const FS_RECTF;
679#[doc = " Rectangle size. Coordinate system agnostic."]
680#[repr(C)]
681#[derive(Debug, Copy, Clone)]
682pub struct FS_SIZEF_ {
683 pub width: f32,
684 pub height: f32,
685}
686#[doc = " Rectangle size. Coordinate system agnostic."]
687pub type FS_LPSIZEF = *mut FS_SIZEF_;
688#[doc = " Rectangle size. Coordinate system agnostic."]
689pub type FS_SIZEF = FS_SIZEF_;
690#[doc = " Const Pointer to FS_SIZEF structure."]
691pub type FS_LPCSIZEF = *const FS_SIZEF;
692#[doc = " 2D Point. Coordinate system agnostic."]
693#[repr(C)]
694#[derive(Debug, Copy, Clone)]
695pub struct FS_POINTF_ {
696 pub x: f32,
697 pub y: f32,
698}
699#[doc = " 2D Point. Coordinate system agnostic."]
700pub type FS_LPPOINTF = *mut FS_POINTF_;
701#[doc = " 2D Point. Coordinate system agnostic."]
702pub type FS_POINTF = FS_POINTF_;
703#[doc = " Const Pointer to FS_POINTF structure."]
704pub type FS_LPCPOINTF = *const FS_POINTF;
705#[repr(C)]
706#[derive(Debug, Copy, Clone)]
707pub struct _FS_QUADPOINTSF {
708 pub x1: FS_FLOAT,
709 pub y1: FS_FLOAT,
710 pub x2: FS_FLOAT,
711 pub y2: FS_FLOAT,
712 pub x3: FS_FLOAT,
713 pub y3: FS_FLOAT,
714 pub x4: FS_FLOAT,
715 pub y4: FS_FLOAT,
716}
717pub type FS_QUADPOINTSF = _FS_QUADPOINTSF;
718#[doc = " Annotation enums."]
719pub type FPDF_ANNOTATION_SUBTYPE = ::std::os::raw::c_int;
720pub type FPDF_ANNOT_APPEARANCEMODE = ::std::os::raw::c_int;
721#[doc = " Dictionary value types."]
722pub type FPDF_OBJECT_TYPE = ::std::os::raw::c_int;
723#[doc = " Anti-Grain Geometry - https://sourceforge.net/projects/agg/"]
724pub const FPDF_RENDERER_TYPE_FPDF_RENDERERTYPE_AGG: FPDF_RENDERER_TYPE = 0;
725#[doc = " Skia - https://skia.org/"]
726pub const FPDF_RENDERER_TYPE_FPDF_RENDERERTYPE_SKIA: FPDF_RENDERER_TYPE = 1;
727#[doc = " PDF renderer types - Experimental.\n Selection of 2D graphics library to use for rendering to FPDF_BITMAPs."]
728pub type FPDF_RENDERER_TYPE = ::std::os::raw::c_uint;
729#[doc = " Process-wide options for initializing the library."]
730#[repr(C)]
731#[derive(Debug, Copy, Clone)]
732pub struct FPDF_LIBRARY_CONFIG_ {
733 #[doc = " Version number of the interface. Currently must be 2.\n Support for version 1 will be deprecated in the future."]
734 pub version: ::std::os::raw::c_int,
735 #[doc = " Array of paths to scan in place of the defaults when using built-in\n FXGE font loading code. The array is terminated by a NULL pointer.\n The Array may be NULL itself to use the default paths. May be ignored\n entirely depending upon the platform."]
736 pub m_pUserFontPaths: *mut *const ::std::os::raw::c_char,
737 #[doc = " Pointer to the v8::Isolate to use, or NULL to force PDFium to create one."]
738 pub m_pIsolate: *mut ::std::os::raw::c_void,
739 #[doc = " The embedder data slot to use in the v8::Isolate to store PDFium's\n per-isolate data. The value needs to be in the range\n [0, |v8::Internals::kNumIsolateDataLots|). Note that 0 is fine for most\n embedders."]
740 pub m_v8EmbedderSlot: ::std::os::raw::c_uint,
741 #[doc = " Pointer to the V8::Platform to use."]
742 pub m_pPlatform: *mut ::std::os::raw::c_void,
743 #[doc = " Explicit specification of core renderer to use. |m_RendererType| must be\n a valid value for |FPDF_LIBRARY_CONFIG| versions of this level or higher,\n or else the initialization will fail with an immediate crash.\n Note that use of a specified |FPDF_RENDERER_TYPE| value for which the\n corresponding render library is not included in the build will similarly\n fail with an immediate crash."]
744 pub m_RendererType: FPDF_RENDERER_TYPE,
745}
746#[doc = " Process-wide options for initializing the library."]
747pub type FPDF_LIBRARY_CONFIG = FPDF_LIBRARY_CONFIG_;
748unsafe extern "C" {
749 #[doc = " Function: FPDF_InitLibraryWithConfig\n Initialize the PDFium library and allocate global resources for it.\n Parameters:\n config - configuration information as above.\n Return value:\n None.\n Comments:\n You have to call this function before you can call any PDF\n processing functions."]
750 pub fn FPDF_InitLibraryWithConfig(config: *const FPDF_LIBRARY_CONFIG);
751}
752unsafe extern "C" {
753 #[doc = " Function: FPDF_InitLibrary\n Initialize the PDFium library (alternative form).\n Parameters:\n None\n Return value:\n None.\n Comments:\n Convenience function to call FPDF_InitLibraryWithConfig() with a\n default configuration for backwards compatibility purposes. New\n code should call FPDF_InitLibraryWithConfig() instead. This will\n be deprecated in the future."]
754 pub fn FPDF_InitLibrary();
755}
756unsafe extern "C" {
757 #[doc = " Function: FPDF_DestroyLibrary\n Release global resources allocated to the PDFium library by\n FPDF_InitLibrary() or FPDF_InitLibraryWithConfig().\n Parameters:\n None.\n Return value:\n None.\n Comments:\n After this function is called, you must not call any PDF\n processing functions.\n\n Calling this function does not automatically close other\n objects. It is recommended to close other objects before\n closing the library with this function."]
758 pub fn FPDF_DestroyLibrary();
759}
760unsafe extern "C" {
761 #[doc = " Function: FPDF_SetSandBoxPolicy\n Set the policy for the sandbox environment.\n Parameters:\n policy - The specified policy for setting, for example:\n FPDF_POLICY_MACHINETIME_ACCESS.\n enable - True to enable, false to disable the policy.\n Return value:\n None."]
762 pub fn FPDF_SetSandBoxPolicy(policy: FPDF_DWORD, enable: FPDF_BOOL);
763}
764unsafe extern "C" {
765 #[doc = " Function: FPDF_LoadDocument\n Open and load a PDF document.\n Parameters:\n file_path - Path to the PDF file (including extension).\n password - A string used as the password for the PDF file.\n If no password is needed, empty or NULL can be used.\n See comments below regarding the encoding.\n Return value:\n A handle to the loaded document, or NULL on failure.\n Comments:\n Loaded document can be closed by FPDF_CloseDocument().\n If this function fails, you can use FPDF_GetLastError() to retrieve\n the reason why it failed.\n\n The encoding for |file_path| is UTF-8.\n\n The encoding for |password| can be either UTF-8 or Latin-1. PDFs,\n depending on the security handler revision, will only accept one or\n the other encoding. If |password|'s encoding and the PDF's expected\n encoding do not match, FPDF_LoadDocument() will automatically\n convert |password| to the other encoding."]
766 pub fn FPDF_LoadDocument(file_path: FPDF_STRING, password: FPDF_BYTESTRING) -> FPDF_DOCUMENT;
767}
768unsafe extern "C" {
769 #[doc = " Function: FPDF_LoadMemDocument\n Open and load a PDF document from memory.\n Parameters:\n data_buf - Pointer to a buffer containing the PDF document.\n size - Number of bytes in the PDF document.\n password - A string used as the password for the PDF file.\n If no password is needed, empty or NULL can be used.\n Return value:\n A handle to the loaded document, or NULL on failure.\n Comments:\n The memory buffer must remain valid when the document is open.\n The loaded document can be closed by FPDF_CloseDocument.\n If this function fails, you can use FPDF_GetLastError() to retrieve\n the reason why it failed.\n\n See the comments for FPDF_LoadDocument() regarding the encoding for\n |password|.\n Notes:\n If PDFium is built with the XFA module, the application should call\n FPDF_LoadXFA() function after the PDF document loaded to support XFA\n fields defined in the fpdfformfill.h file."]
770 pub fn FPDF_LoadMemDocument(
771 data_buf: *const ::std::os::raw::c_void,
772 size: ::std::os::raw::c_int,
773 password: FPDF_BYTESTRING,
774 ) -> FPDF_DOCUMENT;
775}
776unsafe extern "C" {
777 #[doc = " Experimental API.\n Function: FPDF_LoadMemDocument64\n Open and load a PDF document from memory.\n Parameters:\n data_buf - Pointer to a buffer containing the PDF document.\n size - Number of bytes in the PDF document.\n password - A string used as the password for the PDF file.\n If no password is needed, empty or NULL can be used.\n Return value:\n A handle to the loaded document, or NULL on failure.\n Comments:\n The memory buffer must remain valid when the document is open.\n The loaded document can be closed by FPDF_CloseDocument.\n If this function fails, you can use FPDF_GetLastError() to retrieve\n the reason why it failed.\n\n See the comments for FPDF_LoadDocument() regarding the encoding for\n |password|.\n Notes:\n If PDFium is built with the XFA module, the application should call\n FPDF_LoadXFA() function after the PDF document loaded to support XFA\n fields defined in the fpdfformfill.h file."]
778 pub fn FPDF_LoadMemDocument64(
779 data_buf: *const ::std::os::raw::c_void,
780 size: usize,
781 password: FPDF_BYTESTRING,
782 ) -> FPDF_DOCUMENT;
783}
784#[doc = " Structure for custom file access."]
785#[repr(C)]
786#[derive(Debug, Copy, Clone)]
787pub struct FPDF_FILEACCESS {
788 #[doc = " File length, in bytes."]
789 pub m_FileLen: ::std::os::raw::c_ulong,
790 #[doc = " A function pointer for getting a block of data from a specific position.\n Position is specified by byte offset from the beginning of the file.\n The pointer to the buffer is never NULL and the size is never 0.\n The position and size will never go out of range of the file length.\n It may be possible for PDFium to call this function multiple times for\n the same position.\n Return value: should be non-zero if successful, zero for error."]
791 pub m_GetBlock: ::std::option::Option<
792 unsafe extern "C" fn(
793 param: *mut ::std::os::raw::c_void,
794 position: ::std::os::raw::c_ulong,
795 pBuf: *mut ::std::os::raw::c_uchar,
796 size: ::std::os::raw::c_ulong,
797 ) -> ::std::os::raw::c_int,
798 >,
799 #[doc = " A custom pointer for all implementation specific data. This pointer will\n be used as the first parameter to the m_GetBlock callback."]
800 pub m_Param: *mut ::std::os::raw::c_void,
801}
802#[doc = " Structure for file reading or writing (I/O).\n\n Note: This is a handler and should be implemented by callers,\n and is only used from XFA."]
803#[repr(C)]
804#[derive(Debug, Copy, Clone)]
805pub struct FPDF_FILEHANDLER_ {
806 #[doc = " User-defined data.\n Note: Callers can use this field to track controls."]
807 pub clientData: *mut ::std::os::raw::c_void,
808 #[doc = " Callback function to release the current file stream object.\n\n Parameters:\n clientData - Pointer to user-defined data.\n Returns:\n None."]
809 pub Release:
810 ::std::option::Option<unsafe extern "C" fn(clientData: *mut ::std::os::raw::c_void)>,
811 #[doc = " Callback function to retrieve the current file stream size.\n\n Parameters:\n clientData - Pointer to user-defined data.\n Returns:\n Size of file stream."]
812 pub GetSize: ::std::option::Option<
813 unsafe extern "C" fn(clientData: *mut ::std::os::raw::c_void) -> FPDF_DWORD,
814 >,
815 #[doc = " Callback function to read data from the current file stream.\n\n Parameters:\n clientData - Pointer to user-defined data.\n offset - Offset position starts from the beginning of file\n stream. This parameter indicates reading position.\n buffer - Memory buffer to store data which are read from\n file stream. This parameter should not be NULL.\n size - Size of data which should be read from file stream,\n in bytes. The buffer indicated by |buffer| must be\n large enough to store specified data.\n Returns:\n 0 for success, other value for failure."]
816 pub ReadBlock: ::std::option::Option<
817 unsafe extern "C" fn(
818 clientData: *mut ::std::os::raw::c_void,
819 offset: FPDF_DWORD,
820 buffer: *mut ::std::os::raw::c_void,
821 size: FPDF_DWORD,
822 ) -> FPDF_RESULT,
823 >,
824 #[doc = " Callback function to write data into the current file stream.\n\n Parameters:\n clientData - Pointer to user-defined data.\n offset - Offset position starts from the beginning of file\n stream. This parameter indicates writing position.\n buffer - Memory buffer contains data which is written into\n file stream. This parameter should not be NULL.\n size - Size of data which should be written into file\n stream, in bytes.\n Returns:\n 0 for success, other value for failure."]
825 pub WriteBlock: ::std::option::Option<
826 unsafe extern "C" fn(
827 clientData: *mut ::std::os::raw::c_void,
828 offset: FPDF_DWORD,
829 buffer: *const ::std::os::raw::c_void,
830 size: FPDF_DWORD,
831 ) -> FPDF_RESULT,
832 >,
833 #[doc = " Callback function to flush all internal accessing buffers.\n\n Parameters:\n clientData - Pointer to user-defined data.\n Returns:\n 0 for success, other value for failure."]
834 pub Flush: ::std::option::Option<
835 unsafe extern "C" fn(clientData: *mut ::std::os::raw::c_void) -> FPDF_RESULT,
836 >,
837 #[doc = " Callback function to change file size.\n\n Description:\n This function is called under writing mode usually. Implementer\n can determine whether to realize it based on application requests.\n Parameters:\n clientData - Pointer to user-defined data.\n size - New size of file stream, in bytes.\n Returns:\n 0 for success, other value for failure."]
838 pub Truncate: ::std::option::Option<
839 unsafe extern "C" fn(
840 clientData: *mut ::std::os::raw::c_void,
841 size: FPDF_DWORD,
842 ) -> FPDF_RESULT,
843 >,
844}
845#[doc = " Structure for file reading or writing (I/O).\n\n Note: This is a handler and should be implemented by callers,\n and is only used from XFA."]
846pub type FPDF_FILEHANDLER = FPDF_FILEHANDLER_;
847unsafe extern "C" {
848 #[doc = " Function: FPDF_LoadCustomDocument\n Load PDF document from a custom access descriptor.\n Parameters:\n pFileAccess - A structure for accessing the file.\n password - Optional password for decrypting the PDF file.\n Return value:\n A handle to the loaded document, or NULL on failure.\n Comments:\n The application must keep the file resources |pFileAccess| points to\n valid until the returned FPDF_DOCUMENT is closed. |pFileAccess|\n itself does not need to outlive the FPDF_DOCUMENT.\n\n The loaded document can be closed with FPDF_CloseDocument().\n\n See the comments for FPDF_LoadDocument() regarding the encoding for\n |password|.\n Notes:\n If PDFium is built with the XFA module, the application should call\n FPDF_LoadXFA() function after the PDF document loaded to support XFA\n fields defined in the fpdfformfill.h file."]
849 pub fn FPDF_LoadCustomDocument(
850 pFileAccess: *mut FPDF_FILEACCESS,
851 password: FPDF_BYTESTRING,
852 ) -> FPDF_DOCUMENT;
853}
854unsafe extern "C" {
855 #[doc = " Function: FPDF_GetFileVersion\n Get the file version of the given PDF document.\n Parameters:\n doc - Handle to a document.\n fileVersion - The PDF file version. File version: 14 for 1.4, 15\n for 1.5, ...\n Return value:\n True if succeeds, false otherwise.\n Comments:\n If the document was created by FPDF_CreateNewDocument,\n then this function will always fail."]
856 pub fn FPDF_GetFileVersion(
857 doc: FPDF_DOCUMENT,
858 fileVersion: *mut ::std::os::raw::c_int,
859 ) -> FPDF_BOOL;
860}
861unsafe extern "C" {
862 #[doc = " Function: FPDF_GetLastError\n Get last error code when a function fails.\n Parameters:\n None.\n Return value:\n A 32-bit integer indicating error code as defined above.\n Comments:\n If the previous SDK call succeeded, the return value of this\n function is not defined. This function only works in conjunction\n with APIs that mention FPDF_GetLastError() in their documentation."]
863 pub fn FPDF_GetLastError() -> ::std::os::raw::c_ulong;
864}
865unsafe extern "C" {
866 #[doc = " Experimental API.\n Function: FPDF_DocumentHasValidCrossReferenceTable\n Whether the document's cross reference table is valid or not.\n Parameters:\n document - Handle to a document. Returned by FPDF_LoadDocument.\n Return value:\n True if the PDF parser did not encounter problems parsing the cross\n reference table. False if the parser could not parse the cross\n reference table and the table had to be rebuild from other data\n within the document.\n Comments:\n The return value can change over time as the PDF parser evolves."]
867 pub fn FPDF_DocumentHasValidCrossReferenceTable(document: FPDF_DOCUMENT) -> FPDF_BOOL;
868}
869unsafe extern "C" {
870 #[doc = " Experimental API.\n Function: FPDF_GetTrailerEnds\n Get the byte offsets of trailer ends.\n Parameters:\n document - Handle to document. Returned by FPDF_LoadDocument().\n buffer - The address of a buffer that receives the\n byte offsets.\n length - The size, in ints, of |buffer|.\n Return value:\n Returns the number of ints in the buffer on success, 0 on error.\n\n |buffer| is an array of integers that describes the exact byte offsets of the\n trailer ends in the document. If |length| is less than the returned length,\n or |document| or |buffer| is NULL, |buffer| will not be modified."]
871 pub fn FPDF_GetTrailerEnds(
872 document: FPDF_DOCUMENT,
873 buffer: *mut ::std::os::raw::c_uint,
874 length: ::std::os::raw::c_ulong,
875 ) -> ::std::os::raw::c_ulong;
876}
877unsafe extern "C" {
878 #[doc = " Function: FPDF_GetDocPermissions\n Get file permission flags of the document.\n Parameters:\n document - Handle to a document. Returned by FPDF_LoadDocument.\n Return value:\n A 32-bit integer indicating permission flags. Please refer to the\n PDF Reference for detailed descriptions. If the document is not\n protected or was unlocked by the owner, 0xffffffff will be returned."]
879 pub fn FPDF_GetDocPermissions(document: FPDF_DOCUMENT) -> ::std::os::raw::c_ulong;
880}
881unsafe extern "C" {
882 #[doc = " Function: FPDF_GetDocUserPermissions\n Get user file permission flags of the document.\n Parameters:\n document - Handle to a document. Returned by FPDF_LoadDocument.\n Return value:\n A 32-bit integer indicating permission flags. Please refer to the\n PDF Reference for detailed descriptions. If the document is not\n protected, 0xffffffff will be returned. Always returns user\n permissions, even if the document was unlocked by the owner."]
883 pub fn FPDF_GetDocUserPermissions(document: FPDF_DOCUMENT) -> ::std::os::raw::c_ulong;
884}
885unsafe extern "C" {
886 #[doc = " Function: FPDF_GetSecurityHandlerRevision\n Get the revision for the security handler.\n Parameters:\n document - Handle to a document. Returned by FPDF_LoadDocument.\n Return value:\n The security handler revision number. Please refer to the PDF\n Reference for a detailed description. If the document is not\n protected, -1 will be returned."]
887 pub fn FPDF_GetSecurityHandlerRevision(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
888}
889unsafe extern "C" {
890 #[doc = " Function: FPDF_GetPageCount\n Get total number of pages in the document.\n Parameters:\n document - Handle to document. Returned by FPDF_LoadDocument.\n Return value:\n Total number of pages in the document."]
891 pub fn FPDF_GetPageCount(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
892}
893unsafe extern "C" {
894 #[doc = " Function: FPDF_LoadPage\n Load a page inside the document.\n Parameters:\n document - Handle to document. Returned by FPDF_LoadDocument\n page_index - Index number of the page. 0 for the first page.\n Return value:\n A handle to the loaded page, or NULL if page load fails.\n Comments:\n The loaded page can be rendered to devices using FPDF_RenderPage.\n The loaded page can be closed using FPDF_ClosePage."]
895 pub fn FPDF_LoadPage(document: FPDF_DOCUMENT, page_index: ::std::os::raw::c_int) -> FPDF_PAGE;
896}
897unsafe extern "C" {
898 #[doc = " Experimental API\n Function: FPDF_GetPageWidthF\n Get page width.\n Parameters:\n page - Handle to the page. Returned by FPDF_LoadPage().\n Return value:\n Page width (excluding non-displayable area) measured in points.\n One point is 1/72 inch (around 0.3528 mm).\n Comments:\n Changing the rotation of |page| affects the return value."]
899 pub fn FPDF_GetPageWidthF(page: FPDF_PAGE) -> f32;
900}
901unsafe extern "C" {
902 #[doc = " Function: FPDF_GetPageWidth\n Get page width.\n Parameters:\n page - Handle to the page. Returned by FPDF_LoadPage.\n Return value:\n Page width (excluding non-displayable area) measured in points.\n One point is 1/72 inch (around 0.3528 mm).\n Note:\n Prefer FPDF_GetPageWidthF() above. This will be deprecated in the\n future.\n Comments:\n Changing the rotation of |page| affects the return value."]
903 pub fn FPDF_GetPageWidth(page: FPDF_PAGE) -> f64;
904}
905unsafe extern "C" {
906 #[doc = " Experimental API\n Function: FPDF_GetPageHeightF\n Get page height.\n Parameters:\n page - Handle to the page. Returned by FPDF_LoadPage().\n Return value:\n Page height (excluding non-displayable area) measured in points.\n One point is 1/72 inch (around 0.3528 mm)\n Comments:\n Changing the rotation of |page| affects the return value."]
907 pub fn FPDF_GetPageHeightF(page: FPDF_PAGE) -> f32;
908}
909unsafe extern "C" {
910 #[doc = " Function: FPDF_GetPageHeight\n Get page height.\n Parameters:\n page - Handle to the page. Returned by FPDF_LoadPage.\n Return value:\n Page height (excluding non-displayable area) measured in points.\n One point is 1/72 inch (around 0.3528 mm)\n Note:\n Prefer FPDF_GetPageHeightF() above. This will be deprecated in the\n future.\n Comments:\n Changing the rotation of |page| affects the return value."]
911 pub fn FPDF_GetPageHeight(page: FPDF_PAGE) -> f64;
912}
913unsafe extern "C" {
914 #[doc = " Experimental API.\n Function: FPDF_GetPageBoundingBox\n Get the bounding box of the page. This is the intersection between\n its media box and its crop box.\n Parameters:\n page - Handle to the page. Returned by FPDF_LoadPage.\n rect - Pointer to a rect to receive the page bounding box.\n On an error, |rect| won't be filled.\n Return value:\n True for success."]
915 pub fn FPDF_GetPageBoundingBox(page: FPDF_PAGE, rect: *mut FS_RECTF) -> FPDF_BOOL;
916}
917unsafe extern "C" {
918 #[doc = " Experimental API.\n Function: FPDF_GetPageSizeByIndexF\n Get the size of the page at the given index.\n Parameters:\n document - Handle to document. Returned by FPDF_LoadDocument().\n page_index - Page index, zero for the first page.\n size - Pointer to a FS_SIZEF to receive the page size.\n (in points).\n Return value:\n Non-zero for success. 0 for error (document or page not found)."]
919 pub fn FPDF_GetPageSizeByIndexF(
920 document: FPDF_DOCUMENT,
921 page_index: ::std::os::raw::c_int,
922 size: *mut FS_SIZEF,
923 ) -> FPDF_BOOL;
924}
925unsafe extern "C" {
926 #[doc = " Function: FPDF_GetPageSizeByIndex\n Get the size of the page at the given index.\n Parameters:\n document - Handle to document. Returned by FPDF_LoadDocument.\n page_index - Page index, zero for the first page.\n width - Pointer to a double to receive the page width\n (in points).\n height - Pointer to a double to receive the page height\n (in points).\n Return value:\n Non-zero for success. 0 for error (document or page not found).\n Note:\n Prefer FPDF_GetPageSizeByIndexF() above. This will be deprecated in\n the future."]
927 pub fn FPDF_GetPageSizeByIndex(
928 document: FPDF_DOCUMENT,
929 page_index: ::std::os::raw::c_int,
930 width: *mut f64,
931 height: *mut f64,
932 ) -> ::std::os::raw::c_int;
933}
934#[doc = " Struct for color scheme.\n Each should be a 32-bit value specifying the color, in 8888 ARGB format."]
935#[repr(C)]
936#[derive(Debug, Copy, Clone)]
937pub struct FPDF_COLORSCHEME_ {
938 pub path_fill_color: FPDF_DWORD,
939 pub path_stroke_color: FPDF_DWORD,
940 pub text_fill_color: FPDF_DWORD,
941 pub text_stroke_color: FPDF_DWORD,
942}
943#[doc = " Struct for color scheme.\n Each should be a 32-bit value specifying the color, in 8888 ARGB format."]
944pub type FPDF_COLORSCHEME = FPDF_COLORSCHEME_;
945unsafe extern "C" {
946 #[doc = " Function: FPDF_RenderPageBitmap\n Render contents of a page to a device independent bitmap.\n Parameters:\n bitmap - Handle to the device independent bitmap (as the\n output buffer). The bitmap handle can be created\n by FPDFBitmap_Create or retrieved from an image\n object by FPDFImageObj_GetBitmap.\n page - Handle to the page. Returned by FPDF_LoadPage\n start_x - Left pixel position of the display area in\n bitmap coordinates.\n start_y - Top pixel position of the display area in bitmap\n coordinates.\n size_x - Horizontal size (in pixels) for displaying the page.\n size_y - Vertical size (in pixels) for displaying the page.\n rotate - Page orientation:\n 0 (normal)\n 1 (rotated 90 degrees clockwise)\n 2 (rotated 180 degrees)\n 3 (rotated 90 degrees counter-clockwise)\n flags - 0 for normal display, or combination of the Page\n Rendering flags defined above. With the FPDF_ANNOT\n flag, it renders all annotations that do not require\n user-interaction, which are all annotations except\n widget and popup annotations.\n Return value:\n None."]
947 pub fn FPDF_RenderPageBitmap(
948 bitmap: FPDF_BITMAP,
949 page: FPDF_PAGE,
950 start_x: ::std::os::raw::c_int,
951 start_y: ::std::os::raw::c_int,
952 size_x: ::std::os::raw::c_int,
953 size_y: ::std::os::raw::c_int,
954 rotate: ::std::os::raw::c_int,
955 flags: ::std::os::raw::c_int,
956 );
957}
958unsafe extern "C" {
959 #[doc = " Function: FPDF_RenderPageBitmapWithMatrix\n Render contents of a page to a device independent bitmap.\n Parameters:\n bitmap - Handle to the device independent bitmap (as the\n output buffer). The bitmap handle can be created\n by FPDFBitmap_Create or retrieved by\n FPDFImageObj_GetBitmap.\n page - Handle to the page. Returned by FPDF_LoadPage.\n matrix - The transform matrix, which must be invertible.\n See PDF Reference 1.7, 4.2.2 Common Transformations.\n clipping - The rect to clip to in device coords.\n flags - 0 for normal display, or combination of the Page\n Rendering flags defined above. With the FPDF_ANNOT\n flag, it renders all annotations that do not require\n user-interaction, which are all annotations except\n widget and popup annotations.\n Return value:\n None. Note that behavior is undefined if det of |matrix| is 0."]
960 pub fn FPDF_RenderPageBitmapWithMatrix(
961 bitmap: FPDF_BITMAP,
962 page: FPDF_PAGE,
963 matrix: *const FS_MATRIX,
964 clipping: *const FS_RECTF,
965 flags: ::std::os::raw::c_int,
966 );
967}
968unsafe extern "C" {
969 #[doc = " Experimental API.\n Function: FPDF_RenderPageSkia\n Render contents of a page to a Skia SkCanvas.\n Parameters:\n canvas - SkCanvas to render to.\n page - Handle to the page.\n size_x - Horizontal size (in pixels) for displaying the page.\n size_y - Vertical size (in pixels) for displaying the page.\n Return value:\n None."]
970 pub fn FPDF_RenderPageSkia(
971 canvas: FPDF_SKIA_CANVAS,
972 page: FPDF_PAGE,
973 size_x: ::std::os::raw::c_int,
974 size_y: ::std::os::raw::c_int,
975 );
976}
977unsafe extern "C" {
978 #[doc = " Function: FPDF_ClosePage\n Close a loaded PDF page.\n Parameters:\n page - Handle to the loaded page.\n Return value:\n None."]
979 pub fn FPDF_ClosePage(page: FPDF_PAGE);
980}
981unsafe extern "C" {
982 #[doc = " Function: FPDF_CloseDocument\n Close a loaded PDF document.\n Parameters:\n document - Handle to the loaded document.\n Return value:\n None."]
983 pub fn FPDF_CloseDocument(document: FPDF_DOCUMENT);
984}
985unsafe extern "C" {
986 #[doc = " Function: FPDF_DeviceToPage\n Convert the screen coordinates of a point to page coordinates.\n Parameters:\n page - Handle to the page. Returned by FPDF_LoadPage.\n start_x - Left pixel position of the display area in\n device coordinates.\n start_y - Top pixel position of the display area in device\n coordinates.\n size_x - Horizontal size (in pixels) for displaying the page.\n size_y - Vertical size (in pixels) for displaying the page.\n rotate - Page orientation:\n 0 (normal)\n 1 (rotated 90 degrees clockwise)\n 2 (rotated 180 degrees)\n 3 (rotated 90 degrees counter-clockwise)\n device_x - X value in device coordinates to be converted.\n device_y - Y value in device coordinates to be converted.\n page_x - A pointer to a double receiving the converted X\n value in page coordinates.\n page_y - A pointer to a double receiving the converted Y\n value in page coordinates.\n Return value:\n Returns true if the conversion succeeds, and |page_x| and |page_y|\n successfully receives the converted coordinates.\n Comments:\n The page coordinate system has its origin at the left-bottom corner\n of the page, with the X-axis on the bottom going to the right, and\n the Y-axis on the left side going up.\n\n NOTE: this coordinate system can be altered when you zoom, scroll,\n or rotate a page, however, a point on the page should always have\n the same coordinate values in the page coordinate system.\n\n The device coordinate system is device dependent. For screen device,\n its origin is at the left-top corner of the window. However this\n origin can be altered by the Windows coordinate transformation\n utilities.\n\n You must make sure the start_x, start_y, size_x, size_y\n and rotate parameters have exactly same values as you used in\n the FPDF_RenderPage() function call."]
987 pub fn FPDF_DeviceToPage(
988 page: FPDF_PAGE,
989 start_x: ::std::os::raw::c_int,
990 start_y: ::std::os::raw::c_int,
991 size_x: ::std::os::raw::c_int,
992 size_y: ::std::os::raw::c_int,
993 rotate: ::std::os::raw::c_int,
994 device_x: ::std::os::raw::c_int,
995 device_y: ::std::os::raw::c_int,
996 page_x: *mut f64,
997 page_y: *mut f64,
998 ) -> FPDF_BOOL;
999}
1000unsafe extern "C" {
1001 #[doc = " Function: FPDF_PageToDevice\n Convert the page coordinates of a point to screen coordinates.\n Parameters:\n page - Handle to the page. Returned by FPDF_LoadPage.\n start_x - Left pixel position of the display area in\n device coordinates.\n start_y - Top pixel position of the display area in device\n coordinates.\n size_x - Horizontal size (in pixels) for displaying the page.\n size_y - Vertical size (in pixels) for displaying the page.\n rotate - Page orientation:\n 0 (normal)\n 1 (rotated 90 degrees clockwise)\n 2 (rotated 180 degrees)\n 3 (rotated 90 degrees counter-clockwise)\n page_x - X value in page coordinates.\n page_y - Y value in page coordinate.\n device_x - A pointer to an integer receiving the result X\n value in device coordinates.\n device_y - A pointer to an integer receiving the result Y\n value in device coordinates.\n Return value:\n Returns true if the conversion succeeds, and |device_x| and\n |device_y| successfully receives the converted coordinates.\n Comments:\n See comments for FPDF_DeviceToPage()."]
1002 pub fn FPDF_PageToDevice(
1003 page: FPDF_PAGE,
1004 start_x: ::std::os::raw::c_int,
1005 start_y: ::std::os::raw::c_int,
1006 size_x: ::std::os::raw::c_int,
1007 size_y: ::std::os::raw::c_int,
1008 rotate: ::std::os::raw::c_int,
1009 page_x: f64,
1010 page_y: f64,
1011 device_x: *mut ::std::os::raw::c_int,
1012 device_y: *mut ::std::os::raw::c_int,
1013 ) -> FPDF_BOOL;
1014}
1015unsafe extern "C" {
1016 #[doc = " Function: FPDFBitmap_Create\n Create a device independent bitmap (FXDIB).\n Parameters:\n width - The number of pixels in width for the bitmap.\n Must be greater than 0.\n height - The number of pixels in height for the bitmap.\n Must be greater than 0.\n alpha - A flag indicating whether the alpha channel is used.\n Non-zero for using alpha, zero for not using.\n Return value:\n The created bitmap handle, or NULL if a parameter error or out of\n memory.\n Comments:\n The bitmap always uses 4 bytes per pixel. The first byte is always\n double word aligned.\n\n The byte order is BGRx (the last byte unused if no alpha channel) or\n BGRA.\n\n The pixels in a horizontal line are stored side by side, with the\n left most pixel stored first (with lower memory address).\n Each line uses width * 4 bytes.\n\n Lines are stored one after another, with the top most line stored\n first. There is no gap between adjacent lines.\n\n This function allocates enough memory for holding all pixels in the\n bitmap, but it doesn't initialize the buffer. Applications can use\n FPDFBitmap_FillRect() to fill the bitmap using any color. If the OS\n allows it, this function can allocate up to 4 GB of memory."]
1017 pub fn FPDFBitmap_Create(
1018 width: ::std::os::raw::c_int,
1019 height: ::std::os::raw::c_int,
1020 alpha: ::std::os::raw::c_int,
1021 ) -> FPDF_BITMAP;
1022}
1023unsafe extern "C" {
1024 #[doc = " Function: FPDFBitmap_CreateEx\n Create a device independent bitmap (FXDIB)\n Parameters:\n width - The number of pixels in width for the bitmap.\n Must be greater than 0.\n height - The number of pixels in height for the bitmap.\n Must be greater than 0.\n format - A number indicating for bitmap format, as defined\n above.\n first_scan - A pointer to the first byte of the first line if\n using an external buffer. If this parameter is NULL,\n then a new buffer will be created.\n stride - Number of bytes for each scan line. The value must\n be 0 or greater. When the value is 0,\n FPDFBitmap_CreateEx() will automatically calculate\n the appropriate value using |width| and |format|.\n When using an external buffer, it is recommended for\n the caller to pass in the value.\n When not using an external buffer, it is recommended\n for the caller to pass in 0.\n Return value:\n The bitmap handle, or NULL if parameter error or out of memory.\n Comments:\n Similar to FPDFBitmap_Create function, but allows for more formats\n and an external buffer is supported. The bitmap created by this\n function can be used in any place that a FPDF_BITMAP handle is\n required.\n\n If an external buffer is used, then the caller should destroy the\n buffer. FPDFBitmap_Destroy() will not destroy the buffer.\n\n It is recommended to use FPDFBitmap_GetStride() to get the stride\n value."]
1025 pub fn FPDFBitmap_CreateEx(
1026 width: ::std::os::raw::c_int,
1027 height: ::std::os::raw::c_int,
1028 format: ::std::os::raw::c_int,
1029 first_scan: *mut ::std::os::raw::c_void,
1030 stride: ::std::os::raw::c_int,
1031 ) -> FPDF_BITMAP;
1032}
1033unsafe extern "C" {
1034 #[doc = " Function: FPDFBitmap_GetFormat\n Get the format of the bitmap.\n Parameters:\n bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create\n or FPDFImageObj_GetBitmap.\n Return value:\n The format of the bitmap.\n Comments:\n Only formats supported by FPDFBitmap_CreateEx are supported by this\n function; see the list of such formats above."]
1035 pub fn FPDFBitmap_GetFormat(bitmap: FPDF_BITMAP) -> ::std::os::raw::c_int;
1036}
1037unsafe extern "C" {
1038 #[doc = " Function: FPDFBitmap_FillRect\n Fill a rectangle in a bitmap.\n Parameters:\n bitmap - The handle to the bitmap. Returned by\n FPDFBitmap_Create.\n left - The left position. Starting from 0 at the\n left-most pixel.\n top - The top position. Starting from 0 at the\n top-most line.\n width - Width in pixels to be filled.\n height - Height in pixels to be filled.\n color - A 32-bit value specifing the color, in 8888 ARGB\n format.\n Return value:\n Returns whether the operation succeeded or not.\n Comments:\n This function sets the color and (optionally) alpha value in the\n specified region of the bitmap.\n\n NOTE: If the alpha channel is used, this function does NOT\n composite the background with the source color, instead the\n background will be replaced by the source color and the alpha.\n\n If the alpha channel is not used, the alpha parameter is ignored."]
1039 pub fn FPDFBitmap_FillRect(
1040 bitmap: FPDF_BITMAP,
1041 left: ::std::os::raw::c_int,
1042 top: ::std::os::raw::c_int,
1043 width: ::std::os::raw::c_int,
1044 height: ::std::os::raw::c_int,
1045 color: FPDF_DWORD,
1046 ) -> FPDF_BOOL;
1047}
1048unsafe extern "C" {
1049 #[doc = " Function: FPDFBitmap_GetBuffer\n Get data buffer of a bitmap.\n Parameters:\n bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create\n or FPDFImageObj_GetBitmap.\n Return value:\n The pointer to the first byte of the bitmap buffer.\n Comments:\n The stride may be more than width * number of bytes per pixel\n\n Applications can use this function to get the bitmap buffer pointer,\n then manipulate any color and/or alpha values for any pixels in the\n bitmap.\n\n Use FPDFBitmap_GetFormat() to find out the format of the data."]
1050 pub fn FPDFBitmap_GetBuffer(bitmap: FPDF_BITMAP) -> *mut ::std::os::raw::c_void;
1051}
1052unsafe extern "C" {
1053 #[doc = " Function: FPDFBitmap_GetWidth\n Get width of a bitmap.\n Parameters:\n bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create\n or FPDFImageObj_GetBitmap.\n Return value:\n The width of the bitmap in pixels."]
1054 pub fn FPDFBitmap_GetWidth(bitmap: FPDF_BITMAP) -> ::std::os::raw::c_int;
1055}
1056unsafe extern "C" {
1057 #[doc = " Function: FPDFBitmap_GetHeight\n Get height of a bitmap.\n Parameters:\n bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create\n or FPDFImageObj_GetBitmap.\n Return value:\n The height of the bitmap in pixels."]
1058 pub fn FPDFBitmap_GetHeight(bitmap: FPDF_BITMAP) -> ::std::os::raw::c_int;
1059}
1060unsafe extern "C" {
1061 #[doc = " Function: FPDFBitmap_GetStride\n Get number of bytes for each line in the bitmap buffer.\n Parameters:\n bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create\n or FPDFImageObj_GetBitmap.\n Return value:\n The number of bytes for each line in the bitmap buffer.\n Comments:\n The stride may be more than width * number of bytes per pixel."]
1062 pub fn FPDFBitmap_GetStride(bitmap: FPDF_BITMAP) -> ::std::os::raw::c_int;
1063}
1064unsafe extern "C" {
1065 #[doc = " Function: FPDFBitmap_Destroy\n Destroy a bitmap and release all related buffers.\n Parameters:\n bitmap - Handle to the bitmap. Returned by FPDFBitmap_Create\n or FPDFImageObj_GetBitmap.\n Return value:\n None.\n Comments:\n This function will not destroy any external buffers provided when\n the bitmap was created."]
1066 pub fn FPDFBitmap_Destroy(bitmap: FPDF_BITMAP);
1067}
1068unsafe extern "C" {
1069 #[doc = " Function: FPDF_VIEWERREF_GetPrintScaling\n Whether the PDF document prefers to be scaled or not.\n Parameters:\n document - Handle to the loaded document.\n Return value:\n None."]
1070 pub fn FPDF_VIEWERREF_GetPrintScaling(document: FPDF_DOCUMENT) -> FPDF_BOOL;
1071}
1072unsafe extern "C" {
1073 #[doc = " Function: FPDF_VIEWERREF_GetNumCopies\n Returns the number of copies to be printed.\n Parameters:\n document - Handle to the loaded document.\n Return value:\n The number of copies to be printed."]
1074 pub fn FPDF_VIEWERREF_GetNumCopies(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
1075}
1076unsafe extern "C" {
1077 #[doc = " Function: FPDF_VIEWERREF_GetPrintPageRange\n Page numbers to initialize print dialog box when file is printed.\n Parameters:\n document - Handle to the loaded document.\n Return value:\n The print page range to be used for printing."]
1078 pub fn FPDF_VIEWERREF_GetPrintPageRange(document: FPDF_DOCUMENT) -> FPDF_PAGERANGE;
1079}
1080unsafe extern "C" {
1081 #[doc = " Experimental API.\n Function: FPDF_VIEWERREF_GetPrintPageRangeCount\n Returns the number of elements in a FPDF_PAGERANGE.\n Parameters:\n pagerange - Handle to the page range.\n Return value:\n The number of elements in the page range. Returns 0 on error."]
1082 pub fn FPDF_VIEWERREF_GetPrintPageRangeCount(pagerange: FPDF_PAGERANGE) -> usize;
1083}
1084unsafe extern "C" {
1085 #[doc = " Experimental API.\n Function: FPDF_VIEWERREF_GetPrintPageRangeElement\n Returns an element from a FPDF_PAGERANGE.\n Parameters:\n pagerange - Handle to the page range.\n index - Index of the element.\n Return value:\n The value of the element in the page range at a given index.\n Returns -1 on error."]
1086 pub fn FPDF_VIEWERREF_GetPrintPageRangeElement(
1087 pagerange: FPDF_PAGERANGE,
1088 index: usize,
1089 ) -> ::std::os::raw::c_int;
1090}
1091unsafe extern "C" {
1092 #[doc = " Function: FPDF_VIEWERREF_GetDuplex\n Returns the paper handling option to be used when printing from\n the print dialog.\n Parameters:\n document - Handle to the loaded document.\n Return value:\n The paper handling option to be used when printing."]
1093 pub fn FPDF_VIEWERREF_GetDuplex(document: FPDF_DOCUMENT) -> FPDF_DUPLEXTYPE;
1094}
1095unsafe extern "C" {
1096 #[doc = " Function: FPDF_VIEWERREF_GetName\n Gets the contents for a viewer ref, with a given key. The value must\n be of type \"name\".\n Parameters:\n document - Handle to the loaded document.\n key - Name of the key in the viewer pref dictionary,\n encoded in UTF-8.\n buffer - Caller-allocate buffer to receive the key, or NULL\n - to query the required length.\n length - Length of the buffer.\n Return value:\n The number of bytes in the contents, including the NULL terminator.\n Thus if the return value is 0, then that indicates an error, such\n as when |document| is invalid. If |length| is less than the required\n length, or |buffer| is NULL, |buffer| will not be modified."]
1097 pub fn FPDF_VIEWERREF_GetName(
1098 document: FPDF_DOCUMENT,
1099 key: FPDF_BYTESTRING,
1100 buffer: *mut ::std::os::raw::c_char,
1101 length: ::std::os::raw::c_ulong,
1102 ) -> ::std::os::raw::c_ulong;
1103}
1104unsafe extern "C" {
1105 #[doc = " Function: FPDF_CountNamedDests\n Get the count of named destinations in the PDF document.\n Parameters:\n document - Handle to a document\n Return value:\n The count of named destinations."]
1106 pub fn FPDF_CountNamedDests(document: FPDF_DOCUMENT) -> FPDF_DWORD;
1107}
1108unsafe extern "C" {
1109 #[doc = " Function: FPDF_GetNamedDestByName\n Get a the destination handle for the given name.\n Parameters:\n document - Handle to the loaded document.\n name - The name of a destination.\n Return value:\n The handle to the destination."]
1110 pub fn FPDF_GetNamedDestByName(document: FPDF_DOCUMENT, name: FPDF_BYTESTRING) -> FPDF_DEST;
1111}
1112unsafe extern "C" {
1113 #[doc = " Function: FPDF_GetNamedDest\n Get the named destination by index.\n Parameters:\n document - Handle to a document\n index - The index of a named destination.\n buffer - The buffer to store the destination name,\n used as wchar_t*.\n buflen [in/out] - Size of the buffer in bytes on input,\n length of the result in bytes on output\n or -1 if the buffer is too small.\n Return value:\n The destination handle for a given index, or NULL if there is no\n named destination corresponding to |index|.\n Comments:\n Call this function twice to get the name of the named destination:\n 1) First time pass in |buffer| as NULL and get buflen.\n 2) Second time pass in allocated |buffer| and buflen to retrieve\n |buffer|, which should be used as wchar_t*.\n\n If buflen is not sufficiently large, it will be set to -1 upon\n return."]
1114 pub fn FPDF_GetNamedDest(
1115 document: FPDF_DOCUMENT,
1116 index: ::std::os::raw::c_int,
1117 buffer: *mut ::std::os::raw::c_void,
1118 buflen: *mut ::std::os::raw::c_long,
1119 ) -> FPDF_DEST;
1120}
1121unsafe extern "C" {
1122 #[doc = " Experimental API.\n Function: FPDF_GetXFAPacketCount\n Get the number of valid packets in the XFA entry.\n Parameters:\n document - Handle to the document.\n Return value:\n The number of valid packets, or -1 on error."]
1123 pub fn FPDF_GetXFAPacketCount(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
1124}
1125unsafe extern "C" {
1126 #[doc = " Experimental API.\n Function: FPDF_GetXFAPacketName\n Get the name of a packet in the XFA array.\n Parameters:\n document - Handle to the document.\n index - Index number of the packet. 0 for the first packet.\n buffer - Buffer for holding the name of the XFA packet.\n buflen - Length of |buffer| in bytes.\n Return value:\n The length of the packet name in bytes, or 0 on error.\n\n |document| must be valid and |index| must be in the range [0, N), where N is\n the value returned by FPDF_GetXFAPacketCount().\n |buffer| is only modified if it is non-NULL and |buflen| is greater than or\n equal to the length of the packet name. The packet name includes a\n terminating NUL character. |buffer| is unmodified on error."]
1127 pub fn FPDF_GetXFAPacketName(
1128 document: FPDF_DOCUMENT,
1129 index: ::std::os::raw::c_int,
1130 buffer: *mut ::std::os::raw::c_void,
1131 buflen: ::std::os::raw::c_ulong,
1132 ) -> ::std::os::raw::c_ulong;
1133}
1134unsafe extern "C" {
1135 #[doc = " Experimental API.\n Function: FPDF_GetXFAPacketContent\n Get the content of a packet in the XFA array.\n Parameters:\n document - Handle to the document.\n index - Index number of the packet. 0 for the first packet.\n buffer - Buffer for holding the content of the XFA packet.\n buflen - Length of |buffer| in bytes.\n out_buflen - Pointer to the variable that will receive the minimum\n buffer size needed to contain the content of the XFA\n packet.\n Return value:\n Whether the operation succeeded or not.\n\n |document| must be valid and |index| must be in the range [0, N), where N is\n the value returned by FPDF_GetXFAPacketCount(). |out_buflen| must not be\n NULL. When the aforementioned arguments are valid, the operation succeeds,\n and |out_buflen| receives the content size. |buffer| is only modified if\n |buffer| is non-null and long enough to contain the content. Callers must\n check both the return value and the input |buflen| is no less than the\n returned |out_buflen| before using the data in |buffer|."]
1136 pub fn FPDF_GetXFAPacketContent(
1137 document: FPDF_DOCUMENT,
1138 index: ::std::os::raw::c_int,
1139 buffer: *mut ::std::os::raw::c_void,
1140 buflen: ::std::os::raw::c_ulong,
1141 out_buflen: *mut ::std::os::raw::c_ulong,
1142 ) -> FPDF_BOOL;
1143}
1144unsafe extern "C" {
1145 #[doc = " Function: FPDF_GetRecommendedV8Flags\n Returns a space-separated string of command line flags that are\n recommended to be passed into V8 via V8::SetFlagsFromString()\n prior to initializing the PDFium library.\n Parameters:\n None.\n Return value:\n NUL-terminated string of the form \"--flag1 --flag2\".\n The caller must not attempt to modify or free the result."]
1146 pub fn FPDF_GetRecommendedV8Flags() -> *const ::std::os::raw::c_char;
1147}
1148unsafe extern "C" {
1149 #[doc = " Experimental API.\n Function: FPDF_GetArrayBufferAllocatorSharedInstance()\n Helper function for initializing V8 isolates that will\n use PDFium's internal memory management.\n Parameters:\n None.\n Return Value:\n Pointer to a suitable v8::ArrayBuffer::Allocator, returned\n as void for C compatibility.\n Notes:\n Use is optional, but allows external creation of isolates\n matching the ones PDFium will make when none is provided\n via |FPDF_LIBRARY_CONFIG::m_pIsolate|.\n\n Can only be called when the library is in an uninitialized or\n destroyed state."]
1150 pub fn FPDF_GetArrayBufferAllocatorSharedInstance() -> *mut ::std::os::raw::c_void;
1151}
1152unsafe extern "C" {
1153 #[doc = " Function: FPDF_BStr_Init\n Helper function to initialize a FPDF_BSTR."]
1154 pub fn FPDF_BStr_Init(bstr: *mut FPDF_BSTR) -> FPDF_RESULT;
1155}
1156unsafe extern "C" {
1157 #[doc = " Function: FPDF_BStr_Set\n Helper function to copy string data into the FPDF_BSTR."]
1158 pub fn FPDF_BStr_Set(
1159 bstr: *mut FPDF_BSTR,
1160 cstr: *const ::std::os::raw::c_char,
1161 length: ::std::os::raw::c_int,
1162 ) -> FPDF_RESULT;
1163}
1164unsafe extern "C" {
1165 #[doc = " Function: FPDF_BStr_Clear\n Helper function to clear a FPDF_BSTR."]
1166 pub fn FPDF_BStr_Clear(bstr: *mut FPDF_BSTR) -> FPDF_RESULT;
1167}
1168unsafe extern "C" {
1169 #[doc = " Experimental API.\n Get the number of JavaScript actions in |document|.\n\n document - handle to a document.\n\n Returns the number of JavaScript actions in |document| or -1 on error."]
1170 pub fn FPDFDoc_GetJavaScriptActionCount(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
1171}
1172unsafe extern "C" {
1173 #[doc = " Experimental API.\n Get the JavaScript action at |index| in |document|.\n\n document - handle to a document.\n index - the index of the requested JavaScript action.\n\n Returns the handle to the JavaScript action, or NULL on failure.\n Caller owns the returned handle and must close it with\n FPDFDoc_CloseJavaScriptAction()."]
1174 pub fn FPDFDoc_GetJavaScriptAction(
1175 document: FPDF_DOCUMENT,
1176 index: ::std::os::raw::c_int,
1177 ) -> FPDF_JAVASCRIPT_ACTION;
1178}
1179unsafe extern "C" {
1180 #[doc = " javascript - Handle to a JavaScript action."]
1181 pub fn FPDFDoc_CloseJavaScriptAction(javascript: FPDF_JAVASCRIPT_ACTION);
1182}
1183unsafe extern "C" {
1184 #[doc = " Experimental API.\n Get the name from the |javascript| handle. |buffer| is only modified if\n |buflen| is longer than the length of the name. On errors, |buffer| is\n unmodified and the returned length is 0.\n\n javascript - handle to an JavaScript action.\n buffer - buffer for holding the name, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the JavaScript action name in bytes."]
1185 pub fn FPDFJavaScriptAction_GetName(
1186 javascript: FPDF_JAVASCRIPT_ACTION,
1187 buffer: *mut FPDF_WCHAR,
1188 buflen: ::std::os::raw::c_ulong,
1189 ) -> ::std::os::raw::c_ulong;
1190}
1191unsafe extern "C" {
1192 #[doc = " Experimental API.\n Get the script from the |javascript| handle. |buffer| is only modified if\n |buflen| is longer than the length of the script. On errors, |buffer| is\n unmodified and the returned length is 0.\n\n javascript - handle to an JavaScript action.\n buffer - buffer for holding the name, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the JavaScript action name in bytes."]
1193 pub fn FPDFJavaScriptAction_GetScript(
1194 javascript: FPDF_JAVASCRIPT_ACTION,
1195 buffer: *mut FPDF_WCHAR,
1196 buflen: ::std::os::raw::c_ulong,
1197 ) -> ::std::os::raw::c_ulong;
1198}
1199#[doc = " Structure for custom file write"]
1200#[repr(C)]
1201#[derive(Debug, Copy, Clone)]
1202pub struct FPDF_FILEWRITE_ {
1203 #[doc = "\n Version number of the interface. Currently must be 1.\n"]
1204 pub version: ::std::os::raw::c_int,
1205 #[doc = " Method: WriteBlock\n Output a block of data in your custom way.\n Interface Version:\n 1\n Implementation Required:\n Yes\n Comments:\n Called by function FPDF_SaveDocument\n Parameters:\n pThis - Pointer to the structure itself\n pData - Pointer to a buffer to output\n size - The size of the buffer.\n Return value:\n Should be non-zero if successful, zero for error."]
1206 pub WriteBlock: ::std::option::Option<
1207 unsafe extern "C" fn(
1208 pThis: *mut FPDF_FILEWRITE_,
1209 pData: *const ::std::os::raw::c_void,
1210 size: ::std::os::raw::c_ulong,
1211 ) -> ::std::os::raw::c_int,
1212 >,
1213}
1214#[doc = " Structure for custom file write"]
1215pub type FPDF_FILEWRITE = FPDF_FILEWRITE_;
1216unsafe extern "C" {
1217 #[doc = " Function: FPDF_SaveAsCopy\n Saves the copy of specified document in custom way.\n Parameters:\n document - Handle to document, as returned by\n FPDF_LoadDocument() or FPDF_CreateNewDocument().\n pFileWrite - A pointer to a custom file write structure.\n flags - Flags above that affect how the PDF gets saved.\n Pass in 0 when there are no flags.\n Return value:\n TRUE for succeed, FALSE for failed.\n"]
1218 pub fn FPDF_SaveAsCopy(
1219 document: FPDF_DOCUMENT,
1220 pFileWrite: *mut FPDF_FILEWRITE,
1221 flags: FPDF_DWORD,
1222 ) -> FPDF_BOOL;
1223}
1224unsafe extern "C" {
1225 #[doc = " Function: FPDF_SaveWithVersion\n Same as FPDF_SaveAsCopy(), except the file version of the\n saved document can be specified by the caller.\n Parameters:\n document - Handle to document.\n pFileWrite - A pointer to a custom file write structure.\n flags - The creating flags.\n fileVersion - The PDF file version. File version: 14 for 1.4,\n 15 for 1.5, ...\n Return value:\n TRUE if succeed, FALSE if failed.\n"]
1226 pub fn FPDF_SaveWithVersion(
1227 document: FPDF_DOCUMENT,
1228 pFileWrite: *mut FPDF_FILEWRITE,
1229 flags: FPDF_DWORD,
1230 fileVersion: ::std::os::raw::c_int,
1231 ) -> FPDF_BOOL;
1232}
1233#[doc = " Convenience types."]
1234pub type __u_char = ::std::os::raw::c_uchar;
1235pub type __u_short = ::std::os::raw::c_ushort;
1236pub type __u_int = ::std::os::raw::c_uint;
1237pub type __u_long = ::std::os::raw::c_ulong;
1238#[doc = " Fixed-size types, underlying types depend on word size and compiler."]
1239pub type __int8_t = ::std::os::raw::c_schar;
1240pub type __uint8_t = ::std::os::raw::c_uchar;
1241pub type __int16_t = ::std::os::raw::c_short;
1242pub type __uint16_t = ::std::os::raw::c_ushort;
1243pub type __int32_t = ::std::os::raw::c_int;
1244pub type __uint32_t = ::std::os::raw::c_uint;
1245pub type __int64_t = ::std::os::raw::c_long;
1246pub type __uint64_t = ::std::os::raw::c_ulong;
1247#[doc = " Smallest types with at least a given width."]
1248pub type __int_least8_t = __int8_t;
1249pub type __uint_least8_t = __uint8_t;
1250pub type __int_least16_t = __int16_t;
1251pub type __uint_least16_t = __uint16_t;
1252pub type __int_least32_t = __int32_t;
1253pub type __uint_least32_t = __uint32_t;
1254pub type __int_least64_t = __int64_t;
1255pub type __uint_least64_t = __uint64_t;
1256pub type __quad_t = ::std::os::raw::c_long;
1257pub type __u_quad_t = ::std::os::raw::c_ulong;
1258pub type __intmax_t = ::std::os::raw::c_long;
1259pub type __uintmax_t = ::std::os::raw::c_ulong;
1260pub type __dev_t = ::std::os::raw::c_ulong;
1261pub type __uid_t = ::std::os::raw::c_uint;
1262pub type __gid_t = ::std::os::raw::c_uint;
1263pub type __ino_t = ::std::os::raw::c_ulong;
1264pub type __ino64_t = ::std::os::raw::c_ulong;
1265pub type __mode_t = ::std::os::raw::c_uint;
1266pub type __nlink_t = ::std::os::raw::c_ulong;
1267pub type __off_t = ::std::os::raw::c_long;
1268pub type __off64_t = ::std::os::raw::c_long;
1269pub type __pid_t = ::std::os::raw::c_int;
1270#[repr(C)]
1271#[derive(Debug, Copy, Clone)]
1272pub struct __fsid_t {
1273 pub __val: [::std::os::raw::c_int; 2usize],
1274}
1275pub type __clock_t = ::std::os::raw::c_long;
1276pub type __rlim_t = ::std::os::raw::c_ulong;
1277pub type __rlim64_t = ::std::os::raw::c_ulong;
1278pub type __id_t = ::std::os::raw::c_uint;
1279pub type __time_t = ::std::os::raw::c_long;
1280pub type __useconds_t = ::std::os::raw::c_uint;
1281pub type __suseconds_t = ::std::os::raw::c_long;
1282pub type __suseconds64_t = ::std::os::raw::c_long;
1283pub type __daddr_t = ::std::os::raw::c_int;
1284pub type __key_t = ::std::os::raw::c_int;
1285pub type __clockid_t = ::std::os::raw::c_int;
1286pub type __timer_t = *mut ::std::os::raw::c_void;
1287pub type __blksize_t = ::std::os::raw::c_long;
1288pub type __blkcnt_t = ::std::os::raw::c_long;
1289pub type __blkcnt64_t = ::std::os::raw::c_long;
1290pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
1291pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
1292pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
1293pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
1294pub type __fsword_t = ::std::os::raw::c_long;
1295pub type __ssize_t = ::std::os::raw::c_long;
1296pub type __syscall_slong_t = ::std::os::raw::c_long;
1297pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
1298#[doc = " These few don't really vary by system, they always correspond\nto one of the other defined types."]
1299pub type __loff_t = __off64_t;
1300pub type __caddr_t = *mut ::std::os::raw::c_char;
1301pub type __intptr_t = ::std::os::raw::c_long;
1302pub type __socklen_t = ::std::os::raw::c_uint;
1303#[doc = " C99: An integer type that can be accessed as an atomic entity,\neven in the presence of asynchronous interrupts.\nIt is not currently necessary for this to be machine-specific."]
1304pub type __sig_atomic_t = ::std::os::raw::c_int;
1305#[doc = " Signed."]
1306pub type int_least8_t = __int_least8_t;
1307pub type int_least16_t = __int_least16_t;
1308pub type int_least32_t = __int_least32_t;
1309pub type int_least64_t = __int_least64_t;
1310#[doc = " Unsigned."]
1311pub type uint_least8_t = __uint_least8_t;
1312pub type uint_least16_t = __uint_least16_t;
1313pub type uint_least32_t = __uint_least32_t;
1314pub type uint_least64_t = __uint_least64_t;
1315#[doc = " Signed."]
1316pub type int_fast8_t = ::std::os::raw::c_schar;
1317pub type int_fast16_t = ::std::os::raw::c_long;
1318pub type int_fast32_t = ::std::os::raw::c_long;
1319pub type int_fast64_t = ::std::os::raw::c_long;
1320#[doc = " Unsigned."]
1321pub type uint_fast8_t = ::std::os::raw::c_uchar;
1322pub type uint_fast16_t = ::std::os::raw::c_ulong;
1323pub type uint_fast32_t = ::std::os::raw::c_ulong;
1324pub type uint_fast64_t = ::std::os::raw::c_ulong;
1325#[doc = " Largest integral types."]
1326pub type intmax_t = __intmax_t;
1327pub type uintmax_t = __uintmax_t;
1328#[repr(C)]
1329#[derive(Debug, Copy, Clone)]
1330pub struct FPDF_IMAGEOBJ_METADATA {
1331 #[doc = " The image width in pixels."]
1332 pub width: ::std::os::raw::c_uint,
1333 #[doc = " The image height in pixels."]
1334 pub height: ::std::os::raw::c_uint,
1335 #[doc = " The image's horizontal pixel-per-inch."]
1336 pub horizontal_dpi: f32,
1337 #[doc = " The image's vertical pixel-per-inch."]
1338 pub vertical_dpi: f32,
1339 #[doc = " The number of bits used to represent each pixel."]
1340 pub bits_per_pixel: ::std::os::raw::c_uint,
1341 #[doc = " The image's colorspace. See above for the list of FPDF_COLORSPACE_*."]
1342 pub colorspace: ::std::os::raw::c_int,
1343 #[doc = " The image's marked content ID. Useful for pairing with associated alt-text.\n A value of -1 indicates no ID."]
1344 pub marked_content_id: ::std::os::raw::c_int,
1345}
1346unsafe extern "C" {
1347 #[doc = " Create a new PDF document.\n\n Returns a handle to a new document, or NULL on failure."]
1348 pub fn FPDF_CreateNewDocument() -> FPDF_DOCUMENT;
1349}
1350unsafe extern "C" {
1351 #[doc = " Create a new PDF page.\n\n document - handle to document.\n page_index - suggested 0-based index of the page to create. If it is larger\n than document's current last index(L), the created page index\n is the next available index -- L+1.\n width - the page width in points.\n height - the page height in points.\n\n Returns the handle to the new page or NULL on failure.\n\n The page should be closed with FPDF_ClosePage() when finished as\n with any other page in the document."]
1352 pub fn FPDFPage_New(
1353 document: FPDF_DOCUMENT,
1354 page_index: ::std::os::raw::c_int,
1355 width: f64,
1356 height: f64,
1357 ) -> FPDF_PAGE;
1358}
1359unsafe extern "C" {
1360 #[doc = " Delete the page at |page_index|.\n\n document - handle to document.\n page_index - the index of the page to delete."]
1361 pub fn FPDFPage_Delete(document: FPDF_DOCUMENT, page_index: ::std::os::raw::c_int);
1362}
1363unsafe extern "C" {
1364 #[doc = " Experimental API.\n Move the given pages to a new index position.\n\n page_indices - the ordered list of pages to move. No duplicates allowed.\n page_indices_len - the number of elements in |page_indices|\n dest_page_index - the new index position to which the pages in\n |page_indices| are moved.\n\n Returns TRUE on success. If it returns FALSE, the document may be left in an\n indeterminate state.\n\n Example: The PDF document starts out with pages [A, B, C, D], with indices\n [0, 1, 2, 3].\n\n > Move(doc, [3, 2], 2, 1); // returns true\n > // The document has pages [A, D, C, B].\n >\n > Move(doc, [0, 4, 3], 3, 1); // returns false\n > // Returned false because index 4 is out of range.\n >\n > Move(doc, [0, 3, 1], 3, 2); // returns false\n > // Returned false because index 2 is out of range for 3 page indices.\n >\n > Move(doc, [2, 2], 2, 0); // returns false\n > // Returned false because [2, 2] contains duplicates.\n"]
1365 pub fn FPDF_MovePages(
1366 document: FPDF_DOCUMENT,
1367 page_indices: *const ::std::os::raw::c_int,
1368 page_indices_len: ::std::os::raw::c_ulong,
1369 dest_page_index: ::std::os::raw::c_int,
1370 ) -> FPDF_BOOL;
1371}
1372unsafe extern "C" {
1373 #[doc = " Get the rotation of |page|.\n\n page - handle to a page\n\n Returns one of the following indicating the page rotation:\n 0 - No rotation.\n 1 - Rotated 90 degrees clockwise.\n 2 - Rotated 180 degrees clockwise.\n 3 - Rotated 270 degrees clockwise."]
1374 pub fn FPDFPage_GetRotation(page: FPDF_PAGE) -> ::std::os::raw::c_int;
1375}
1376unsafe extern "C" {
1377 #[doc = " Set rotation for |page|.\n\n page - handle to a page.\n rotate - the rotation value, one of:\n 0 - No rotation.\n 1 - Rotated 90 degrees clockwise.\n 2 - Rotated 180 degrees clockwise.\n 3 - Rotated 270 degrees clockwise."]
1378 pub fn FPDFPage_SetRotation(page: FPDF_PAGE, rotate: ::std::os::raw::c_int);
1379}
1380unsafe extern "C" {
1381 #[doc = " Insert |page_object| into |page|.\n\n page - handle to a page\n page_object - handle to a page object. The |page_object| will be\n automatically freed."]
1382 pub fn FPDFPage_InsertObject(page: FPDF_PAGE, page_object: FPDF_PAGEOBJECT);
1383}
1384unsafe extern "C" {
1385 #[doc = " Insert |page_object| into |page| at the specified |index|.\n\n page - handle to a page\n page_object - handle to a page object as previously obtained by\n FPDFPageObj_CreateNew{Path|Rect}() or\n FPDFPageObj_New{Text|Image}Obj(). Ownership of the object\n is transferred back to PDFium.\n index - the index position to insert the object at. If index equals\n the current object count, the object will be appended to the\n end. If index is greater than the object count, the function\n will fail and return false.\n\n Returns true if successful."]
1386 pub fn FPDFPage_InsertObjectAtIndex(
1387 page: FPDF_PAGE,
1388 page_object: FPDF_PAGEOBJECT,
1389 index: usize,
1390 ) -> FPDF_BOOL;
1391}
1392unsafe extern "C" {
1393 #[doc = " Experimental API.\n Remove |page_object| from |page|.\n\n page - handle to a page\n page_object - handle to a page object to be removed.\n\n Returns TRUE on success.\n\n Ownership is transferred to the caller. Call FPDFPageObj_Destroy() to free\n it.\n Note that when removing a |page_object| of type FPDF_PAGEOBJ_TEXT, all\n FPDF_TEXTPAGE handles for |page| are no longer valid."]
1394 pub fn FPDFPage_RemoveObject(page: FPDF_PAGE, page_object: FPDF_PAGEOBJECT) -> FPDF_BOOL;
1395}
1396unsafe extern "C" {
1397 #[doc = " Get number of page objects inside |page|.\n\n page - handle to a page.\n\n Returns the number of objects in |page|."]
1398 pub fn FPDFPage_CountObjects(page: FPDF_PAGE) -> ::std::os::raw::c_int;
1399}
1400unsafe extern "C" {
1401 #[doc = " Get object in |page| at |index|.\n\n page - handle to a page.\n index - the index of a page object.\n\n Returns the handle to the page object, or NULL on failed."]
1402 pub fn FPDFPage_GetObject(page: FPDF_PAGE, index: ::std::os::raw::c_int) -> FPDF_PAGEOBJECT;
1403}
1404unsafe extern "C" {
1405 #[doc = " Checks if |page| contains transparency.\n\n page - handle to a page.\n\n Returns TRUE if |page| contains transparency."]
1406 pub fn FPDFPage_HasTransparency(page: FPDF_PAGE) -> FPDF_BOOL;
1407}
1408unsafe extern "C" {
1409 #[doc = " Generate the content of |page|.\n\n page - handle to a page.\n\n Returns TRUE on success.\n\n Before you save the page to a file, or reload the page, you must call\n |FPDFPage_GenerateContent| or any changes to |page| will be lost."]
1410 pub fn FPDFPage_GenerateContent(page: FPDF_PAGE) -> FPDF_BOOL;
1411}
1412unsafe extern "C" {
1413 #[doc = " Destroy |page_object| by releasing its resources. |page_object| must have\n been created by FPDFPageObj_CreateNew{Path|Rect}() or\n FPDFPageObj_New{Text|Image}Obj(). This function must be called on\n newly-created objects if they are not added to a page through\n FPDFPage_InsertObject() or to an annotation through FPDFAnnot_AppendObject().\n\n page_object - handle to a page object."]
1414 pub fn FPDFPageObj_Destroy(page_object: FPDF_PAGEOBJECT);
1415}
1416unsafe extern "C" {
1417 #[doc = " Checks if |page_object| contains transparency.\n\n page_object - handle to a page object.\n\n Returns TRUE if |page_object| contains transparency."]
1418 pub fn FPDFPageObj_HasTransparency(page_object: FPDF_PAGEOBJECT) -> FPDF_BOOL;
1419}
1420unsafe extern "C" {
1421 #[doc = " Get type of |page_object|.\n\n page_object - handle to a page object.\n\n Returns one of the FPDF_PAGEOBJ_* values on success, FPDF_PAGEOBJ_UNKNOWN on\n error."]
1422 pub fn FPDFPageObj_GetType(page_object: FPDF_PAGEOBJECT) -> ::std::os::raw::c_int;
1423}
1424unsafe extern "C" {
1425 #[doc = " Experimental API.\n Gets active state for |page_object| within page.\n\n page_object - handle to a page object.\n active - pointer to variable that will receive if the page object is\n active. This is a required parameter. Not filled if FALSE\n is returned.\n\n For page objects where |active| is filled with FALSE, the |page_object| is\n treated as if it wasn't in the document even though it is still held\n internally.\n\n Returns TRUE if the operation succeeded, FALSE if it failed."]
1426 pub fn FPDFPageObj_GetIsActive(
1427 page_object: FPDF_PAGEOBJECT,
1428 active: *mut FPDF_BOOL,
1429 ) -> FPDF_BOOL;
1430}
1431unsafe extern "C" {
1432 #[doc = " Experimental API.\n Sets if |page_object| is active within page.\n\n page_object - handle to a page object.\n active - a boolean specifying if the object is active.\n\n Returns TRUE on success.\n\n Page objects all start in the active state by default, and remain in that\n state unless this function is called.\n\n When |active| is false, this makes the |page_object| be treated as if it\n wasn't in the document even though it is still held internally."]
1433 pub fn FPDFPageObj_SetIsActive(page_object: FPDF_PAGEOBJECT, active: FPDF_BOOL) -> FPDF_BOOL;
1434}
1435unsafe extern "C" {
1436 #[doc = " Transform |page_object| by the given matrix.\n\n page_object - handle to a page object.\n a - matrix value.\n b - matrix value.\n c - matrix value.\n d - matrix value.\n e - matrix value.\n f - matrix value.\n\n The matrix is composed as:\n |a c e|\n |b d f|\n and can be used to scale, rotate, shear and translate the |page_object|."]
1437 pub fn FPDFPageObj_Transform(
1438 page_object: FPDF_PAGEOBJECT,
1439 a: f64,
1440 b: f64,
1441 c: f64,
1442 d: f64,
1443 e: f64,
1444 f: f64,
1445 );
1446}
1447unsafe extern "C" {
1448 #[doc = " Experimental API.\n Transform |page_object| by the given matrix.\n\n page_object - handle to a page object.\n matrix - the transform matrix.\n\n Returns TRUE on success.\n\n This can be used to scale, rotate, shear and translate the |page_object|.\n It is an improved version of FPDFPageObj_Transform() that does not do\n unnecessary double to float conversions, and only uses 1 parameter for the\n matrix. It also returns whether the operation succeeded or not."]
1449 pub fn FPDFPageObj_TransformF(
1450 page_object: FPDF_PAGEOBJECT,
1451 matrix: *const FS_MATRIX,
1452 ) -> FPDF_BOOL;
1453}
1454unsafe extern "C" {
1455 #[doc = " Experimental API.\n Get the transform matrix of a page object.\n\n page_object - handle to a page object.\n matrix - pointer to struct to receive the matrix value.\n\n The matrix is composed as:\n |a c e|\n |b d f|\n and used to scale, rotate, shear and translate the page object.\n\n For page objects outside form objects, the matrix values are relative to the\n page that contains it.\n For page objects inside form objects, the matrix values are relative to the\n form that contains it.\n\n Returns TRUE on success."]
1456 pub fn FPDFPageObj_GetMatrix(page_object: FPDF_PAGEOBJECT, matrix: *mut FS_MATRIX)
1457 -> FPDF_BOOL;
1458}
1459unsafe extern "C" {
1460 #[doc = " Experimental API.\n Set the transform matrix of a page object.\n\n page_object - handle to a page object.\n matrix - pointer to struct with the matrix value.\n\n The matrix is composed as:\n |a c e|\n |b d f|\n and can be used to scale, rotate, shear and translate the page object.\n\n Returns TRUE on success."]
1461 pub fn FPDFPageObj_SetMatrix(
1462 page_object: FPDF_PAGEOBJECT,
1463 matrix: *const FS_MATRIX,
1464 ) -> FPDF_BOOL;
1465}
1466unsafe extern "C" {
1467 #[doc = " Transform all annotations in |page|.\n\n page - handle to a page.\n a - matrix value.\n b - matrix value.\n c - matrix value.\n d - matrix value.\n e - matrix value.\n f - matrix value.\n\n The matrix is composed as:\n |a c e|\n |b d f|\n and can be used to scale, rotate, shear and translate the |page| annotations."]
1468 pub fn FPDFPage_TransformAnnots(
1469 page: FPDF_PAGE,
1470 a: f64,
1471 b: f64,
1472 c: f64,
1473 d: f64,
1474 e: f64,
1475 f: f64,
1476 );
1477}
1478unsafe extern "C" {
1479 #[doc = " Create a new image object.\n\n document - handle to a document.\n\n Returns a handle to a new image object."]
1480 pub fn FPDFPageObj_NewImageObj(document: FPDF_DOCUMENT) -> FPDF_PAGEOBJECT;
1481}
1482unsafe extern "C" {
1483 #[doc = " Experimental API.\n Get the marked content ID for the object.\n\n page_object - handle to a page object.\n\n Returns the page object's marked content ID, or -1 on error."]
1484 pub fn FPDFPageObj_GetMarkedContentID(page_object: FPDF_PAGEOBJECT) -> ::std::os::raw::c_int;
1485}
1486unsafe extern "C" {
1487 #[doc = " Experimental API.\n Get number of content marks in |page_object|.\n\n page_object - handle to a page object.\n\n Returns the number of content marks in |page_object|, or -1 in case of\n failure."]
1488 pub fn FPDFPageObj_CountMarks(page_object: FPDF_PAGEOBJECT) -> ::std::os::raw::c_int;
1489}
1490unsafe extern "C" {
1491 #[doc = " Experimental API.\n Get content mark in |page_object| at |index|.\n\n page_object - handle to a page object.\n index - the index of a page object.\n\n Returns the handle to the content mark, or NULL on failure. The handle is\n still owned by the library, and it should not be freed directly. It becomes\n invalid if the page object is destroyed, either directly or indirectly by\n unloading the page."]
1492 pub fn FPDFPageObj_GetMark(
1493 page_object: FPDF_PAGEOBJECT,
1494 index: ::std::os::raw::c_ulong,
1495 ) -> FPDF_PAGEOBJECTMARK;
1496}
1497unsafe extern "C" {
1498 #[doc = " Experimental API.\n Add a new content mark to a |page_object|.\n\n page_object - handle to a page object.\n name - the name (tag) of the mark.\n\n Returns the handle to the content mark, or NULL on failure. The handle is\n still owned by the library, and it should not be freed directly. It becomes\n invalid if the page object is destroyed, either directly or indirectly by\n unloading the page."]
1499 pub fn FPDFPageObj_AddMark(
1500 page_object: FPDF_PAGEOBJECT,
1501 name: FPDF_BYTESTRING,
1502 ) -> FPDF_PAGEOBJECTMARK;
1503}
1504unsafe extern "C" {
1505 #[doc = " Experimental API.\n Removes a content |mark| from a |page_object|.\n The mark handle will be invalid after the removal.\n\n page_object - handle to a page object.\n mark - handle to a content mark in that object to remove.\n\n Returns TRUE if the operation succeeded, FALSE if it failed."]
1506 pub fn FPDFPageObj_RemoveMark(
1507 page_object: FPDF_PAGEOBJECT,
1508 mark: FPDF_PAGEOBJECTMARK,
1509 ) -> FPDF_BOOL;
1510}
1511unsafe extern "C" {
1512 #[doc = " Experimental API.\n Get the name of a content mark.\n\n mark - handle to a content mark.\n buffer - buffer for holding the returned name in UTF-16LE. This is only\n modified if |buflen| is large enough to store the name.\n Optional, pass null to just retrieve the size of the buffer\n needed.\n buflen - length of the buffer in bytes.\n out_buflen - pointer to variable that will receive the minimum buffer size\n in bytes to contain the name. This is a required parameter.\n Not filled if FALSE is returned.\n\n Returns TRUE if the operation succeeded, FALSE if it failed."]
1513 pub fn FPDFPageObjMark_GetName(
1514 mark: FPDF_PAGEOBJECTMARK,
1515 buffer: *mut FPDF_WCHAR,
1516 buflen: ::std::os::raw::c_ulong,
1517 out_buflen: *mut ::std::os::raw::c_ulong,
1518 ) -> FPDF_BOOL;
1519}
1520unsafe extern "C" {
1521 #[doc = " Experimental API.\n Get the number of key/value pair parameters in |mark|.\n\n mark - handle to a content mark.\n\n Returns the number of key/value pair parameters |mark|, or -1 in case of\n failure."]
1522 pub fn FPDFPageObjMark_CountParams(mark: FPDF_PAGEOBJECTMARK) -> ::std::os::raw::c_int;
1523}
1524unsafe extern "C" {
1525 #[doc = " Experimental API.\n Get the key of a property in a content mark.\n\n mark - handle to a content mark.\n index - index of the property.\n buffer - buffer for holding the returned key in UTF-16LE. This is only\n modified if |buflen| is large enough to store the key.\n Optional, pass null to just retrieve the size of the buffer\n needed.\n buflen - length of the buffer in bytes.\n out_buflen - pointer to variable that will receive the minimum buffer size\n in bytes to contain the name. This is a required parameter.\n Not filled if FALSE is returned.\n\n Returns TRUE if the operation was successful, FALSE otherwise."]
1526 pub fn FPDFPageObjMark_GetParamKey(
1527 mark: FPDF_PAGEOBJECTMARK,
1528 index: ::std::os::raw::c_ulong,
1529 buffer: *mut FPDF_WCHAR,
1530 buflen: ::std::os::raw::c_ulong,
1531 out_buflen: *mut ::std::os::raw::c_ulong,
1532 ) -> FPDF_BOOL;
1533}
1534unsafe extern "C" {
1535 #[doc = " Experimental API.\n Get the type of the value of a property in a content mark by key.\n\n mark - handle to a content mark.\n key - string key of the property.\n\n Returns the type of the value, or FPDF_OBJECT_UNKNOWN in case of failure."]
1536 pub fn FPDFPageObjMark_GetParamValueType(
1537 mark: FPDF_PAGEOBJECTMARK,
1538 key: FPDF_BYTESTRING,
1539 ) -> FPDF_OBJECT_TYPE;
1540}
1541unsafe extern "C" {
1542 #[doc = " Experimental API.\n Get the value of a number property in a content mark by key as int.\n FPDFPageObjMark_GetParamValueType() should have returned FPDF_OBJECT_NUMBER\n for this property.\n\n mark - handle to a content mark.\n key - string key of the property.\n out_value - pointer to variable that will receive the value. Not filled if\n false is returned.\n\n Returns TRUE if the key maps to a number value, FALSE otherwise."]
1543 pub fn FPDFPageObjMark_GetParamIntValue(
1544 mark: FPDF_PAGEOBJECTMARK,
1545 key: FPDF_BYTESTRING,
1546 out_value: *mut ::std::os::raw::c_int,
1547 ) -> FPDF_BOOL;
1548}
1549unsafe extern "C" {
1550 #[doc = " Experimental API.\n Get the value of a number property in a content mark by key as float.\n FPDFPageObjMark_GetParamValueType() should have returned FPDF_OBJECT_NUMBER\n for this property.\n\n mark - handle to a content mark.\n key - string key of the property.\n out_value - pointer to variable that will receive the value. Not filled if\n false is returned.\n\n Returns TRUE if the key maps to a number value, FALSE otherwise."]
1551 pub fn FPDFPageObjMark_GetParamFloatValue(
1552 mark: FPDF_PAGEOBJECTMARK,
1553 key: FPDF_BYTESTRING,
1554 out_value: *mut f32,
1555 ) -> FPDF_BOOL;
1556}
1557unsafe extern "C" {
1558 #[doc = " Experimental API.\n Get the value of a string property in a content mark by key.\n\n mark - handle to a content mark.\n key - string key of the property.\n buffer - buffer for holding the returned value in UTF-16LE. This is\n only modified if |buflen| is large enough to store the value.\n Optional, pass null to just retrieve the size of the buffer\n needed.\n buflen - length of the buffer in bytes.\n out_buflen - pointer to variable that will receive the minimum buffer size\n in bytes to contain the name. This is a required parameter.\n Not filled if FALSE is returned.\n\n Returns TRUE if the key maps to a string/blob value, FALSE otherwise."]
1559 pub fn FPDFPageObjMark_GetParamStringValue(
1560 mark: FPDF_PAGEOBJECTMARK,
1561 key: FPDF_BYTESTRING,
1562 buffer: *mut FPDF_WCHAR,
1563 buflen: ::std::os::raw::c_ulong,
1564 out_buflen: *mut ::std::os::raw::c_ulong,
1565 ) -> FPDF_BOOL;
1566}
1567unsafe extern "C" {
1568 #[doc = " Experimental API.\n Get the value of a blob property in a content mark by key.\n\n mark - handle to a content mark.\n key - string key of the property.\n buffer - buffer for holding the returned value. This is only modified\n if |buflen| is large enough to store the value.\n Optional, pass null to just retrieve the size of the buffer\n needed.\n buflen - length of the buffer in bytes.\n out_buflen - pointer to variable that will receive the minimum buffer size\n in bytes to contain the name. This is a required parameter.\n Not filled if FALSE is returned.\n\n Returns TRUE if the key maps to a string/blob value, FALSE otherwise."]
1569 pub fn FPDFPageObjMark_GetParamBlobValue(
1570 mark: FPDF_PAGEOBJECTMARK,
1571 key: FPDF_BYTESTRING,
1572 buffer: *mut ::std::os::raw::c_uchar,
1573 buflen: ::std::os::raw::c_ulong,
1574 out_buflen: *mut ::std::os::raw::c_ulong,
1575 ) -> FPDF_BOOL;
1576}
1577unsafe extern "C" {
1578 #[doc = " Experimental API.\n Set the value of an int property in a content mark by key. If a parameter\n with key |key| exists, its value is set to |value|. Otherwise, it is added as\n a new parameter.\n\n document - handle to the document.\n page_object - handle to the page object with the mark.\n mark - handle to a content mark.\n key - string key of the property.\n value - int value to set.\n\n Returns TRUE if the operation succeeded, FALSE otherwise."]
1579 pub fn FPDFPageObjMark_SetIntParam(
1580 document: FPDF_DOCUMENT,
1581 page_object: FPDF_PAGEOBJECT,
1582 mark: FPDF_PAGEOBJECTMARK,
1583 key: FPDF_BYTESTRING,
1584 value: ::std::os::raw::c_int,
1585 ) -> FPDF_BOOL;
1586}
1587unsafe extern "C" {
1588 #[doc = " Experimental API.\n Set the value of a float property in a content mark by key. If a parameter\n with key |key| exists, its value is set to |value|. Otherwise, it is added as\n a new parameter.\n\n document - handle to the document.\n page_object - handle to the page object with the mark.\n mark - handle to a content mark.\n key - string key of the property.\n value - float value to set.\n\n Returns TRUE if the operation succeeded, FALSE otherwise."]
1589 pub fn FPDFPageObjMark_SetFloatParam(
1590 document: FPDF_DOCUMENT,
1591 page_object: FPDF_PAGEOBJECT,
1592 mark: FPDF_PAGEOBJECTMARK,
1593 key: FPDF_BYTESTRING,
1594 value: f32,
1595 ) -> FPDF_BOOL;
1596}
1597unsafe extern "C" {
1598 #[doc = " Experimental API.\n Set the value of a string property in a content mark by key. If a parameter\n with key |key| exists, its value is set to |value|. Otherwise, it is added as\n a new parameter.\n\n document - handle to the document.\n page_object - handle to the page object with the mark.\n mark - handle to a content mark.\n key - string key of the property.\n value - string value to set.\n\n Returns TRUE if the operation succeeded, FALSE otherwise."]
1599 pub fn FPDFPageObjMark_SetStringParam(
1600 document: FPDF_DOCUMENT,
1601 page_object: FPDF_PAGEOBJECT,
1602 mark: FPDF_PAGEOBJECTMARK,
1603 key: FPDF_BYTESTRING,
1604 value: FPDF_BYTESTRING,
1605 ) -> FPDF_BOOL;
1606}
1607unsafe extern "C" {
1608 #[doc = " Experimental API.\n Set the value of a blob property in a content mark by key. If a parameter\n with key |key| exists, its value is set to |value|. Otherwise, it is added as\n a new parameter.\n\n document - handle to the document.\n page_object - handle to the page object with the mark.\n mark - handle to a content mark.\n key - string key of the property.\n value - pointer to blob value to set.\n value_len - size in bytes of |value|.\n\n Returns TRUE if the operation succeeded, FALSE otherwise."]
1609 pub fn FPDFPageObjMark_SetBlobParam(
1610 document: FPDF_DOCUMENT,
1611 page_object: FPDF_PAGEOBJECT,
1612 mark: FPDF_PAGEOBJECTMARK,
1613 key: FPDF_BYTESTRING,
1614 value: *const ::std::os::raw::c_uchar,
1615 value_len: ::std::os::raw::c_ulong,
1616 ) -> FPDF_BOOL;
1617}
1618unsafe extern "C" {
1619 #[doc = " Experimental API.\n Removes a property from a content mark by key.\n\n page_object - handle to the page object with the mark.\n mark - handle to a content mark.\n key - string key of the property.\n\n Returns TRUE if the operation succeeded, FALSE otherwise."]
1620 pub fn FPDFPageObjMark_RemoveParam(
1621 page_object: FPDF_PAGEOBJECT,
1622 mark: FPDF_PAGEOBJECTMARK,
1623 key: FPDF_BYTESTRING,
1624 ) -> FPDF_BOOL;
1625}
1626unsafe extern "C" {
1627 #[doc = " Load an image from a JPEG image file and then set it into |image_object|.\n\n pages - pointer to the start of all loaded pages, may be NULL.\n count - number of |pages|, may be 0.\n image_object - handle to an image object.\n file_access - file access handler which specifies the JPEG image file.\n\n Returns TRUE on success.\n\n The image object might already have an associated image, which is shared and\n cached by the loaded pages. In that case, we need to clear the cached image\n for all the loaded pages. Pass |pages| and page count (|count|) to this API\n to clear the image cache. If the image is not previously shared, or NULL is a\n valid |pages| value."]
1628 pub fn FPDFImageObj_LoadJpegFile(
1629 pages: *mut FPDF_PAGE,
1630 count: ::std::os::raw::c_int,
1631 image_object: FPDF_PAGEOBJECT,
1632 file_access: *mut FPDF_FILEACCESS,
1633 ) -> FPDF_BOOL;
1634}
1635unsafe extern "C" {
1636 #[doc = " Load an image from a JPEG image file and then set it into |image_object|.\n\n pages - pointer to the start of all loaded pages, may be NULL.\n count - number of |pages|, may be 0.\n image_object - handle to an image object.\n file_access - file access handler which specifies the JPEG image file.\n\n Returns TRUE on success.\n\n The image object might already have an associated image, which is shared and\n cached by the loaded pages. In that case, we need to clear the cached image\n for all the loaded pages. Pass |pages| and page count (|count|) to this API\n to clear the image cache. If the image is not previously shared, or NULL is a\n valid |pages| value. This function loads the JPEG image inline, so the image\n content is copied to the file. This allows |file_access| and its associated\n data to be deleted after this function returns."]
1637 pub fn FPDFImageObj_LoadJpegFileInline(
1638 pages: *mut FPDF_PAGE,
1639 count: ::std::os::raw::c_int,
1640 image_object: FPDF_PAGEOBJECT,
1641 file_access: *mut FPDF_FILEACCESS,
1642 ) -> FPDF_BOOL;
1643}
1644unsafe extern "C" {
1645 #[doc = " TODO(thestig): Start deprecating this once FPDFPageObj_SetMatrix() is stable.\n\n Set the transform matrix of |image_object|.\n\n image_object - handle to an image object.\n a - matrix value.\n b - matrix value.\n c - matrix value.\n d - matrix value.\n e - matrix value.\n f - matrix value.\n\n The matrix is composed as:\n |a c e|\n |b d f|\n and can be used to scale, rotate, shear and translate the |image_object|.\n\n Returns TRUE on success."]
1646 pub fn FPDFImageObj_SetMatrix(
1647 image_object: FPDF_PAGEOBJECT,
1648 a: f64,
1649 b: f64,
1650 c: f64,
1651 d: f64,
1652 e: f64,
1653 f: f64,
1654 ) -> FPDF_BOOL;
1655}
1656unsafe extern "C" {
1657 #[doc = " Set |bitmap| to |image_object|.\n\n pages - pointer to the start of all loaded pages, may be NULL.\n count - number of |pages|, may be 0.\n image_object - handle to an image object.\n bitmap - handle of the bitmap.\n\n Returns TRUE on success."]
1658 pub fn FPDFImageObj_SetBitmap(
1659 pages: *mut FPDF_PAGE,
1660 count: ::std::os::raw::c_int,
1661 image_object: FPDF_PAGEOBJECT,
1662 bitmap: FPDF_BITMAP,
1663 ) -> FPDF_BOOL;
1664}
1665unsafe extern "C" {
1666 #[doc = " Get a bitmap rasterization of |image_object|. FPDFImageObj_GetBitmap() only\n operates on |image_object| and does not take the associated image mask into\n account. It also ignores the matrix for |image_object|.\n The returned bitmap will be owned by the caller, and FPDFBitmap_Destroy()\n must be called on the returned bitmap when it is no longer needed.\n\n image_object - handle to an image object.\n\n Returns the bitmap."]
1667 pub fn FPDFImageObj_GetBitmap(image_object: FPDF_PAGEOBJECT) -> FPDF_BITMAP;
1668}
1669unsafe extern "C" {
1670 #[doc = " Experimental API.\n Get a bitmap rasterization of |image_object| that takes the image mask and\n image matrix into account. To render correctly, the caller must provide the\n |document| associated with |image_object|. If there is a |page| associated\n with |image_object|, the caller should provide that as well.\n The returned bitmap will be owned by the caller, and FPDFBitmap_Destroy()\n must be called on the returned bitmap when it is no longer needed.\n\n document - handle to a document associated with |image_object|.\n page - handle to an optional page associated with |image_object|.\n image_object - handle to an image object.\n\n Returns the bitmap or NULL on failure."]
1671 pub fn FPDFImageObj_GetRenderedBitmap(
1672 document: FPDF_DOCUMENT,
1673 page: FPDF_PAGE,
1674 image_object: FPDF_PAGEOBJECT,
1675 ) -> FPDF_BITMAP;
1676}
1677unsafe extern "C" {
1678 #[doc = " Get the decoded image data of |image_object|. The decoded data is the\n uncompressed image data, i.e. the raw image data after having all filters\n applied. |buffer| is only modified if |buflen| is longer than the length of\n the decoded image data.\n\n image_object - handle to an image object.\n buffer - buffer for holding the decoded image data.\n buflen - length of the buffer in bytes.\n\n Returns the length of the decoded image data."]
1679 pub fn FPDFImageObj_GetImageDataDecoded(
1680 image_object: FPDF_PAGEOBJECT,
1681 buffer: *mut ::std::os::raw::c_void,
1682 buflen: ::std::os::raw::c_ulong,
1683 ) -> ::std::os::raw::c_ulong;
1684}
1685unsafe extern "C" {
1686 #[doc = " Get the raw image data of |image_object|. The raw data is the image data as\n stored in the PDF without applying any filters. |buffer| is only modified if\n |buflen| is longer than the length of the raw image data.\n\n image_object - handle to an image object.\n buffer - buffer for holding the raw image data.\n buflen - length of the buffer in bytes.\n\n Returns the length of the raw image data."]
1687 pub fn FPDFImageObj_GetImageDataRaw(
1688 image_object: FPDF_PAGEOBJECT,
1689 buffer: *mut ::std::os::raw::c_void,
1690 buflen: ::std::os::raw::c_ulong,
1691 ) -> ::std::os::raw::c_ulong;
1692}
1693unsafe extern "C" {
1694 #[doc = " Get the number of filters (i.e. decoders) of the image in |image_object|.\n\n image_object - handle to an image object.\n\n Returns the number of |image_object|'s filters."]
1695 pub fn FPDFImageObj_GetImageFilterCount(image_object: FPDF_PAGEOBJECT)
1696 -> ::std::os::raw::c_int;
1697}
1698unsafe extern "C" {
1699 #[doc = " Get the filter at |index| of |image_object|'s list of filters. Note that the\n filters need to be applied in order, i.e. the first filter should be applied\n first, then the second, etc. |buffer| is only modified if |buflen| is longer\n than the length of the filter string.\n\n image_object - handle to an image object.\n index - the index of the filter requested.\n buffer - buffer for holding filter string, encoded in UTF-8.\n buflen - length of the buffer.\n\n Returns the length of the filter string."]
1700 pub fn FPDFImageObj_GetImageFilter(
1701 image_object: FPDF_PAGEOBJECT,
1702 index: ::std::os::raw::c_int,
1703 buffer: *mut ::std::os::raw::c_void,
1704 buflen: ::std::os::raw::c_ulong,
1705 ) -> ::std::os::raw::c_ulong;
1706}
1707unsafe extern "C" {
1708 #[doc = " Get the image metadata of |image_object|, including dimension, DPI, bits per\n pixel, and colorspace. If the |image_object| is not an image object or if it\n does not have an image, then the return value will be false. Otherwise,\n failure to retrieve any specific parameter would result in its value being 0.\n\n image_object - handle to an image object.\n page - handle to the page that |image_object| is on. Required for\n retrieving the image's bits per pixel and colorspace.\n metadata - receives the image metadata; must not be NULL.\n\n Returns true if successful."]
1709 pub fn FPDFImageObj_GetImageMetadata(
1710 image_object: FPDF_PAGEOBJECT,
1711 page: FPDF_PAGE,
1712 metadata: *mut FPDF_IMAGEOBJ_METADATA,
1713 ) -> FPDF_BOOL;
1714}
1715unsafe extern "C" {
1716 #[doc = " Experimental API.\n Get the image size in pixels. Faster method to get only image size.\n\n image_object - handle to an image object.\n width - receives the image width in pixels; must not be NULL.\n height - receives the image height in pixels; must not be NULL.\n\n Returns true if successful."]
1717 pub fn FPDFImageObj_GetImagePixelSize(
1718 image_object: FPDF_PAGEOBJECT,
1719 width: *mut ::std::os::raw::c_uint,
1720 height: *mut ::std::os::raw::c_uint,
1721 ) -> FPDF_BOOL;
1722}
1723unsafe extern "C" {
1724 #[doc = " Experimental API.\n Get ICC profile decoded data of |image_object|. If the |image_object| is not\n an image object or if it does not have an image, then the return value will\n be false. It also returns false if the |image_object| has no ICC profile.\n |buffer| is only modified if ICC profile exists and |buflen| is longer than\n the length of the ICC profile decoded data.\n\n image_object - handle to an image object; must not be NULL.\n page - handle to the page containing |image_object|; must not be\n NULL. Required for retrieving the image's colorspace.\n buffer - Buffer to receive ICC profile data; may be NULL if querying\n required size via |out_buflen|.\n buflen - Length of the buffer in bytes. Ignored if |buffer| is NULL.\n out_buflen - Pointer to receive the ICC profile data size in bytes; must\n not be NULL. Will be set if this API returns true.\n\n Returns true if |out_buflen| is not null and an ICC profile exists for the\n given |image_object|."]
1725 pub fn FPDFImageObj_GetIccProfileDataDecoded(
1726 image_object: FPDF_PAGEOBJECT,
1727 page: FPDF_PAGE,
1728 buffer: *mut u8,
1729 buflen: usize,
1730 out_buflen: *mut usize,
1731 ) -> FPDF_BOOL;
1732}
1733unsafe extern "C" {
1734 #[doc = " Create a new path object at an initial position.\n\n x - initial horizontal position.\n y - initial vertical position.\n\n Returns a handle to a new path object."]
1735 pub fn FPDFPageObj_CreateNewPath(x: f32, y: f32) -> FPDF_PAGEOBJECT;
1736}
1737unsafe extern "C" {
1738 #[doc = " Create a closed path consisting of a rectangle.\n\n x - horizontal position for the left boundary of the rectangle.\n y - vertical position for the bottom boundary of the rectangle.\n w - width of the rectangle.\n h - height of the rectangle.\n\n Returns a handle to the new path object."]
1739 pub fn FPDFPageObj_CreateNewRect(x: f32, y: f32, w: f32, h: f32) -> FPDF_PAGEOBJECT;
1740}
1741unsafe extern "C" {
1742 #[doc = " Get the bounding box of |page_object|.\n\n page_object - handle to a page object.\n left - pointer where the left coordinate will be stored\n bottom - pointer where the bottom coordinate will be stored\n right - pointer where the right coordinate will be stored\n top - pointer where the top coordinate will be stored\n\n On success, returns TRUE and fills in the 4 coordinates."]
1743 pub fn FPDFPageObj_GetBounds(
1744 page_object: FPDF_PAGEOBJECT,
1745 left: *mut f32,
1746 bottom: *mut f32,
1747 right: *mut f32,
1748 top: *mut f32,
1749 ) -> FPDF_BOOL;
1750}
1751unsafe extern "C" {
1752 #[doc = " Experimental API.\n Get the quad points that bounds |page_object|.\n\n page_object - handle to a page object.\n quad_points - pointer where the quadrilateral points will be stored.\n\n On success, returns TRUE and fills in |quad_points|.\n\n Similar to FPDFPageObj_GetBounds(), this returns the bounds of a page\n object. When the object is rotated by a non-multiple of 90 degrees, this API\n returns a tighter bound that cannot be represented with just the 4 sides of\n a rectangle.\n\n Currently only works the following |page_object| types: FPDF_PAGEOBJ_TEXT and\n FPDF_PAGEOBJ_IMAGE."]
1753 pub fn FPDFPageObj_GetRotatedBounds(
1754 page_object: FPDF_PAGEOBJECT,
1755 quad_points: *mut FS_QUADPOINTSF,
1756 ) -> FPDF_BOOL;
1757}
1758unsafe extern "C" {
1759 #[doc = " Set the blend mode of |page_object|.\n\n page_object - handle to a page object.\n blend_mode - string containing the blend mode.\n\n Blend mode can be one of following: Color, ColorBurn, ColorDodge, Darken,\n Difference, Exclusion, HardLight, Hue, Lighten, Luminosity, Multiply, Normal,\n Overlay, Saturation, Screen, SoftLight"]
1760 pub fn FPDFPageObj_SetBlendMode(page_object: FPDF_PAGEOBJECT, blend_mode: FPDF_BYTESTRING);
1761}
1762unsafe extern "C" {
1763 #[doc = " Set the stroke RGBA of a page object. Range of values: 0 - 255.\n\n page_object - the handle to the page object.\n R - the red component for the object's stroke color.\n G - the green component for the object's stroke color.\n B - the blue component for the object's stroke color.\n A - the stroke alpha for the object.\n\n Returns TRUE on success."]
1764 pub fn FPDFPageObj_SetStrokeColor(
1765 page_object: FPDF_PAGEOBJECT,
1766 R: ::std::os::raw::c_uint,
1767 G: ::std::os::raw::c_uint,
1768 B: ::std::os::raw::c_uint,
1769 A: ::std::os::raw::c_uint,
1770 ) -> FPDF_BOOL;
1771}
1772unsafe extern "C" {
1773 #[doc = " Get the stroke RGBA of a page object. Range of values: 0 - 255.\n\n page_object - the handle to the page object.\n R - the red component of the path stroke color.\n G - the green component of the object's stroke color.\n B - the blue component of the object's stroke color.\n A - the stroke alpha of the object.\n\n Returns TRUE on success."]
1774 pub fn FPDFPageObj_GetStrokeColor(
1775 page_object: FPDF_PAGEOBJECT,
1776 R: *mut ::std::os::raw::c_uint,
1777 G: *mut ::std::os::raw::c_uint,
1778 B: *mut ::std::os::raw::c_uint,
1779 A: *mut ::std::os::raw::c_uint,
1780 ) -> FPDF_BOOL;
1781}
1782unsafe extern "C" {
1783 #[doc = " Set the stroke width of a page object.\n\n path - the handle to the page object.\n width - the width of the stroke.\n\n Returns TRUE on success"]
1784 pub fn FPDFPageObj_SetStrokeWidth(page_object: FPDF_PAGEOBJECT, width: f32) -> FPDF_BOOL;
1785}
1786unsafe extern "C" {
1787 #[doc = " Get the stroke width of a page object.\n\n path - the handle to the page object.\n width - the width of the stroke.\n\n Returns TRUE on success"]
1788 pub fn FPDFPageObj_GetStrokeWidth(page_object: FPDF_PAGEOBJECT, width: *mut f32) -> FPDF_BOOL;
1789}
1790unsafe extern "C" {
1791 #[doc = " Get the line join of |page_object|.\n\n page_object - handle to a page object.\n\n Returns the line join, or -1 on failure.\n Line join can be one of following: FPDF_LINEJOIN_MITER, FPDF_LINEJOIN_ROUND,\n FPDF_LINEJOIN_BEVEL"]
1792 pub fn FPDFPageObj_GetLineJoin(page_object: FPDF_PAGEOBJECT) -> ::std::os::raw::c_int;
1793}
1794unsafe extern "C" {
1795 #[doc = " Set the line join of |page_object|.\n\n page_object - handle to a page object.\n line_join - line join\n\n Line join can be one of following: FPDF_LINEJOIN_MITER, FPDF_LINEJOIN_ROUND,\n FPDF_LINEJOIN_BEVEL"]
1796 pub fn FPDFPageObj_SetLineJoin(
1797 page_object: FPDF_PAGEOBJECT,
1798 line_join: ::std::os::raw::c_int,
1799 ) -> FPDF_BOOL;
1800}
1801unsafe extern "C" {
1802 #[doc = " Get the line cap of |page_object|.\n\n page_object - handle to a page object.\n\n Returns the line cap, or -1 on failure.\n Line cap can be one of following: FPDF_LINECAP_BUTT, FPDF_LINECAP_ROUND,\n FPDF_LINECAP_PROJECTING_SQUARE"]
1803 pub fn FPDFPageObj_GetLineCap(page_object: FPDF_PAGEOBJECT) -> ::std::os::raw::c_int;
1804}
1805unsafe extern "C" {
1806 #[doc = " Set the line cap of |page_object|.\n\n page_object - handle to a page object.\n line_cap - line cap\n\n Line cap can be one of following: FPDF_LINECAP_BUTT, FPDF_LINECAP_ROUND,\n FPDF_LINECAP_PROJECTING_SQUARE"]
1807 pub fn FPDFPageObj_SetLineCap(
1808 page_object: FPDF_PAGEOBJECT,
1809 line_cap: ::std::os::raw::c_int,
1810 ) -> FPDF_BOOL;
1811}
1812unsafe extern "C" {
1813 #[doc = " Set the fill RGBA of a page object. Range of values: 0 - 255.\n\n page_object - the handle to the page object.\n R - the red component for the object's fill color.\n G - the green component for the object's fill color.\n B - the blue component for the object's fill color.\n A - the fill alpha for the object.\n\n Returns TRUE on success."]
1814 pub fn FPDFPageObj_SetFillColor(
1815 page_object: FPDF_PAGEOBJECT,
1816 R: ::std::os::raw::c_uint,
1817 G: ::std::os::raw::c_uint,
1818 B: ::std::os::raw::c_uint,
1819 A: ::std::os::raw::c_uint,
1820 ) -> FPDF_BOOL;
1821}
1822unsafe extern "C" {
1823 #[doc = " Get the fill RGBA of a page object. Range of values: 0 - 255.\n\n page_object - the handle to the page object.\n R - the red component of the object's fill color.\n G - the green component of the object's fill color.\n B - the blue component of the object's fill color.\n A - the fill alpha of the object.\n\n Returns TRUE on success."]
1824 pub fn FPDFPageObj_GetFillColor(
1825 page_object: FPDF_PAGEOBJECT,
1826 R: *mut ::std::os::raw::c_uint,
1827 G: *mut ::std::os::raw::c_uint,
1828 B: *mut ::std::os::raw::c_uint,
1829 A: *mut ::std::os::raw::c_uint,
1830 ) -> FPDF_BOOL;
1831}
1832unsafe extern "C" {
1833 #[doc = " Experimental API.\n Get the line dash |phase| of |page_object|.\n\n page_object - handle to a page object.\n phase - pointer where the dashing phase will be stored.\n\n Returns TRUE on success."]
1834 pub fn FPDFPageObj_GetDashPhase(page_object: FPDF_PAGEOBJECT, phase: *mut f32) -> FPDF_BOOL;
1835}
1836unsafe extern "C" {
1837 #[doc = " Experimental API.\n Set the line dash phase of |page_object|.\n\n page_object - handle to a page object.\n phase - line dash phase.\n\n Returns TRUE on success."]
1838 pub fn FPDFPageObj_SetDashPhase(page_object: FPDF_PAGEOBJECT, phase: f32) -> FPDF_BOOL;
1839}
1840unsafe extern "C" {
1841 #[doc = " Experimental API.\n Get the line dash array of |page_object|.\n\n page_object - handle to a page object.\n\n Returns the line dash array size or -1 on failure."]
1842 pub fn FPDFPageObj_GetDashCount(page_object: FPDF_PAGEOBJECT) -> ::std::os::raw::c_int;
1843}
1844unsafe extern "C" {
1845 #[doc = " Experimental API.\n Get the line dash array of |page_object|.\n\n page_object - handle to a page object.\n dash_array - pointer where the dashing array will be stored.\n dash_count - number of elements in |dash_array|.\n\n Returns TRUE on success."]
1846 pub fn FPDFPageObj_GetDashArray(
1847 page_object: FPDF_PAGEOBJECT,
1848 dash_array: *mut f32,
1849 dash_count: usize,
1850 ) -> FPDF_BOOL;
1851}
1852unsafe extern "C" {
1853 #[doc = " Experimental API.\n Set the line dash array of |page_object|.\n\n page_object - handle to a page object.\n dash_array - the dash array.\n dash_count - number of elements in |dash_array|.\n phase - the line dash phase.\n\n Returns TRUE on success."]
1854 pub fn FPDFPageObj_SetDashArray(
1855 page_object: FPDF_PAGEOBJECT,
1856 dash_array: *const f32,
1857 dash_count: usize,
1858 phase: f32,
1859 ) -> FPDF_BOOL;
1860}
1861unsafe extern "C" {
1862 #[doc = " Get number of segments inside |path|.\n\n path - handle to a path.\n\n A segment is a command, created by e.g. FPDFPath_MoveTo(),\n FPDFPath_LineTo() or FPDFPath_BezierTo().\n\n Returns the number of objects in |path| or -1 on failure."]
1863 pub fn FPDFPath_CountSegments(path: FPDF_PAGEOBJECT) -> ::std::os::raw::c_int;
1864}
1865unsafe extern "C" {
1866 #[doc = " Get segment in |path| at |index|.\n\n path - handle to a path.\n index - the index of a segment.\n\n Returns the handle to the segment, or NULL on faiure."]
1867 pub fn FPDFPath_GetPathSegment(
1868 path: FPDF_PAGEOBJECT,
1869 index: ::std::os::raw::c_int,
1870 ) -> FPDF_PATHSEGMENT;
1871}
1872unsafe extern "C" {
1873 #[doc = " Get coordinates of |segment|.\n\n segment - handle to a segment.\n x - the horizontal position of the segment.\n y - the vertical position of the segment.\n\n Returns TRUE on success, otherwise |x| and |y| is not set."]
1874 pub fn FPDFPathSegment_GetPoint(
1875 segment: FPDF_PATHSEGMENT,
1876 x: *mut f32,
1877 y: *mut f32,
1878 ) -> FPDF_BOOL;
1879}
1880unsafe extern "C" {
1881 #[doc = " Get type of |segment|.\n\n segment - handle to a segment.\n\n Returns one of the FPDF_SEGMENT_* values on success,\n FPDF_SEGMENT_UNKNOWN on error."]
1882 pub fn FPDFPathSegment_GetType(segment: FPDF_PATHSEGMENT) -> ::std::os::raw::c_int;
1883}
1884unsafe extern "C" {
1885 #[doc = " Gets if the |segment| closes the current subpath of a given path.\n\n segment - handle to a segment.\n\n Returns close flag for non-NULL segment, FALSE otherwise."]
1886 pub fn FPDFPathSegment_GetClose(segment: FPDF_PATHSEGMENT) -> FPDF_BOOL;
1887}
1888unsafe extern "C" {
1889 #[doc = " Move a path's current point.\n\n path - the handle to the path object.\n x - the horizontal position of the new current point.\n y - the vertical position of the new current point.\n\n Note that no line will be created between the previous current point and the\n new one.\n\n Returns TRUE on success"]
1890 pub fn FPDFPath_MoveTo(path: FPDF_PAGEOBJECT, x: f32, y: f32) -> FPDF_BOOL;
1891}
1892unsafe extern "C" {
1893 #[doc = " Add a line between the current point and a new point in the path.\n\n path - the handle to the path object.\n x - the horizontal position of the new point.\n y - the vertical position of the new point.\n\n The path's current point is changed to (x, y).\n\n Returns TRUE on success"]
1894 pub fn FPDFPath_LineTo(path: FPDF_PAGEOBJECT, x: f32, y: f32) -> FPDF_BOOL;
1895}
1896unsafe extern "C" {
1897 #[doc = " Add a cubic Bezier curve to the given path, starting at the current point.\n\n path - the handle to the path object.\n x1 - the horizontal position of the first Bezier control point.\n y1 - the vertical position of the first Bezier control point.\n x2 - the horizontal position of the second Bezier control point.\n y2 - the vertical position of the second Bezier control point.\n x3 - the horizontal position of the ending point of the Bezier curve.\n y3 - the vertical position of the ending point of the Bezier curve.\n\n Returns TRUE on success"]
1898 pub fn FPDFPath_BezierTo(
1899 path: FPDF_PAGEOBJECT,
1900 x1: f32,
1901 y1: f32,
1902 x2: f32,
1903 y2: f32,
1904 x3: f32,
1905 y3: f32,
1906 ) -> FPDF_BOOL;
1907}
1908unsafe extern "C" {
1909 #[doc = " Close the current subpath of a given path.\n\n path - the handle to the path object.\n\n This will add a line between the current point and the initial point of the\n subpath, thus terminating the current subpath.\n\n Returns TRUE on success"]
1910 pub fn FPDFPath_Close(path: FPDF_PAGEOBJECT) -> FPDF_BOOL;
1911}
1912unsafe extern "C" {
1913 #[doc = " Set the drawing mode of a path.\n\n path - the handle to the path object.\n fillmode - the filling mode to be set: one of the FPDF_FILLMODE_* flags.\n stroke - a boolean specifying if the path should be stroked or not.\n\n Returns TRUE on success"]
1914 pub fn FPDFPath_SetDrawMode(
1915 path: FPDF_PAGEOBJECT,
1916 fillmode: ::std::os::raw::c_int,
1917 stroke: FPDF_BOOL,
1918 ) -> FPDF_BOOL;
1919}
1920unsafe extern "C" {
1921 #[doc = " Get the drawing mode of a path.\n\n path - the handle to the path object.\n fillmode - the filling mode of the path: one of the FPDF_FILLMODE_* flags.\n stroke - a boolean specifying if the path is stroked or not.\n\n Returns TRUE on success"]
1922 pub fn FPDFPath_GetDrawMode(
1923 path: FPDF_PAGEOBJECT,
1924 fillmode: *mut ::std::os::raw::c_int,
1925 stroke: *mut FPDF_BOOL,
1926 ) -> FPDF_BOOL;
1927}
1928unsafe extern "C" {
1929 #[doc = " Create a new text object using one of the standard PDF fonts.\n\n document - handle to the document.\n font - string containing the font name, without spaces.\n font_size - the font size for the new text object.\n\n Returns a handle to a new text object, or NULL on failure"]
1930 pub fn FPDFPageObj_NewTextObj(
1931 document: FPDF_DOCUMENT,
1932 font: FPDF_BYTESTRING,
1933 font_size: f32,
1934 ) -> FPDF_PAGEOBJECT;
1935}
1936unsafe extern "C" {
1937 #[doc = " Set the text for a text object. If it had text, it will be replaced.\n\n text_object - handle to the text object.\n text - the UTF-16LE encoded string containing the text to be added.\n\n Returns TRUE on success"]
1938 pub fn FPDFText_SetText(text_object: FPDF_PAGEOBJECT, text: FPDF_WIDESTRING) -> FPDF_BOOL;
1939}
1940unsafe extern "C" {
1941 #[doc = " Experimental API.\n Set the text using charcodes for a text object. If it had text, it will be\n replaced.\n\n text_object - handle to the text object.\n charcodes - pointer to an array of charcodes to be added.\n count - number of elements in |charcodes|.\n\n Returns TRUE on success"]
1942 pub fn FPDFText_SetCharcodes(
1943 text_object: FPDF_PAGEOBJECT,
1944 charcodes: *const u32,
1945 count: usize,
1946 ) -> FPDF_BOOL;
1947}
1948unsafe extern "C" {
1949 #[doc = " Returns a font object loaded from a stream of data. The font is loaded\n into the document. Various font data structures, such as the ToUnicode data,\n are auto-generated based on the inputs.\n\n document - handle to the document.\n data - the stream of font data, which will be copied by the font object.\n size - the size of the font data, in bytes.\n font_type - FPDF_FONT_TYPE1 or FPDF_FONT_TRUETYPE depending on the font type.\n cid - a boolean specifying if the font is a CID font or not.\n\n The loaded font can be closed using FPDFFont_Close().\n\n Returns NULL on failure"]
1950 pub fn FPDFText_LoadFont(
1951 document: FPDF_DOCUMENT,
1952 data: *const u8,
1953 size: u32,
1954 font_type: ::std::os::raw::c_int,
1955 cid: FPDF_BOOL,
1956 ) -> FPDF_FONT;
1957}
1958unsafe extern "C" {
1959 #[doc = " Experimental API.\n Loads one of the standard 14 fonts per PDF spec 1.7 page 416. The preferred\n way of using font style is using a dash to separate the name from the style,\n for example 'Helvetica-BoldItalic'.\n\n document - handle to the document.\n font - string containing the font name, without spaces.\n\n The loaded font can be closed using FPDFFont_Close().\n\n Returns NULL on failure."]
1960 pub fn FPDFText_LoadStandardFont(document: FPDF_DOCUMENT, font: FPDF_BYTESTRING) -> FPDF_FONT;
1961}
1962unsafe extern "C" {
1963 #[doc = " Experimental API.\n Returns a font object loaded from a stream of data for a type 2 CID font. The\n font is loaded into the document. Unlike FPDFText_LoadFont(), the ToUnicode\n data and the CIDToGIDMap data are caller provided, instead of auto-generated.\n\n document - handle to the document.\n font_data - the stream of font data, which will be copied by\n the font object.\n font_data_size - the size of the font data, in bytes.\n to_unicode_cmap - the ToUnicode data.\n cid_to_gid_map_data - the stream of CIDToGIDMap data.\n cid_to_gid_map_data_size - the size of the CIDToGIDMap data, in bytes.\n\n The loaded font can be closed using FPDFFont_Close().\n\n Returns NULL on failure."]
1964 pub fn FPDFText_LoadCidType2Font(
1965 document: FPDF_DOCUMENT,
1966 font_data: *const u8,
1967 font_data_size: u32,
1968 to_unicode_cmap: FPDF_BYTESTRING,
1969 cid_to_gid_map_data: *const u8,
1970 cid_to_gid_map_data_size: u32,
1971 ) -> FPDF_FONT;
1972}
1973unsafe extern "C" {
1974 #[doc = " Get the font size of a text object.\n\n text - handle to a text.\n size - pointer to the font size of the text object, measured in points\n (about 1/72 inch)\n\n Returns TRUE on success."]
1975 pub fn FPDFTextObj_GetFontSize(text: FPDF_PAGEOBJECT, size: *mut f32) -> FPDF_BOOL;
1976}
1977unsafe extern "C" {
1978 #[doc = " Close a loaded PDF font.\n\n font - Handle to the loaded font."]
1979 pub fn FPDFFont_Close(font: FPDF_FONT);
1980}
1981unsafe extern "C" {
1982 #[doc = " Create a new text object using a loaded font.\n\n document - handle to the document.\n font - handle to the font object.\n font_size - the font size for the new text object.\n\n Returns a handle to a new text object, or NULL on failure"]
1983 pub fn FPDFPageObj_CreateTextObj(
1984 document: FPDF_DOCUMENT,
1985 font: FPDF_FONT,
1986 font_size: f32,
1987 ) -> FPDF_PAGEOBJECT;
1988}
1989unsafe extern "C" {
1990 #[doc = " Get the text rendering mode of a text object.\n\n text - the handle to the text object.\n\n Returns one of the known FPDF_TEXT_RENDERMODE enum values on success,\n FPDF_TEXTRENDERMODE_UNKNOWN on error."]
1991 pub fn FPDFTextObj_GetTextRenderMode(text: FPDF_PAGEOBJECT) -> FPDF_TEXT_RENDERMODE;
1992}
1993unsafe extern "C" {
1994 #[doc = " Experimental API.\n Set the text rendering mode of a text object.\n\n text - the handle to the text object.\n render_mode - the FPDF_TEXT_RENDERMODE enum value to be set (cannot set to\n FPDF_TEXTRENDERMODE_UNKNOWN).\n\n Returns TRUE on success."]
1995 pub fn FPDFTextObj_SetTextRenderMode(
1996 text: FPDF_PAGEOBJECT,
1997 render_mode: FPDF_TEXT_RENDERMODE,
1998 ) -> FPDF_BOOL;
1999}
2000unsafe extern "C" {
2001 #[doc = " Get the text of a text object.\n\n text_object - the handle to the text object.\n text_page - the handle to the text page.\n buffer - the address of a buffer that receives the text.\n length - the size, in bytes, of |buffer|.\n\n Returns the number of bytes in the text (including the trailing NUL\n character) on success, 0 on error.\n\n Regardless of the platform, the |buffer| is always in UTF-16LE encoding.\n If |length| is less than the returned length, or |buffer| is NULL, |buffer|\n will not be modified."]
2002 pub fn FPDFTextObj_GetText(
2003 text_object: FPDF_PAGEOBJECT,
2004 text_page: FPDF_TEXTPAGE,
2005 buffer: *mut FPDF_WCHAR,
2006 length: ::std::os::raw::c_ulong,
2007 ) -> ::std::os::raw::c_ulong;
2008}
2009unsafe extern "C" {
2010 #[doc = " Experimental API.\n Get a bitmap rasterization of |text_object|. To render correctly, the caller\n must provide the |document| associated with |text_object|. If there is a\n |page| associated with |text_object|, the caller should provide that as well.\n The returned bitmap will be owned by the caller, and FPDFBitmap_Destroy()\n must be called on the returned bitmap when it is no longer needed.\n\n document - handle to a document associated with |text_object|.\n page - handle to an optional page associated with |text_object|.\n text_object - handle to a text object.\n scale - the scaling factor, which must be greater than 0.\n\n Returns the bitmap or NULL on failure."]
2011 pub fn FPDFTextObj_GetRenderedBitmap(
2012 document: FPDF_DOCUMENT,
2013 page: FPDF_PAGE,
2014 text_object: FPDF_PAGEOBJECT,
2015 scale: f32,
2016 ) -> FPDF_BITMAP;
2017}
2018unsafe extern "C" {
2019 #[doc = " Experimental API.\n Get the font of a text object.\n\n text - the handle to the text object.\n\n Returns a handle to the font object held by |text| which retains ownership."]
2020 pub fn FPDFTextObj_GetFont(text: FPDF_PAGEOBJECT) -> FPDF_FONT;
2021}
2022unsafe extern "C" {
2023 #[doc = " Experimental API.\n Get the base name of a font.\n\n font - the handle to the font object.\n buffer - the address of a buffer that receives the base font name.\n length - the size, in bytes, of |buffer|.\n\n Returns the number of bytes in the base name (including the trailing NUL\n character) on success, 0 on error. The base name is typically the font's\n PostScript name. See descriptions of \"BaseFont\" in ISO 32000-1:2008 spec.\n\n Regardless of the platform, the |buffer| is always in UTF-8 encoding.\n If |length| is less than the returned length, or |buffer| is NULL, |buffer|\n will not be modified."]
2024 pub fn FPDFFont_GetBaseFontName(
2025 font: FPDF_FONT,
2026 buffer: *mut ::std::os::raw::c_char,
2027 length: usize,
2028 ) -> usize;
2029}
2030unsafe extern "C" {
2031 #[doc = " Experimental API.\n Get the family name of a font.\n\n font - the handle to the font object.\n buffer - the address of a buffer that receives the font name.\n length - the size, in bytes, of |buffer|.\n\n Returns the number of bytes in the family name (including the trailing NUL\n character) on success, 0 on error.\n\n Regardless of the platform, the |buffer| is always in UTF-8 encoding.\n If |length| is less than the returned length, or |buffer| is NULL, |buffer|\n will not be modified."]
2032 pub fn FPDFFont_GetFamilyName(
2033 font: FPDF_FONT,
2034 buffer: *mut ::std::os::raw::c_char,
2035 length: usize,
2036 ) -> usize;
2037}
2038unsafe extern "C" {
2039 #[doc = " Experimental API.\n Get the decoded data from the |font| object.\n\n font - The handle to the font object. (Required)\n buffer - The address of a buffer that receives the font data.\n buflen - Length of the buffer.\n out_buflen - Pointer to variable that will receive the minimum buffer size\n to contain the font data. Not filled if the return value is\n FALSE. (Required)\n\n Returns TRUE on success. In which case, |out_buflen| will be filled, and\n |buffer| will be filled if it is large enough. Returns FALSE if any of the\n required parameters are null.\n\n The decoded data is the uncompressed font data. i.e. the raw font data after\n having all stream filters applied, when the data is embedded.\n\n If the font is not embedded, then this API will instead return the data for\n the substitution font it is using."]
2040 pub fn FPDFFont_GetFontData(
2041 font: FPDF_FONT,
2042 buffer: *mut u8,
2043 buflen: usize,
2044 out_buflen: *mut usize,
2045 ) -> FPDF_BOOL;
2046}
2047unsafe extern "C" {
2048 #[doc = " Experimental API.\n Get whether |font| is embedded or not.\n\n font - the handle to the font object.\n\n Returns 1 if the font is embedded, 0 if it not, and -1 on failure."]
2049 pub fn FPDFFont_GetIsEmbedded(font: FPDF_FONT) -> ::std::os::raw::c_int;
2050}
2051unsafe extern "C" {
2052 #[doc = " Experimental API.\n Get the descriptor flags of a font.\n\n font - the handle to the font object.\n\n Returns the bit flags specifying various characteristics of the font as\n defined in ISO 32000-1:2008, table 123, -1 on failure."]
2053 pub fn FPDFFont_GetFlags(font: FPDF_FONT) -> ::std::os::raw::c_int;
2054}
2055unsafe extern "C" {
2056 #[doc = " Experimental API.\n Get the font weight of a font.\n\n font - the handle to the font object.\n\n Returns the font weight, -1 on failure.\n Typical values are 400 (normal) and 700 (bold)."]
2057 pub fn FPDFFont_GetWeight(font: FPDF_FONT) -> ::std::os::raw::c_int;
2058}
2059unsafe extern "C" {
2060 #[doc = " Experimental API.\n Get the italic angle of a font.\n\n font - the handle to the font object.\n angle - pointer where the italic angle will be stored\n\n The italic angle of a |font| is defined as degrees counterclockwise\n from vertical. For a font that slopes to the right, this will be negative.\n\n Returns TRUE on success; |angle| unmodified on failure."]
2061 pub fn FPDFFont_GetItalicAngle(font: FPDF_FONT, angle: *mut ::std::os::raw::c_int)
2062 -> FPDF_BOOL;
2063}
2064unsafe extern "C" {
2065 #[doc = " Experimental API.\n Get ascent distance of a font.\n\n font - the handle to the font object.\n font_size - the size of the |font|.\n ascent - pointer where the font ascent will be stored\n\n Ascent is the maximum distance in points above the baseline reached by the\n glyphs of the |font|. One point is 1/72 inch (around 0.3528 mm).\n\n Returns TRUE on success; |ascent| unmodified on failure."]
2066 pub fn FPDFFont_GetAscent(font: FPDF_FONT, font_size: f32, ascent: *mut f32) -> FPDF_BOOL;
2067}
2068unsafe extern "C" {
2069 #[doc = " Experimental API.\n Get descent distance of a font.\n\n font - the handle to the font object.\n font_size - the size of the |font|.\n descent - pointer where the font descent will be stored\n\n Descent is the maximum distance in points below the baseline reached by the\n glyphs of the |font|. One point is 1/72 inch (around 0.3528 mm).\n\n Returns TRUE on success; |descent| unmodified on failure."]
2070 pub fn FPDFFont_GetDescent(font: FPDF_FONT, font_size: f32, descent: *mut f32) -> FPDF_BOOL;
2071}
2072unsafe extern "C" {
2073 #[doc = " Experimental API.\n Get the width of a glyph in a font.\n\n font - the handle to the font object.\n glyph - the glyph.\n font_size - the size of the font.\n width - pointer where the glyph width will be stored\n\n Glyph width is the distance from the end of the prior glyph to the next\n glyph. This will be the vertical distance for vertical writing.\n\n Returns TRUE on success; |width| unmodified on failure."]
2074 pub fn FPDFFont_GetGlyphWidth(
2075 font: FPDF_FONT,
2076 glyph: u32,
2077 font_size: f32,
2078 width: *mut f32,
2079 ) -> FPDF_BOOL;
2080}
2081unsafe extern "C" {
2082 #[doc = " Experimental API.\n Get the glyphpath describing how to draw a font glyph.\n\n font - the handle to the font object.\n glyph - the glyph being drawn.\n font_size - the size of the font.\n\n Returns the handle to the segment, or NULL on faiure."]
2083 pub fn FPDFFont_GetGlyphPath(font: FPDF_FONT, glyph: u32, font_size: f32) -> FPDF_GLYPHPATH;
2084}
2085unsafe extern "C" {
2086 #[doc = " Experimental API.\n Get number of segments inside glyphpath.\n\n glyphpath - handle to a glyph path.\n\n Returns the number of objects in |glyphpath| or -1 on failure."]
2087 pub fn FPDFGlyphPath_CountGlyphSegments(glyphpath: FPDF_GLYPHPATH) -> ::std::os::raw::c_int;
2088}
2089unsafe extern "C" {
2090 #[doc = " Experimental API.\n Get segment in glyphpath at index.\n\n glyphpath - handle to a glyph path.\n index - the index of a segment.\n\n Returns the handle to the segment, or NULL on faiure."]
2091 pub fn FPDFGlyphPath_GetGlyphPathSegment(
2092 glyphpath: FPDF_GLYPHPATH,
2093 index: ::std::os::raw::c_int,
2094 ) -> FPDF_PATHSEGMENT;
2095}
2096unsafe extern "C" {
2097 #[doc = " Get number of page objects inside |form_object|.\n\n form_object - handle to a form object.\n\n Returns the number of objects in |form_object| on success, -1 on error."]
2098 pub fn FPDFFormObj_CountObjects(form_object: FPDF_PAGEOBJECT) -> ::std::os::raw::c_int;
2099}
2100unsafe extern "C" {
2101 #[doc = " Get page object in |form_object| at |index|.\n\n form_object - handle to a form object.\n index - the 0-based index of a page object.\n\n Returns the handle to the page object, or NULL on error."]
2102 pub fn FPDFFormObj_GetObject(
2103 form_object: FPDF_PAGEOBJECT,
2104 index: ::std::os::raw::c_ulong,
2105 ) -> FPDF_PAGEOBJECT;
2106}
2107unsafe extern "C" {
2108 #[doc = " Experimental API.\n\n Remove |page_object| from |form_object|.\n\n form_object - handle to a form object.\n page_object - handle to a page object to be removed from the form.\n\n Returns TRUE on success.\n\n Ownership of the removed |page_object| is transferred to the caller.\n Call FPDFPageObj_Destroy() on the removed page_object to free it."]
2109 pub fn FPDFFormObj_RemoveObject(
2110 form_object: FPDF_PAGEOBJECT,
2111 page_object: FPDF_PAGEOBJECT,
2112 ) -> FPDF_BOOL;
2113}
2114#[doc = " Interface: FPDF_SYSFONTINFO\n Interface for getting system font information and font mapping"]
2115#[repr(C)]
2116#[derive(Debug, Copy, Clone)]
2117pub struct _FPDF_SYSFONTINFO {
2118 #[doc = " Version number of the interface. Currently must be 1 or 2.\n Version 1: Traditional behavior - calls EnumFonts during initialization.\n Version 2: Per-request behavior - skips EnumFonts, relies on MapFont.\n Experimental: Subject to change based on feedback."]
2119 pub version: ::std::os::raw::c_int,
2120 #[doc = " Method: Release\n Give implementation a chance to release any data after the\n interface is no longer used.\n Interface Version:\n 1 and 2\n Implementation Required:\n No\n Parameters:\n pThis - Pointer to the interface structure itself\n Return Value:\n None\n Comments:\n Called by PDFium during the final cleanup process."]
2121 pub Release: ::std::option::Option<unsafe extern "C" fn(pThis: *mut _FPDF_SYSFONTINFO)>,
2122 #[doc = " Method: EnumFonts\n Enumerate all fonts installed on the system\n Interface Version:\n 1\n Implementation Required:\n No\n Parameters:\n pThis - Pointer to the interface structure itself\n pMapper - An opaque pointer to internal font mapper, used\n when calling FPDF_AddInstalledFont().\n Return Value:\n None\n Comments:\n Implementations should call FPDF_AddInstalledFont() function for\n each font found. Only TrueType/OpenType and Type1 fonts are\n accepted by PDFium.\n NOTE: This method will not be called when version is set to 2.\n Version 2 relies entirely on MapFont() for per-request matching."]
2123 pub EnumFonts: ::std::option::Option<
2124 unsafe extern "C" fn(pThis: *mut _FPDF_SYSFONTINFO, pMapper: *mut ::std::os::raw::c_void),
2125 >,
2126 #[doc = " Method: MapFont\n Use the system font mapper to get a font handle from requested\n parameters.\n Interface Version:\n 1 and 2\n Implementation Required:\n Required if GetFont method is not implemented.\n Parameters:\n pThis - Pointer to the interface structure itself\n weight - Weight of the requested font. 400 is normal and\n 700 is bold.\n bItalic - Italic option of the requested font, TRUE or\n FALSE.\n charset - Character set identifier for the requested font.\n See above defined constants.\n pitch_family - A combination of flags. See above defined\n constants.\n face - Typeface name. Currently use system local encoding\n only.\n bExact - Obsolete: this parameter is now ignored.\n Return Value:\n An opaque pointer for font handle, or NULL if system mapping is\n not supported.\n Comments:\n If the system supports native font mapper (like Windows),\n implementation can implement this method to get a font handle.\n Otherwise, PDFium will do the mapping and then call GetFont\n method. Only TrueType/OpenType and Type1 fonts are accepted\n by PDFium."]
2127 pub MapFont: ::std::option::Option<
2128 unsafe extern "C" fn(
2129 pThis: *mut _FPDF_SYSFONTINFO,
2130 weight: ::std::os::raw::c_int,
2131 bItalic: FPDF_BOOL,
2132 charset: ::std::os::raw::c_int,
2133 pitch_family: ::std::os::raw::c_int,
2134 face: *const ::std::os::raw::c_char,
2135 bExact: *mut FPDF_BOOL,
2136 ) -> *mut ::std::os::raw::c_void,
2137 >,
2138 #[doc = " Method: GetFont\n Get a handle to a particular font by its internal ID\n Interface Version:\n 1 and 2\n Implementation Required:\n Required if MapFont method is not implemented.\n Return Value:\n An opaque pointer for font handle.\n Parameters:\n pThis - Pointer to the interface structure itself\n face - Typeface name in system local encoding.\n Comments:\n If the system mapping not supported, PDFium will do the font\n mapping and use this method to get a font handle."]
2139 pub GetFont: ::std::option::Option<
2140 unsafe extern "C" fn(
2141 pThis: *mut _FPDF_SYSFONTINFO,
2142 face: *const ::std::os::raw::c_char,
2143 ) -> *mut ::std::os::raw::c_void,
2144 >,
2145 #[doc = " Method: GetFontData\n Get font data from a font\n Interface Version:\n 1 and 2\n Implementation Required:\n Yes\n Parameters:\n pThis - Pointer to the interface structure itself\n hFont - Font handle returned by MapFont or GetFont method\n table - TrueType/OpenType table identifier (refer to\n TrueType specification), or 0 for the whole file.\n buffer - The buffer receiving the font data. Can be NULL if\n not provided.\n buf_size - Buffer size, can be zero if not provided.\n Return Value:\n Number of bytes needed, if buffer not provided or not large\n enough, or number of bytes written into buffer otherwise.\n Comments:\n Can read either the full font file, or a particular\n TrueType/OpenType table."]
2146 pub GetFontData: ::std::option::Option<
2147 unsafe extern "C" fn(
2148 pThis: *mut _FPDF_SYSFONTINFO,
2149 hFont: *mut ::std::os::raw::c_void,
2150 table: ::std::os::raw::c_uint,
2151 buffer: *mut ::std::os::raw::c_uchar,
2152 buf_size: ::std::os::raw::c_ulong,
2153 ) -> ::std::os::raw::c_ulong,
2154 >,
2155 #[doc = " Method: GetFaceName\n Get face name from a font handle\n Interface Version:\n 1 and 2\n Implementation Required:\n No\n Parameters:\n pThis - Pointer to the interface structure itself\n hFont - Font handle returned by MapFont or GetFont method\n buffer - The buffer receiving the face name. Can be NULL if\n not provided\n buf_size - Buffer size, can be zero if not provided\n Return Value:\n Number of bytes needed, if buffer not provided or not large\n enough, or number of bytes written into buffer otherwise."]
2156 pub GetFaceName: ::std::option::Option<
2157 unsafe extern "C" fn(
2158 pThis: *mut _FPDF_SYSFONTINFO,
2159 hFont: *mut ::std::os::raw::c_void,
2160 buffer: *mut ::std::os::raw::c_char,
2161 buf_size: ::std::os::raw::c_ulong,
2162 ) -> ::std::os::raw::c_ulong,
2163 >,
2164 #[doc = " Method: GetFontCharset\n Get character set information for a font handle\n Interface Version:\n 1 and 2\n Implementation Required:\n No\n Parameters:\n pThis - Pointer to the interface structure itself\n hFont - Font handle returned by MapFont or GetFont method\n Return Value:\n Character set identifier. See defined constants above."]
2165 pub GetFontCharset: ::std::option::Option<
2166 unsafe extern "C" fn(
2167 pThis: *mut _FPDF_SYSFONTINFO,
2168 hFont: *mut ::std::os::raw::c_void,
2169 ) -> ::std::os::raw::c_int,
2170 >,
2171 #[doc = " Method: DeleteFont\n Delete a font handle\n Interface Version:\n 1 and 2\n Implementation Required:\n Yes\n Parameters:\n pThis - Pointer to the interface structure itself\n hFont - Font handle returned by MapFont or GetFont method\n Return Value:\n None"]
2172 pub DeleteFont: ::std::option::Option<
2173 unsafe extern "C" fn(pThis: *mut _FPDF_SYSFONTINFO, hFont: *mut ::std::os::raw::c_void),
2174 >,
2175}
2176#[doc = " Interface: FPDF_SYSFONTINFO\n Interface for getting system font information and font mapping"]
2177pub type FPDF_SYSFONTINFO = _FPDF_SYSFONTINFO;
2178#[doc = " Struct: FPDF_CharsetFontMap\n Provides the name of a font to use for a given charset value."]
2179#[repr(C)]
2180#[derive(Debug, Copy, Clone)]
2181pub struct FPDF_CharsetFontMap_ {
2182 #[doc = " Character Set Enum value, see FXFONT_*_CHARSET above."]
2183 pub charset: ::std::os::raw::c_int,
2184 #[doc = " Name of default font to use with that charset."]
2185 pub fontname: *const ::std::os::raw::c_char,
2186}
2187#[doc = " Struct: FPDF_CharsetFontMap\n Provides the name of a font to use for a given charset value."]
2188pub type FPDF_CharsetFontMap = FPDF_CharsetFontMap_;
2189unsafe extern "C" {
2190 #[doc = " Function: FPDF_GetDefaultTTFMap\n Returns a pointer to the default character set to TT Font name map. The\n map is an array of FPDF_CharsetFontMap structs, with its end indicated\n by a { -1, NULL } entry.\n Parameters:\n None.\n Return Value:\n Pointer to the Charset Font Map.\n Note:\n Once FPDF_GetDefaultTTFMapCount() and FPDF_GetDefaultTTFMapEntry() are no\n longer experimental, this API will be marked as deprecated.\n See https://crbug.com/348468114"]
2191 pub fn FPDF_GetDefaultTTFMap() -> *const FPDF_CharsetFontMap;
2192}
2193unsafe extern "C" {
2194 #[doc = " Experimental API.\n\n Function: FPDF_GetDefaultTTFMapCount\n Returns the number of entries in the default character set to TT Font name\n map.\n Parameters:\n None.\n Return Value:\n The number of entries in the map."]
2195 pub fn FPDF_GetDefaultTTFMapCount() -> usize;
2196}
2197unsafe extern "C" {
2198 #[doc = " Experimental API.\n\n Function: FPDF_GetDefaultTTFMapEntry\n Returns an entry in the default character set to TT Font name map.\n Parameters:\n index - The index to the entry in the map to retrieve.\n Return Value:\n A pointer to the entry, if it is in the map, or NULL if the index is out\n of bounds."]
2199 pub fn FPDF_GetDefaultTTFMapEntry(index: usize) -> *const FPDF_CharsetFontMap;
2200}
2201unsafe extern "C" {
2202 #[doc = " Function: FPDF_AddInstalledFont\n Add a system font to the list in PDFium.\n Comments:\n This function is only called during the system font list building\n process.\n Parameters:\n mapper - Opaque pointer to Foxit font mapper\n face - The font face name\n charset - Font character set. See above defined constants.\n Return Value:\n None."]
2203 pub fn FPDF_AddInstalledFont(
2204 mapper: *mut ::std::os::raw::c_void,
2205 face: *const ::std::os::raw::c_char,
2206 charset: ::std::os::raw::c_int,
2207 );
2208}
2209unsafe extern "C" {
2210 #[doc = " Function: FPDF_SetSystemFontInfo\n Set the system font info interface into PDFium\n Parameters:\n font_info - Pointer to a FPDF_SYSFONTINFO structure\n Return Value:\n None\n Comments:\n Platform support implementation should implement required methods of\n FFDF_SYSFONTINFO interface, then call this function during PDFium\n initialization process.\n\n Call this with NULL to tell PDFium to stop using a previously set\n |FPDF_SYSFONTINFO|."]
2211 pub fn FPDF_SetSystemFontInfo(font_info: *mut FPDF_SYSFONTINFO);
2212}
2213unsafe extern "C" {
2214 #[doc = " Function: FPDF_GetDefaultSystemFontInfo\n Get default system font info interface for current platform\n Parameters:\n None\n Return Value:\n Pointer to a FPDF_SYSFONTINFO structure describing the default\n interface, or NULL if the platform doesn't have a default interface.\n Application should call FPDF_FreeDefaultSystemFontInfo to free the\n returned pointer.\n Comments:\n For some platforms, PDFium implements a default version of system\n font info interface. The default implementation can be passed to\n FPDF_SetSystemFontInfo()."]
2215 pub fn FPDF_GetDefaultSystemFontInfo() -> *mut FPDF_SYSFONTINFO;
2216}
2217unsafe extern "C" {
2218 #[doc = " Function: FPDF_FreeDefaultSystemFontInfo\n Free a default system font info interface\n Parameters:\n font_info - Pointer to a FPDF_SYSFONTINFO structure\n Return Value:\n None\n Comments:\n This function should be called on the output from\n FPDF_GetDefaultSystemFontInfo() once it is no longer needed."]
2219 pub fn FPDF_FreeDefaultSystemFontInfo(font_info: *mut FPDF_SYSFONTINFO);
2220}
2221#[doc = " Returned by `clock'."]
2222pub type clock_t = __clock_t;
2223pub type time_t = __time_t;
2224#[doc = " ISO C `broken-down time' structure."]
2225#[repr(C)]
2226#[derive(Debug, Copy, Clone)]
2227pub struct tm {
2228 #[doc = " Seconds.\t[0-60] (1 leap second)"]
2229 pub tm_sec: ::std::os::raw::c_int,
2230 #[doc = " Minutes.\t[0-59]"]
2231 pub tm_min: ::std::os::raw::c_int,
2232 #[doc = " Hours.\t[0-23]"]
2233 pub tm_hour: ::std::os::raw::c_int,
2234 #[doc = " Day.\t\t[1-31]"]
2235 pub tm_mday: ::std::os::raw::c_int,
2236 #[doc = " Month.\t[0-11]"]
2237 pub tm_mon: ::std::os::raw::c_int,
2238 #[doc = " Year\t- 1900."]
2239 pub tm_year: ::std::os::raw::c_int,
2240 #[doc = " Day of week.\t[0-6]"]
2241 pub tm_wday: ::std::os::raw::c_int,
2242 #[doc = " Days in year.[0-365]"]
2243 pub tm_yday: ::std::os::raw::c_int,
2244 #[doc = " DST.\t\t[-1/0/1]"]
2245 pub tm_isdst: ::std::os::raw::c_int,
2246 #[doc = " Seconds east of UTC."]
2247 pub tm_gmtoff: ::std::os::raw::c_long,
2248 #[doc = " Timezone abbreviation."]
2249 pub tm_zone: *const ::std::os::raw::c_char,
2250}
2251#[doc = " POSIX.1b structure for a time value. This is like a `struct timeval' but\nhas nanoseconds instead of microseconds."]
2252#[repr(C)]
2253#[derive(Debug, Copy, Clone)]
2254pub struct timespec {
2255 #[doc = " Seconds."]
2256 pub tv_sec: __time_t,
2257 #[doc = " Nanoseconds."]
2258 pub tv_nsec: __syscall_slong_t,
2259}
2260#[doc = " Clock ID used in clock and timer functions."]
2261pub type clockid_t = __clockid_t;
2262#[doc = " Timer ID returned by `timer_create'."]
2263pub type timer_t = __timer_t;
2264#[doc = " POSIX.1b structure for timer start values and intervals."]
2265#[repr(C)]
2266#[derive(Debug, Copy, Clone)]
2267pub struct itimerspec {
2268 pub it_interval: timespec,
2269 pub it_value: timespec,
2270}
2271#[repr(C)]
2272#[derive(Debug, Copy, Clone)]
2273pub struct sigevent {
2274 _unused: [u8; 0],
2275}
2276pub type pid_t = __pid_t;
2277#[doc = " POSIX.1-2008: the locale_t type, representing a locale context\n(implementation-namespace version). This type should be treated\nas opaque by applications; some details are exposed for the sake of\nefficiency in e.g. ctype functions."]
2278#[repr(C)]
2279#[derive(Debug, Copy, Clone)]
2280pub struct __locale_struct {
2281 #[doc = " 13 = __LC_LAST."]
2282 pub __locales: [*mut __locale_data; 13usize],
2283 #[doc = " To increase the speed of this solution we add some special members."]
2284 pub __ctype_b: *const ::std::os::raw::c_ushort,
2285 pub __ctype_tolower: *const ::std::os::raw::c_int,
2286 pub __ctype_toupper: *const ::std::os::raw::c_int,
2287 #[doc = " Note: LC_ALL is not a valid index into this array."]
2288 pub __names: [*const ::std::os::raw::c_char; 13usize],
2289}
2290pub type __locale_t = *mut __locale_struct;
2291pub type locale_t = __locale_t;
2292unsafe extern "C" {
2293 #[doc = " Time used by the program so far (user time + system time).\nThe result / CLOCKS_PER_SEC is program time in seconds."]
2294 pub fn clock() -> clock_t;
2295}
2296unsafe extern "C" {
2297 #[doc = " Return the current time and put it in *TIMER if TIMER is not NULL."]
2298 pub fn time(__timer: *mut time_t) -> time_t;
2299}
2300unsafe extern "C" {
2301 #[doc = " Return the difference between TIME1 and TIME0."]
2302 pub fn difftime(__time1: time_t, __time0: time_t) -> f64;
2303}
2304unsafe extern "C" {
2305 #[doc = " Return the `time_t' representation of TP and normalize TP."]
2306 pub fn mktime(__tp: *mut tm) -> time_t;
2307}
2308unsafe extern "C" {
2309 #[doc = " Format TP into S according to FORMAT.\nWrite no more than MAXSIZE characters and return the number\nof characters written, or 0 if it would exceed MAXSIZE."]
2310 pub fn strftime(
2311 __s: *mut ::std::os::raw::c_char,
2312 __maxsize: usize,
2313 __format: *const ::std::os::raw::c_char,
2314 __tp: *const tm,
2315 ) -> usize;
2316}
2317unsafe extern "C" {
2318 #[doc = " Similar to the two functions above but take the information from\nthe provided locale and not the global locale."]
2319 pub fn strftime_l(
2320 __s: *mut ::std::os::raw::c_char,
2321 __maxsize: usize,
2322 __format: *const ::std::os::raw::c_char,
2323 __tp: *const tm,
2324 __loc: locale_t,
2325 ) -> usize;
2326}
2327unsafe extern "C" {
2328 #[doc = " Return the `struct tm' representation of *TIMER\nin Universal Coordinated Time (aka Greenwich Mean Time)."]
2329 pub fn gmtime(__timer: *const time_t) -> *mut tm;
2330}
2331unsafe extern "C" {
2332 #[doc = " Return the `struct tm' representation\nof *TIMER in the local timezone."]
2333 pub fn localtime(__timer: *const time_t) -> *mut tm;
2334}
2335unsafe extern "C" {
2336 #[doc = " Return the `struct tm' representation of *TIMER in UTC,\nusing *TP to store the result."]
2337 pub fn gmtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
2338}
2339unsafe extern "C" {
2340 #[doc = " Return the `struct tm' representation of *TIMER in local time,\nusing *TP to store the result."]
2341 pub fn localtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
2342}
2343unsafe extern "C" {
2344 #[doc = " Return a string of the form \"Day Mon dd hh:mm:ss yyyy\\n\"\nthat is the representation of TP in this format."]
2345 pub fn asctime(__tp: *const tm) -> *mut ::std::os::raw::c_char;
2346}
2347unsafe extern "C" {
2348 pub fn ctime(__timer: *const time_t) -> *mut ::std::os::raw::c_char;
2349}
2350unsafe extern "C" {
2351 #[doc = " Return in BUF a string of the form \"Day Mon dd hh:mm:ss yyyy\\n\"\nthat is the representation of TP in this format."]
2352 pub fn asctime_r(
2353 __tp: *const tm,
2354 __buf: *mut ::std::os::raw::c_char,
2355 ) -> *mut ::std::os::raw::c_char;
2356}
2357unsafe extern "C" {
2358 pub fn ctime_r(
2359 __timer: *const time_t,
2360 __buf: *mut ::std::os::raw::c_char,
2361 ) -> *mut ::std::os::raw::c_char;
2362}
2363unsafe extern "C" {
2364 #[doc = " Current time zone abbreviations."]
2365 pub static mut __tzname: [*mut ::std::os::raw::c_char; 2usize];
2366}
2367unsafe extern "C" {
2368 #[doc = " If daylight-saving time is ever in use."]
2369 pub static mut __daylight: ::std::os::raw::c_int;
2370}
2371unsafe extern "C" {
2372 #[doc = " Seconds west of UTC."]
2373 pub static mut __timezone: ::std::os::raw::c_long;
2374}
2375unsafe extern "C" {
2376 #[doc = " Same as above."]
2377 pub static mut tzname: [*mut ::std::os::raw::c_char; 2usize];
2378}
2379unsafe extern "C" {
2380 #[doc = " Set time conversion information from the TZ environment variable.\nIf TZ is not defined, a locale-dependent default is used."]
2381 pub fn tzset();
2382}
2383unsafe extern "C" {
2384 pub static mut daylight: ::std::os::raw::c_int;
2385}
2386unsafe extern "C" {
2387 pub static mut timezone: ::std::os::raw::c_long;
2388}
2389unsafe extern "C" {
2390 #[doc = " Like `mktime', but for TP represents Universal Time, not local time."]
2391 pub fn timegm(__tp: *mut tm) -> time_t;
2392}
2393unsafe extern "C" {
2394 #[doc = " Another name for `mktime'."]
2395 pub fn timelocal(__tp: *mut tm) -> time_t;
2396}
2397unsafe extern "C" {
2398 #[doc = " Return the number of days in YEAR."]
2399 pub fn dysize(__year: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
2400}
2401unsafe extern "C" {
2402 #[doc = " Pause execution for a number of nanoseconds.\n\nThis function is a cancellation point and therefore not marked with\n__THROW."]
2403 pub fn nanosleep(
2404 __requested_time: *const timespec,
2405 __remaining: *mut timespec,
2406 ) -> ::std::os::raw::c_int;
2407}
2408unsafe extern "C" {
2409 #[doc = " Get resolution of clock CLOCK_ID."]
2410 pub fn clock_getres(__clock_id: clockid_t, __res: *mut timespec) -> ::std::os::raw::c_int;
2411}
2412unsafe extern "C" {
2413 #[doc = " Get current value of clock CLOCK_ID and store it in TP."]
2414 pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut timespec) -> ::std::os::raw::c_int;
2415}
2416unsafe extern "C" {
2417 #[doc = " Set clock CLOCK_ID to value TP."]
2418 pub fn clock_settime(__clock_id: clockid_t, __tp: *const timespec) -> ::std::os::raw::c_int;
2419}
2420unsafe extern "C" {
2421 pub fn clock_nanosleep(
2422 __clock_id: clockid_t,
2423 __flags: ::std::os::raw::c_int,
2424 __req: *const timespec,
2425 __rem: *mut timespec,
2426 ) -> ::std::os::raw::c_int;
2427}
2428unsafe extern "C" {
2429 #[doc = " Return clock ID for CPU-time clock."]
2430 pub fn clock_getcpuclockid(__pid: pid_t, __clock_id: *mut clockid_t) -> ::std::os::raw::c_int;
2431}
2432unsafe extern "C" {
2433 #[doc = " Create new per-process timer using CLOCK_ID."]
2434 pub fn timer_create(
2435 __clock_id: clockid_t,
2436 __evp: *mut sigevent,
2437 __timerid: *mut timer_t,
2438 ) -> ::std::os::raw::c_int;
2439}
2440unsafe extern "C" {
2441 #[doc = " Delete timer TIMERID."]
2442 pub fn timer_delete(__timerid: timer_t) -> ::std::os::raw::c_int;
2443}
2444unsafe extern "C" {
2445 pub fn timer_settime(
2446 __timerid: timer_t,
2447 __flags: ::std::os::raw::c_int,
2448 __value: *const itimerspec,
2449 __ovalue: *mut itimerspec,
2450 ) -> ::std::os::raw::c_int;
2451}
2452unsafe extern "C" {
2453 #[doc = " Get current value of timer TIMERID and store it in VALUE."]
2454 pub fn timer_gettime(__timerid: timer_t, __value: *mut itimerspec) -> ::std::os::raw::c_int;
2455}
2456unsafe extern "C" {
2457 #[doc = " Get expiration overrun for timer TIMERID."]
2458 pub fn timer_getoverrun(__timerid: timer_t) -> ::std::os::raw::c_int;
2459}
2460unsafe extern "C" {
2461 #[doc = " Set TS to calendar time based in time base BASE."]
2462 pub fn timespec_get(
2463 __ts: *mut timespec,
2464 __base: ::std::os::raw::c_int,
2465 ) -> ::std::os::raw::c_int;
2466}
2467#[doc = " Interface for unsupported feature notifications."]
2468#[repr(C)]
2469#[derive(Debug, Copy, Clone)]
2470pub struct _UNSUPPORT_INFO {
2471 #[doc = " Version number of the interface. Must be 1."]
2472 pub version: ::std::os::raw::c_int,
2473 #[doc = " Unsupported object notification function.\n Interface Version: 1\n Implementation Required: Yes\n\n pThis - pointer to the interface structure.\n nType - the type of unsupported object. One of the |FPDF_UNSP_*| entries."]
2474 pub FSDK_UnSupport_Handler: ::std::option::Option<
2475 unsafe extern "C" fn(pThis: *mut _UNSUPPORT_INFO, nType: ::std::os::raw::c_int),
2476 >,
2477}
2478#[doc = " Interface for unsupported feature notifications."]
2479pub type UNSUPPORT_INFO = _UNSUPPORT_INFO;
2480unsafe extern "C" {
2481 #[doc = " Setup an unsupported object handler.\n\n unsp_info - Pointer to an UNSUPPORT_INFO structure.\n\n Returns TRUE on success."]
2482 pub fn FSDK_SetUnSpObjProcessHandler(unsp_info: *mut UNSUPPORT_INFO) -> FPDF_BOOL;
2483}
2484unsafe extern "C" {
2485 #[doc = " Set replacement function for calls to time().\n\n This API is intended to be used only for testing, thus may cause PDFium to\n behave poorly in production environments.\n\n func - Function pointer to alternate implementation of time(), or\n NULL to restore to actual time() call itself."]
2486 pub fn FSDK_SetTimeFunction(func: ::std::option::Option<unsafe extern "C" fn() -> time_t>);
2487}
2488unsafe extern "C" {
2489 #[doc = " Set replacement function for calls to localtime().\n\n This API is intended to be used only for testing, thus may cause PDFium to\n behave poorly in production environments.\n\n func - Function pointer to alternate implementation of localtime(), or\n NULL to restore to actual localtime() call itself."]
2490 pub fn FSDK_SetLocaltimeFunction(
2491 func: ::std::option::Option<unsafe extern "C" fn(arg1: *const time_t) -> *mut tm>,
2492 );
2493}
2494unsafe extern "C" {
2495 #[doc = " Get the document's PageMode.\n\n doc - Handle to document.\n\n Returns one of the |PAGEMODE_*| flags defined above.\n\n The page mode defines how the document should be initially displayed."]
2496 pub fn FPDFDoc_GetPageMode(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
2497}
2498#[repr(C)]
2499#[derive(Debug, Copy, Clone)]
2500pub struct _IPDF_JsPlatform {
2501 #[doc = " Version number of the interface. Currently must be 2."]
2502 pub version: ::std::os::raw::c_int,
2503 #[doc = " Method: app_alert\n Pop up a dialog to show warning or hint.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n Msg - A string containing the message to be displayed.\n Title - The title of the dialog.\n Type - The type of button group, one of the\n JSPLATFORM_ALERT_BUTTON_* values above.\n nIcon - The type of the icon, one of the\n JSPLATFORM_ALERT_ICON_* above.\n Return Value:\n Option selected by user in dialogue, one of the\n JSPLATFORM_ALERT_RETURN_* values above."]
2504 pub app_alert: ::std::option::Option<
2505 unsafe extern "C" fn(
2506 pThis: *mut _IPDF_JsPlatform,
2507 Msg: FPDF_WIDESTRING,
2508 Title: FPDF_WIDESTRING,
2509 Type: ::std::os::raw::c_int,
2510 Icon: ::std::os::raw::c_int,
2511 ) -> ::std::os::raw::c_int,
2512 >,
2513 #[doc = " Method: app_beep\n Causes the system to play a sound.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself\n nType - The sound type, see JSPLATFORM_BEEP_TYPE_*\n above.\n Return Value:\n None"]
2514 pub app_beep: ::std::option::Option<
2515 unsafe extern "C" fn(pThis: *mut _IPDF_JsPlatform, nType: ::std::os::raw::c_int),
2516 >,
2517 #[doc = " Method: app_response\n Displays a dialog box containing a question and an entry field for\n the user to reply to the question.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself\n Question - The question to be posed to the user.\n Title - The title of the dialog box.\n Default - A default value for the answer to the question. If\n not specified, no default value is presented.\n cLabel - A short string to appear in front of and on the\n same line as the edit text field.\n bPassword - If true, indicates that the user's response should\n be shown as asterisks (*) or bullets (?) to mask\n the response, which might be sensitive information.\n response - A string buffer allocated by PDFium, to receive the\n user's response.\n length - The length of the buffer in bytes. Currently, it is\n always 2048.\n Return Value:\n Number of bytes the complete user input would actually require, not\n including trailing zeros, regardless of the value of the length\n parameter or the presence of the response buffer.\n Comments:\n No matter on what platform, the response buffer should be always\n written using UTF-16LE encoding. If a response buffer is\n present and the size of the user input exceeds the capacity of the\n buffer as specified by the length parameter, only the\n first \"length\" bytes of the user input are to be written to the\n buffer."]
2518 pub app_response: ::std::option::Option<
2519 unsafe extern "C" fn(
2520 pThis: *mut _IPDF_JsPlatform,
2521 Question: FPDF_WIDESTRING,
2522 Title: FPDF_WIDESTRING,
2523 Default: FPDF_WIDESTRING,
2524 cLabel: FPDF_WIDESTRING,
2525 bPassword: FPDF_BOOL,
2526 response: *mut ::std::os::raw::c_void,
2527 length: ::std::os::raw::c_int,
2528 ) -> ::std::os::raw::c_int,
2529 >,
2530 #[doc = " Method: Doc_getFilePath\n Get the file path of the current document.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself\n filePath - The string buffer to receive the file path. Can\n be NULL.\n length - The length of the buffer, number of bytes. Can\n be 0.\n Return Value:\n Number of bytes the filePath consumes, including trailing zeros.\n Comments:\n The filePath should always be provided in the local encoding.\n The return value always indicated number of bytes required for\n the buffer, even when there is no buffer specified, or the buffer\n size is less than required. In this case, the buffer will not\n be modified."]
2531 pub Doc_getFilePath: ::std::option::Option<
2532 unsafe extern "C" fn(
2533 pThis: *mut _IPDF_JsPlatform,
2534 filePath: *mut ::std::os::raw::c_void,
2535 length: ::std::os::raw::c_int,
2536 ) -> ::std::os::raw::c_int,
2537 >,
2538 #[doc = " Method: Doc_mail\n Mails the data buffer as an attachment to all recipients, with or\n without user interaction.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself\n mailData - Pointer to the data buffer to be sent. Can be NULL.\n length - The size,in bytes, of the buffer pointed by\n mailData parameter. Can be 0.\n bUI - If true, the rest of the parameters are used in a\n compose-new-message window that is displayed to the\n user. If false, the cTo parameter is required and\n all others are optional.\n To - A semicolon-delimited list of recipients for the\n message.\n Subject - The subject of the message. The length limit is\n 64 KB.\n CC - A semicolon-delimited list of CC recipients for\n the message.\n BCC - A semicolon-delimited list of BCC recipients for\n the message.\n Msg - The content of the message. The length limit is\n 64 KB.\n Return Value:\n None.\n Comments:\n If the parameter mailData is NULL or length is 0, the current\n document will be mailed as an attachment to all recipients."]
2539 pub Doc_mail: ::std::option::Option<
2540 unsafe extern "C" fn(
2541 pThis: *mut _IPDF_JsPlatform,
2542 mailData: *mut ::std::os::raw::c_void,
2543 length: ::std::os::raw::c_int,
2544 bUI: FPDF_BOOL,
2545 To: FPDF_WIDESTRING,
2546 Subject: FPDF_WIDESTRING,
2547 CC: FPDF_WIDESTRING,
2548 BCC: FPDF_WIDESTRING,
2549 Msg: FPDF_WIDESTRING,
2550 ),
2551 >,
2552 #[doc = " Method: Doc_print\n Prints all or a specific number of pages of the document.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n bUI - If true, will cause a UI to be presented to the\n user to obtain printing information and confirm\n the action.\n nStart - A 0-based index that defines the start of an\n inclusive range of pages.\n nEnd - A 0-based index that defines the end of an\n inclusive page range.\n bSilent - If true, suppresses the cancel dialog box while\n the document is printing. The default is false.\n bShrinkToFit - If true, the page is shrunk (if necessary) to\n fit within the imageable area of the printed page.\n bPrintAsImage - If true, print pages as an image.\n bReverse - If true, print from nEnd to nStart.\n bAnnotations - If true (the default), annotations are\n printed.\n Return Value:\n None."]
2553 pub Doc_print: ::std::option::Option<
2554 unsafe extern "C" fn(
2555 pThis: *mut _IPDF_JsPlatform,
2556 bUI: FPDF_BOOL,
2557 nStart: ::std::os::raw::c_int,
2558 nEnd: ::std::os::raw::c_int,
2559 bSilent: FPDF_BOOL,
2560 bShrinkToFit: FPDF_BOOL,
2561 bPrintAsImage: FPDF_BOOL,
2562 bReverse: FPDF_BOOL,
2563 bAnnotations: FPDF_BOOL,
2564 ),
2565 >,
2566 #[doc = " Method: Doc_submitForm\n Send the form data to a specified URL.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself\n formData - Pointer to the data buffer to be sent.\n length - The size,in bytes, of the buffer pointed by\n formData parameter.\n URL - The URL to send to.\n Return Value:\n None."]
2567 pub Doc_submitForm: ::std::option::Option<
2568 unsafe extern "C" fn(
2569 pThis: *mut _IPDF_JsPlatform,
2570 formData: *mut ::std::os::raw::c_void,
2571 length: ::std::os::raw::c_int,
2572 URL: FPDF_WIDESTRING,
2573 ),
2574 >,
2575 #[doc = " Method: Doc_gotoPage\n Jump to a specified page.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself\n nPageNum - The specified page number, zero for the first page.\n Return Value:\n None."]
2576 pub Doc_gotoPage: ::std::option::Option<
2577 unsafe extern "C" fn(pThis: *mut _IPDF_JsPlatform, nPageNum: ::std::os::raw::c_int),
2578 >,
2579 #[doc = " Method: Field_browse\n Show a file selection dialog, and return the selected file path.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n filePath - Pointer to the data buffer to receive the file\n path. Can be NULL.\n length - The length of the buffer, in bytes. Can be 0.\n Return Value:\n Number of bytes the filePath consumes, including trailing zeros.\n Comments:\n The filePath should always be provided in local encoding."]
2580 pub Field_browse: ::std::option::Option<
2581 unsafe extern "C" fn(
2582 pThis: *mut _IPDF_JsPlatform,
2583 filePath: *mut ::std::os::raw::c_void,
2584 length: ::std::os::raw::c_int,
2585 ) -> ::std::os::raw::c_int,
2586 >,
2587 #[doc = " Pointer for embedder-specific data. Unused by PDFium, and despite\n its name, can be any data the embedder desires, though traditionally\n a FPDF_FORMFILLINFO interface."]
2588 pub m_pFormfillinfo: *mut ::std::os::raw::c_void,
2589 #[doc = " Unused in v3, retain for compatibility."]
2590 pub m_isolate: *mut ::std::os::raw::c_void,
2591 #[doc = " Unused in v3, retain for compatibility."]
2592 pub m_v8EmbedderSlot: ::std::os::raw::c_uint,
2593}
2594pub type IPDF_JSPLATFORM = _IPDF_JsPlatform;
2595#[doc = " Function signature for the callback function passed to the FFI_SetTimer\n method.\n Parameters:\n idEvent - Identifier of the timer.\n Return value:\n None."]
2596pub type TimerCallback =
2597 ::std::option::Option<unsafe extern "C" fn(idEvent: ::std::os::raw::c_int)>;
2598#[doc = " Declares of a struct type to the local system time."]
2599#[repr(C)]
2600#[derive(Debug, Copy, Clone)]
2601pub struct _FPDF_SYSTEMTIME {
2602 #[doc = " years since 1900"]
2603 pub wYear: ::std::os::raw::c_ushort,
2604 #[doc = " months since January - [0,11]"]
2605 pub wMonth: ::std::os::raw::c_ushort,
2606 #[doc = " days since Sunday - [0,6]"]
2607 pub wDayOfWeek: ::std::os::raw::c_ushort,
2608 #[doc = " day of the month - [1,31]"]
2609 pub wDay: ::std::os::raw::c_ushort,
2610 #[doc = " hours since midnight - [0,23]"]
2611 pub wHour: ::std::os::raw::c_ushort,
2612 #[doc = " minutes after the hour - [0,59]"]
2613 pub wMinute: ::std::os::raw::c_ushort,
2614 #[doc = " seconds after the minute - [0,59]"]
2615 pub wSecond: ::std::os::raw::c_ushort,
2616 #[doc = " milliseconds after the second - [0,999]"]
2617 pub wMilliseconds: ::std::os::raw::c_ushort,
2618}
2619#[doc = " Declares of a struct type to the local system time."]
2620pub type FPDF_SYSTEMTIME = _FPDF_SYSTEMTIME;
2621#[repr(C)]
2622#[derive(Debug, Copy, Clone)]
2623pub struct _FPDF_FORMFILLINFO {
2624 #[doc = " Version number of the interface.\n Version 1 contains stable interfaces. Version 2 has additional\n experimental interfaces.\n When PDFium is built without the XFA module, version can be 1 or 2.\n With version 1, only stable interfaces are called. With version 2,\n additional experimental interfaces are also called.\n When PDFium is built with the XFA module, version must be 2.\n All the XFA related interfaces are experimental. If PDFium is built with\n the XFA module and version 1 then none of the XFA related interfaces\n would be called. When PDFium is built with XFA module then the version\n must be 2."]
2625 pub version: ::std::os::raw::c_int,
2626 #[doc = " Method: Release\n Give the implementation a chance to release any resources after the\n interface is no longer used.\n Interface Version:\n 1\n Implementation Required:\n No\n Comments:\n Called by PDFium during the final cleanup process.\n Parameters:\n pThis - Pointer to the interface structure itself\n Return Value:\n None"]
2627 pub Release: ::std::option::Option<unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO)>,
2628 #[doc = " Method: FFI_Invalidate\n Invalidate the client area within the specified rectangle.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n page - Handle to the page. Returned by FPDF_LoadPage().\n left - Left position of the client area in PDF page\n coordinates.\n top - Top position of the client area in PDF page\n coordinates.\n right - Right position of the client area in PDF page\n coordinates.\n bottom - Bottom position of the client area in PDF page\n coordinates.\n Return Value:\n None.\n Comments:\n All positions are measured in PDF \"user space\".\n Implementation should call FPDF_RenderPageBitmap() for repainting\n the specified page area."]
2629 pub FFI_Invalidate: ::std::option::Option<
2630 unsafe extern "C" fn(
2631 pThis: *mut _FPDF_FORMFILLINFO,
2632 page: FPDF_PAGE,
2633 left: f64,
2634 top: f64,
2635 right: f64,
2636 bottom: f64,
2637 ),
2638 >,
2639 #[doc = " Method: FFI_OutputSelectedRect\n When the user selects text in form fields with the mouse, this\n callback function will be invoked with the selected areas.\n Interface Version:\n 1\n Implementation Required:\n No\n Parameters:\n pThis - Pointer to the interface structure itself.\n page - Handle to the page. Returned by FPDF_LoadPage()/\n left - Left position of the client area in PDF page\n coordinates.\n top - Top position of the client area in PDF page\n coordinates.\n right - Right position of the client area in PDF page\n coordinates.\n bottom - Bottom position of the client area in PDF page\n coordinates.\n Return Value:\n None.\n Comments:\n This callback function is useful for implementing special text\n selection effects. An implementation should first record the\n returned rectangles, then draw them one by one during the next\n painting period. Lastly, it should remove all the recorded\n rectangles when finished painting."]
2640 pub FFI_OutputSelectedRect: ::std::option::Option<
2641 unsafe extern "C" fn(
2642 pThis: *mut _FPDF_FORMFILLINFO,
2643 page: FPDF_PAGE,
2644 left: f64,
2645 top: f64,
2646 right: f64,
2647 bottom: f64,
2648 ),
2649 >,
2650 #[doc = " Method: FFI_SetCursor\n Set the Cursor shape.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n nCursorType - Cursor type, see Flags for Cursor type for details.\n Return value:\n None."]
2651 pub FFI_SetCursor: ::std::option::Option<
2652 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, nCursorType: ::std::os::raw::c_int),
2653 >,
2654 #[doc = " Method: FFI_SetTimer\n This method installs a system timer. An interval value is specified,\n and every time that interval elapses, the system must call into the\n callback function with the timer ID as returned by this function.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n uElapse - Specifies the time-out value, in milliseconds.\n lpTimerFunc - A pointer to the callback function-TimerCallback.\n Return value:\n The timer identifier of the new timer if the function is successful.\n An application passes this value to the FFI_KillTimer method to kill\n the timer. Nonzero if it is successful; otherwise, it is zero."]
2655 pub FFI_SetTimer: ::std::option::Option<
2656 unsafe extern "C" fn(
2657 pThis: *mut _FPDF_FORMFILLINFO,
2658 uElapse: ::std::os::raw::c_int,
2659 lpTimerFunc: TimerCallback,
2660 ) -> ::std::os::raw::c_int,
2661 >,
2662 #[doc = " Method: FFI_KillTimer\n This method uninstalls a system timer, as set by an earlier call to\n FFI_SetTimer.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n nTimerID - The timer ID returned by FFI_SetTimer function.\n Return value:\n None."]
2663 pub FFI_KillTimer: ::std::option::Option<
2664 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, nTimerID: ::std::os::raw::c_int),
2665 >,
2666 #[doc = " Method: FFI_GetLocalTime\n This method receives the current local time on the system.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n Return value:\n The local time. See FPDF_SYSTEMTIME above for details.\n Note: Unused."]
2667 pub FFI_GetLocalTime: ::std::option::Option<
2668 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO) -> FPDF_SYSTEMTIME,
2669 >,
2670 #[doc = " Method: FFI_OnChange\n This method will be invoked to notify the implementation when the\n value of any FormField on the document had been changed.\n Interface Version:\n 1\n Implementation Required:\n no\n Parameters:\n pThis - Pointer to the interface structure itself.\n Return value:\n None."]
2671 pub FFI_OnChange: ::std::option::Option<unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO)>,
2672 #[doc = " Method: FFI_GetPage\n This method receives the page handle associated with a specified\n page index.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n document - Handle to document. Returned by FPDF_LoadDocument().\n nPageIndex - Index number of the page. 0 for the first page.\n Return value:\n Handle to the page, as previously returned to the implementation by\n FPDF_LoadPage().\n Comments:\n The implementation is expected to keep track of the page handles it\n receives from PDFium, and their mappings to page numbers. In some\n cases, the document-level JavaScript action may refer to a page\n which hadn't been loaded yet. To successfully run the Javascript\n action, the implementation needs to load the page."]
2673 pub FFI_GetPage: ::std::option::Option<
2674 unsafe extern "C" fn(
2675 pThis: *mut _FPDF_FORMFILLINFO,
2676 document: FPDF_DOCUMENT,
2677 nPageIndex: ::std::os::raw::c_int,
2678 ) -> FPDF_PAGE,
2679 >,
2680 #[doc = " Method: FFI_GetCurrentPage\n This method receives the handle to the current page.\n Interface Version:\n 1\n Implementation Required:\n Yes when V8 support is present, otherwise unused.\n Parameters:\n pThis - Pointer to the interface structure itself.\n document - Handle to document. Returned by FPDF_LoadDocument().\n Return value:\n Handle to the page. Returned by FPDF_LoadPage().\n Comments:\n PDFium doesn't keep keep track of the \"current page\" (e.g. the one\n that is most visible on screen), so it must ask the embedder for\n this information."]
2681 pub FFI_GetCurrentPage: ::std::option::Option<
2682 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, document: FPDF_DOCUMENT) -> FPDF_PAGE,
2683 >,
2684 #[doc = " Method: FFI_GetRotation\n This method receives currently rotation of the page view.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n page - Handle to page, as returned by FPDF_LoadPage().\n Return value:\n A number to indicate the page rotation in 90 degree increments\n in a clockwise direction:\n 0 - 0 degrees\n 1 - 90 degrees\n 2 - 180 degrees\n 3 - 270 degrees\n Note: Unused."]
2685 pub FFI_GetRotation: ::std::option::Option<
2686 unsafe extern "C" fn(
2687 pThis: *mut _FPDF_FORMFILLINFO,
2688 page: FPDF_PAGE,
2689 ) -> ::std::os::raw::c_int,
2690 >,
2691 #[doc = " Method: FFI_ExecuteNamedAction\n This method will execute a named action.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself.\n namedAction - A byte string which indicates the named action,\n terminated by 0.\n Return value:\n None.\n Comments:\n See ISO 32000-1:2008, section 12.6.4.11 for descriptions of the\n standard named actions, but note that a document may supply any\n name of its choosing."]
2692 pub FFI_ExecuteNamedAction: ::std::option::Option<
2693 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, namedAction: FPDF_BYTESTRING),
2694 >,
2695 #[doc = " Method: FFI_SetTextFieldFocus\n Called when a text field is getting or losing focus.\n Interface Version:\n 1\n Implementation Required:\n no\n Parameters:\n pThis - Pointer to the interface structure itself.\n value - The string value of the form field, in UTF-16LE\n format.\n valueLen - The length of the string value. This is the\n number of characters, not bytes.\n is_focus - True if the form field is getting focus, false\n if the form field is losing focus.\n Return value:\n None.\n Comments:\n Only supports text fields and combobox fields."]
2696 pub FFI_SetTextFieldFocus: ::std::option::Option<
2697 unsafe extern "C" fn(
2698 pThis: *mut _FPDF_FORMFILLINFO,
2699 value: FPDF_WIDESTRING,
2700 valueLen: FPDF_DWORD,
2701 is_focus: FPDF_BOOL,
2702 ),
2703 >,
2704 #[doc = " Method: FFI_DoURIAction\n Ask the implementation to navigate to a uniform resource identifier.\n Interface Version:\n 1\n Implementation Required:\n No\n Parameters:\n pThis - Pointer to the interface structure itself.\n bsURI - A byte string which indicates the uniform\n resource identifier, terminated by 0.\n Return value:\n None.\n Comments:\n If the embedder is version 2 or higher and have implementation for\n FFI_DoURIActionWithKeyboardModifier, then\n FFI_DoURIActionWithKeyboardModifier takes precedence over\n FFI_DoURIAction.\n See the URI actions description of <<PDF Reference, version 1.7>>\n for more details."]
2705 pub FFI_DoURIAction: ::std::option::Option<
2706 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, bsURI: FPDF_BYTESTRING),
2707 >,
2708 #[doc = " Method: FFI_DoGoToAction\n This action changes the view to a specified destination.\n Interface Version:\n 1\n Implementation Required:\n No\n Parameters:\n pThis - Pointer to the interface structure itself.\n nPageIndex - The index of the PDF page.\n zoomMode - The zoom mode for viewing page. See below.\n fPosArray - The float array which carries the position info.\n sizeofArray - The size of float array.\n PDFZoom values:\n - XYZ = 1\n - FITPAGE = 2\n - FITHORZ = 3\n - FITVERT = 4\n - FITRECT = 5\n - FITBBOX = 6\n - FITBHORZ = 7\n - FITBVERT = 8\n Return value:\n None.\n Comments:\n See the Destinations description of <<PDF Reference, version 1.7>>\n in 8.2.1 for more details."]
2709 pub FFI_DoGoToAction: ::std::option::Option<
2710 unsafe extern "C" fn(
2711 pThis: *mut _FPDF_FORMFILLINFO,
2712 nPageIndex: ::std::os::raw::c_int,
2713 zoomMode: ::std::os::raw::c_int,
2714 fPosArray: *mut f32,
2715 sizeofArray: ::std::os::raw::c_int,
2716 ),
2717 >,
2718 #[doc = " Pointer to IPDF_JSPLATFORM interface.\n Unused if PDFium is built without V8 support. Otherwise, if NULL, then\n JavaScript will be prevented from executing while rendering the document."]
2719 pub m_pJsPlatform: *mut IPDF_JSPLATFORM,
2720 #[doc = " Whether the XFA module is disabled when built with the XFA module.\n Interface Version:\n Ignored if |version| < 2."]
2721 pub xfa_disabled: FPDF_BOOL,
2722 #[doc = " Method: FFI_DisplayCaret\n This method will show the caret at specified position.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n page - Handle to page. Returned by FPDF_LoadPage().\n left - Left position of the client area in PDF page\n coordinates.\n top - Top position of the client area in PDF page\n coordinates.\n right - Right position of the client area in PDF page\n coordinates.\n bottom - Bottom position of the client area in PDF page\n coordinates.\n Return value:\n None."]
2723 pub FFI_DisplayCaret: ::std::option::Option<
2724 unsafe extern "C" fn(
2725 pThis: *mut _FPDF_FORMFILLINFO,
2726 page: FPDF_PAGE,
2727 bVisible: FPDF_BOOL,
2728 left: f64,
2729 top: f64,
2730 right: f64,
2731 bottom: f64,
2732 ),
2733 >,
2734 #[doc = " Method: FFI_GetCurrentPageIndex\n This method will get the current page index.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n document - Handle to document from FPDF_LoadDocument().\n Return value:\n The index of current page."]
2735 pub FFI_GetCurrentPageIndex: ::std::option::Option<
2736 unsafe extern "C" fn(
2737 pThis: *mut _FPDF_FORMFILLINFO,
2738 document: FPDF_DOCUMENT,
2739 ) -> ::std::os::raw::c_int,
2740 >,
2741 #[doc = " Method: FFI_SetCurrentPage\n This method will set the current page.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n document - Handle to document from FPDF_LoadDocument().\n iCurPage - The index of the PDF page.\n Return value:\n None."]
2742 pub FFI_SetCurrentPage: ::std::option::Option<
2743 unsafe extern "C" fn(
2744 pThis: *mut _FPDF_FORMFILLINFO,
2745 document: FPDF_DOCUMENT,
2746 iCurPage: ::std::os::raw::c_int,
2747 ),
2748 >,
2749 #[doc = " Method: FFI_GotoURL\n This method will navigate to the specified URL.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n document - Handle to document from FPDF_LoadDocument().\n wsURL - The string value of the URL, in UTF-16LE format.\n Return value:\n None."]
2750 pub FFI_GotoURL: ::std::option::Option<
2751 unsafe extern "C" fn(
2752 pThis: *mut _FPDF_FORMFILLINFO,
2753 document: FPDF_DOCUMENT,
2754 wsURL: FPDF_WIDESTRING,
2755 ),
2756 >,
2757 #[doc = " Method: FFI_GetPageViewRect\n This method will get the current page view rectangle.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n page - Handle to page. Returned by FPDF_LoadPage().\n left - The pointer to receive left position of the page\n view area in PDF page coordinates.\n top - The pointer to receive top position of the page\n view area in PDF page coordinates.\n right - The pointer to receive right position of the\n page view area in PDF page coordinates.\n bottom - The pointer to receive bottom position of the\n page view area in PDF page coordinates.\n Return value:\n None."]
2758 pub FFI_GetPageViewRect: ::std::option::Option<
2759 unsafe extern "C" fn(
2760 pThis: *mut _FPDF_FORMFILLINFO,
2761 page: FPDF_PAGE,
2762 left: *mut f64,
2763 top: *mut f64,
2764 right: *mut f64,
2765 bottom: *mut f64,
2766 ),
2767 >,
2768 #[doc = " Method: FFI_PageEvent\n This method fires when pages have been added to or deleted from\n the XFA document.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n page_count - The number of pages to be added or deleted.\n event_type - See FXFA_PAGEVIEWEVENT_* above.\n Return value:\n None.\n Comments:\n The pages to be added or deleted always start from the last page\n of document. This means that if parameter page_count is 2 and\n event type is FXFA_PAGEVIEWEVENT_POSTADDED, 2 new pages have been\n appended to the tail of document; If page_count is 2 and\n event type is FXFA_PAGEVIEWEVENT_POSTREMOVED, the last 2 pages\n have been deleted."]
2769 pub FFI_PageEvent: ::std::option::Option<
2770 unsafe extern "C" fn(
2771 pThis: *mut _FPDF_FORMFILLINFO,
2772 page_count: ::std::os::raw::c_int,
2773 event_type: FPDF_DWORD,
2774 ),
2775 >,
2776 #[doc = " Method: FFI_PopupMenu\n This method will track the right context menu for XFA fields.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n page - Handle to page. Returned by FPDF_LoadPage().\n hWidget - Always null, exists for compatibility.\n menuFlag - The menu flags. Please refer to macro definition\n of FXFA_MENU_XXX and this can be one or a\n combination of these macros.\n x - X position of the client area in PDF page\n coordinates.\n y - Y position of the client area in PDF page\n coordinates.\n Return value:\n TRUE indicates success; otherwise false."]
2777 pub FFI_PopupMenu: ::std::option::Option<
2778 unsafe extern "C" fn(
2779 pThis: *mut _FPDF_FORMFILLINFO,
2780 page: FPDF_PAGE,
2781 hWidget: FPDF_WIDGET,
2782 menuFlag: ::std::os::raw::c_int,
2783 x: f32,
2784 y: f32,
2785 ) -> FPDF_BOOL,
2786 >,
2787 #[doc = " Method: FFI_OpenFile\n This method will open the specified file with the specified mode.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n fileFlag - The file flag. Please refer to macro definition\n of FXFA_SAVEAS_XXX and use one of these macros.\n wsURL - The string value of the file URL, in UTF-16LE\n format.\n mode - The mode for open file, e.g. \"rb\" or \"wb\".\n Return value:\n The handle to FPDF_FILEHANDLER."]
2788 pub FFI_OpenFile: ::std::option::Option<
2789 unsafe extern "C" fn(
2790 pThis: *mut _FPDF_FORMFILLINFO,
2791 fileFlag: ::std::os::raw::c_int,
2792 wsURL: FPDF_WIDESTRING,
2793 mode: *const ::std::os::raw::c_char,
2794 ) -> *mut FPDF_FILEHANDLER,
2795 >,
2796 #[doc = " Method: FFI_EmailTo\n This method will email the specified file stream to the specified\n contact.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n pFileHandler - Handle to the FPDF_FILEHANDLER.\n pTo - A semicolon-delimited list of recipients for the\n message,in UTF-16LE format.\n pSubject - The subject of the message,in UTF-16LE format.\n pCC - A semicolon-delimited list of CC recipients for\n the message,in UTF-16LE format.\n pBcc - A semicolon-delimited list of BCC recipients for\n the message,in UTF-16LE format.\n pMsg - Pointer to the data buffer to be sent.Can be\n NULL,in UTF-16LE format.\n Return value:\n None."]
2797 pub FFI_EmailTo: ::std::option::Option<
2798 unsafe extern "C" fn(
2799 pThis: *mut _FPDF_FORMFILLINFO,
2800 fileHandler: *mut FPDF_FILEHANDLER,
2801 pTo: FPDF_WIDESTRING,
2802 pSubject: FPDF_WIDESTRING,
2803 pCC: FPDF_WIDESTRING,
2804 pBcc: FPDF_WIDESTRING,
2805 pMsg: FPDF_WIDESTRING,
2806 ),
2807 >,
2808 #[doc = " Method: FFI_UploadTo\n This method will upload the specified file stream to the\n specified URL.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n pFileHandler - Handle to the FPDF_FILEHANDLER.\n fileFlag - The file flag. Please refer to macro definition\n of FXFA_SAVEAS_XXX and use one of these macros.\n uploadTo - Pointer to the URL path, in UTF-16LE format.\n Return value:\n None."]
2809 pub FFI_UploadTo: ::std::option::Option<
2810 unsafe extern "C" fn(
2811 pThis: *mut _FPDF_FORMFILLINFO,
2812 fileHandler: *mut FPDF_FILEHANDLER,
2813 fileFlag: ::std::os::raw::c_int,
2814 uploadTo: FPDF_WIDESTRING,
2815 ),
2816 >,
2817 #[doc = " Method: FFI_GetPlatform\n This method will get the current platform.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n platform - Pointer to the data buffer to receive the\n platform,in UTF-16LE format. Can be NULL.\n length - The length of the buffer in bytes. Can be\n 0 to query the required size.\n Return value:\n The length of the buffer, number of bytes."]
2818 pub FFI_GetPlatform: ::std::option::Option<
2819 unsafe extern "C" fn(
2820 pThis: *mut _FPDF_FORMFILLINFO,
2821 platform: *mut ::std::os::raw::c_void,
2822 length: ::std::os::raw::c_int,
2823 ) -> ::std::os::raw::c_int,
2824 >,
2825 #[doc = " Method: FFI_GetLanguage\n This method will get the current language.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n language - Pointer to the data buffer to receive the\n current language. Can be NULL.\n length - The length of the buffer in bytes. Can be\n 0 to query the required size.\n Return value:\n The length of the buffer, number of bytes."]
2826 pub FFI_GetLanguage: ::std::option::Option<
2827 unsafe extern "C" fn(
2828 pThis: *mut _FPDF_FORMFILLINFO,
2829 language: *mut ::std::os::raw::c_void,
2830 length: ::std::os::raw::c_int,
2831 ) -> ::std::os::raw::c_int,
2832 >,
2833 #[doc = " Method: FFI_DownloadFromURL\n This method will download the specified file from the URL.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n URL - The string value of the file URL, in UTF-16LE\n format.\n Return value:\n The handle to FPDF_FILEHANDLER."]
2834 pub FFI_DownloadFromURL: ::std::option::Option<
2835 unsafe extern "C" fn(
2836 pThis: *mut _FPDF_FORMFILLINFO,
2837 URL: FPDF_WIDESTRING,
2838 ) -> *mut FPDF_FILEHANDLER,
2839 >,
2840 #[doc = " Method: FFI_PostRequestURL\n This method will post the request to the server URL.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n wsURL - The string value of the server URL, in UTF-16LE\n format.\n wsData - The post data,in UTF-16LE format.\n wsContentType - The content type of the request data, in\n UTF-16LE format.\n wsEncode - The encode type, in UTF-16LE format.\n wsHeader - The request header,in UTF-16LE format.\n response - Pointer to the FPDF_BSTR to receive the response\n data from the server, in UTF-16LE format.\n Return value:\n TRUE indicates success, otherwise FALSE."]
2841 pub FFI_PostRequestURL: ::std::option::Option<
2842 unsafe extern "C" fn(
2843 pThis: *mut _FPDF_FORMFILLINFO,
2844 wsURL: FPDF_WIDESTRING,
2845 wsData: FPDF_WIDESTRING,
2846 wsContentType: FPDF_WIDESTRING,
2847 wsEncode: FPDF_WIDESTRING,
2848 wsHeader: FPDF_WIDESTRING,
2849 response: *mut FPDF_BSTR,
2850 ) -> FPDF_BOOL,
2851 >,
2852 #[doc = " Method: FFI_PutRequestURL\n This method will put the request to the server URL.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n Required for XFA, otherwise set to NULL.\n Parameters:\n pThis - Pointer to the interface structure itself.\n wsURL - The string value of the server URL, in UTF-16LE\n format.\n wsData - The put data, in UTF-16LE format.\n wsEncode - The encode type, in UTR-16LE format.\n Return value:\n TRUE indicates success, otherwise FALSE."]
2853 pub FFI_PutRequestURL: ::std::option::Option<
2854 unsafe extern "C" fn(
2855 pThis: *mut _FPDF_FORMFILLINFO,
2856 wsURL: FPDF_WIDESTRING,
2857 wsData: FPDF_WIDESTRING,
2858 wsEncode: FPDF_WIDESTRING,
2859 ) -> FPDF_BOOL,
2860 >,
2861 #[doc = " Method: FFI_OnFocusChange\n Called when the focused annotation is updated.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n No\n Parameters:\n param - Pointer to the interface structure itself.\n annot - The focused annotation.\n page_index - Index number of the page which contains the\n focused annotation. 0 for the first page.\n Return value:\n None.\n Comments:\n This callback function is useful for implementing any view based\n action such as scrolling the annotation rect into view. The\n embedder should not copy and store the annot as its scope is\n limited to this call only."]
2862 pub FFI_OnFocusChange: ::std::option::Option<
2863 unsafe extern "C" fn(
2864 param: *mut _FPDF_FORMFILLINFO,
2865 annot: FPDF_ANNOTATION,
2866 page_index: ::std::os::raw::c_int,
2867 ),
2868 >,
2869 #[doc = " Method: FFI_DoURIActionWithKeyboardModifier\n Ask the implementation to navigate to a uniform resource identifier\n with the specified modifiers.\n Interface Version:\n Ignored if |version| < 2.\n Implementation Required:\n No\n Parameters:\n param - Pointer to the interface structure itself.\n uri - A byte string which indicates the uniform\n resource identifier, terminated by 0.\n modifiers - Keyboard modifier that indicates which of\n the virtual keys are down, if any.\n Return value:\n None.\n Comments:\n If the embedder who is version 2 and does not implement this API,\n then a call will be redirected to FFI_DoURIAction.\n See the URI actions description of <<PDF Reference, version 1.7>>\n for more details."]
2870 pub FFI_DoURIActionWithKeyboardModifier: ::std::option::Option<
2871 unsafe extern "C" fn(
2872 param: *mut _FPDF_FORMFILLINFO,
2873 uri: FPDF_BYTESTRING,
2874 modifiers: ::std::os::raw::c_int,
2875 ),
2876 >,
2877}
2878pub type FPDF_FORMFILLINFO = _FPDF_FORMFILLINFO;
2879unsafe extern "C" {
2880 #[doc = " Function: FPDFDOC_InitFormFillEnvironment\n Initialize form fill environment.\n Parameters:\n document - Handle to document from FPDF_LoadDocument().\n formInfo - Pointer to a FPDF_FORMFILLINFO structure.\n Return Value:\n Handle to the form fill module, or NULL on failure.\n Comments:\n This function should be called before any form fill operation.\n The FPDF_FORMFILLINFO passed in via |formInfo| must remain valid until\n the returned FPDF_FORMHANDLE is closed."]
2881 pub fn FPDFDOC_InitFormFillEnvironment(
2882 document: FPDF_DOCUMENT,
2883 formInfo: *mut FPDF_FORMFILLINFO,
2884 ) -> FPDF_FORMHANDLE;
2885}
2886unsafe extern "C" {
2887 #[doc = " Function: FPDFDOC_ExitFormFillEnvironment\n Take ownership of |hHandle| and exit form fill environment.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n Return Value:\n None.\n Comments:\n This function is a no-op when |hHandle| is null."]
2888 pub fn FPDFDOC_ExitFormFillEnvironment(hHandle: FPDF_FORMHANDLE);
2889}
2890unsafe extern "C" {
2891 #[doc = " Function: FORM_OnAfterLoadPage\n This method is required for implementing all the form related\n functions. Should be invoked after user successfully loaded a\n PDF page, and FPDFDOC_InitFormFillEnvironment() has been invoked.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n Return Value:\n None."]
2892 pub fn FORM_OnAfterLoadPage(page: FPDF_PAGE, hHandle: FPDF_FORMHANDLE);
2893}
2894unsafe extern "C" {
2895 #[doc = " Function: FORM_OnBeforeClosePage\n This method is required for implementing all the form related\n functions. Should be invoked before user closes the PDF page.\n Parameters:\n page - Handle to the page, as returned by FPDF_LoadPage().\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n Return Value:\n None."]
2896 pub fn FORM_OnBeforeClosePage(page: FPDF_PAGE, hHandle: FPDF_FORMHANDLE);
2897}
2898unsafe extern "C" {
2899 #[doc = " Function: FORM_DoDocumentJSAction\n This method is required for performing document-level JavaScript\n actions. It should be invoked after the PDF document has been loaded.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n Return Value:\n None.\n Comments:\n If there is document-level JavaScript action embedded in the\n document, this method will execute the JavaScript action. Otherwise,\n the method will do nothing."]
2900 pub fn FORM_DoDocumentJSAction(hHandle: FPDF_FORMHANDLE);
2901}
2902unsafe extern "C" {
2903 #[doc = " Function: FORM_DoDocumentOpenAction\n This method is required for performing open-action when the document\n is opened.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n Return Value:\n None.\n Comments:\n This method will do nothing if there are no open-actions embedded\n in the document."]
2904 pub fn FORM_DoDocumentOpenAction(hHandle: FPDF_FORMHANDLE);
2905}
2906unsafe extern "C" {
2907 #[doc = " Function: FORM_DoDocumentAAction\n This method is required for performing the document's\n additional-action.\n Parameters:\n hHandle - Handle to the form fill module. Returned by\n FPDFDOC_InitFormFillEnvironment.\n aaType - The type of the additional-actions which defined\n above.\n Return Value:\n None.\n Comments:\n This method will do nothing if there is no document\n additional-action corresponding to the specified |aaType|."]
2908 pub fn FORM_DoDocumentAAction(hHandle: FPDF_FORMHANDLE, aaType: ::std::os::raw::c_int);
2909}
2910unsafe extern "C" {
2911 #[doc = " Function: FORM_DoPageAAction\n This method is required for performing the page object's\n additional-action when opened or closed.\n Parameters:\n page - Handle to the page, as returned by FPDF_LoadPage().\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n aaType - The type of the page object's additional-actions\n which defined above.\n Return Value:\n None.\n Comments:\n This method will do nothing if no additional-action corresponding\n to the specified |aaType| exists."]
2912 pub fn FORM_DoPageAAction(
2913 page: FPDF_PAGE,
2914 hHandle: FPDF_FORMHANDLE,
2915 aaType: ::std::os::raw::c_int,
2916 );
2917}
2918unsafe extern "C" {
2919 #[doc = " Function: FORM_OnMouseMove\n Call this member function when the mouse cursor moves.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n modifier - Indicates whether various virtual keys are down.\n page_x - Specifies the x-coordinate of the cursor in PDF user\n space.\n page_y - Specifies the y-coordinate of the cursor in PDF user\n space.\n Return Value:\n True indicates success; otherwise false."]
2920 pub fn FORM_OnMouseMove(
2921 hHandle: FPDF_FORMHANDLE,
2922 page: FPDF_PAGE,
2923 modifier: ::std::os::raw::c_int,
2924 page_x: f64,
2925 page_y: f64,
2926 ) -> FPDF_BOOL;
2927}
2928unsafe extern "C" {
2929 #[doc = " Experimental API\n Function: FORM_OnMouseWheel\n Call this member function when the user scrolls the mouse wheel.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n modifier - Indicates whether various virtual keys are down.\n page_coord - Specifies the coordinates of the cursor in PDF user\n space.\n delta_x - Specifies the amount of wheel movement on the x-axis,\n in units of platform-agnostic wheel deltas. Negative\n values mean left.\n delta_y - Specifies the amount of wheel movement on the y-axis,\n in units of platform-agnostic wheel deltas. Negative\n values mean down.\n Return Value:\n True indicates success; otherwise false.\n Comments:\n For |delta_x| and |delta_y|, the caller must normalize\n platform-specific wheel deltas. e.g. On Windows, a delta value of 240\n for a WM_MOUSEWHEEL event normalizes to 2, since Windows defines\n WHEEL_DELTA as 120."]
2930 pub fn FORM_OnMouseWheel(
2931 hHandle: FPDF_FORMHANDLE,
2932 page: FPDF_PAGE,
2933 modifier: ::std::os::raw::c_int,
2934 page_coord: *const FS_POINTF,
2935 delta_x: ::std::os::raw::c_int,
2936 delta_y: ::std::os::raw::c_int,
2937 ) -> FPDF_BOOL;
2938}
2939unsafe extern "C" {
2940 #[doc = " Function: FORM_OnFocus\n This function focuses the form annotation at a given point. If the\n annotation at the point already has focus, nothing happens. If there\n is no annotation at the point, removes form focus.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n modifier - Indicates whether various virtual keys are down.\n page_x - Specifies the x-coordinate of the cursor in PDF user\n space.\n page_y - Specifies the y-coordinate of the cursor in PDF user\n space.\n Return Value:\n True if there is an annotation at the given point and it has focus."]
2941 pub fn FORM_OnFocus(
2942 hHandle: FPDF_FORMHANDLE,
2943 page: FPDF_PAGE,
2944 modifier: ::std::os::raw::c_int,
2945 page_x: f64,
2946 page_y: f64,
2947 ) -> FPDF_BOOL;
2948}
2949unsafe extern "C" {
2950 #[doc = " Function: FORM_OnLButtonDown\n Call this member function when the user presses the left\n mouse button.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n modifier - Indicates whether various virtual keys are down.\n page_x - Specifies the x-coordinate of the cursor in PDF user\n space.\n page_y - Specifies the y-coordinate of the cursor in PDF user\n space.\n Return Value:\n True indicates success; otherwise false."]
2951 pub fn FORM_OnLButtonDown(
2952 hHandle: FPDF_FORMHANDLE,
2953 page: FPDF_PAGE,
2954 modifier: ::std::os::raw::c_int,
2955 page_x: f64,
2956 page_y: f64,
2957 ) -> FPDF_BOOL;
2958}
2959unsafe extern "C" {
2960 #[doc = " Function: FORM_OnRButtonDown\n Same as above, execpt for the right mouse button.\n Comments:\n At the present time, has no effect except in XFA builds, but is\n included for the sake of symmetry."]
2961 pub fn FORM_OnRButtonDown(
2962 hHandle: FPDF_FORMHANDLE,
2963 page: FPDF_PAGE,
2964 modifier: ::std::os::raw::c_int,
2965 page_x: f64,
2966 page_y: f64,
2967 ) -> FPDF_BOOL;
2968}
2969unsafe extern "C" {
2970 #[doc = " Function: FORM_OnLButtonUp\n Call this member function when the user releases the left\n mouse button.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n modifier - Indicates whether various virtual keys are down.\n page_x - Specifies the x-coordinate of the cursor in device.\n page_y - Specifies the y-coordinate of the cursor in device.\n Return Value:\n True indicates success; otherwise false."]
2971 pub fn FORM_OnLButtonUp(
2972 hHandle: FPDF_FORMHANDLE,
2973 page: FPDF_PAGE,
2974 modifier: ::std::os::raw::c_int,
2975 page_x: f64,
2976 page_y: f64,
2977 ) -> FPDF_BOOL;
2978}
2979unsafe extern "C" {
2980 #[doc = " Function: FORM_OnRButtonUp\n Same as above, execpt for the right mouse button.\n Comments:\n At the present time, has no effect except in XFA builds, but is\n included for the sake of symmetry."]
2981 pub fn FORM_OnRButtonUp(
2982 hHandle: FPDF_FORMHANDLE,
2983 page: FPDF_PAGE,
2984 modifier: ::std::os::raw::c_int,
2985 page_x: f64,
2986 page_y: f64,
2987 ) -> FPDF_BOOL;
2988}
2989unsafe extern "C" {
2990 #[doc = " Function: FORM_OnLButtonDoubleClick\n Call this member function when the user double clicks the\n left mouse button.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n modifier - Indicates whether various virtual keys are down.\n page_x - Specifies the x-coordinate of the cursor in PDF user\n space.\n page_y - Specifies the y-coordinate of the cursor in PDF user\n space.\n Return Value:\n True indicates success; otherwise false."]
2991 pub fn FORM_OnLButtonDoubleClick(
2992 hHandle: FPDF_FORMHANDLE,
2993 page: FPDF_PAGE,
2994 modifier: ::std::os::raw::c_int,
2995 page_x: f64,
2996 page_y: f64,
2997 ) -> FPDF_BOOL;
2998}
2999unsafe extern "C" {
3000 #[doc = " Function: FORM_OnKeyDown\n Call this member function when a nonsystem key is pressed.\n Parameters:\n hHandle - Handle to the form fill module, aseturned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n nKeyCode - The virtual-key code of the given key (see\n fpdf_fwlevent.h for virtual key codes).\n modifier - Mask of key flags (see fpdf_fwlevent.h for key\n flag values).\n Return Value:\n True indicates success; otherwise false."]
3001 pub fn FORM_OnKeyDown(
3002 hHandle: FPDF_FORMHANDLE,
3003 page: FPDF_PAGE,
3004 nKeyCode: ::std::os::raw::c_int,
3005 modifier: ::std::os::raw::c_int,
3006 ) -> FPDF_BOOL;
3007}
3008unsafe extern "C" {
3009 #[doc = " Function: FORM_OnKeyUp\n Call this member function when a nonsystem key is released.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n nKeyCode - The virtual-key code of the given key (see\n fpdf_fwlevent.h for virtual key codes).\n modifier - Mask of key flags (see fpdf_fwlevent.h for key\n flag values).\n Return Value:\n True indicates success; otherwise false.\n Comments:\n Currently unimplemented and always returns false. PDFium reserves this\n API and may implement it in the future on an as-needed basis."]
3010 pub fn FORM_OnKeyUp(
3011 hHandle: FPDF_FORMHANDLE,
3012 page: FPDF_PAGE,
3013 nKeyCode: ::std::os::raw::c_int,
3014 modifier: ::std::os::raw::c_int,
3015 ) -> FPDF_BOOL;
3016}
3017unsafe extern "C" {
3018 #[doc = " Function: FORM_OnChar\n Call this member function when a keystroke translates to a\n nonsystem character.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n nChar - The character code value itself.\n modifier - Mask of key flags (see fpdf_fwlevent.h for key\n flag values).\n Return Value:\n True indicates success; otherwise false."]
3019 pub fn FORM_OnChar(
3020 hHandle: FPDF_FORMHANDLE,
3021 page: FPDF_PAGE,
3022 nChar: ::std::os::raw::c_int,
3023 modifier: ::std::os::raw::c_int,
3024 ) -> FPDF_BOOL;
3025}
3026unsafe extern "C" {
3027 #[doc = " Experimental API\n Function: FORM_GetFocusedText\n Call this function to obtain the text within the current focused\n field, if any.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n buffer - Buffer for holding the form text, encoded in\n UTF-16LE. If NULL, |buffer| is not modified.\n buflen - Length of |buffer| in bytes. If |buflen| is less\n than the length of the form text string, |buffer| is\n not modified.\n Return Value:\n Length in bytes for the text in the focused field."]
3028 pub fn FORM_GetFocusedText(
3029 hHandle: FPDF_FORMHANDLE,
3030 page: FPDF_PAGE,
3031 buffer: *mut ::std::os::raw::c_void,
3032 buflen: ::std::os::raw::c_ulong,
3033 ) -> ::std::os::raw::c_ulong;
3034}
3035unsafe extern "C" {
3036 #[doc = " Function: FORM_GetSelectedText\n Call this function to obtain selected text within a form text\n field or form combobox text field.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n buffer - Buffer for holding the selected text, encoded in\n UTF-16LE. If NULL, |buffer| is not modified.\n buflen - Length of |buffer| in bytes. If |buflen| is less\n than the length of the selected text string,\n |buffer| is not modified.\n Return Value:\n Length in bytes of selected text in form text field or form combobox\n text field."]
3037 pub fn FORM_GetSelectedText(
3038 hHandle: FPDF_FORMHANDLE,
3039 page: FPDF_PAGE,
3040 buffer: *mut ::std::os::raw::c_void,
3041 buflen: ::std::os::raw::c_ulong,
3042 ) -> ::std::os::raw::c_ulong;
3043}
3044unsafe extern "C" {
3045 #[doc = " Experimental API\n Function: FORM_ReplaceAndKeepSelection\n Call this function to replace the selected text in a form\n text field or user-editable form combobox text field with another\n text string (which can be empty or non-empty). If there is no\n selected text, this function will append the replacement text after\n the current caret position. After the insertion, the inserted text\n will be selected.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as Returned by FPDF_LoadPage().\n wsText - The text to be inserted, in UTF-16LE format.\n Return Value:\n None."]
3046 pub fn FORM_ReplaceAndKeepSelection(
3047 hHandle: FPDF_FORMHANDLE,
3048 page: FPDF_PAGE,
3049 wsText: FPDF_WIDESTRING,
3050 );
3051}
3052unsafe extern "C" {
3053 #[doc = " Function: FORM_ReplaceSelection\n Call this function to replace the selected text in a form\n text field or user-editable form combobox text field with another\n text string (which can be empty or non-empty). If there is no\n selected text, this function will append the replacement text after\n the current caret position. After the insertion, the selection range\n will be set to empty.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as Returned by FPDF_LoadPage().\n wsText - The text to be inserted, in UTF-16LE format.\n Return Value:\n None."]
3054 pub fn FORM_ReplaceSelection(
3055 hHandle: FPDF_FORMHANDLE,
3056 page: FPDF_PAGE,
3057 wsText: FPDF_WIDESTRING,
3058 );
3059}
3060unsafe extern "C" {
3061 #[doc = " Experimental API\n Function: FORM_SelectAllText\n Call this function to select all the text within the currently focused\n form text field or form combobox text field.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n Return Value:\n Whether the operation succeeded or not."]
3062 pub fn FORM_SelectAllText(hHandle: FPDF_FORMHANDLE, page: FPDF_PAGE) -> FPDF_BOOL;
3063}
3064unsafe extern "C" {
3065 #[doc = " Function: FORM_CanUndo\n Find out if it is possible for the current focused widget in a given\n form to perform an undo operation.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n Return Value:\n True if it is possible to undo."]
3066 pub fn FORM_CanUndo(hHandle: FPDF_FORMHANDLE, page: FPDF_PAGE) -> FPDF_BOOL;
3067}
3068unsafe extern "C" {
3069 #[doc = " Function: FORM_CanRedo\n Find out if it is possible for the current focused widget in a given\n form to perform a redo operation.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n Return Value:\n True if it is possible to redo."]
3070 pub fn FORM_CanRedo(hHandle: FPDF_FORMHANDLE, page: FPDF_PAGE) -> FPDF_BOOL;
3071}
3072unsafe extern "C" {
3073 #[doc = " Function: FORM_Undo\n Make the current focused widget perform an undo operation.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n Return Value:\n True if the undo operation succeeded."]
3074 pub fn FORM_Undo(hHandle: FPDF_FORMHANDLE, page: FPDF_PAGE) -> FPDF_BOOL;
3075}
3076unsafe extern "C" {
3077 #[doc = " Function: FORM_Redo\n Make the current focused widget perform a redo operation.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page, as returned by FPDF_LoadPage().\n Return Value:\n True if the redo operation succeeded."]
3078 pub fn FORM_Redo(hHandle: FPDF_FORMHANDLE, page: FPDF_PAGE) -> FPDF_BOOL;
3079}
3080unsafe extern "C" {
3081 #[doc = " Function: FORM_ForceToKillFocus.\n Call this member function to force to kill the focus of the form\n field which has focus. If it would kill the focus of a form field,\n save the value of form field if was changed by theuser.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n Return Value:\n True indicates success; otherwise false."]
3082 pub fn FORM_ForceToKillFocus(hHandle: FPDF_FORMHANDLE) -> FPDF_BOOL;
3083}
3084unsafe extern "C" {
3085 #[doc = " Experimental API.\n Function: FORM_GetFocusedAnnot.\n Call this member function to get the currently focused annotation.\n Parameters:\n handle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n page_index - Buffer to hold the index number of the page which\n contains the focused annotation. 0 for the first page.\n Can't be NULL.\n annot - Buffer to hold the focused annotation. Can't be NULL.\n Return Value:\n On success, return true and write to the out parameters. Otherwise\n return false and leave the out parameters unmodified.\n Comments:\n Not currently supported for XFA forms - will report no focused\n annotation.\n Must call FPDFPage_CloseAnnot() when the annotation returned in |annot|\n by this function is no longer needed.\n This will return true and set |page_index| to -1 and |annot| to NULL,\n if there is no focused annotation."]
3086 pub fn FORM_GetFocusedAnnot(
3087 handle: FPDF_FORMHANDLE,
3088 page_index: *mut ::std::os::raw::c_int,
3089 annot: *mut FPDF_ANNOTATION,
3090 ) -> FPDF_BOOL;
3091}
3092unsafe extern "C" {
3093 #[doc = " Experimental API.\n Function: FORM_SetFocusedAnnot.\n Call this member function to set the currently focused annotation.\n Parameters:\n handle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - Handle to an annotation.\n Return Value:\n True indicates success; otherwise false.\n Comments:\n |annot| can't be NULL. To kill focus, use FORM_ForceToKillFocus()\n instead."]
3094 pub fn FORM_SetFocusedAnnot(handle: FPDF_FORMHANDLE, annot: FPDF_ANNOTATION) -> FPDF_BOOL;
3095}
3096unsafe extern "C" {
3097 #[doc = " Function: FPDFPage_HasFormFieldAtPoint\n Get the form field type by point.\n Parameters:\n hHandle - Handle to the form fill module. Returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page. Returned by FPDF_LoadPage().\n page_x - X position in PDF \"user space\".\n page_y - Y position in PDF \"user space\".\n Return Value:\n Return the type of the form field; -1 indicates no field.\n See field types above."]
3098 pub fn FPDFPage_HasFormFieldAtPoint(
3099 hHandle: FPDF_FORMHANDLE,
3100 page: FPDF_PAGE,
3101 page_x: f64,
3102 page_y: f64,
3103 ) -> ::std::os::raw::c_int;
3104}
3105unsafe extern "C" {
3106 #[doc = " Function: FPDFPage_FormFieldZOrderAtPoint\n Get the form field z-order by point.\n Parameters:\n hHandle - Handle to the form fill module. Returned by\n FPDFDOC_InitFormFillEnvironment().\n page - Handle to the page. Returned by FPDF_LoadPage().\n page_x - X position in PDF \"user space\".\n page_y - Y position in PDF \"user space\".\n Return Value:\n Return the z-order of the form field; -1 indicates no field.\n Higher numbers are closer to the front."]
3107 pub fn FPDFPage_FormFieldZOrderAtPoint(
3108 hHandle: FPDF_FORMHANDLE,
3109 page: FPDF_PAGE,
3110 page_x: f64,
3111 page_y: f64,
3112 ) -> ::std::os::raw::c_int;
3113}
3114unsafe extern "C" {
3115 #[doc = " Function: FPDF_SetFormFieldHighlightColor\n Set the highlight color of the specified (or all) form fields\n in the document.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n doc - Handle to the document, as returned by\n FPDF_LoadDocument().\n fieldType - A 32-bit integer indicating the type of a form\n field (defined above).\n color - The highlight color of the form field. Constructed by\n 0xxxrrggbb.\n Return Value:\n None.\n Comments:\n When the parameter fieldType is set to FPDF_FORMFIELD_UNKNOWN, the\n highlight color will be applied to all the form fields in the\n document.\n Please refresh the client window to show the highlight immediately\n if necessary."]
3116 pub fn FPDF_SetFormFieldHighlightColor(
3117 hHandle: FPDF_FORMHANDLE,
3118 fieldType: ::std::os::raw::c_int,
3119 color: ::std::os::raw::c_ulong,
3120 );
3121}
3122unsafe extern "C" {
3123 #[doc = " Function: FPDF_SetFormFieldHighlightAlpha\n Set the transparency of the form field highlight color in the\n document.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n doc - Handle to the document, as returaned by\n FPDF_LoadDocument().\n alpha - The transparency of the form field highlight color,\n between 0-255.\n Return Value:\n None."]
3124 pub fn FPDF_SetFormFieldHighlightAlpha(
3125 hHandle: FPDF_FORMHANDLE,
3126 alpha: ::std::os::raw::c_uchar,
3127 );
3128}
3129unsafe extern "C" {
3130 #[doc = " Function: FPDF_RemoveFormFieldHighlight\n Remove the form field highlight color in the document.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n Return Value:\n None.\n Comments:\n Please refresh the client window to remove the highlight immediately\n if necessary."]
3131 pub fn FPDF_RemoveFormFieldHighlight(hHandle: FPDF_FORMHANDLE);
3132}
3133unsafe extern "C" {
3134 #[doc = " Function: FPDF_FFLDraw\n Render FormFields and popup window on a page to a device independent\n bitmap.\n Parameters:\n hHandle - Handle to the form fill module, as returned by\n FPDFDOC_InitFormFillEnvironment().\n bitmap - Handle to the device independent bitmap (as the\n output buffer). Bitmap handles can be created by\n FPDFBitmap_Create().\n page - Handle to the page, as returned by FPDF_LoadPage().\n start_x - Left pixel position of the display area in the\n device coordinates.\n start_y - Top pixel position of the display area in the device\n coordinates.\n size_x - Horizontal size (in pixels) for displaying the page.\n size_y - Vertical size (in pixels) for displaying the page.\n rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees\n clockwise), 2 (rotated 180 degrees), 3 (rotated 90\n degrees counter-clockwise).\n flags - 0 for normal display, or combination of flags\n defined above.\n Return Value:\n None.\n Comments:\n This function is designed to render annotations that are\n user-interactive, which are widget annotations (for FormFields) and\n popup annotations.\n With the FPDF_ANNOT flag, this function will render a popup annotation\n when users mouse-hover on a non-widget annotation. Regardless of\n FPDF_ANNOT flag, this function will always render widget annotations\n for FormFields.\n In order to implement the FormFill functions, implementation should\n call this function after rendering functions, such as\n FPDF_RenderPageBitmap() or FPDF_RenderPageBitmap_Start(), have\n finished rendering the page contents."]
3135 pub fn FPDF_FFLDraw(
3136 hHandle: FPDF_FORMHANDLE,
3137 bitmap: FPDF_BITMAP,
3138 page: FPDF_PAGE,
3139 start_x: ::std::os::raw::c_int,
3140 start_y: ::std::os::raw::c_int,
3141 size_x: ::std::os::raw::c_int,
3142 size_y: ::std::os::raw::c_int,
3143 rotate: ::std::os::raw::c_int,
3144 flags: ::std::os::raw::c_int,
3145 );
3146}
3147unsafe extern "C" {
3148 pub fn FPDF_FFLDrawSkia(
3149 hHandle: FPDF_FORMHANDLE,
3150 canvas: FPDF_SKIA_CANVAS,
3151 page: FPDF_PAGE,
3152 start_x: ::std::os::raw::c_int,
3153 start_y: ::std::os::raw::c_int,
3154 size_x: ::std::os::raw::c_int,
3155 size_y: ::std::os::raw::c_int,
3156 rotate: ::std::os::raw::c_int,
3157 flags: ::std::os::raw::c_int,
3158 );
3159}
3160unsafe extern "C" {
3161 #[doc = " Experimental API\n Function: FPDF_GetFormType\n Returns the type of form contained in the PDF document.\n Parameters:\n document - Handle to document.\n Return Value:\n Integer value representing one of the FORMTYPE_ values.\n Comments:\n If |document| is NULL, then the return value is FORMTYPE_NONE."]
3162 pub fn FPDF_GetFormType(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
3163}
3164unsafe extern "C" {
3165 #[doc = " Experimental API\n Function: FORM_SetIndexSelected\n Selects/deselects the value at the given |index| of the focused\n annotation.\n Parameters:\n hHandle - Handle to the form fill module. Returned by\n FPDFDOC_InitFormFillEnvironment.\n page - Handle to the page. Returned by FPDF_LoadPage\n index - 0-based index of value to be set as\n selected/unselected\n selected - true to select, false to deselect\n Return Value:\n TRUE if the operation succeeded.\n FALSE if the operation failed or widget is not a supported type.\n Comments:\n Intended for use with listbox/combobox widget types. Comboboxes\n have at most a single value selected at a time which cannot be\n deselected. Deselect on a combobox is a no-op that returns false.\n Default implementation is a no-op that will return false for\n other types.\n Not currently supported for XFA forms - will return false."]
3166 pub fn FORM_SetIndexSelected(
3167 hHandle: FPDF_FORMHANDLE,
3168 page: FPDF_PAGE,
3169 index: ::std::os::raw::c_int,
3170 selected: FPDF_BOOL,
3171 ) -> FPDF_BOOL;
3172}
3173unsafe extern "C" {
3174 #[doc = " Experimental API\n Function: FORM_IsIndexSelected\n Returns whether or not the value at |index| of the focused\n annotation is currently selected.\n Parameters:\n hHandle - Handle to the form fill module. Returned by\n FPDFDOC_InitFormFillEnvironment.\n page - Handle to the page. Returned by FPDF_LoadPage\n index - 0-based Index of value to check\n Return Value:\n TRUE if value at |index| is currently selected.\n FALSE if value at |index| is not selected or widget is not a\n supported type.\n Comments:\n Intended for use with listbox/combobox widget types. Default\n implementation is a no-op that will return false for other types.\n Not currently supported for XFA forms - will return false."]
3175 pub fn FORM_IsIndexSelected(
3176 hHandle: FPDF_FORMHANDLE,
3177 page: FPDF_PAGE,
3178 index: ::std::os::raw::c_int,
3179 ) -> FPDF_BOOL;
3180}
3181unsafe extern "C" {
3182 #[doc = " Function: FPDF_LoadXFA\n If the document consists of XFA fields, call this method to\n attempt to load XFA fields.\n Parameters:\n document - Handle to document from FPDF_LoadDocument().\n Return Value:\n TRUE upon success, otherwise FALSE. If XFA support is not built\n into PDFium, performs no action and always returns FALSE."]
3183 pub fn FPDF_LoadXFA(document: FPDF_DOCUMENT) -> FPDF_BOOL;
3184}
3185unsafe extern "C" {
3186 #[doc = " Function: FPDFText_LoadPage\n Prepare information about all characters in a page.\n Parameters:\n page - Handle to the page. Returned by FPDF_LoadPage function\n (in FPDFVIEW module).\n Return value:\n A handle to the text page information structure.\n NULL if something goes wrong.\n Comments:\n Application must call FPDFText_ClosePage to release the text page\n information.\n"]
3187 pub fn FPDFText_LoadPage(page: FPDF_PAGE) -> FPDF_TEXTPAGE;
3188}
3189unsafe extern "C" {
3190 #[doc = " Function: FPDFText_ClosePage\n Release all resources allocated for a text page information\n structure.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n Return Value:\n None.\n"]
3191 pub fn FPDFText_ClosePage(text_page: FPDF_TEXTPAGE);
3192}
3193unsafe extern "C" {
3194 #[doc = " Function: FPDFText_CountChars\n Get number of characters in a page.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n Return value:\n Number of characters in the page. Return -1 for error.\n Generated characters, like additional space characters, new line\n characters, are also counted.\n Comments:\n Characters in a page form a \"stream\", inside the stream, each\n character has an index.\n We will use the index parameters in many of FPDFTEXT functions. The\n first character in the page\n has an index value of zero.\n"]
3195 pub fn FPDFText_CountChars(text_page: FPDF_TEXTPAGE) -> ::std::os::raw::c_int;
3196}
3197unsafe extern "C" {
3198 #[doc = " Function: FPDFText_GetUnicode\n Get Unicode of a character in a page.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n Return value:\n The Unicode of the particular character.\n If a character is not encoded in Unicode and Foxit engine can't\n convert to Unicode,\n the return value will be zero.\n"]
3199 pub fn FPDFText_GetUnicode(
3200 text_page: FPDF_TEXTPAGE,
3201 index: ::std::os::raw::c_int,
3202 ) -> ::std::os::raw::c_uint;
3203}
3204unsafe extern "C" {
3205 #[doc = " Experimental API.\n Function: FPDFText_GetTextObject\n Get the FPDF_PAGEOBJECT associated with a given character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n Return value:\n The associated text object for the character at |index|, or NULL on\n error. The returned text object, if non-null, is of type\n |FPDF_PAGEOBJ_TEXT|. The caller does not own the returned object.\n"]
3206 pub fn FPDFText_GetTextObject(
3207 text_page: FPDF_TEXTPAGE,
3208 index: ::std::os::raw::c_int,
3209 ) -> FPDF_PAGEOBJECT;
3210}
3211unsafe extern "C" {
3212 #[doc = " Experimental API.\n Function: FPDFText_IsGenerated\n Get if a character in a page is generated by PDFium.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n Return value:\n 1 if the character is generated by PDFium.\n 0 if the character is not generated by PDFium.\n -1 if there was an error.\n"]
3213 pub fn FPDFText_IsGenerated(
3214 text_page: FPDF_TEXTPAGE,
3215 index: ::std::os::raw::c_int,
3216 ) -> ::std::os::raw::c_int;
3217}
3218unsafe extern "C" {
3219 #[doc = " Experimental API.\n Function: FPDFText_IsHyphen\n Get if a character in a page is a hyphen.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n Return value:\n 1 if the character is a hyphen.\n 0 if the character is not a hyphen.\n -1 if there was an error.\n"]
3220 pub fn FPDFText_IsHyphen(
3221 text_page: FPDF_TEXTPAGE,
3222 index: ::std::os::raw::c_int,
3223 ) -> ::std::os::raw::c_int;
3224}
3225unsafe extern "C" {
3226 #[doc = " Experimental API.\n Function: FPDFText_HasUnicodeMapError\n Get if a character in a page has an invalid unicode mapping.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n Return value:\n 1 if the character has an invalid unicode mapping.\n 0 if the character has no known unicode mapping issues.\n -1 if there was an error.\n"]
3227 pub fn FPDFText_HasUnicodeMapError(
3228 text_page: FPDF_TEXTPAGE,
3229 index: ::std::os::raw::c_int,
3230 ) -> ::std::os::raw::c_int;
3231}
3232unsafe extern "C" {
3233 #[doc = " Function: FPDFText_GetFontSize\n Get the font size of a particular character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n Return value:\n The font size of the particular character, measured in points (about\n 1/72 inch). This is the typographic size of the font (so called\n \"em size\").\n"]
3234 pub fn FPDFText_GetFontSize(text_page: FPDF_TEXTPAGE, index: ::std::os::raw::c_int) -> f64;
3235}
3236unsafe extern "C" {
3237 #[doc = " Experimental API.\n Function: FPDFText_GetFontInfo\n Get the font name and flags of a particular character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n buffer - A buffer receiving the font name.\n buflen - The length of |buffer| in bytes.\n flags - Optional pointer to an int receiving the font flags.\n These flags should be interpreted per PDF spec 1.7\n Section 5.7.1 Font Descriptor Flags.\n Return value:\n On success, return the length of the font name, including the\n trailing NUL character, in bytes. If this length is less than or\n equal to |length|, |buffer| is set to the font name, |flags| is\n set to the font flags. |buffer| is in UTF-8 encoding. Return 0 on\n failure.\n"]
3238 pub fn FPDFText_GetFontInfo(
3239 text_page: FPDF_TEXTPAGE,
3240 index: ::std::os::raw::c_int,
3241 buffer: *mut ::std::os::raw::c_void,
3242 buflen: ::std::os::raw::c_ulong,
3243 flags: *mut ::std::os::raw::c_int,
3244 ) -> ::std::os::raw::c_ulong;
3245}
3246unsafe extern "C" {
3247 #[doc = " Experimental API.\n Function: FPDFText_GetFontWeight\n Get the font weight of a particular character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n Return value:\n On success, return the font weight of the particular character. If\n |text_page| is invalid, if |index| is out of bounds, or if the\n character's text object is undefined, return -1.\n"]
3248 pub fn FPDFText_GetFontWeight(
3249 text_page: FPDF_TEXTPAGE,
3250 index: ::std::os::raw::c_int,
3251 ) -> ::std::os::raw::c_int;
3252}
3253unsafe extern "C" {
3254 #[doc = " Experimental API.\n Function: FPDFText_GetFillColor\n Get the fill color of a particular character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n R - Pointer to an unsigned int number receiving the\n red value of the fill color.\n G - Pointer to an unsigned int number receiving the\n green value of the fill color.\n B - Pointer to an unsigned int number receiving the\n blue value of the fill color.\n A - Pointer to an unsigned int number receiving the\n alpha value of the fill color.\n Return value:\n Whether the call succeeded. If false, |R|, |G|, |B| and |A| are\n unchanged.\n"]
3255 pub fn FPDFText_GetFillColor(
3256 text_page: FPDF_TEXTPAGE,
3257 index: ::std::os::raw::c_int,
3258 R: *mut ::std::os::raw::c_uint,
3259 G: *mut ::std::os::raw::c_uint,
3260 B: *mut ::std::os::raw::c_uint,
3261 A: *mut ::std::os::raw::c_uint,
3262 ) -> FPDF_BOOL;
3263}
3264unsafe extern "C" {
3265 #[doc = " Experimental API.\n Function: FPDFText_GetStrokeColor\n Get the stroke color of a particular character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n R - Pointer to an unsigned int number receiving the\n red value of the stroke color.\n G - Pointer to an unsigned int number receiving the\n green value of the stroke color.\n B - Pointer to an unsigned int number receiving the\n blue value of the stroke color.\n A - Pointer to an unsigned int number receiving the\n alpha value of the stroke color.\n Return value:\n Whether the call succeeded. If false, |R|, |G|, |B| and |A| are\n unchanged.\n"]
3266 pub fn FPDFText_GetStrokeColor(
3267 text_page: FPDF_TEXTPAGE,
3268 index: ::std::os::raw::c_int,
3269 R: *mut ::std::os::raw::c_uint,
3270 G: *mut ::std::os::raw::c_uint,
3271 B: *mut ::std::os::raw::c_uint,
3272 A: *mut ::std::os::raw::c_uint,
3273 ) -> FPDF_BOOL;
3274}
3275unsafe extern "C" {
3276 #[doc = " Experimental API.\n Function: FPDFText_GetCharAngle\n Get character rotation angle.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n Return Value:\n On success, return the angle value in radian. Value will always be\n greater or equal to 0. If |text_page| is invalid, or if |index| is\n out of bounds, then return -1.\n"]
3277 pub fn FPDFText_GetCharAngle(text_page: FPDF_TEXTPAGE, index: ::std::os::raw::c_int) -> f32;
3278}
3279unsafe extern "C" {
3280 #[doc = " Function: FPDFText_GetCharBox\n Get bounding box of a particular character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n left - Pointer to a double number receiving left position\n of the character box.\n right - Pointer to a double number receiving right position\n of the character box.\n bottom - Pointer to a double number receiving bottom position\n of the character box.\n top - Pointer to a double number receiving top position of\n the character box.\n Return Value:\n On success, return TRUE and fill in |left|, |right|, |bottom|, and\n |top|. If |text_page| is invalid, or if |index| is out of bounds,\n then return FALSE, and the out parameters remain unmodified.\n Comments:\n All positions are measured in PDF \"user space\".\n"]
3281 pub fn FPDFText_GetCharBox(
3282 text_page: FPDF_TEXTPAGE,
3283 index: ::std::os::raw::c_int,
3284 left: *mut f64,
3285 right: *mut f64,
3286 bottom: *mut f64,
3287 top: *mut f64,
3288 ) -> FPDF_BOOL;
3289}
3290unsafe extern "C" {
3291 #[doc = " Experimental API.\n Function: FPDFText_GetLooseCharBox\n Get a \"loose\" bounding box of a particular character, i.e., covering\n the entire glyph bounds, without taking the actual glyph shape into\n account.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n rect - Pointer to a FS_RECTF receiving the character box.\n Return Value:\n On success, return TRUE and fill in |rect|. If |text_page| is\n invalid, or if |index| is out of bounds, then return FALSE, and the\n |rect| out parameter remains unmodified.\n Comments:\n All positions are measured in PDF \"user space\".\n"]
3292 pub fn FPDFText_GetLooseCharBox(
3293 text_page: FPDF_TEXTPAGE,
3294 index: ::std::os::raw::c_int,
3295 rect: *mut FS_RECTF,
3296 ) -> FPDF_BOOL;
3297}
3298unsafe extern "C" {
3299 #[doc = " Experimental API.\n Function: FPDFText_GetMatrix\n Get the effective transformation matrix for a particular character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage().\n index - Zero-based index of the character.\n matrix - Pointer to a FS_MATRIX receiving the transformation\n matrix.\n Return Value:\n On success, return TRUE and fill in |matrix|. If |text_page| is\n invalid, or if |index| is out of bounds, or if |matrix| is NULL,\n then return FALSE, and |matrix| remains unmodified.\n"]
3300 pub fn FPDFText_GetMatrix(
3301 text_page: FPDF_TEXTPAGE,
3302 index: ::std::os::raw::c_int,
3303 matrix: *mut FS_MATRIX,
3304 ) -> FPDF_BOOL;
3305}
3306unsafe extern "C" {
3307 #[doc = " Function: FPDFText_GetCharOrigin\n Get origin of a particular character.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n index - Zero-based index of the character.\n x - Pointer to a double number receiving x coordinate of\n the character origin.\n y - Pointer to a double number receiving y coordinate of\n the character origin.\n Return Value:\n Whether the call succeeded. If false, x and y are unchanged.\n Comments:\n All positions are measured in PDF \"user space\".\n"]
3308 pub fn FPDFText_GetCharOrigin(
3309 text_page: FPDF_TEXTPAGE,
3310 index: ::std::os::raw::c_int,
3311 x: *mut f64,
3312 y: *mut f64,
3313 ) -> FPDF_BOOL;
3314}
3315unsafe extern "C" {
3316 #[doc = " Function: FPDFText_GetCharIndexAtPos\n Get the index of a character at or nearby a certain position on the\n page.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n x - X position in PDF \"user space\".\n y - Y position in PDF \"user space\".\n xTolerance - An x-axis tolerance value for character hit\n detection, in point units.\n yTolerance - A y-axis tolerance value for character hit\n detection, in point units.\n Return Value:\n The zero-based index of the character at, or nearby the point (x,y).\n If there is no character at or nearby the point, return value will\n be -1. If an error occurs, -3 will be returned.\n"]
3317 pub fn FPDFText_GetCharIndexAtPos(
3318 text_page: FPDF_TEXTPAGE,
3319 x: f64,
3320 y: f64,
3321 xTolerance: f64,
3322 yTolerance: f64,
3323 ) -> ::std::os::raw::c_int;
3324}
3325unsafe extern "C" {
3326 #[doc = " Function: FPDFText_GetText\n Extract unicode text string from the page.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n start_index - Index for the start characters.\n count - Number of UCS-2 values to be extracted.\n result - A buffer (allocated by application) receiving the\n extracted UCS-2 values. The buffer must be able to\n hold `count` UCS-2 values plus a terminator.\n Return Value:\n Number of characters written into the result buffer, including the\n trailing terminator.\n Comments:\n This function ignores characters without UCS-2 representations.\n It considers all characters on the page, even those that are not\n visible when the page has a cropbox. To filter out the characters\n outside of the cropbox, use FPDF_GetPageBoundingBox() and\n FPDFText_GetCharBox().\n"]
3327 pub fn FPDFText_GetText(
3328 text_page: FPDF_TEXTPAGE,
3329 start_index: ::std::os::raw::c_int,
3330 count: ::std::os::raw::c_int,
3331 result: *mut ::std::os::raw::c_ushort,
3332 ) -> ::std::os::raw::c_int;
3333}
3334unsafe extern "C" {
3335 #[doc = " Function: FPDFText_CountRects\n Counts number of rectangular areas occupied by a segment of text,\n and caches the result for subsequent FPDFText_GetRect() calls.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n start_index - Index for the start character.\n count - Number of characters, or -1 for all remaining.\n Return value:\n Number of rectangles, 0 if text_page is null, or -1 on bad\n start_index.\n Comments:\n This function, along with FPDFText_GetRect can be used by\n applications to detect the position on the page for a text segment,\n so proper areas can be highlighted. The FPDFText_* functions will\n automatically merge small character boxes into bigger one if those\n characters are on the same line and use same font settings.\n"]
3336 pub fn FPDFText_CountRects(
3337 text_page: FPDF_TEXTPAGE,
3338 start_index: ::std::os::raw::c_int,
3339 count: ::std::os::raw::c_int,
3340 ) -> ::std::os::raw::c_int;
3341}
3342unsafe extern "C" {
3343 #[doc = " Function: FPDFText_GetRect\n Get a rectangular area from the result generated by\n FPDFText_CountRects.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n rect_index - Zero-based index for the rectangle.\n left - Pointer to a double value receiving the rectangle\n left boundary.\n top - Pointer to a double value receiving the rectangle\n top boundary.\n right - Pointer to a double value receiving the rectangle\n right boundary.\n bottom - Pointer to a double value receiving the rectangle\n bottom boundary.\n Return Value:\n On success, return TRUE and fill in |left|, |top|, |right|, and\n |bottom|. If |text_page| is invalid then return FALSE, and the out\n parameters remain unmodified. If |text_page| is valid but\n |rect_index| is out of bounds, then return FALSE and set the out\n parameters to 0.\n"]
3344 pub fn FPDFText_GetRect(
3345 text_page: FPDF_TEXTPAGE,
3346 rect_index: ::std::os::raw::c_int,
3347 left: *mut f64,
3348 top: *mut f64,
3349 right: *mut f64,
3350 bottom: *mut f64,
3351 ) -> FPDF_BOOL;
3352}
3353unsafe extern "C" {
3354 #[doc = " Function: FPDFText_GetBoundedText\n Extract unicode text within a rectangular boundary on the page.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n left - Left boundary.\n top - Top boundary.\n right - Right boundary.\n bottom - Bottom boundary.\n buffer - Caller-allocated buffer to receive UTF-16 values.\n buflen - Number of UTF-16 values (not bytes) that `buffer`\n is capable of holding.\n Return Value:\n If buffer is NULL or buflen is zero, return number of UTF-16\n values (not bytes) of text present within the rectangle, excluding\n a terminating NUL. Generally you should pass a buffer at least one\n larger than this if you want a terminating NUL, which will be\n provided if space is available. Otherwise, return number of UTF-16\n values copied into the buffer, including the terminating NUL when\n space for it is available.\n Comment:\n If the buffer is too small, as much text as will fit is copied into\n it. May return a split surrogate in that case.\n"]
3355 pub fn FPDFText_GetBoundedText(
3356 text_page: FPDF_TEXTPAGE,
3357 left: f64,
3358 top: f64,
3359 right: f64,
3360 bottom: f64,
3361 buffer: *mut ::std::os::raw::c_ushort,
3362 buflen: ::std::os::raw::c_int,
3363 ) -> ::std::os::raw::c_int;
3364}
3365unsafe extern "C" {
3366 #[doc = " Function: FPDFText_FindStart\n Start a search.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n findwhat - A unicode match pattern.\n flags - Option flags.\n start_index - Start from this character. -1 for end of the page.\n Return Value:\n A handle for the search context. FPDFText_FindClose must be called\n to release this handle.\n"]
3367 pub fn FPDFText_FindStart(
3368 text_page: FPDF_TEXTPAGE,
3369 findwhat: FPDF_WIDESTRING,
3370 flags: ::std::os::raw::c_ulong,
3371 start_index: ::std::os::raw::c_int,
3372 ) -> FPDF_SCHHANDLE;
3373}
3374unsafe extern "C" {
3375 #[doc = " Function: FPDFText_FindNext\n Search in the direction from page start to end.\n Parameters:\n handle - A search context handle returned by\n FPDFText_FindStart.\n Return Value:\n Whether a match is found.\n"]
3376 pub fn FPDFText_FindNext(handle: FPDF_SCHHANDLE) -> FPDF_BOOL;
3377}
3378unsafe extern "C" {
3379 #[doc = " Function: FPDFText_FindPrev\n Search in the direction from page end to start.\n Parameters:\n handle - A search context handle returned by\n FPDFText_FindStart.\n Return Value:\n Whether a match is found.\n"]
3380 pub fn FPDFText_FindPrev(handle: FPDF_SCHHANDLE) -> FPDF_BOOL;
3381}
3382unsafe extern "C" {
3383 #[doc = " Function: FPDFText_GetSchResultIndex\n Get the starting character index of the search result.\n Parameters:\n handle - A search context handle returned by\n FPDFText_FindStart.\n Return Value:\n Index for the starting character.\n"]
3384 pub fn FPDFText_GetSchResultIndex(handle: FPDF_SCHHANDLE) -> ::std::os::raw::c_int;
3385}
3386unsafe extern "C" {
3387 #[doc = " Function: FPDFText_GetSchCount\n Get the number of matched characters in the search result.\n Parameters:\n handle - A search context handle returned by\n FPDFText_FindStart.\n Return Value:\n Number of matched characters.\n"]
3388 pub fn FPDFText_GetSchCount(handle: FPDF_SCHHANDLE) -> ::std::os::raw::c_int;
3389}
3390unsafe extern "C" {
3391 #[doc = " Function: FPDFText_FindClose\n Release a search context.\n Parameters:\n handle - A search context handle returned by\n FPDFText_FindStart.\n Return Value:\n None.\n"]
3392 pub fn FPDFText_FindClose(handle: FPDF_SCHHANDLE);
3393}
3394unsafe extern "C" {
3395 #[doc = " Function: FPDFLink_LoadWebLinks\n Prepare information about weblinks in a page.\n Parameters:\n text_page - Handle to a text page information structure.\n Returned by FPDFText_LoadPage function.\n Return Value:\n A handle to the page's links information structure, or\n NULL if something goes wrong.\n Comments:\n Weblinks are those links implicitly embedded in PDF pages. PDF also\n has a type of annotation called \"link\" (FPDFTEXT doesn't deal with\n that kind of link). FPDFTEXT weblink feature is useful for\n automatically detecting links in the page contents. For example,\n things like \"https://www.example.com\" will be detected, so\n applications can allow user to click on those characters to activate\n the link, even the PDF doesn't come with link annotations.\n\n FPDFLink_CloseWebLinks must be called to release resources.\n"]
3396 pub fn FPDFLink_LoadWebLinks(text_page: FPDF_TEXTPAGE) -> FPDF_PAGELINK;
3397}
3398unsafe extern "C" {
3399 #[doc = " Function: FPDFLink_CountWebLinks\n Count number of detected web links.\n Parameters:\n link_page - Handle returned by FPDFLink_LoadWebLinks.\n Return Value:\n Number of detected web links.\n"]
3400 pub fn FPDFLink_CountWebLinks(link_page: FPDF_PAGELINK) -> ::std::os::raw::c_int;
3401}
3402unsafe extern "C" {
3403 #[doc = " Function: FPDFLink_GetURL\n Fetch the URL information for a detected web link.\n Parameters:\n link_page - Handle returned by FPDFLink_LoadWebLinks.\n link_index - Zero-based index for the link.\n buffer - A unicode buffer for the result.\n buflen - Number of 16-bit code units (not bytes) for the\n buffer, including an additional terminator.\n Return Value:\n If |buffer| is NULL or |buflen| is zero, return the number of 16-bit\n code units (not bytes) needed to buffer the result (an additional\n terminator is included in this count).\n Otherwise, copy the result into |buffer|, truncating at |buflen| if\n the result is too large to fit, and return the number of 16-bit code\n units actually copied into the buffer (the additional terminator is\n also included in this count).\n If |link_index| does not correspond to a valid link, then the result\n is an empty string.\n"]
3404 pub fn FPDFLink_GetURL(
3405 link_page: FPDF_PAGELINK,
3406 link_index: ::std::os::raw::c_int,
3407 buffer: *mut ::std::os::raw::c_ushort,
3408 buflen: ::std::os::raw::c_int,
3409 ) -> ::std::os::raw::c_int;
3410}
3411unsafe extern "C" {
3412 #[doc = " Function: FPDFLink_CountRects\n Count number of rectangular areas for the link.\n Parameters:\n link_page - Handle returned by FPDFLink_LoadWebLinks.\n link_index - Zero-based index for the link.\n Return Value:\n Number of rectangular areas for the link. If |link_index| does\n not correspond to a valid link, then 0 is returned.\n"]
3413 pub fn FPDFLink_CountRects(
3414 link_page: FPDF_PAGELINK,
3415 link_index: ::std::os::raw::c_int,
3416 ) -> ::std::os::raw::c_int;
3417}
3418unsafe extern "C" {
3419 #[doc = " Function: FPDFLink_GetRect\n Fetch the boundaries of a rectangle for a link.\n Parameters:\n link_page - Handle returned by FPDFLink_LoadWebLinks.\n link_index - Zero-based index for the link.\n rect_index - Zero-based index for a rectangle.\n left - Pointer to a double value receiving the rectangle\n left boundary.\n top - Pointer to a double value receiving the rectangle\n top boundary.\n right - Pointer to a double value receiving the rectangle\n right boundary.\n bottom - Pointer to a double value receiving the rectangle\n bottom boundary.\n Return Value:\n On success, return TRUE and fill in |left|, |top|, |right|, and\n |bottom|. If |link_page| is invalid or if |link_index| does not\n correspond to a valid link, then return FALSE, and the out\n parameters remain unmodified.\n"]
3420 pub fn FPDFLink_GetRect(
3421 link_page: FPDF_PAGELINK,
3422 link_index: ::std::os::raw::c_int,
3423 rect_index: ::std::os::raw::c_int,
3424 left: *mut f64,
3425 top: *mut f64,
3426 right: *mut f64,
3427 bottom: *mut f64,
3428 ) -> FPDF_BOOL;
3429}
3430unsafe extern "C" {
3431 #[doc = " Experimental API.\n Function: FPDFLink_GetTextRange\n Fetch the start char index and char count for a link.\n Parameters:\n link_page - Handle returned by FPDFLink_LoadWebLinks.\n link_index - Zero-based index for the link.\n start_char_index - pointer to int receiving the start char index\n char_count - pointer to int receiving the char count\n Return Value:\n On success, return TRUE and fill in |start_char_index| and\n |char_count|. if |link_page| is invalid or if |link_index| does\n not correspond to a valid link, then return FALSE and the out\n parameters remain unmodified.\n"]
3432 pub fn FPDFLink_GetTextRange(
3433 link_page: FPDF_PAGELINK,
3434 link_index: ::std::os::raw::c_int,
3435 start_char_index: *mut ::std::os::raw::c_int,
3436 char_count: *mut ::std::os::raw::c_int,
3437 ) -> FPDF_BOOL;
3438}
3439unsafe extern "C" {
3440 #[doc = " Function: FPDFLink_CloseWebLinks\n Release resources used by weblink feature.\n Parameters:\n link_page - Handle returned by FPDFLink_LoadWebLinks.\n Return Value:\n None.\n"]
3441 pub fn FPDFLink_CloseWebLinks(link_page: FPDF_PAGELINK);
3442}
3443unsafe extern "C" {
3444 #[doc = " Flatten annotations and form fields into the page contents.\n\n page - handle to the page.\n nFlag - One of the |FLAT_*| values denoting the page usage.\n\n Returns one of the |FLATTEN_*| values.\n\n Currently, all failures return |FLATTEN_FAIL| with no indication of the\n cause."]
3445 pub fn FPDFPage_Flatten(page: FPDF_PAGE, nFlag: ::std::os::raw::c_int)
3446 -> ::std::os::raw::c_int;
3447}
3448unsafe extern "C" {
3449 #[doc = " Experimental API.\n Gets the decoded data from the thumbnail of |page| if it exists.\n This only modifies |buffer| if |buflen| less than or equal to the\n size of the decoded data. Returns the size of the decoded\n data or 0 if thumbnail DNE. Optional, pass null to just retrieve\n the size of the buffer needed.\n\n page - handle to a page.\n buffer - buffer for holding the decoded image data.\n buflen - length of the buffer in bytes."]
3450 pub fn FPDFPage_GetDecodedThumbnailData(
3451 page: FPDF_PAGE,
3452 buffer: *mut ::std::os::raw::c_void,
3453 buflen: ::std::os::raw::c_ulong,
3454 ) -> ::std::os::raw::c_ulong;
3455}
3456unsafe extern "C" {
3457 #[doc = " Experimental API.\n Gets the raw data from the thumbnail of |page| if it exists.\n This only modifies |buffer| if |buflen| is less than or equal to\n the size of the raw data. Returns the size of the raw data or 0\n if thumbnail DNE. Optional, pass null to just retrieve the size\n of the buffer needed.\n\n page - handle to a page.\n buffer - buffer for holding the raw image data.\n buflen - length of the buffer in bytes."]
3458 pub fn FPDFPage_GetRawThumbnailData(
3459 page: FPDF_PAGE,
3460 buffer: *mut ::std::os::raw::c_void,
3461 buflen: ::std::os::raw::c_ulong,
3462 ) -> ::std::os::raw::c_ulong;
3463}
3464unsafe extern "C" {
3465 #[doc = " Experimental API.\n Returns the thumbnail of |page| as a FPDF_BITMAP. Returns a nullptr\n if unable to access the thumbnail's stream.\n\n page - handle to a page."]
3466 pub fn FPDFPage_GetThumbnailAsBitmap(page: FPDF_PAGE) -> FPDF_BITMAP;
3467}
3468pub const FPDF_FILEIDTYPE_FILEIDTYPE_PERMANENT: FPDF_FILEIDTYPE = 0;
3469pub const FPDF_FILEIDTYPE_FILEIDTYPE_CHANGING: FPDF_FILEIDTYPE = 1;
3470#[doc = " The file identifier entry type. See section 14.4 \"File Identifiers\" of the\n ISO 32000-1:2008 spec."]
3471pub type FPDF_FILEIDTYPE = ::std::os::raw::c_uint;
3472unsafe extern "C" {
3473 #[doc = " Get the first child of |bookmark|, or the first top-level bookmark item.\n\n document - handle to the document.\n bookmark - handle to the current bookmark. Pass NULL for the first top\n level item.\n\n Returns a handle to the first child of |bookmark| or the first top-level\n bookmark item. NULL if no child or top-level bookmark found.\n Note that another name for the bookmarks is the document outline, as\n described in ISO 32000-1:2008, section 12.3.3."]
3474 pub fn FPDFBookmark_GetFirstChild(
3475 document: FPDF_DOCUMENT,
3476 bookmark: FPDF_BOOKMARK,
3477 ) -> FPDF_BOOKMARK;
3478}
3479unsafe extern "C" {
3480 #[doc = " Get the next sibling of |bookmark|.\n\n document - handle to the document.\n bookmark - handle to the current bookmark.\n\n Returns a handle to the next sibling of |bookmark|, or NULL if this is the\n last bookmark at this level.\n\n Note that the caller is responsible for handling circular bookmark\n references, as may arise from malformed documents."]
3481 pub fn FPDFBookmark_GetNextSibling(
3482 document: FPDF_DOCUMENT,
3483 bookmark: FPDF_BOOKMARK,
3484 ) -> FPDF_BOOKMARK;
3485}
3486unsafe extern "C" {
3487 #[doc = " Get the title of |bookmark|.\n\n bookmark - handle to the bookmark.\n buffer - buffer for the title. May be NULL.\n buflen - the length of the buffer in bytes. May be 0.\n\n Returns the number of bytes in the title, including the terminating NUL\n character. The number of bytes is returned regardless of the |buffer| and\n |buflen| parameters.\n\n Regardless of the platform, the |buffer| is always in UTF-16LE encoding. The\n string is terminated by a UTF16 NUL character. If |buflen| is less than the\n required length, or |buffer| is NULL, |buffer| will not be modified."]
3488 pub fn FPDFBookmark_GetTitle(
3489 bookmark: FPDF_BOOKMARK,
3490 buffer: *mut ::std::os::raw::c_void,
3491 buflen: ::std::os::raw::c_ulong,
3492 ) -> ::std::os::raw::c_ulong;
3493}
3494unsafe extern "C" {
3495 #[doc = " Experimental API.\n Get the number of chlidren of |bookmark|.\n\n bookmark - handle to the bookmark.\n\n Returns a signed integer that represents the number of sub-items the given\n bookmark has. If the value is positive, child items shall be shown by default\n (open state). If the value is negative, child items shall be hidden by\n default (closed state). Please refer to PDF 32000-1:2008, Table 153.\n Returns 0 if the bookmark has no children or is invalid."]
3496 pub fn FPDFBookmark_GetCount(bookmark: FPDF_BOOKMARK) -> ::std::os::raw::c_int;
3497}
3498unsafe extern "C" {
3499 #[doc = " Find the bookmark with |title| in |document|.\n\n document - handle to the document.\n title - the UTF-16LE encoded Unicode title for which to search.\n\n Returns the handle to the bookmark, or NULL if |title| can't be found.\n\n FPDFBookmark_Find() will always return the first bookmark found even if\n multiple bookmarks have the same |title|."]
3500 pub fn FPDFBookmark_Find(document: FPDF_DOCUMENT, title: FPDF_WIDESTRING) -> FPDF_BOOKMARK;
3501}
3502unsafe extern "C" {
3503 #[doc = " Get the destination associated with |bookmark|.\n\n document - handle to the document.\n bookmark - handle to the bookmark.\n\n Returns the handle to the destination data, or NULL if no destination is\n associated with |bookmark|."]
3504 pub fn FPDFBookmark_GetDest(document: FPDF_DOCUMENT, bookmark: FPDF_BOOKMARK) -> FPDF_DEST;
3505}
3506unsafe extern "C" {
3507 #[doc = " Get the action associated with |bookmark|.\n\n bookmark - handle to the bookmark.\n\n Returns the handle to the action data, or NULL if no action is associated\n with |bookmark|.\n If this function returns a valid handle, it is valid as long as |bookmark| is\n valid.\n If this function returns NULL, FPDFBookmark_GetDest() should be called to get\n the |bookmark| destination data."]
3508 pub fn FPDFBookmark_GetAction(bookmark: FPDF_BOOKMARK) -> FPDF_ACTION;
3509}
3510unsafe extern "C" {
3511 #[doc = " Get the type of |action|.\n\n action - handle to the action.\n\n Returns one of:\n PDFACTION_UNSUPPORTED\n PDFACTION_GOTO\n PDFACTION_REMOTEGOTO\n PDFACTION_URI\n PDFACTION_LAUNCH"]
3512 pub fn FPDFAction_GetType(action: FPDF_ACTION) -> ::std::os::raw::c_ulong;
3513}
3514unsafe extern "C" {
3515 #[doc = " Get the destination of |action|.\n\n document - handle to the document.\n action - handle to the action. |action| must be a |PDFACTION_GOTO| or\n |PDFACTION_REMOTEGOTO|.\n\n Returns a handle to the destination data, or NULL on error, typically\n because the arguments were bad or the action was of the wrong type.\n\n In the case of |PDFACTION_REMOTEGOTO|, you must first call\n FPDFAction_GetFilePath(), then load the document at that path, then pass\n the document handle from that document as |document| to FPDFAction_GetDest()."]
3516 pub fn FPDFAction_GetDest(document: FPDF_DOCUMENT, action: FPDF_ACTION) -> FPDF_DEST;
3517}
3518unsafe extern "C" {
3519 #[doc = " Get the file path of |action|.\n\n action - handle to the action. |action| must be a |PDFACTION_LAUNCH| or\n |PDFACTION_REMOTEGOTO|.\n buffer - a buffer for output the path string. May be NULL.\n buflen - the length of the buffer, in bytes. May be 0.\n\n Returns the number of bytes in the file path, including the trailing NUL\n character, or 0 on error, typically because the arguments were bad or the\n action was of the wrong type.\n\n Regardless of the platform, the |buffer| is always in UTF-8 encoding.\n If |buflen| is less than the returned length, or |buffer| is NULL, |buffer|\n will not be modified."]
3520 pub fn FPDFAction_GetFilePath(
3521 action: FPDF_ACTION,
3522 buffer: *mut ::std::os::raw::c_void,
3523 buflen: ::std::os::raw::c_ulong,
3524 ) -> ::std::os::raw::c_ulong;
3525}
3526unsafe extern "C" {
3527 #[doc = " Get the URI path of |action|.\n\n document - handle to the document.\n action - handle to the action. Must be a |PDFACTION_URI|.\n buffer - a buffer for the path string. May be NULL.\n buflen - the length of the buffer, in bytes. May be 0.\n\n Returns the number of bytes in the URI path, including the trailing NUL\n character, or 0 on error, typically because the arguments were bad or the\n action was of the wrong type.\n\n The |buffer| may contain badly encoded data. The caller should validate the\n output. e.g. Check to see if it is UTF-8.\n\n If |buflen| is less than the returned length, or |buffer| is NULL, |buffer|\n will not be modified.\n\n Historically, the documentation for this API claimed |buffer| is always\n encoded in 7-bit ASCII, but did not actually enforce it.\n https://pdfium.googlesource.com/pdfium.git/+/d609e84cee2e14a18333247485af91df48a40592\n added that enforcement, but that did not work well for real world PDFs that\n used UTF-8. As of this writing, this API reverted back to its original\n behavior prior to commit d609e84cee."]
3528 pub fn FPDFAction_GetURIPath(
3529 document: FPDF_DOCUMENT,
3530 action: FPDF_ACTION,
3531 buffer: *mut ::std::os::raw::c_void,
3532 buflen: ::std::os::raw::c_ulong,
3533 ) -> ::std::os::raw::c_ulong;
3534}
3535unsafe extern "C" {
3536 #[doc = " Get the page index of |dest|.\n\n document - handle to the document.\n dest - handle to the destination.\n\n Returns the 0-based page index containing |dest|. Returns -1 on error."]
3537 pub fn FPDFDest_GetDestPageIndex(
3538 document: FPDF_DOCUMENT,
3539 dest: FPDF_DEST,
3540 ) -> ::std::os::raw::c_int;
3541}
3542unsafe extern "C" {
3543 #[doc = " Experimental API.\n Get the view (fit type) specified by |dest|.\n\n dest - handle to the destination.\n pNumParams - receives the number of view parameters, which is at most 4.\n pParams - buffer to write the view parameters. Must be at least 4\n FS_FLOATs long.\n Returns one of the PDFDEST_VIEW_* constants, PDFDEST_VIEW_UNKNOWN_MODE if\n |dest| does not specify a view."]
3544 pub fn FPDFDest_GetView(
3545 dest: FPDF_DEST,
3546 pNumParams: *mut ::std::os::raw::c_ulong,
3547 pParams: *mut FS_FLOAT,
3548 ) -> ::std::os::raw::c_ulong;
3549}
3550unsafe extern "C" {
3551 #[doc = " Get the (x, y, zoom) location of |dest| in the destination page, if the\n destination is in [page /XYZ x y zoom] syntax.\n\n dest - handle to the destination.\n hasXVal - out parameter; true if the x value is not null\n hasYVal - out parameter; true if the y value is not null\n hasZoomVal - out parameter; true if the zoom value is not null\n x - out parameter; the x coordinate, in page coordinates.\n y - out parameter; the y coordinate, in page coordinates.\n zoom - out parameter; the zoom value.\n Returns TRUE on successfully reading the /XYZ value.\n\n Note the [x, y, zoom] values are only set if the corresponding hasXVal,\n hasYVal or hasZoomVal flags are true."]
3552 pub fn FPDFDest_GetLocationInPage(
3553 dest: FPDF_DEST,
3554 hasXVal: *mut FPDF_BOOL,
3555 hasYVal: *mut FPDF_BOOL,
3556 hasZoomVal: *mut FPDF_BOOL,
3557 x: *mut FS_FLOAT,
3558 y: *mut FS_FLOAT,
3559 zoom: *mut FS_FLOAT,
3560 ) -> FPDF_BOOL;
3561}
3562unsafe extern "C" {
3563 #[doc = " Find a link at point (|x|,|y|) on |page|.\n\n page - handle to the document page.\n x - the x coordinate, in the page coordinate system.\n y - the y coordinate, in the page coordinate system.\n\n Returns a handle to the link, or NULL if no link found at the given point.\n\n You can convert coordinates from screen coordinates to page coordinates using\n FPDF_DeviceToPage()."]
3564 pub fn FPDFLink_GetLinkAtPoint(page: FPDF_PAGE, x: f64, y: f64) -> FPDF_LINK;
3565}
3566unsafe extern "C" {
3567 #[doc = " Find the Z-order of link at point (|x|,|y|) on |page|.\n\n page - handle to the document page.\n x - the x coordinate, in the page coordinate system.\n y - the y coordinate, in the page coordinate system.\n\n Returns the Z-order of the link, or -1 if no link found at the given point.\n Larger Z-order numbers are closer to the front.\n\n You can convert coordinates from screen coordinates to page coordinates using\n FPDF_DeviceToPage()."]
3568 pub fn FPDFLink_GetLinkZOrderAtPoint(page: FPDF_PAGE, x: f64, y: f64) -> ::std::os::raw::c_int;
3569}
3570unsafe extern "C" {
3571 #[doc = " Get destination info for |link|.\n\n document - handle to the document.\n link - handle to the link.\n\n Returns a handle to the destination, or NULL if there is no destination\n associated with the link. In this case, you should call FPDFLink_GetAction()\n to retrieve the action associated with |link|."]
3572 pub fn FPDFLink_GetDest(document: FPDF_DOCUMENT, link: FPDF_LINK) -> FPDF_DEST;
3573}
3574unsafe extern "C" {
3575 #[doc = " Get action info for |link|.\n\n link - handle to the link.\n\n Returns a handle to the action associated to |link|, or NULL if no action.\n If this function returns a valid handle, it is valid as long as |link| is\n valid."]
3576 pub fn FPDFLink_GetAction(link: FPDF_LINK) -> FPDF_ACTION;
3577}
3578unsafe extern "C" {
3579 #[doc = " Enumerates all the link annotations in |page|.\n\n page - handle to the page.\n start_pos - the start position, should initially be 0 and is updated with\n the next start position on return.\n link_annot - the link handle for |startPos|.\n\n Returns TRUE on success."]
3580 pub fn FPDFLink_Enumerate(
3581 page: FPDF_PAGE,
3582 start_pos: *mut ::std::os::raw::c_int,
3583 link_annot: *mut FPDF_LINK,
3584 ) -> FPDF_BOOL;
3585}
3586unsafe extern "C" {
3587 #[doc = " Experimental API.\n Gets FPDF_ANNOTATION object for |link_annot|.\n\n page - handle to the page in which FPDF_LINK object is present.\n link_annot - handle to link annotation.\n\n Returns FPDF_ANNOTATION from the FPDF_LINK and NULL on failure,\n if the input link annot or page is NULL."]
3588 pub fn FPDFLink_GetAnnot(page: FPDF_PAGE, link_annot: FPDF_LINK) -> FPDF_ANNOTATION;
3589}
3590unsafe extern "C" {
3591 #[doc = " Get the rectangle for |link_annot|.\n\n link_annot - handle to the link annotation.\n rect - the annotation rectangle.\n\n Returns true on success."]
3592 pub fn FPDFLink_GetAnnotRect(link_annot: FPDF_LINK, rect: *mut FS_RECTF) -> FPDF_BOOL;
3593}
3594unsafe extern "C" {
3595 #[doc = " Get the count of quadrilateral points to the |link_annot|.\n\n link_annot - handle to the link annotation.\n\n Returns the count of quadrilateral points."]
3596 pub fn FPDFLink_CountQuadPoints(link_annot: FPDF_LINK) -> ::std::os::raw::c_int;
3597}
3598unsafe extern "C" {
3599 #[doc = " Get the quadrilateral points for the specified |quad_index| in |link_annot|.\n\n link_annot - handle to the link annotation.\n quad_index - the specified quad point index.\n quad_points - receives the quadrilateral points.\n\n Returns true on success."]
3600 pub fn FPDFLink_GetQuadPoints(
3601 link_annot: FPDF_LINK,
3602 quad_index: ::std::os::raw::c_int,
3603 quad_points: *mut FS_QUADPOINTSF,
3604 ) -> FPDF_BOOL;
3605}
3606unsafe extern "C" {
3607 #[doc = " Experimental API\n Gets an additional-action from |page|.\n\n page - handle to the page, as returned by FPDF_LoadPage().\n aa_type - the type of the page object's addtional-action, defined\n in public/fpdf_formfill.h\n\n Returns the handle to the action data, or NULL if there is no\n additional-action of type |aa_type|.\n If this function returns a valid handle, it is valid as long as |page| is\n valid."]
3608 pub fn FPDF_GetPageAAction(page: FPDF_PAGE, aa_type: ::std::os::raw::c_int) -> FPDF_ACTION;
3609}
3610unsafe extern "C" {
3611 #[doc = " Experimental API.\n Get the file identifer defined in the trailer of |document|.\n\n document - handle to the document.\n id_type - the file identifier type to retrieve.\n buffer - a buffer for the file identifier. May be NULL.\n buflen - the length of the buffer, in bytes. May be 0.\n\n Returns the number of bytes in the file identifier, including the NUL\n terminator.\n\n The |buffer| is always a byte string. The |buffer| is followed by a NUL\n terminator. If |buflen| is less than the returned length, or |buffer| is\n NULL, |buffer| will not be modified."]
3612 pub fn FPDF_GetFileIdentifier(
3613 document: FPDF_DOCUMENT,
3614 id_type: FPDF_FILEIDTYPE,
3615 buffer: *mut ::std::os::raw::c_void,
3616 buflen: ::std::os::raw::c_ulong,
3617 ) -> ::std::os::raw::c_ulong;
3618}
3619unsafe extern "C" {
3620 #[doc = " Get meta-data |tag| content from |document|.\n\n document - handle to the document.\n tag - the tag to retrieve. The tag can be one of:\n Title, Author, Subject, Keywords, Creator, Producer,\n CreationDate, or ModDate.\n For detailed explanations of these tags and their respective\n values, please refer to PDF Reference 1.6, section 10.2.1,\n 'Document Information Dictionary'.\n buffer - a buffer for the tag. May be NULL.\n buflen - the length of the buffer, in bytes. May be 0.\n\n Returns the number of bytes in the tag, including trailing zeros.\n\n The |buffer| is always encoded in UTF-16LE. The |buffer| is followed by two\n bytes of zeros indicating the end of the string. If |buflen| is less than\n the returned length, or |buffer| is NULL, |buffer| will not be modified.\n\n For linearized files, FPDFAvail_IsFormAvail must be called before this, and\n it must have returned PDF_FORM_AVAIL or PDF_FORM_NOTEXIST. Before that, there\n is no guarantee the metadata has been loaded."]
3621 pub fn FPDF_GetMetaText(
3622 document: FPDF_DOCUMENT,
3623 tag: FPDF_BYTESTRING,
3624 buffer: *mut ::std::os::raw::c_void,
3625 buflen: ::std::os::raw::c_ulong,
3626 ) -> ::std::os::raw::c_ulong;
3627}
3628unsafe extern "C" {
3629 #[doc = " Get the page label for |page_index| from |document|.\n\n document - handle to the document.\n page_index - the 0-based index of the page.\n buffer - a buffer for the page label. May be NULL.\n buflen - the length of the buffer, in bytes. May be 0.\n\n Returns the number of bytes in the page label, including trailing zeros.\n\n The |buffer| is always encoded in UTF-16LE. The |buffer| is followed by two\n bytes of zeros indicating the end of the string. If |buflen| is less than\n the returned length, or |buffer| is NULL, |buffer| will not be modified."]
3630 pub fn FPDF_GetPageLabel(
3631 document: FPDF_DOCUMENT,
3632 page_index: ::std::os::raw::c_int,
3633 buffer: *mut ::std::os::raw::c_void,
3634 buflen: ::std::os::raw::c_ulong,
3635 ) -> ::std::os::raw::c_ulong;
3636}
3637unsafe extern "C" {
3638 #[doc = " Get the character index in |text_page| internal character list.\n\n text_page - a text page information structure.\n nTextIndex - index of the text returned from FPDFText_GetText().\n\n Returns the index of the character in internal character list. -1 for error."]
3639 pub fn FPDFText_GetCharIndexFromTextIndex(
3640 text_page: FPDF_TEXTPAGE,
3641 nTextIndex: ::std::os::raw::c_int,
3642 ) -> ::std::os::raw::c_int;
3643}
3644unsafe extern "C" {
3645 #[doc = " Get the text index in |text_page| internal character list.\n\n text_page - a text page information structure.\n nCharIndex - index of the character in internal character list.\n\n Returns the index of the text returned from FPDFText_GetText(). -1 for error."]
3646 pub fn FPDFText_GetTextIndexFromCharIndex(
3647 text_page: FPDF_TEXTPAGE,
3648 nCharIndex: ::std::os::raw::c_int,
3649 ) -> ::std::os::raw::c_int;
3650}
3651unsafe extern "C" {
3652 #[doc = " Experimental API.\n Function: FPDF_GetSignatureCount\n Get total number of signatures in the document.\n Parameters:\n document - Handle to document. Returned by FPDF_LoadDocument().\n Return value:\n Total number of signatures in the document on success, -1 on error."]
3653 pub fn FPDF_GetSignatureCount(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
3654}
3655unsafe extern "C" {
3656 #[doc = " Experimental API.\n Function: FPDF_GetSignatureObject\n Get the Nth signature of the document.\n Parameters:\n document - Handle to document. Returned by FPDF_LoadDocument().\n index - Index into the array of signatures of the document.\n Return value:\n Returns the handle to the signature, or NULL on failure. The caller\n does not take ownership of the returned FPDF_SIGNATURE. Instead, it\n remains valid until FPDF_CloseDocument() is called for the document."]
3657 pub fn FPDF_GetSignatureObject(
3658 document: FPDF_DOCUMENT,
3659 index: ::std::os::raw::c_int,
3660 ) -> FPDF_SIGNATURE;
3661}
3662unsafe extern "C" {
3663 #[doc = " Experimental API.\n Function: FPDFSignatureObj_GetContents\n Get the contents of a signature object.\n Parameters:\n signature - Handle to the signature object. Returned by\n FPDF_GetSignatureObject().\n buffer - The address of a buffer that receives the contents.\n length - The size, in bytes, of |buffer|.\n Return value:\n Returns the number of bytes in the contents on success, 0 on error.\n\n For public-key signatures, |buffer| is either a DER-encoded PKCS#1 binary or\n a DER-encoded PKCS#7 binary. If |length| is less than the returned length, or\n |buffer| is NULL, |buffer| will not be modified."]
3664 pub fn FPDFSignatureObj_GetContents(
3665 signature: FPDF_SIGNATURE,
3666 buffer: *mut ::std::os::raw::c_void,
3667 length: ::std::os::raw::c_ulong,
3668 ) -> ::std::os::raw::c_ulong;
3669}
3670unsafe extern "C" {
3671 #[doc = " Experimental API.\n Function: FPDFSignatureObj_GetByteRange\n Get the byte range of a signature object.\n Parameters:\n signature - Handle to the signature object. Returned by\n FPDF_GetSignatureObject().\n buffer - The address of a buffer that receives the\n byte range.\n length - The size, in ints, of |buffer|.\n Return value:\n Returns the number of ints in the byte range on\n success, 0 on error.\n\n |buffer| is an array of pairs of integers (starting byte offset,\n length in bytes) that describes the exact byte range for the digest\n calculation. If |length| is less than the returned length, or\n |buffer| is NULL, |buffer| will not be modified."]
3672 pub fn FPDFSignatureObj_GetByteRange(
3673 signature: FPDF_SIGNATURE,
3674 buffer: *mut ::std::os::raw::c_int,
3675 length: ::std::os::raw::c_ulong,
3676 ) -> ::std::os::raw::c_ulong;
3677}
3678unsafe extern "C" {
3679 #[doc = " Experimental API.\n Function: FPDFSignatureObj_GetSubFilter\n Get the encoding of the value of a signature object.\n Parameters:\n signature - Handle to the signature object. Returned by\n FPDF_GetSignatureObject().\n buffer - The address of a buffer that receives the encoding.\n length - The size, in bytes, of |buffer|.\n Return value:\n Returns the number of bytes in the encoding name (including the\n trailing NUL character) on success, 0 on error.\n\n The |buffer| is always encoded in 7-bit ASCII. If |length| is less than the\n returned length, or |buffer| is NULL, |buffer| will not be modified."]
3680 pub fn FPDFSignatureObj_GetSubFilter(
3681 signature: FPDF_SIGNATURE,
3682 buffer: *mut ::std::os::raw::c_char,
3683 length: ::std::os::raw::c_ulong,
3684 ) -> ::std::os::raw::c_ulong;
3685}
3686unsafe extern "C" {
3687 #[doc = " Experimental API.\n Function: FPDFSignatureObj_GetReason\n Get the reason (comment) of the signature object.\n Parameters:\n signature - Handle to the signature object. Returned by\n FPDF_GetSignatureObject().\n buffer - The address of a buffer that receives the reason.\n length - The size, in bytes, of |buffer|.\n Return value:\n Returns the number of bytes in the reason on success, 0 on error.\n\n Regardless of the platform, the |buffer| is always in UTF-16LE encoding. The\n string is terminated by a UTF16 NUL character. If |length| is less than the\n returned length, or |buffer| is NULL, |buffer| will not be modified."]
3688 pub fn FPDFSignatureObj_GetReason(
3689 signature: FPDF_SIGNATURE,
3690 buffer: *mut ::std::os::raw::c_void,
3691 length: ::std::os::raw::c_ulong,
3692 ) -> ::std::os::raw::c_ulong;
3693}
3694unsafe extern "C" {
3695 #[doc = " Experimental API.\n Function: FPDFSignatureObj_GetTime\n Get the time of signing of a signature object.\n Parameters:\n signature - Handle to the signature object. Returned by\n FPDF_GetSignatureObject().\n buffer - The address of a buffer that receives the time.\n length - The size, in bytes, of |buffer|.\n Return value:\n Returns the number of bytes in the encoding name (including the\n trailing NUL character) on success, 0 on error.\n\n The |buffer| is always encoded in 7-bit ASCII. If |length| is less than the\n returned length, or |buffer| is NULL, |buffer| will not be modified.\n\n The format of time is expected to be D:YYYYMMDDHHMMSS+XX'YY', i.e. it's\n percision is seconds, with timezone information. This value should be used\n only when the time of signing is not available in the (PKCS#7 binary)\n signature."]
3696 pub fn FPDFSignatureObj_GetTime(
3697 signature: FPDF_SIGNATURE,
3698 buffer: *mut ::std::os::raw::c_char,
3699 length: ::std::os::raw::c_ulong,
3700 ) -> ::std::os::raw::c_ulong;
3701}
3702unsafe extern "C" {
3703 #[doc = " Experimental API.\n Function: FPDFSignatureObj_GetDocMDPPermission\n Get the DocMDP permission of a signature object.\n Parameters:\n signature - Handle to the signature object. Returned by\n FPDF_GetSignatureObject().\n Return value:\n Returns the permission (1, 2 or 3) on success, 0 on error."]
3704 pub fn FPDFSignatureObj_GetDocMDPPermission(
3705 signature: FPDF_SIGNATURE,
3706 ) -> ::std::os::raw::c_uint;
3707}
3708unsafe extern "C" {
3709 #[doc = " Function: FPDF_StructTree_GetForPage\n Get the structure tree for a page.\n Parameters:\n page - Handle to the page, as returned by FPDF_LoadPage().\n Return value:\n A handle to the structure tree or NULL on error. The caller owns the\n returned handle and must use FPDF_StructTree_Close() to release it.\n The handle should be released before |page| gets released."]
3710 pub fn FPDF_StructTree_GetForPage(page: FPDF_PAGE) -> FPDF_STRUCTTREE;
3711}
3712unsafe extern "C" {
3713 #[doc = " Function: FPDF_StructTree_Close\n Release a resource allocated by FPDF_StructTree_GetForPage().\n Parameters:\n struct_tree - Handle to the structure tree, as returned by\n FPDF_StructTree_LoadPage().\n Return value:\n None."]
3714 pub fn FPDF_StructTree_Close(struct_tree: FPDF_STRUCTTREE);
3715}
3716unsafe extern "C" {
3717 #[doc = " Function: FPDF_StructTree_CountChildren\n Count the number of children for the structure tree.\n Parameters:\n struct_tree - Handle to the structure tree, as returned by\n FPDF_StructTree_LoadPage().\n Return value:\n The number of children, or -1 on error."]
3718 pub fn FPDF_StructTree_CountChildren(struct_tree: FPDF_STRUCTTREE) -> ::std::os::raw::c_int;
3719}
3720unsafe extern "C" {
3721 #[doc = " Function: FPDF_StructTree_GetChildAtIndex\n Get a child in the structure tree.\n Parameters:\n struct_tree - Handle to the structure tree, as returned by\n FPDF_StructTree_LoadPage().\n index - The index for the child, 0-based.\n Return value:\n The child at the n-th index or NULL on error. The caller does not\n own the handle. The handle remains valid as long as |struct_tree|\n remains valid.\n Comments:\n The |index| must be less than the FPDF_StructTree_CountChildren()\n return value."]
3722 pub fn FPDF_StructTree_GetChildAtIndex(
3723 struct_tree: FPDF_STRUCTTREE,
3724 index: ::std::os::raw::c_int,
3725 ) -> FPDF_STRUCTELEMENT;
3726}
3727unsafe extern "C" {
3728 #[doc = " Function: FPDF_StructElement_GetAltText\n Get the alt text for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n buffer - A buffer for output the alt text. May be NULL.\n buflen - The length of the buffer, in bytes. May be 0.\n Return value:\n The number of bytes in the alt text, including the terminating NUL\n character. The number of bytes is returned regardless of the\n |buffer| and |buflen| parameters.\n Comments:\n Regardless of the platform, the |buffer| is always in UTF-16LE\n encoding. The string is terminated by a UTF16 NUL character. If\n |buflen| is less than the required length, or |buffer| is NULL,\n |buffer| will not be modified."]
3729 pub fn FPDF_StructElement_GetAltText(
3730 struct_element: FPDF_STRUCTELEMENT,
3731 buffer: *mut ::std::os::raw::c_void,
3732 buflen: ::std::os::raw::c_ulong,
3733 ) -> ::std::os::raw::c_ulong;
3734}
3735unsafe extern "C" {
3736 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetActualText\n Get the actual text for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n buffer - A buffer for output the actual text. May be NULL.\n buflen - The length of the buffer, in bytes. May be 0.\n Return value:\n The number of bytes in the actual text, including the terminating\n NUL character. The number of bytes is returned regardless of the\n |buffer| and |buflen| parameters.\n Comments:\n Regardless of the platform, the |buffer| is always in UTF-16LE\n encoding. The string is terminated by a UTF16 NUL character. If\n |buflen| is less than the required length, or |buffer| is NULL,\n |buffer| will not be modified."]
3737 pub fn FPDF_StructElement_GetActualText(
3738 struct_element: FPDF_STRUCTELEMENT,
3739 buffer: *mut ::std::os::raw::c_void,
3740 buflen: ::std::os::raw::c_ulong,
3741 ) -> ::std::os::raw::c_ulong;
3742}
3743unsafe extern "C" {
3744 #[doc = " Function: FPDF_StructElement_GetID\n Get the ID for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n buffer - A buffer for output the ID string. May be NULL.\n buflen - The length of the buffer, in bytes. May be 0.\n Return value:\n The number of bytes in the ID string, including the terminating NUL\n character. The number of bytes is returned regardless of the\n |buffer| and |buflen| parameters.\n Comments:\n Regardless of the platform, the |buffer| is always in UTF-16LE\n encoding. The string is terminated by a UTF16 NUL character. If\n |buflen| is less than the required length, or |buffer| is NULL,\n |buffer| will not be modified."]
3745 pub fn FPDF_StructElement_GetID(
3746 struct_element: FPDF_STRUCTELEMENT,
3747 buffer: *mut ::std::os::raw::c_void,
3748 buflen: ::std::os::raw::c_ulong,
3749 ) -> ::std::os::raw::c_ulong;
3750}
3751unsafe extern "C" {
3752 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetLang\n Get the case-insensitive IETF BCP 47 language code for an element.\n Parameters:\n struct_element - Handle to the struct element.\n buffer - A buffer for output the lang string. May be NULL.\n buflen - The length of the buffer, in bytes. May be 0.\n Return value:\n The number of bytes in the ID string, including the terminating NUL\n character. The number of bytes is returned regardless of the\n |buffer| and |buflen| parameters.\n Comments:\n Regardless of the platform, the |buffer| is always in UTF-16LE\n encoding. The string is terminated by a UTF16 NUL character. If\n |buflen| is less than the required length, or |buffer| is NULL,\n |buffer| will not be modified."]
3753 pub fn FPDF_StructElement_GetLang(
3754 struct_element: FPDF_STRUCTELEMENT,
3755 buffer: *mut ::std::os::raw::c_void,
3756 buflen: ::std::os::raw::c_ulong,
3757 ) -> ::std::os::raw::c_ulong;
3758}
3759unsafe extern "C" {
3760 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetStringAttribute\n Get a struct element attribute of type \"name\" or \"string\".\n Parameters:\n struct_element - Handle to the struct element.\n attr_name - The name of the attribute to retrieve.\n buffer - A buffer for output. May be NULL.\n buflen - The length of the buffer, in bytes. May be 0.\n Return value:\n The number of bytes in the attribute value, including the\n terminating NUL character. The number of bytes is returned\n regardless of the |buffer| and |buflen| parameters.\n Comments:\n Regardless of the platform, the |buffer| is always in UTF-16LE\n encoding. The string is terminated by a UTF16 NUL character. If\n |buflen| is less than the required length, or |buffer| is NULL,\n |buffer| will not be modified."]
3761 pub fn FPDF_StructElement_GetStringAttribute(
3762 struct_element: FPDF_STRUCTELEMENT,
3763 attr_name: FPDF_BYTESTRING,
3764 buffer: *mut ::std::os::raw::c_void,
3765 buflen: ::std::os::raw::c_ulong,
3766 ) -> ::std::os::raw::c_ulong;
3767}
3768unsafe extern "C" {
3769 #[doc = " Function: FPDF_StructElement_GetMarkedContentID\n Get the marked content ID for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n Return value:\n The marked content ID of the element. If no ID exists, returns\n -1.\n Comments:\n FPDF_StructElement_GetMarkedContentIdAtIndex() may be able to\n extract more marked content IDs out of |struct_element|. This API\n may be deprecated in the future."]
3770 pub fn FPDF_StructElement_GetMarkedContentID(
3771 struct_element: FPDF_STRUCTELEMENT,
3772 ) -> ::std::os::raw::c_int;
3773}
3774unsafe extern "C" {
3775 #[doc = " Function: FPDF_StructElement_GetType\n Get the type (/S) for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n buffer - A buffer for output. May be NULL.\n buflen - The length of the buffer, in bytes. May be 0.\n Return value:\n The number of bytes in the type, including the terminating NUL\n character. The number of bytes is returned regardless of the\n |buffer| and |buflen| parameters.\n Comments:\n Regardless of the platform, the |buffer| is always in UTF-16LE\n encoding. The string is terminated by a UTF16 NUL character. If\n |buflen| is less than the required length, or |buffer| is NULL,\n |buffer| will not be modified."]
3776 pub fn FPDF_StructElement_GetType(
3777 struct_element: FPDF_STRUCTELEMENT,
3778 buffer: *mut ::std::os::raw::c_void,
3779 buflen: ::std::os::raw::c_ulong,
3780 ) -> ::std::os::raw::c_ulong;
3781}
3782unsafe extern "C" {
3783 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetObjType\n Get the object type (/Type) for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n buffer - A buffer for output. May be NULL.\n buflen - The length of the buffer, in bytes. May be 0.\n Return value:\n The number of bytes in the object type, including the terminating\n NUL character. The number of bytes is returned regardless of the\n |buffer| and |buflen| parameters.\n Comments:\n Regardless of the platform, the |buffer| is always in UTF-16LE\n encoding. The string is terminated by a UTF16 NUL character. If\n |buflen| is less than the required length, or |buffer| is NULL,\n |buffer| will not be modified."]
3784 pub fn FPDF_StructElement_GetObjType(
3785 struct_element: FPDF_STRUCTELEMENT,
3786 buffer: *mut ::std::os::raw::c_void,
3787 buflen: ::std::os::raw::c_ulong,
3788 ) -> ::std::os::raw::c_ulong;
3789}
3790unsafe extern "C" {
3791 #[doc = " Function: FPDF_StructElement_GetTitle\n Get the title (/T) for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n buffer - A buffer for output. May be NULL.\n buflen - The length of the buffer, in bytes. May be 0.\n Return value:\n The number of bytes in the title, including the terminating NUL\n character. The number of bytes is returned regardless of the\n |buffer| and |buflen| parameters.\n Comments:\n Regardless of the platform, the |buffer| is always in UTF-16LE\n encoding. The string is terminated by a UTF16 NUL character. If\n |buflen| is less than the required length, or |buffer| is NULL,\n |buffer| will not be modified."]
3792 pub fn FPDF_StructElement_GetTitle(
3793 struct_element: FPDF_STRUCTELEMENT,
3794 buffer: *mut ::std::os::raw::c_void,
3795 buflen: ::std::os::raw::c_ulong,
3796 ) -> ::std::os::raw::c_ulong;
3797}
3798unsafe extern "C" {
3799 #[doc = " Function: FPDF_StructElement_CountChildren\n Count the number of children for the structure element.\n Parameters:\n struct_element - Handle to the struct element.\n Return value:\n The number of children, or -1 on error."]
3800 pub fn FPDF_StructElement_CountChildren(
3801 struct_element: FPDF_STRUCTELEMENT,
3802 ) -> ::std::os::raw::c_int;
3803}
3804unsafe extern "C" {
3805 #[doc = " Function: FPDF_StructElement_GetChildAtIndex\n Get a child in the structure element.\n Parameters:\n struct_element - Handle to the struct element.\n index - The index for the child, 0-based.\n Return value:\n The child at the n-th index or NULL on error.\n Comments:\n If the child exists but is not an element, then this function will\n return NULL. This will also return NULL for out of bounds indices.\n The |index| must be less than the FPDF_StructElement_CountChildren()\n return value."]
3806 pub fn FPDF_StructElement_GetChildAtIndex(
3807 struct_element: FPDF_STRUCTELEMENT,
3808 index: ::std::os::raw::c_int,
3809 ) -> FPDF_STRUCTELEMENT;
3810}
3811unsafe extern "C" {
3812 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetChildMarkedContentID\n Get the child's content id\n Parameters:\n struct_element - Handle to the struct element.\n index - The index for the child, 0-based.\n Return value:\n The marked content ID of the child. If no ID exists, returns -1.\n Comments:\n If the child exists but is not a stream or object, then this\n function will return -1. This will also return -1 for out of bounds\n indices. Compared to FPDF_StructElement_GetMarkedContentIdAtIndex,\n it is scoped to the current page.\n The |index| must be less than the FPDF_StructElement_CountChildren()\n return value."]
3813 pub fn FPDF_StructElement_GetChildMarkedContentID(
3814 struct_element: FPDF_STRUCTELEMENT,
3815 index: ::std::os::raw::c_int,
3816 ) -> ::std::os::raw::c_int;
3817}
3818unsafe extern "C" {
3819 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetParent\n Get the parent of the structure element.\n Parameters:\n struct_element - Handle to the struct element.\n Return value:\n The parent structure element or NULL on error.\n Comments:\n If structure element is StructTreeRoot, then this function will\n return NULL."]
3820 pub fn FPDF_StructElement_GetParent(struct_element: FPDF_STRUCTELEMENT) -> FPDF_STRUCTELEMENT;
3821}
3822unsafe extern "C" {
3823 #[doc = " Function: FPDF_StructElement_GetAttributeCount\n Count the number of attributes for the structure element.\n Parameters:\n struct_element - Handle to the struct element.\n Return value:\n The number of attributes, or -1 on error."]
3824 pub fn FPDF_StructElement_GetAttributeCount(
3825 struct_element: FPDF_STRUCTELEMENT,
3826 ) -> ::std::os::raw::c_int;
3827}
3828unsafe extern "C" {
3829 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetAttributeAtIndex\n Get an attribute object in the structure element.\n Parameters:\n struct_element - Handle to the struct element.\n index - The index for the attribute object, 0-based.\n Return value:\n The attribute object at the n-th index or NULL on error.\n Comments:\n If the attribute object exists but is not a dict, then this\n function will return NULL. This will also return NULL for out of\n bounds indices. The caller does not own the handle. The handle\n remains valid as long as |struct_element| remains valid.\n The |index| must be less than the\n FPDF_StructElement_GetAttributeCount() return value."]
3830 pub fn FPDF_StructElement_GetAttributeAtIndex(
3831 struct_element: FPDF_STRUCTELEMENT,
3832 index: ::std::os::raw::c_int,
3833 ) -> FPDF_STRUCTELEMENT_ATTR;
3834}
3835unsafe extern "C" {
3836 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetCount\n Count the number of attributes in a structure element attribute map.\n Parameters:\n struct_attribute - Handle to the struct element attribute.\n Return value:\n The number of attributes, or -1 on error."]
3837 pub fn FPDF_StructElement_Attr_GetCount(
3838 struct_attribute: FPDF_STRUCTELEMENT_ATTR,
3839 ) -> ::std::os::raw::c_int;
3840}
3841unsafe extern "C" {
3842 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetName\n Get the name of an attribute in a structure element attribute map.\n Parameters:\n struct_attribute - Handle to the struct element attribute.\n index - The index of attribute in the map.\n buffer - A buffer for output. May be NULL. This is only\n modified if |buflen| is longer than the length\n of the key. Optional, pass null to just\n retrieve the size of the buffer needed.\n buflen - The length of the buffer.\n out_buflen - A pointer to variable that will receive the\n minimum buffer size to contain the key. Not\n filled if FALSE is returned.\n Return value:\n TRUE if the operation was successful, FALSE otherwise."]
3843 pub fn FPDF_StructElement_Attr_GetName(
3844 struct_attribute: FPDF_STRUCTELEMENT_ATTR,
3845 index: ::std::os::raw::c_int,
3846 buffer: *mut ::std::os::raw::c_void,
3847 buflen: ::std::os::raw::c_ulong,
3848 out_buflen: *mut ::std::os::raw::c_ulong,
3849 ) -> FPDF_BOOL;
3850}
3851unsafe extern "C" {
3852 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetValue\n Get a handle to a value for an attribute in a structure element\n attribute map.\n Parameters:\n struct_attribute - Handle to the struct element attribute.\n name - The attribute name.\n Return value:\n Returns a handle to the value associated with the input, if any.\n Returns NULL on failure. The caller does not own the handle.\n The handle remains valid as long as |struct_attribute| remains\n valid."]
3853 pub fn FPDF_StructElement_Attr_GetValue(
3854 struct_attribute: FPDF_STRUCTELEMENT_ATTR,
3855 name: FPDF_BYTESTRING,
3856 ) -> FPDF_STRUCTELEMENT_ATTR_VALUE;
3857}
3858unsafe extern "C" {
3859 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetType\n Get the type of an attribute in a structure element attribute map.\n Parameters:\n value - Handle to the value.\n Return value:\n Returns the type of the value, or FPDF_OBJECT_UNKNOWN in case of\n failure. Note that this will never return FPDF_OBJECT_REFERENCE, as\n references are always dereferenced."]
3860 pub fn FPDF_StructElement_Attr_GetType(
3861 value: FPDF_STRUCTELEMENT_ATTR_VALUE,
3862 ) -> FPDF_OBJECT_TYPE;
3863}
3864unsafe extern "C" {
3865 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetBooleanValue\n Get the value of a boolean attribute in an attribute map as\n FPDF_BOOL. FPDF_StructElement_Attr_GetType() should have returned\n FPDF_OBJECT_BOOLEAN for this property.\n Parameters:\n value - Handle to the value.\n out_value - A pointer to variable that will receive the value. Not\n filled if false is returned.\n Return value:\n Returns TRUE if the attribute maps to a boolean value, FALSE\n otherwise."]
3866 pub fn FPDF_StructElement_Attr_GetBooleanValue(
3867 value: FPDF_STRUCTELEMENT_ATTR_VALUE,
3868 out_value: *mut FPDF_BOOL,
3869 ) -> FPDF_BOOL;
3870}
3871unsafe extern "C" {
3872 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetNumberValue\n Get the value of a number attribute in an attribute map as float.\n FPDF_StructElement_Attr_GetType() should have returned\n FPDF_OBJECT_NUMBER for this property.\n Parameters:\n value - Handle to the value.\n out_value - A pointer to variable that will receive the value. Not\n filled if false is returned.\n Return value:\n Returns TRUE if the attribute maps to a number value, FALSE\n otherwise."]
3873 pub fn FPDF_StructElement_Attr_GetNumberValue(
3874 value: FPDF_STRUCTELEMENT_ATTR_VALUE,
3875 out_value: *mut f32,
3876 ) -> FPDF_BOOL;
3877}
3878unsafe extern "C" {
3879 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetStringValue\n Get the value of a string attribute in an attribute map as string.\n FPDF_StructElement_Attr_GetType() should have returned\n FPDF_OBJECT_STRING or FPDF_OBJECT_NAME for this property.\n Parameters:\n value - Handle to the value.\n buffer - A buffer for holding the returned key in UTF-16LE.\n This is only modified if |buflen| is longer than the\n length of the key. Optional, pass null to just\n retrieve the size of the buffer needed.\n buflen - The length of the buffer.\n out_buflen - A pointer to variable that will receive the minimum\n buffer size to contain the key. Not filled if FALSE is\n returned.\n Return value:\n Returns TRUE if the attribute maps to a string value, FALSE\n otherwise."]
3880 pub fn FPDF_StructElement_Attr_GetStringValue(
3881 value: FPDF_STRUCTELEMENT_ATTR_VALUE,
3882 buffer: *mut ::std::os::raw::c_void,
3883 buflen: ::std::os::raw::c_ulong,
3884 out_buflen: *mut ::std::os::raw::c_ulong,
3885 ) -> FPDF_BOOL;
3886}
3887unsafe extern "C" {
3888 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetBlobValue\n Get the value of a blob attribute in an attribute map as string.\n Parameters:\n value - Handle to the value.\n buffer - A buffer for holding the returned value. This is only\n modified if |buflen| is at least as long as the length\n of the value. Optional, pass null to just retrieve the\n size of the buffer needed.\n buflen - The length of the buffer.\n out_buflen - A pointer to variable that will receive the minimum\n buffer size to contain the key. Not filled if FALSE is\n returned.\n Return value:\n Returns TRUE if the attribute maps to a string value, FALSE\n otherwise."]
3889 pub fn FPDF_StructElement_Attr_GetBlobValue(
3890 value: FPDF_STRUCTELEMENT_ATTR_VALUE,
3891 buffer: *mut ::std::os::raw::c_void,
3892 buflen: ::std::os::raw::c_ulong,
3893 out_buflen: *mut ::std::os::raw::c_ulong,
3894 ) -> FPDF_BOOL;
3895}
3896unsafe extern "C" {
3897 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_CountChildren\n Count the number of children values in an attribute.\n Parameters:\n value - Handle to the value.\n Return value:\n The number of children, or -1 on error."]
3898 pub fn FPDF_StructElement_Attr_CountChildren(
3899 value: FPDF_STRUCTELEMENT_ATTR_VALUE,
3900 ) -> ::std::os::raw::c_int;
3901}
3902unsafe extern "C" {
3903 #[doc = " Experimental API.\n Function: FPDF_StructElement_Attr_GetChildAtIndex\n Get a child from an attribute.\n Parameters:\n value - Handle to the value.\n index - The index for the child, 0-based.\n Return value:\n The child at the n-th index or NULL on error.\n Comments:\n The |index| must be less than the\n FPDF_StructElement_Attr_CountChildren() return value."]
3904 pub fn FPDF_StructElement_Attr_GetChildAtIndex(
3905 value: FPDF_STRUCTELEMENT_ATTR_VALUE,
3906 index: ::std::os::raw::c_int,
3907 ) -> FPDF_STRUCTELEMENT_ATTR_VALUE;
3908}
3909unsafe extern "C" {
3910 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetMarkedContentIdCount\n Get the count of marked content ids for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n Return value:\n The count of marked content ids or -1 if none exists."]
3911 pub fn FPDF_StructElement_GetMarkedContentIdCount(
3912 struct_element: FPDF_STRUCTELEMENT,
3913 ) -> ::std::os::raw::c_int;
3914}
3915unsafe extern "C" {
3916 #[doc = " Experimental API.\n Function: FPDF_StructElement_GetMarkedContentIdAtIndex\n Get the marked content id at a given index for a given element.\n Parameters:\n struct_element - Handle to the struct element.\n index - The index of the marked content id, 0-based.\n Return value:\n The marked content ID of the element. If no ID exists, returns\n -1.\n Comments:\n The |index| must be less than the\n FPDF_StructElement_GetMarkedContentIdCount() return value.\n This will likely supersede FPDF_StructElement_GetMarkedContentID()."]
3917 pub fn FPDF_StructElement_GetMarkedContentIdAtIndex(
3918 struct_element: FPDF_STRUCTELEMENT,
3919 index: ::std::os::raw::c_int,
3920 ) -> ::std::os::raw::c_int;
3921}
3922pub const FWL_EVENTFLAG_FWL_EVENTFLAG_ShiftKey: FWL_EVENTFLAG = 1;
3923pub const FWL_EVENTFLAG_FWL_EVENTFLAG_ControlKey: FWL_EVENTFLAG = 2;
3924pub const FWL_EVENTFLAG_FWL_EVENTFLAG_AltKey: FWL_EVENTFLAG = 4;
3925pub const FWL_EVENTFLAG_FWL_EVENTFLAG_MetaKey: FWL_EVENTFLAG = 8;
3926pub const FWL_EVENTFLAG_FWL_EVENTFLAG_KeyPad: FWL_EVENTFLAG = 16;
3927pub const FWL_EVENTFLAG_FWL_EVENTFLAG_AutoRepeat: FWL_EVENTFLAG = 32;
3928pub const FWL_EVENTFLAG_FWL_EVENTFLAG_LeftButtonDown: FWL_EVENTFLAG = 64;
3929pub const FWL_EVENTFLAG_FWL_EVENTFLAG_MiddleButtonDown: FWL_EVENTFLAG = 128;
3930pub const FWL_EVENTFLAG_FWL_EVENTFLAG_RightButtonDown: FWL_EVENTFLAG = 256;
3931#[doc = " Key flags."]
3932pub type FWL_EVENTFLAG = ::std::os::raw::c_uint;
3933pub const FWL_VKEYCODE_FWL_VKEY_Back: FWL_VKEYCODE = 8;
3934pub const FWL_VKEYCODE_FWL_VKEY_Tab: FWL_VKEYCODE = 9;
3935pub const FWL_VKEYCODE_FWL_VKEY_NewLine: FWL_VKEYCODE = 10;
3936pub const FWL_VKEYCODE_FWL_VKEY_Clear: FWL_VKEYCODE = 12;
3937pub const FWL_VKEYCODE_FWL_VKEY_Return: FWL_VKEYCODE = 13;
3938pub const FWL_VKEYCODE_FWL_VKEY_Shift: FWL_VKEYCODE = 16;
3939pub const FWL_VKEYCODE_FWL_VKEY_Control: FWL_VKEYCODE = 17;
3940pub const FWL_VKEYCODE_FWL_VKEY_Menu: FWL_VKEYCODE = 18;
3941pub const FWL_VKEYCODE_FWL_VKEY_Pause: FWL_VKEYCODE = 19;
3942pub const FWL_VKEYCODE_FWL_VKEY_Capital: FWL_VKEYCODE = 20;
3943pub const FWL_VKEYCODE_FWL_VKEY_Kana: FWL_VKEYCODE = 21;
3944pub const FWL_VKEYCODE_FWL_VKEY_Hangul: FWL_VKEYCODE = 21;
3945pub const FWL_VKEYCODE_FWL_VKEY_Junja: FWL_VKEYCODE = 23;
3946pub const FWL_VKEYCODE_FWL_VKEY_Final: FWL_VKEYCODE = 24;
3947pub const FWL_VKEYCODE_FWL_VKEY_Hanja: FWL_VKEYCODE = 25;
3948pub const FWL_VKEYCODE_FWL_VKEY_Kanji: FWL_VKEYCODE = 25;
3949pub const FWL_VKEYCODE_FWL_VKEY_Escape: FWL_VKEYCODE = 27;
3950pub const FWL_VKEYCODE_FWL_VKEY_Convert: FWL_VKEYCODE = 28;
3951pub const FWL_VKEYCODE_FWL_VKEY_NonConvert: FWL_VKEYCODE = 29;
3952pub const FWL_VKEYCODE_FWL_VKEY_Accept: FWL_VKEYCODE = 30;
3953pub const FWL_VKEYCODE_FWL_VKEY_ModeChange: FWL_VKEYCODE = 31;
3954pub const FWL_VKEYCODE_FWL_VKEY_Space: FWL_VKEYCODE = 32;
3955pub const FWL_VKEYCODE_FWL_VKEY_Prior: FWL_VKEYCODE = 33;
3956pub const FWL_VKEYCODE_FWL_VKEY_Next: FWL_VKEYCODE = 34;
3957pub const FWL_VKEYCODE_FWL_VKEY_End: FWL_VKEYCODE = 35;
3958pub const FWL_VKEYCODE_FWL_VKEY_Home: FWL_VKEYCODE = 36;
3959pub const FWL_VKEYCODE_FWL_VKEY_Left: FWL_VKEYCODE = 37;
3960pub const FWL_VKEYCODE_FWL_VKEY_Up: FWL_VKEYCODE = 38;
3961pub const FWL_VKEYCODE_FWL_VKEY_Right: FWL_VKEYCODE = 39;
3962pub const FWL_VKEYCODE_FWL_VKEY_Down: FWL_VKEYCODE = 40;
3963pub const FWL_VKEYCODE_FWL_VKEY_Select: FWL_VKEYCODE = 41;
3964pub const FWL_VKEYCODE_FWL_VKEY_Print: FWL_VKEYCODE = 42;
3965pub const FWL_VKEYCODE_FWL_VKEY_Execute: FWL_VKEYCODE = 43;
3966pub const FWL_VKEYCODE_FWL_VKEY_Snapshot: FWL_VKEYCODE = 44;
3967pub const FWL_VKEYCODE_FWL_VKEY_Insert: FWL_VKEYCODE = 45;
3968pub const FWL_VKEYCODE_FWL_VKEY_Delete: FWL_VKEYCODE = 46;
3969pub const FWL_VKEYCODE_FWL_VKEY_Help: FWL_VKEYCODE = 47;
3970pub const FWL_VKEYCODE_FWL_VKEY_0: FWL_VKEYCODE = 48;
3971pub const FWL_VKEYCODE_FWL_VKEY_1: FWL_VKEYCODE = 49;
3972pub const FWL_VKEYCODE_FWL_VKEY_2: FWL_VKEYCODE = 50;
3973pub const FWL_VKEYCODE_FWL_VKEY_3: FWL_VKEYCODE = 51;
3974pub const FWL_VKEYCODE_FWL_VKEY_4: FWL_VKEYCODE = 52;
3975pub const FWL_VKEYCODE_FWL_VKEY_5: FWL_VKEYCODE = 53;
3976pub const FWL_VKEYCODE_FWL_VKEY_6: FWL_VKEYCODE = 54;
3977pub const FWL_VKEYCODE_FWL_VKEY_7: FWL_VKEYCODE = 55;
3978pub const FWL_VKEYCODE_FWL_VKEY_8: FWL_VKEYCODE = 56;
3979pub const FWL_VKEYCODE_FWL_VKEY_9: FWL_VKEYCODE = 57;
3980pub const FWL_VKEYCODE_FWL_VKEY_A: FWL_VKEYCODE = 65;
3981pub const FWL_VKEYCODE_FWL_VKEY_B: FWL_VKEYCODE = 66;
3982pub const FWL_VKEYCODE_FWL_VKEY_C: FWL_VKEYCODE = 67;
3983pub const FWL_VKEYCODE_FWL_VKEY_D: FWL_VKEYCODE = 68;
3984pub const FWL_VKEYCODE_FWL_VKEY_E: FWL_VKEYCODE = 69;
3985pub const FWL_VKEYCODE_FWL_VKEY_F: FWL_VKEYCODE = 70;
3986pub const FWL_VKEYCODE_FWL_VKEY_G: FWL_VKEYCODE = 71;
3987pub const FWL_VKEYCODE_FWL_VKEY_H: FWL_VKEYCODE = 72;
3988pub const FWL_VKEYCODE_FWL_VKEY_I: FWL_VKEYCODE = 73;
3989pub const FWL_VKEYCODE_FWL_VKEY_J: FWL_VKEYCODE = 74;
3990pub const FWL_VKEYCODE_FWL_VKEY_K: FWL_VKEYCODE = 75;
3991pub const FWL_VKEYCODE_FWL_VKEY_L: FWL_VKEYCODE = 76;
3992pub const FWL_VKEYCODE_FWL_VKEY_M: FWL_VKEYCODE = 77;
3993pub const FWL_VKEYCODE_FWL_VKEY_N: FWL_VKEYCODE = 78;
3994pub const FWL_VKEYCODE_FWL_VKEY_O: FWL_VKEYCODE = 79;
3995pub const FWL_VKEYCODE_FWL_VKEY_P: FWL_VKEYCODE = 80;
3996pub const FWL_VKEYCODE_FWL_VKEY_Q: FWL_VKEYCODE = 81;
3997pub const FWL_VKEYCODE_FWL_VKEY_R: FWL_VKEYCODE = 82;
3998pub const FWL_VKEYCODE_FWL_VKEY_S: FWL_VKEYCODE = 83;
3999pub const FWL_VKEYCODE_FWL_VKEY_T: FWL_VKEYCODE = 84;
4000pub const FWL_VKEYCODE_FWL_VKEY_U: FWL_VKEYCODE = 85;
4001pub const FWL_VKEYCODE_FWL_VKEY_V: FWL_VKEYCODE = 86;
4002pub const FWL_VKEYCODE_FWL_VKEY_W: FWL_VKEYCODE = 87;
4003pub const FWL_VKEYCODE_FWL_VKEY_X: FWL_VKEYCODE = 88;
4004pub const FWL_VKEYCODE_FWL_VKEY_Y: FWL_VKEYCODE = 89;
4005pub const FWL_VKEYCODE_FWL_VKEY_Z: FWL_VKEYCODE = 90;
4006pub const FWL_VKEYCODE_FWL_VKEY_LWin: FWL_VKEYCODE = 91;
4007pub const FWL_VKEYCODE_FWL_VKEY_Command: FWL_VKEYCODE = 91;
4008pub const FWL_VKEYCODE_FWL_VKEY_RWin: FWL_VKEYCODE = 92;
4009pub const FWL_VKEYCODE_FWL_VKEY_Apps: FWL_VKEYCODE = 93;
4010pub const FWL_VKEYCODE_FWL_VKEY_Sleep: FWL_VKEYCODE = 95;
4011pub const FWL_VKEYCODE_FWL_VKEY_NumPad0: FWL_VKEYCODE = 96;
4012pub const FWL_VKEYCODE_FWL_VKEY_NumPad1: FWL_VKEYCODE = 97;
4013pub const FWL_VKEYCODE_FWL_VKEY_NumPad2: FWL_VKEYCODE = 98;
4014pub const FWL_VKEYCODE_FWL_VKEY_NumPad3: FWL_VKEYCODE = 99;
4015pub const FWL_VKEYCODE_FWL_VKEY_NumPad4: FWL_VKEYCODE = 100;
4016pub const FWL_VKEYCODE_FWL_VKEY_NumPad5: FWL_VKEYCODE = 101;
4017pub const FWL_VKEYCODE_FWL_VKEY_NumPad6: FWL_VKEYCODE = 102;
4018pub const FWL_VKEYCODE_FWL_VKEY_NumPad7: FWL_VKEYCODE = 103;
4019pub const FWL_VKEYCODE_FWL_VKEY_NumPad8: FWL_VKEYCODE = 104;
4020pub const FWL_VKEYCODE_FWL_VKEY_NumPad9: FWL_VKEYCODE = 105;
4021pub const FWL_VKEYCODE_FWL_VKEY_Multiply: FWL_VKEYCODE = 106;
4022pub const FWL_VKEYCODE_FWL_VKEY_Add: FWL_VKEYCODE = 107;
4023pub const FWL_VKEYCODE_FWL_VKEY_Separator: FWL_VKEYCODE = 108;
4024pub const FWL_VKEYCODE_FWL_VKEY_Subtract: FWL_VKEYCODE = 109;
4025pub const FWL_VKEYCODE_FWL_VKEY_Decimal: FWL_VKEYCODE = 110;
4026pub const FWL_VKEYCODE_FWL_VKEY_Divide: FWL_VKEYCODE = 111;
4027pub const FWL_VKEYCODE_FWL_VKEY_F1: FWL_VKEYCODE = 112;
4028pub const FWL_VKEYCODE_FWL_VKEY_F2: FWL_VKEYCODE = 113;
4029pub const FWL_VKEYCODE_FWL_VKEY_F3: FWL_VKEYCODE = 114;
4030pub const FWL_VKEYCODE_FWL_VKEY_F4: FWL_VKEYCODE = 115;
4031pub const FWL_VKEYCODE_FWL_VKEY_F5: FWL_VKEYCODE = 116;
4032pub const FWL_VKEYCODE_FWL_VKEY_F6: FWL_VKEYCODE = 117;
4033pub const FWL_VKEYCODE_FWL_VKEY_F7: FWL_VKEYCODE = 118;
4034pub const FWL_VKEYCODE_FWL_VKEY_F8: FWL_VKEYCODE = 119;
4035pub const FWL_VKEYCODE_FWL_VKEY_F9: FWL_VKEYCODE = 120;
4036pub const FWL_VKEYCODE_FWL_VKEY_F10: FWL_VKEYCODE = 121;
4037pub const FWL_VKEYCODE_FWL_VKEY_F11: FWL_VKEYCODE = 122;
4038pub const FWL_VKEYCODE_FWL_VKEY_F12: FWL_VKEYCODE = 123;
4039pub const FWL_VKEYCODE_FWL_VKEY_F13: FWL_VKEYCODE = 124;
4040pub const FWL_VKEYCODE_FWL_VKEY_F14: FWL_VKEYCODE = 125;
4041pub const FWL_VKEYCODE_FWL_VKEY_F15: FWL_VKEYCODE = 126;
4042pub const FWL_VKEYCODE_FWL_VKEY_F16: FWL_VKEYCODE = 127;
4043pub const FWL_VKEYCODE_FWL_VKEY_F17: FWL_VKEYCODE = 128;
4044pub const FWL_VKEYCODE_FWL_VKEY_F18: FWL_VKEYCODE = 129;
4045pub const FWL_VKEYCODE_FWL_VKEY_F19: FWL_VKEYCODE = 130;
4046pub const FWL_VKEYCODE_FWL_VKEY_F20: FWL_VKEYCODE = 131;
4047pub const FWL_VKEYCODE_FWL_VKEY_F21: FWL_VKEYCODE = 132;
4048pub const FWL_VKEYCODE_FWL_VKEY_F22: FWL_VKEYCODE = 133;
4049pub const FWL_VKEYCODE_FWL_VKEY_F23: FWL_VKEYCODE = 134;
4050pub const FWL_VKEYCODE_FWL_VKEY_F24: FWL_VKEYCODE = 135;
4051pub const FWL_VKEYCODE_FWL_VKEY_NunLock: FWL_VKEYCODE = 144;
4052pub const FWL_VKEYCODE_FWL_VKEY_Scroll: FWL_VKEYCODE = 145;
4053pub const FWL_VKEYCODE_FWL_VKEY_LShift: FWL_VKEYCODE = 160;
4054pub const FWL_VKEYCODE_FWL_VKEY_RShift: FWL_VKEYCODE = 161;
4055pub const FWL_VKEYCODE_FWL_VKEY_LControl: FWL_VKEYCODE = 162;
4056pub const FWL_VKEYCODE_FWL_VKEY_RControl: FWL_VKEYCODE = 163;
4057pub const FWL_VKEYCODE_FWL_VKEY_LMenu: FWL_VKEYCODE = 164;
4058pub const FWL_VKEYCODE_FWL_VKEY_RMenu: FWL_VKEYCODE = 165;
4059pub const FWL_VKEYCODE_FWL_VKEY_BROWSER_Back: FWL_VKEYCODE = 166;
4060pub const FWL_VKEYCODE_FWL_VKEY_BROWSER_Forward: FWL_VKEYCODE = 167;
4061pub const FWL_VKEYCODE_FWL_VKEY_BROWSER_Refresh: FWL_VKEYCODE = 168;
4062pub const FWL_VKEYCODE_FWL_VKEY_BROWSER_Stop: FWL_VKEYCODE = 169;
4063pub const FWL_VKEYCODE_FWL_VKEY_BROWSER_Search: FWL_VKEYCODE = 170;
4064pub const FWL_VKEYCODE_FWL_VKEY_BROWSER_Favorites: FWL_VKEYCODE = 171;
4065pub const FWL_VKEYCODE_FWL_VKEY_BROWSER_Home: FWL_VKEYCODE = 172;
4066pub const FWL_VKEYCODE_FWL_VKEY_VOLUME_Mute: FWL_VKEYCODE = 173;
4067pub const FWL_VKEYCODE_FWL_VKEY_VOLUME_Down: FWL_VKEYCODE = 174;
4068pub const FWL_VKEYCODE_FWL_VKEY_VOLUME_Up: FWL_VKEYCODE = 175;
4069pub const FWL_VKEYCODE_FWL_VKEY_MEDIA_NEXT_Track: FWL_VKEYCODE = 176;
4070pub const FWL_VKEYCODE_FWL_VKEY_MEDIA_PREV_Track: FWL_VKEYCODE = 177;
4071pub const FWL_VKEYCODE_FWL_VKEY_MEDIA_Stop: FWL_VKEYCODE = 178;
4072pub const FWL_VKEYCODE_FWL_VKEY_MEDIA_PLAY_Pause: FWL_VKEYCODE = 179;
4073pub const FWL_VKEYCODE_FWL_VKEY_MEDIA_LAUNCH_Mail: FWL_VKEYCODE = 180;
4074pub const FWL_VKEYCODE_FWL_VKEY_MEDIA_LAUNCH_MEDIA_Select: FWL_VKEYCODE = 181;
4075pub const FWL_VKEYCODE_FWL_VKEY_MEDIA_LAUNCH_APP1: FWL_VKEYCODE = 182;
4076pub const FWL_VKEYCODE_FWL_VKEY_MEDIA_LAUNCH_APP2: FWL_VKEYCODE = 183;
4077pub const FWL_VKEYCODE_FWL_VKEY_OEM_1: FWL_VKEYCODE = 186;
4078pub const FWL_VKEYCODE_FWL_VKEY_OEM_Plus: FWL_VKEYCODE = 187;
4079pub const FWL_VKEYCODE_FWL_VKEY_OEM_Comma: FWL_VKEYCODE = 188;
4080pub const FWL_VKEYCODE_FWL_VKEY_OEM_Minus: FWL_VKEYCODE = 189;
4081pub const FWL_VKEYCODE_FWL_VKEY_OEM_Period: FWL_VKEYCODE = 190;
4082pub const FWL_VKEYCODE_FWL_VKEY_OEM_2: FWL_VKEYCODE = 191;
4083pub const FWL_VKEYCODE_FWL_VKEY_OEM_3: FWL_VKEYCODE = 192;
4084pub const FWL_VKEYCODE_FWL_VKEY_OEM_4: FWL_VKEYCODE = 219;
4085pub const FWL_VKEYCODE_FWL_VKEY_OEM_5: FWL_VKEYCODE = 220;
4086pub const FWL_VKEYCODE_FWL_VKEY_OEM_6: FWL_VKEYCODE = 221;
4087pub const FWL_VKEYCODE_FWL_VKEY_OEM_7: FWL_VKEYCODE = 222;
4088pub const FWL_VKEYCODE_FWL_VKEY_OEM_8: FWL_VKEYCODE = 223;
4089pub const FWL_VKEYCODE_FWL_VKEY_OEM_102: FWL_VKEYCODE = 226;
4090pub const FWL_VKEYCODE_FWL_VKEY_ProcessKey: FWL_VKEYCODE = 229;
4091pub const FWL_VKEYCODE_FWL_VKEY_Packet: FWL_VKEYCODE = 231;
4092pub const FWL_VKEYCODE_FWL_VKEY_Attn: FWL_VKEYCODE = 246;
4093pub const FWL_VKEYCODE_FWL_VKEY_Crsel: FWL_VKEYCODE = 247;
4094pub const FWL_VKEYCODE_FWL_VKEY_Exsel: FWL_VKEYCODE = 248;
4095pub const FWL_VKEYCODE_FWL_VKEY_Ereof: FWL_VKEYCODE = 249;
4096pub const FWL_VKEYCODE_FWL_VKEY_Play: FWL_VKEYCODE = 250;
4097pub const FWL_VKEYCODE_FWL_VKEY_Zoom: FWL_VKEYCODE = 251;
4098pub const FWL_VKEYCODE_FWL_VKEY_NoName: FWL_VKEYCODE = 252;
4099pub const FWL_VKEYCODE_FWL_VKEY_PA1: FWL_VKEYCODE = 253;
4100pub const FWL_VKEYCODE_FWL_VKEY_OEM_Clear: FWL_VKEYCODE = 254;
4101pub const FWL_VKEYCODE_FWL_VKEY_Unknown: FWL_VKEYCODE = 0;
4102#[doc = " Virtual keycodes."]
4103pub type FWL_VKEYCODE = ::std::os::raw::c_uint;
4104unsafe extern "C" {
4105 #[doc = " Experimental API.\n\n Determine if |document| represents a tagged PDF.\n\n For the definition of tagged PDF, See (see 10.7 \"Tagged PDF\" in PDF\n Reference 1.7).\n\n document - handle to a document.\n\n Returns |true| iff |document| is a tagged PDF."]
4106 pub fn FPDFCatalog_IsTagged(document: FPDF_DOCUMENT) -> FPDF_BOOL;
4107}
4108unsafe extern "C" {
4109 #[doc = " Experimental API.\n Sets the language of |document| to |language|.\n\n document - handle to a document.\n language - the language to set to.\n\n Returns TRUE on success."]
4110 pub fn FPDFCatalog_SetLanguage(document: FPDF_DOCUMENT, language: FPDF_BYTESTRING)
4111 -> FPDF_BOOL;
4112}
4113#[doc = " Interface for checking whether sections of the file are available."]
4114#[repr(C)]
4115#[derive(Debug, Copy, Clone)]
4116pub struct _FX_FILEAVAIL {
4117 #[doc = " Version number of the interface. Must be 1."]
4118 pub version: ::std::os::raw::c_int,
4119 #[doc = " Reports if the specified data section is currently available. A section is\n available if all bytes in the section are available.\n\n Interface Version: 1\n Implementation Required: Yes\n\n pThis - pointer to the interface structure.\n offset - the offset of the data section in the file.\n size - the size of the data section.\n\n Returns true if the specified data section at |offset| of |size|\n is available."]
4120 pub IsDataAvail: ::std::option::Option<
4121 unsafe extern "C" fn(pThis: *mut _FX_FILEAVAIL, offset: usize, size: usize) -> FPDF_BOOL,
4122 >,
4123}
4124#[doc = " Interface for checking whether sections of the file are available."]
4125pub type FX_FILEAVAIL = _FX_FILEAVAIL;
4126unsafe extern "C" {
4127 #[doc = " Create a document availability provider.\n\n file_avail - pointer to file availability interface.\n file - pointer to a file access interface.\n\n Returns a handle to the document availability provider, or NULL on error.\n\n FPDFAvail_Destroy() must be called when done with the availability provider."]
4128 pub fn FPDFAvail_Create(
4129 file_avail: *mut FX_FILEAVAIL,
4130 file: *mut FPDF_FILEACCESS,
4131 ) -> FPDF_AVAIL;
4132}
4133unsafe extern "C" {
4134 #[doc = " Destroy the |avail| document availability provider.\n\n avail - handle to document availability provider to be destroyed."]
4135 pub fn FPDFAvail_Destroy(avail: FPDF_AVAIL);
4136}
4137#[doc = " Download hints interface. Used to receive hints for further downloading."]
4138#[repr(C)]
4139#[derive(Debug, Copy, Clone)]
4140pub struct _FX_DOWNLOADHINTS {
4141 #[doc = " Version number of the interface. Must be 1."]
4142 pub version: ::std::os::raw::c_int,
4143 #[doc = " Add a section to be downloaded.\n\n Interface Version: 1\n Implementation Required: Yes\n\n pThis - pointer to the interface structure.\n offset - the offset of the hint reported to be downloaded.\n size - the size of the hint reported to be downloaded.\n\n The |offset| and |size| of the section may not be unique. Part of the\n section might be already available. The download manager must deal with\n overlapping sections."]
4144 pub AddSegment: ::std::option::Option<
4145 unsafe extern "C" fn(pThis: *mut _FX_DOWNLOADHINTS, offset: usize, size: usize),
4146 >,
4147}
4148#[doc = " Download hints interface. Used to receive hints for further downloading."]
4149pub type FX_DOWNLOADHINTS = _FX_DOWNLOADHINTS;
4150unsafe extern "C" {
4151 #[doc = " Checks if the document is ready for loading, if not, gets download hints.\n\n avail - handle to document availability provider.\n hints - pointer to a download hints interface.\n\n Returns one of:\n PDF_DATA_ERROR: A common error is returned. Data availability unknown.\n PDF_DATA_NOTAVAIL: Data not yet available.\n PDF_DATA_AVAIL: Data available.\n\n Applications should call this function whenever new data arrives, and process\n all the generated download hints, if any, until the function returns\n |PDF_DATA_ERROR| or |PDF_DATA_AVAIL|.\n if hints is nullptr, the function just check current document availability.\n\n Once all data is available, call FPDFAvail_GetDocument() to get a document\n handle."]
4152 pub fn FPDFAvail_IsDocAvail(
4153 avail: FPDF_AVAIL,
4154 hints: *mut FX_DOWNLOADHINTS,
4155 ) -> ::std::os::raw::c_int;
4156}
4157unsafe extern "C" {
4158 #[doc = " Get document from the availability provider.\n\n avail - handle to document availability provider.\n password - password for decrypting the PDF file. Optional.\n\n Returns a handle to the document.\n\n When FPDFAvail_IsDocAvail() returns TRUE, call FPDFAvail_GetDocument() to\n retrieve the document handle.\n See the comments for FPDF_LoadDocument() regarding the encoding for\n |password|."]
4159 pub fn FPDFAvail_GetDocument(avail: FPDF_AVAIL, password: FPDF_BYTESTRING) -> FPDF_DOCUMENT;
4160}
4161unsafe extern "C" {
4162 #[doc = " Get the page number for the first available page in a linearized PDF.\n\n doc - document handle.\n\n Returns the zero-based index for the first available page.\n\n For most linearized PDFs, the first available page will be the first page,\n however, some PDFs might make another page the first available page.\n For non-linearized PDFs, this function will always return zero."]
4163 pub fn FPDFAvail_GetFirstPageNum(doc: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
4164}
4165unsafe extern "C" {
4166 #[doc = " Check if |page_index| is ready for loading, if not, get the\n |FX_DOWNLOADHINTS|.\n\n avail - handle to document availability provider.\n page_index - index number of the page. Zero for the first page.\n hints - pointer to a download hints interface. Populated if\n |page_index| is not available.\n\n Returns one of:\n PDF_DATA_ERROR: A common error is returned. Data availability unknown.\n PDF_DATA_NOTAVAIL: Data not yet available.\n PDF_DATA_AVAIL: Data available.\n\n This function can be called only after FPDFAvail_GetDocument() is called.\n Applications should call this function whenever new data arrives and process\n all the generated download |hints|, if any, until this function returns\n |PDF_DATA_ERROR| or |PDF_DATA_AVAIL|. Applications can then perform page\n loading.\n if hints is nullptr, the function just check current availability of\n specified page."]
4167 pub fn FPDFAvail_IsPageAvail(
4168 avail: FPDF_AVAIL,
4169 page_index: ::std::os::raw::c_int,
4170 hints: *mut FX_DOWNLOADHINTS,
4171 ) -> ::std::os::raw::c_int;
4172}
4173unsafe extern "C" {
4174 #[doc = " Check if form data is ready for initialization, if not, get the\n |FX_DOWNLOADHINTS|.\n\n avail - handle to document availability provider.\n hints - pointer to a download hints interface. Populated if form is not\n ready for initialization.\n\n Returns one of:\n PDF_FORM_ERROR: A common eror, in general incorrect parameters.\n PDF_FORM_NOTAVAIL: Data not available.\n PDF_FORM_AVAIL: Data available.\n PDF_FORM_NOTEXIST: No form data.\n\n This function can be called only after FPDFAvail_GetDocument() is called.\n The application should call this function whenever new data arrives and\n process all the generated download |hints|, if any, until the function\n |PDF_FORM_ERROR|, |PDF_FORM_AVAIL| or |PDF_FORM_NOTEXIST|.\n if hints is nullptr, the function just check current form availability.\n\n Applications can then perform page loading. It is recommend to call\n FPDFDOC_InitFormFillEnvironment() when |PDF_FORM_AVAIL| is returned."]
4175 pub fn FPDFAvail_IsFormAvail(
4176 avail: FPDF_AVAIL,
4177 hints: *mut FX_DOWNLOADHINTS,
4178 ) -> ::std::os::raw::c_int;
4179}
4180unsafe extern "C" {
4181 #[doc = " Check whether a document is a linearized PDF.\n\n avail - handle to document availability provider.\n\n Returns one of:\n PDF_LINEARIZED\n PDF_NOT_LINEARIZED\n PDF_LINEARIZATION_UNKNOWN\n\n FPDFAvail_IsLinearized() will return |PDF_LINEARIZED| or |PDF_NOT_LINEARIZED|\n when we have 1k of data. If the files size less than 1k, it returns\n |PDF_LINEARIZATION_UNKNOWN| as there is insufficient information to determine\n if the PDF is linearlized."]
4182 pub fn FPDFAvail_IsLinearized(avail: FPDF_AVAIL) -> ::std::os::raw::c_int;
4183}
4184unsafe extern "C" {
4185 #[doc = " Set \"MediaBox\" entry to the page dictionary.\n\n page - Handle to a page.\n left - The left of the rectangle.\n bottom - The bottom of the rectangle.\n right - The right of the rectangle.\n top - The top of the rectangle."]
4186 pub fn FPDFPage_SetMediaBox(page: FPDF_PAGE, left: f32, bottom: f32, right: f32, top: f32);
4187}
4188unsafe extern "C" {
4189 #[doc = " Set \"CropBox\" entry to the page dictionary.\n\n page - Handle to a page.\n left - The left of the rectangle.\n bottom - The bottom of the rectangle.\n right - The right of the rectangle.\n top - The top of the rectangle."]
4190 pub fn FPDFPage_SetCropBox(page: FPDF_PAGE, left: f32, bottom: f32, right: f32, top: f32);
4191}
4192unsafe extern "C" {
4193 #[doc = " Set \"BleedBox\" entry to the page dictionary.\n\n page - Handle to a page.\n left - The left of the rectangle.\n bottom - The bottom of the rectangle.\n right - The right of the rectangle.\n top - The top of the rectangle."]
4194 pub fn FPDFPage_SetBleedBox(page: FPDF_PAGE, left: f32, bottom: f32, right: f32, top: f32);
4195}
4196unsafe extern "C" {
4197 #[doc = " Set \"TrimBox\" entry to the page dictionary.\n\n page - Handle to a page.\n left - The left of the rectangle.\n bottom - The bottom of the rectangle.\n right - The right of the rectangle.\n top - The top of the rectangle."]
4198 pub fn FPDFPage_SetTrimBox(page: FPDF_PAGE, left: f32, bottom: f32, right: f32, top: f32);
4199}
4200unsafe extern "C" {
4201 #[doc = " Set \"ArtBox\" entry to the page dictionary.\n\n page - Handle to a page.\n left - The left of the rectangle.\n bottom - The bottom of the rectangle.\n right - The right of the rectangle.\n top - The top of the rectangle."]
4202 pub fn FPDFPage_SetArtBox(page: FPDF_PAGE, left: f32, bottom: f32, right: f32, top: f32);
4203}
4204unsafe extern "C" {
4205 #[doc = " Get \"MediaBox\" entry from the page dictionary.\n\n page - Handle to a page.\n left - Pointer to a float value receiving the left of the rectangle.\n bottom - Pointer to a float value receiving the bottom of the rectangle.\n right - Pointer to a float value receiving the right of the rectangle.\n top - Pointer to a float value receiving the top of the rectangle.\n\n On success, return true and write to the out parameters. Otherwise return\n false and leave the out parameters unmodified."]
4206 pub fn FPDFPage_GetMediaBox(
4207 page: FPDF_PAGE,
4208 left: *mut f32,
4209 bottom: *mut f32,
4210 right: *mut f32,
4211 top: *mut f32,
4212 ) -> FPDF_BOOL;
4213}
4214unsafe extern "C" {
4215 #[doc = " Get \"CropBox\" entry from the page dictionary.\n\n page - Handle to a page.\n left - Pointer to a float value receiving the left of the rectangle.\n bottom - Pointer to a float value receiving the bottom of the rectangle.\n right - Pointer to a float value receiving the right of the rectangle.\n top - Pointer to a float value receiving the top of the rectangle.\n\n On success, return true and write to the out parameters. Otherwise return\n false and leave the out parameters unmodified."]
4216 pub fn FPDFPage_GetCropBox(
4217 page: FPDF_PAGE,
4218 left: *mut f32,
4219 bottom: *mut f32,
4220 right: *mut f32,
4221 top: *mut f32,
4222 ) -> FPDF_BOOL;
4223}
4224unsafe extern "C" {
4225 #[doc = " Get \"BleedBox\" entry from the page dictionary.\n\n page - Handle to a page.\n left - Pointer to a float value receiving the left of the rectangle.\n bottom - Pointer to a float value receiving the bottom of the rectangle.\n right - Pointer to a float value receiving the right of the rectangle.\n top - Pointer to a float value receiving the top of the rectangle.\n\n On success, return true and write to the out parameters. Otherwise return\n false and leave the out parameters unmodified."]
4226 pub fn FPDFPage_GetBleedBox(
4227 page: FPDF_PAGE,
4228 left: *mut f32,
4229 bottom: *mut f32,
4230 right: *mut f32,
4231 top: *mut f32,
4232 ) -> FPDF_BOOL;
4233}
4234unsafe extern "C" {
4235 #[doc = " Get \"TrimBox\" entry from the page dictionary.\n\n page - Handle to a page.\n left - Pointer to a float value receiving the left of the rectangle.\n bottom - Pointer to a float value receiving the bottom of the rectangle.\n right - Pointer to a float value receiving the right of the rectangle.\n top - Pointer to a float value receiving the top of the rectangle.\n\n On success, return true and write to the out parameters. Otherwise return\n false and leave the out parameters unmodified."]
4236 pub fn FPDFPage_GetTrimBox(
4237 page: FPDF_PAGE,
4238 left: *mut f32,
4239 bottom: *mut f32,
4240 right: *mut f32,
4241 top: *mut f32,
4242 ) -> FPDF_BOOL;
4243}
4244unsafe extern "C" {
4245 #[doc = " Get \"ArtBox\" entry from the page dictionary.\n\n page - Handle to a page.\n left - Pointer to a float value receiving the left of the rectangle.\n bottom - Pointer to a float value receiving the bottom of the rectangle.\n right - Pointer to a float value receiving the right of the rectangle.\n top - Pointer to a float value receiving the top of the rectangle.\n\n On success, return true and write to the out parameters. Otherwise return\n false and leave the out parameters unmodified."]
4246 pub fn FPDFPage_GetArtBox(
4247 page: FPDF_PAGE,
4248 left: *mut f32,
4249 bottom: *mut f32,
4250 right: *mut f32,
4251 top: *mut f32,
4252 ) -> FPDF_BOOL;
4253}
4254unsafe extern "C" {
4255 #[doc = " Apply transforms to |page|.\n\n If |matrix| is provided it will be applied to transform the page.\n If |clipRect| is provided it will be used to clip the resulting page.\n If neither |matrix| or |clipRect| are provided this method returns |false|.\n Returns |true| if transforms are applied.\n\n This function will transform the whole page, and would take effect to all the\n objects in the page.\n\n page - Page handle.\n matrix - Transform matrix.\n clipRect - Clipping rectangle."]
4256 pub fn FPDFPage_TransFormWithClip(
4257 page: FPDF_PAGE,
4258 matrix: *const FS_MATRIX,
4259 clipRect: *const FS_RECTF,
4260 ) -> FPDF_BOOL;
4261}
4262unsafe extern "C" {
4263 #[doc = " Transform (scale, rotate, shear, move) the clip path of page object.\n page_object - Handle to a page object. Returned by\n FPDFPageObj_NewImageObj().\n\n a - The coefficient \"a\" of the matrix.\n b - The coefficient \"b\" of the matrix.\n c - The coefficient \"c\" of the matrix.\n d - The coefficient \"d\" of the matrix.\n e - The coefficient \"e\" of the matrix.\n f - The coefficient \"f\" of the matrix."]
4264 pub fn FPDFPageObj_TransformClipPath(
4265 page_object: FPDF_PAGEOBJECT,
4266 a: f64,
4267 b: f64,
4268 c: f64,
4269 d: f64,
4270 e: f64,
4271 f: f64,
4272 );
4273}
4274unsafe extern "C" {
4275 #[doc = " Experimental API.\n Get the clip path of the page object.\n\n page object - Handle to a page object. Returned by e.g.\n FPDFPage_GetObject().\n\n Returns the handle to the clip path, or NULL on failure. The caller does not\n take ownership of the returned FPDF_CLIPPATH. Instead, it remains valid until\n FPDF_ClosePage() is called for the page containing |page_object|."]
4276 pub fn FPDFPageObj_GetClipPath(page_object: FPDF_PAGEOBJECT) -> FPDF_CLIPPATH;
4277}
4278unsafe extern "C" {
4279 #[doc = " Experimental API.\n Get number of paths inside |clip_path|.\n\n clip_path - handle to a clip_path.\n\n Returns the number of objects in |clip_path| or -1 on failure."]
4280 pub fn FPDFClipPath_CountPaths(clip_path: FPDF_CLIPPATH) -> ::std::os::raw::c_int;
4281}
4282unsafe extern "C" {
4283 #[doc = " Experimental API.\n Get number of segments inside one path of |clip_path|.\n\n clip_path - handle to a clip_path.\n path_index - index into the array of paths of the clip path.\n\n Returns the number of segments or -1 on failure."]
4284 pub fn FPDFClipPath_CountPathSegments(
4285 clip_path: FPDF_CLIPPATH,
4286 path_index: ::std::os::raw::c_int,
4287 ) -> ::std::os::raw::c_int;
4288}
4289unsafe extern "C" {
4290 #[doc = " Experimental API.\n Get segment in one specific path of |clip_path| at index.\n\n clip_path - handle to a clip_path.\n path_index - the index of a path.\n segment_index - the index of a segment.\n\n Returns the handle to the segment, or NULL on failure. The caller does not\n take ownership of the returned FPDF_PATHSEGMENT. Instead, it remains valid\n until FPDF_ClosePage() is called for the page containing |clip_path|."]
4291 pub fn FPDFClipPath_GetPathSegment(
4292 clip_path: FPDF_CLIPPATH,
4293 path_index: ::std::os::raw::c_int,
4294 segment_index: ::std::os::raw::c_int,
4295 ) -> FPDF_PATHSEGMENT;
4296}
4297unsafe extern "C" {
4298 #[doc = " Create a new clip path, with a rectangle inserted.\n\n Caller takes ownership of the returned FPDF_CLIPPATH. It should be freed with\n FPDF_DestroyClipPath().\n\n left - The left of the clip box.\n bottom - The bottom of the clip box.\n right - The right of the clip box.\n top - The top of the clip box."]
4299 pub fn FPDF_CreateClipPath(left: f32, bottom: f32, right: f32, top: f32) -> FPDF_CLIPPATH;
4300}
4301unsafe extern "C" {
4302 #[doc = " Destroy the clip path.\n\n clipPath - A handle to the clip path. It will be invalid after this call."]
4303 pub fn FPDF_DestroyClipPath(clipPath: FPDF_CLIPPATH);
4304}
4305unsafe extern "C" {
4306 #[doc = " Clip the page content, the page content that outside the clipping region\n become invisible.\n\n A clip path will be inserted before the page content stream or content array.\n In this way, the page content will be clipped by this clip path.\n\n page - A page handle.\n clipPath - A handle to the clip path. (Does not take ownership.)"]
4307 pub fn FPDFPage_InsertClipPath(page: FPDF_PAGE, clipPath: FPDF_CLIPPATH);
4308}
4309unsafe extern "C" {
4310 #[doc = " Experimental API.\n Get the number of embedded files in |document|.\n\n document - handle to a document.\n\n Returns the number of embedded files in |document|."]
4311 pub fn FPDFDoc_GetAttachmentCount(document: FPDF_DOCUMENT) -> ::std::os::raw::c_int;
4312}
4313unsafe extern "C" {
4314 #[doc = " Experimental API.\n Add an embedded file with |name| in |document|. If |name| is empty, or if\n |name| is the name of a existing embedded file in |document|, or if\n |document|'s embedded file name tree is too deep (i.e. |document| has too\n many embedded files already), then a new attachment will not be added.\n\n document - handle to a document.\n name - name of the new attachment.\n\n Returns a handle to the new attachment object, or NULL on failure."]
4315 pub fn FPDFDoc_AddAttachment(document: FPDF_DOCUMENT, name: FPDF_WIDESTRING)
4316 -> FPDF_ATTACHMENT;
4317}
4318unsafe extern "C" {
4319 #[doc = " Experimental API.\n Get the embedded attachment at |index| in |document|. Note that the returned\n attachment handle is only valid while |document| is open.\n\n document - handle to a document.\n index - the index of the requested embedded file.\n\n Returns the handle to the attachment object, or NULL on failure."]
4320 pub fn FPDFDoc_GetAttachment(
4321 document: FPDF_DOCUMENT,
4322 index: ::std::os::raw::c_int,
4323 ) -> FPDF_ATTACHMENT;
4324}
4325unsafe extern "C" {
4326 #[doc = " Experimental API.\n Delete the embedded attachment at |index| in |document|. Note that this does\n not remove the attachment data from the PDF file; it simply removes the\n file's entry in the embedded files name tree so that it does not appear in\n the attachment list. This behavior may change in the future.\n\n document - handle to a document.\n index - the index of the embedded file to be deleted.\n\n Returns true if successful."]
4327 pub fn FPDFDoc_DeleteAttachment(
4328 document: FPDF_DOCUMENT,
4329 index: ::std::os::raw::c_int,
4330 ) -> FPDF_BOOL;
4331}
4332unsafe extern "C" {
4333 #[doc = " Experimental API.\n Get the name of the |attachment| file. |buffer| is only modified if |buflen|\n is longer than the length of the file name. On errors, |buffer| is unmodified\n and the returned length is 0.\n\n attachment - handle to an attachment.\n buffer - buffer for holding the file name, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the file name in bytes."]
4334 pub fn FPDFAttachment_GetName(
4335 attachment: FPDF_ATTACHMENT,
4336 buffer: *mut FPDF_WCHAR,
4337 buflen: ::std::os::raw::c_ulong,
4338 ) -> ::std::os::raw::c_ulong;
4339}
4340unsafe extern "C" {
4341 #[doc = " Experimental API.\n Check if the params dictionary of |attachment| has |key| as a key.\n\n attachment - handle to an attachment.\n key - the key to look for, encoded in UTF-8.\n\n Returns true if |key| exists."]
4342 pub fn FPDFAttachment_HasKey(attachment: FPDF_ATTACHMENT, key: FPDF_BYTESTRING) -> FPDF_BOOL;
4343}
4344unsafe extern "C" {
4345 #[doc = " Experimental API.\n Get the type of the value corresponding to |key| in the params dictionary of\n the embedded |attachment|.\n\n attachment - handle to an attachment.\n key - the key to look for, encoded in UTF-8.\n\n Returns the type of the dictionary value."]
4346 pub fn FPDFAttachment_GetValueType(
4347 attachment: FPDF_ATTACHMENT,
4348 key: FPDF_BYTESTRING,
4349 ) -> FPDF_OBJECT_TYPE;
4350}
4351unsafe extern "C" {
4352 #[doc = " Experimental API.\n Set the string value corresponding to |key| in the params dictionary of the\n embedded file |attachment|, overwriting the existing value if any. The value\n type should be FPDF_OBJECT_STRING after this function call succeeds.\n\n attachment - handle to an attachment.\n key - the key to the dictionary entry, encoded in UTF-8.\n value - the string value to be set, encoded in UTF-16LE.\n\n Returns true if successful."]
4353 pub fn FPDFAttachment_SetStringValue(
4354 attachment: FPDF_ATTACHMENT,
4355 key: FPDF_BYTESTRING,
4356 value: FPDF_WIDESTRING,
4357 ) -> FPDF_BOOL;
4358}
4359unsafe extern "C" {
4360 #[doc = " Experimental API.\n Get the string value corresponding to |key| in the params dictionary of the\n embedded file |attachment|. |buffer| is only modified if |buflen| is longer\n than the length of the string value. Note that if |key| does not exist in the\n dictionary or if |key|'s corresponding value in the dictionary is not a\n string (i.e. the value is not of type FPDF_OBJECT_STRING or\n FPDF_OBJECT_NAME), then an empty string would be copied to |buffer| and the\n return value would be 2. On other errors, nothing would be added to |buffer|\n and the return value would be 0.\n\n attachment - handle to an attachment.\n key - the key to the requested string value, encoded in UTF-8.\n buffer - buffer for holding the string value encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the dictionary value string in bytes."]
4361 pub fn FPDFAttachment_GetStringValue(
4362 attachment: FPDF_ATTACHMENT,
4363 key: FPDF_BYTESTRING,
4364 buffer: *mut FPDF_WCHAR,
4365 buflen: ::std::os::raw::c_ulong,
4366 ) -> ::std::os::raw::c_ulong;
4367}
4368unsafe extern "C" {
4369 #[doc = " Experimental API.\n Set the file data of |attachment|, overwriting the existing file data if any.\n The creation date and checksum will be updated, while all other dictionary\n entries will be deleted. Note that only contents with |len| smaller than\n INT_MAX is supported.\n\n attachment - handle to an attachment.\n contents - buffer holding the file data to write to |attachment|.\n len - length of file data in bytes.\n\n Returns true if successful."]
4370 pub fn FPDFAttachment_SetFile(
4371 attachment: FPDF_ATTACHMENT,
4372 document: FPDF_DOCUMENT,
4373 contents: *const ::std::os::raw::c_void,
4374 len: ::std::os::raw::c_ulong,
4375 ) -> FPDF_BOOL;
4376}
4377unsafe extern "C" {
4378 #[doc = " Experimental API.\n Get the file data of |attachment|.\n When the attachment file data is readable, true is returned, and |out_buflen|\n is updated to indicate the file data size. |buffer| is only modified if\n |buflen| is non-null and long enough to contain the entire file data. Callers\n must check both the return value and the input |buflen| is no less than the\n returned |out_buflen| before using the data.\n\n Otherwise, when the attachment file data is unreadable or when |out_buflen|\n is null, false is returned and |buffer| and |out_buflen| remain unmodified.\n\n attachment - handle to an attachment.\n buffer - buffer for holding the file data from |attachment|.\n buflen - length of the buffer in bytes.\n out_buflen - pointer to the variable that will receive the minimum buffer\n size to contain the file data of |attachment|.\n\n Returns true on success, false otherwise."]
4379 pub fn FPDFAttachment_GetFile(
4380 attachment: FPDF_ATTACHMENT,
4381 buffer: *mut ::std::os::raw::c_void,
4382 buflen: ::std::os::raw::c_ulong,
4383 out_buflen: *mut ::std::os::raw::c_ulong,
4384 ) -> FPDF_BOOL;
4385}
4386unsafe extern "C" {
4387 #[doc = " Experimental API.\n Get the MIME type (Subtype) of the embedded file |attachment|. |buffer| is\n only modified if |buflen| is longer than the length of the MIME type string.\n If the Subtype is not found or if there is no file stream, an empty string\n would be copied to |buffer| and the return value would be 2. On other errors,\n nothing would be added to |buffer| and the return value would be 0.\n\n attachment - handle to an attachment.\n buffer - buffer for holding the MIME type string encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the MIME type string in bytes."]
4388 pub fn FPDFAttachment_GetSubtype(
4389 attachment: FPDF_ATTACHMENT,
4390 buffer: *mut FPDF_WCHAR,
4391 buflen: ::std::os::raw::c_ulong,
4392 ) -> ::std::os::raw::c_ulong;
4393}
4394pub const FPDFANNOT_COLORTYPE_FPDFANNOT_COLORTYPE_Color: FPDFANNOT_COLORTYPE = 0;
4395pub const FPDFANNOT_COLORTYPE_FPDFANNOT_COLORTYPE_InteriorColor: FPDFANNOT_COLORTYPE = 1;
4396pub type FPDFANNOT_COLORTYPE = ::std::os::raw::c_uint;
4397unsafe extern "C" {
4398 #[doc = " Experimental API.\n Check if an annotation subtype is currently supported for creation.\n Currently supported subtypes:\n - circle\n - fileattachment\n - freetext\n - highlight\n - ink\n - link\n - popup\n - square,\n - squiggly\n - stamp\n - strikeout\n - text\n - underline\n\n subtype - the subtype to be checked.\n\n Returns true if this subtype supported."]
4399 pub fn FPDFAnnot_IsSupportedSubtype(subtype: FPDF_ANNOTATION_SUBTYPE) -> FPDF_BOOL;
4400}
4401unsafe extern "C" {
4402 #[doc = " Experimental API.\n Create an annotation in |page| of the subtype |subtype|. If the specified\n subtype is illegal or unsupported, then a new annotation will not be created.\n Must call FPDFPage_CloseAnnot() when the annotation returned by this\n function is no longer needed.\n\n page - handle to a page.\n subtype - the subtype of the new annotation.\n\n Returns a handle to the new annotation object, or NULL on failure."]
4403 pub fn FPDFPage_CreateAnnot(
4404 page: FPDF_PAGE,
4405 subtype: FPDF_ANNOTATION_SUBTYPE,
4406 ) -> FPDF_ANNOTATION;
4407}
4408unsafe extern "C" {
4409 #[doc = " Experimental API.\n Get the number of annotations in |page|.\n\n page - handle to a page.\n\n Returns the number of annotations in |page|."]
4410 pub fn FPDFPage_GetAnnotCount(page: FPDF_PAGE) -> ::std::os::raw::c_int;
4411}
4412unsafe extern "C" {
4413 #[doc = " Experimental API.\n Get annotation in |page| at |index|. Must call FPDFPage_CloseAnnot() when the\n annotation returned by this function is no longer needed.\n\n page - handle to a page.\n index - the index of the annotation.\n\n Returns a handle to the annotation object, or NULL on failure."]
4414 pub fn FPDFPage_GetAnnot(page: FPDF_PAGE, index: ::std::os::raw::c_int) -> FPDF_ANNOTATION;
4415}
4416unsafe extern "C" {
4417 #[doc = " Experimental API.\n Get the index of |annot| in |page|. This is the opposite of\n FPDFPage_GetAnnot().\n\n page - handle to the page that the annotation is on.\n annot - handle to an annotation.\n\n Returns the index of |annot|, or -1 on failure."]
4418 pub fn FPDFPage_GetAnnotIndex(page: FPDF_PAGE, annot: FPDF_ANNOTATION)
4419 -> ::std::os::raw::c_int;
4420}
4421unsafe extern "C" {
4422 #[doc = " Experimental API.\n Close an annotation. Must be called when the annotation returned by\n FPDFPage_CreateAnnot() or FPDFPage_GetAnnot() is no longer needed. This\n function does not remove the annotation from the document.\n\n annot - handle to an annotation."]
4423 pub fn FPDFPage_CloseAnnot(annot: FPDF_ANNOTATION);
4424}
4425unsafe extern "C" {
4426 #[doc = " Experimental API.\n Remove the annotation in |page| at |index|.\n\n page - handle to a page.\n index - the index of the annotation.\n\n Returns true if successful."]
4427 pub fn FPDFPage_RemoveAnnot(page: FPDF_PAGE, index: ::std::os::raw::c_int) -> FPDF_BOOL;
4428}
4429unsafe extern "C" {
4430 #[doc = " Experimental API.\n Get the subtype of an annotation.\n\n annot - handle to an annotation.\n\n Returns the annotation subtype."]
4431 pub fn FPDFAnnot_GetSubtype(annot: FPDF_ANNOTATION) -> FPDF_ANNOTATION_SUBTYPE;
4432}
4433unsafe extern "C" {
4434 #[doc = " Experimental API.\n Check if an annotation subtype is currently supported for object extraction,\n update, and removal.\n Currently supported subtypes: ink and stamp.\n\n subtype - the subtype to be checked.\n\n Returns true if this subtype supported."]
4435 pub fn FPDFAnnot_IsObjectSupportedSubtype(subtype: FPDF_ANNOTATION_SUBTYPE) -> FPDF_BOOL;
4436}
4437unsafe extern "C" {
4438 #[doc = " Experimental API.\n Update |obj| in |annot|. |obj| must be in |annot| already and must have\n been retrieved by FPDFAnnot_GetObject(). Currently, only ink and stamp\n annotations are supported by this API. Also note that only path, image, and\n text objects have APIs for modification; see FPDFPath_*(), FPDFText_*(), and\n FPDFImageObj_*().\n\n annot - handle to an annotation.\n obj - handle to the object that |annot| needs to update.\n\n Return true if successful."]
4439 pub fn FPDFAnnot_UpdateObject(annot: FPDF_ANNOTATION, obj: FPDF_PAGEOBJECT) -> FPDF_BOOL;
4440}
4441unsafe extern "C" {
4442 #[doc = " Experimental API.\n Add a new InkStroke, represented by an array of points, to the InkList of\n |annot|. The API creates an InkList if one doesn't already exist in |annot|.\n This API works only for ink annotations. Please refer to ISO 32000-1:2008\n spec, section 12.5.6.13.\n\n annot - handle to an annotation.\n points - pointer to a FS_POINTF array representing input points.\n point_count - number of elements in |points| array. This should not exceed\n the maximum value that can be represented by an int32_t).\n\n Returns the 0-based index at which the new InkStroke is added in the InkList\n of the |annot|. Returns -1 on failure."]
4443 pub fn FPDFAnnot_AddInkStroke(
4444 annot: FPDF_ANNOTATION,
4445 points: *const FS_POINTF,
4446 point_count: usize,
4447 ) -> ::std::os::raw::c_int;
4448}
4449unsafe extern "C" {
4450 #[doc = " Experimental API.\n Removes an InkList in |annot|.\n This API works only for ink annotations.\n\n annot - handle to an annotation.\n\n Return true on successful removal of /InkList entry from context of the\n non-null ink |annot|. Returns false on failure."]
4451 pub fn FPDFAnnot_RemoveInkList(annot: FPDF_ANNOTATION) -> FPDF_BOOL;
4452}
4453unsafe extern "C" {
4454 #[doc = " Experimental API.\n Add |obj| to |annot|. |obj| must have been created by\n FPDFPageObj_CreateNew{Path|Rect}() or FPDFPageObj_New{Text|Image}Obj(), and\n will be owned by |annot|. Note that an |obj| cannot belong to more than one\n |annot|. Currently, only ink and stamp annotations are supported by this API.\n Also note that only path, image, and text objects have APIs for creation.\n\n annot - handle to an annotation.\n obj - handle to the object that is to be added to |annot|.\n\n Return true if successful."]
4455 pub fn FPDFAnnot_AppendObject(annot: FPDF_ANNOTATION, obj: FPDF_PAGEOBJECT) -> FPDF_BOOL;
4456}
4457unsafe extern "C" {
4458 #[doc = " Experimental API.\n Get the total number of objects in |annot|, including path objects, text\n objects, external objects, image objects, and shading objects.\n\n annot - handle to an annotation.\n\n Returns the number of objects in |annot|."]
4459 pub fn FPDFAnnot_GetObjectCount(annot: FPDF_ANNOTATION) -> ::std::os::raw::c_int;
4460}
4461unsafe extern "C" {
4462 #[doc = " Experimental API.\n Get the object in |annot| at |index|.\n\n annot - handle to an annotation.\n index - the index of the object.\n\n Return a handle to the object, or NULL on failure."]
4463 pub fn FPDFAnnot_GetObject(
4464 annot: FPDF_ANNOTATION,
4465 index: ::std::os::raw::c_int,
4466 ) -> FPDF_PAGEOBJECT;
4467}
4468unsafe extern "C" {
4469 #[doc = " Experimental API.\n Remove the object in |annot| at |index|.\n\n annot - handle to an annotation.\n index - the index of the object to be removed.\n\n Return true if successful."]
4470 pub fn FPDFAnnot_RemoveObject(
4471 annot: FPDF_ANNOTATION,
4472 index: ::std::os::raw::c_int,
4473 ) -> FPDF_BOOL;
4474}
4475unsafe extern "C" {
4476 #[doc = " Experimental API.\n Set the color of an annotation. Fails when called on annotations with\n appearance streams already defined; instead use\n FPDFPageObj_Set{Stroke|Fill}Color().\n\n annot - handle to an annotation.\n type - type of the color to be set.\n R, G, B - buffer to hold the RGB value of the color. Ranges from 0 to 255.\n A - buffer to hold the opacity. Ranges from 0 to 255.\n\n Returns true if successful."]
4477 pub fn FPDFAnnot_SetColor(
4478 annot: FPDF_ANNOTATION,
4479 type_: FPDFANNOT_COLORTYPE,
4480 R: ::std::os::raw::c_uint,
4481 G: ::std::os::raw::c_uint,
4482 B: ::std::os::raw::c_uint,
4483 A: ::std::os::raw::c_uint,
4484 ) -> FPDF_BOOL;
4485}
4486unsafe extern "C" {
4487 #[doc = " Experimental API.\n Get the color of an annotation. If no color is specified, default to yellow\n for highlight annotation, black for all else. Fails when called on\n annotations with appearance streams already defined; instead use\n FPDFPageObj_Get{Stroke|Fill}Color().\n\n annot - handle to an annotation.\n type - type of the color requested.\n R, G, B - buffer to hold the RGB value of the color. Ranges from 0 to 255.\n A - buffer to hold the opacity. Ranges from 0 to 255.\n\n Returns true if successful."]
4488 pub fn FPDFAnnot_GetColor(
4489 annot: FPDF_ANNOTATION,
4490 type_: FPDFANNOT_COLORTYPE,
4491 R: *mut ::std::os::raw::c_uint,
4492 G: *mut ::std::os::raw::c_uint,
4493 B: *mut ::std::os::raw::c_uint,
4494 A: *mut ::std::os::raw::c_uint,
4495 ) -> FPDF_BOOL;
4496}
4497unsafe extern "C" {
4498 #[doc = " Experimental API.\n Check if the annotation is of a type that has attachment points\n (i.e. quadpoints). Quadpoints are the vertices of the rectangle that\n encompasses the texts affected by the annotation. They provide the\n coordinates in the page where the annotation is attached. Only text markup\n annotations (i.e. highlight, strikeout, squiggly, and underline) and link\n annotations have quadpoints.\n\n annot - handle to an annotation.\n\n Returns true if the annotation is of a type that has quadpoints, false\n otherwise."]
4499 pub fn FPDFAnnot_HasAttachmentPoints(annot: FPDF_ANNOTATION) -> FPDF_BOOL;
4500}
4501unsafe extern "C" {
4502 #[doc = " Experimental API.\n Replace the attachment points (i.e. quadpoints) set of an annotation at\n |quad_index|. This index needs to be within the result of\n FPDFAnnot_CountAttachmentPoints().\n If the annotation's appearance stream is defined and this annotation is of a\n type with quadpoints, then update the bounding box too if the new quadpoints\n define a bigger one.\n\n annot - handle to an annotation.\n quad_index - index of the set of quadpoints.\n quad_points - the quadpoints to be set.\n\n Returns true if successful."]
4503 pub fn FPDFAnnot_SetAttachmentPoints(
4504 annot: FPDF_ANNOTATION,
4505 quad_index: usize,
4506 quad_points: *const FS_QUADPOINTSF,
4507 ) -> FPDF_BOOL;
4508}
4509unsafe extern "C" {
4510 #[doc = " Experimental API.\n Append to the list of attachment points (i.e. quadpoints) of an annotation.\n If the annotation's appearance stream is defined and this annotation is of a\n type with quadpoints, then update the bounding box too if the new quadpoints\n define a bigger one.\n\n annot - handle to an annotation.\n quad_points - the quadpoints to be set.\n\n Returns true if successful."]
4511 pub fn FPDFAnnot_AppendAttachmentPoints(
4512 annot: FPDF_ANNOTATION,
4513 quad_points: *const FS_QUADPOINTSF,
4514 ) -> FPDF_BOOL;
4515}
4516unsafe extern "C" {
4517 #[doc = " Experimental API.\n Get the number of sets of quadpoints of an annotation.\n\n annot - handle to an annotation.\n\n Returns the number of sets of quadpoints, or 0 on failure."]
4518 pub fn FPDFAnnot_CountAttachmentPoints(annot: FPDF_ANNOTATION) -> usize;
4519}
4520unsafe extern "C" {
4521 #[doc = " Experimental API.\n Get the attachment points (i.e. quadpoints) of an annotation.\n\n annot - handle to an annotation.\n quad_index - index of the set of quadpoints.\n quad_points - receives the quadpoints; must not be NULL.\n\n Returns true if successful."]
4522 pub fn FPDFAnnot_GetAttachmentPoints(
4523 annot: FPDF_ANNOTATION,
4524 quad_index: usize,
4525 quad_points: *mut FS_QUADPOINTSF,
4526 ) -> FPDF_BOOL;
4527}
4528unsafe extern "C" {
4529 #[doc = " Experimental API.\n Set the annotation rectangle defining the location of the annotation. If the\n annotation's appearance stream is defined and this annotation is of a type\n without quadpoints, then update the bounding box too if the new rectangle\n defines a bigger one.\n\n annot - handle to an annotation.\n rect - the annotation rectangle to be set.\n\n Returns true if successful."]
4530 pub fn FPDFAnnot_SetRect(annot: FPDF_ANNOTATION, rect: *const FS_RECTF) -> FPDF_BOOL;
4531}
4532unsafe extern "C" {
4533 #[doc = " Experimental API.\n Get the annotation rectangle defining the location of the annotation.\n\n annot - handle to an annotation.\n rect - receives the rectangle; must not be NULL.\n\n Returns true if successful."]
4534 pub fn FPDFAnnot_GetRect(annot: FPDF_ANNOTATION, rect: *mut FS_RECTF) -> FPDF_BOOL;
4535}
4536unsafe extern "C" {
4537 #[doc = " Experimental API.\n Get the vertices of a polygon or polyline annotation. |buffer| is an array of\n points of the annotation. If |length| is less than the returned length, or\n |annot| or |buffer| is NULL, |buffer| will not be modified.\n\n annot - handle to an annotation, as returned by e.g. FPDFPage_GetAnnot()\n buffer - buffer for holding the points.\n length - length of the buffer in points.\n\n Returns the number of points if the annotation is of type polygon or\n polyline, 0 otherwise."]
4538 pub fn FPDFAnnot_GetVertices(
4539 annot: FPDF_ANNOTATION,
4540 buffer: *mut FS_POINTF,
4541 length: ::std::os::raw::c_ulong,
4542 ) -> ::std::os::raw::c_ulong;
4543}
4544unsafe extern "C" {
4545 #[doc = " Experimental API.\n Get the number of paths in the ink list of an ink annotation.\n\n annot - handle to an annotation, as returned by e.g. FPDFPage_GetAnnot()\n\n Returns the number of paths in the ink list if the annotation is of type ink,\n 0 otherwise."]
4546 pub fn FPDFAnnot_GetInkListCount(annot: FPDF_ANNOTATION) -> ::std::os::raw::c_ulong;
4547}
4548unsafe extern "C" {
4549 #[doc = " Experimental API.\n Get a path in the ink list of an ink annotation. |buffer| is an array of\n points of the path. If |length| is less than the returned length, or |annot|\n or |buffer| is NULL, |buffer| will not be modified.\n\n annot - handle to an annotation, as returned by e.g. FPDFPage_GetAnnot()\n path_index - index of the path\n buffer - buffer for holding the points.\n length - length of the buffer in points.\n\n Returns the number of points of the path if the annotation is of type ink, 0\n otherwise."]
4550 pub fn FPDFAnnot_GetInkListPath(
4551 annot: FPDF_ANNOTATION,
4552 path_index: ::std::os::raw::c_ulong,
4553 buffer: *mut FS_POINTF,
4554 length: ::std::os::raw::c_ulong,
4555 ) -> ::std::os::raw::c_ulong;
4556}
4557unsafe extern "C" {
4558 #[doc = " Experimental API.\n Get the starting and ending coordinates of a line annotation.\n\n annot - handle to an annotation, as returned by e.g. FPDFPage_GetAnnot()\n start - starting point\n end - ending point\n\n Returns true if the annotation is of type line, |start| and |end| are not\n NULL, false otherwise."]
4559 pub fn FPDFAnnot_GetLine(
4560 annot: FPDF_ANNOTATION,
4561 start: *mut FS_POINTF,
4562 end: *mut FS_POINTF,
4563 ) -> FPDF_BOOL;
4564}
4565unsafe extern "C" {
4566 #[doc = " Experimental API.\n Set the characteristics of the annotation's border (rounded rectangle).\n\n annot - handle to an annotation\n horizontal_radius - horizontal corner radius, in default user space units\n vertical_radius - vertical corner radius, in default user space units\n border_width - border width, in default user space units\n\n Returns true if setting the border for |annot| succeeds, false otherwise.\n\n If |annot| contains an appearance stream that overrides the border values,\n then the appearance stream will be removed on success."]
4567 pub fn FPDFAnnot_SetBorder(
4568 annot: FPDF_ANNOTATION,
4569 horizontal_radius: f32,
4570 vertical_radius: f32,
4571 border_width: f32,
4572 ) -> FPDF_BOOL;
4573}
4574unsafe extern "C" {
4575 #[doc = " Experimental API.\n Get the characteristics of the annotation's border (rounded rectangle).\n\n annot - handle to an annotation\n horizontal_radius - horizontal corner radius, in default user space units\n vertical_radius - vertical corner radius, in default user space units\n border_width - border width, in default user space units\n\n Returns true if |horizontal_radius|, |vertical_radius| and |border_width| are\n not NULL, false otherwise."]
4576 pub fn FPDFAnnot_GetBorder(
4577 annot: FPDF_ANNOTATION,
4578 horizontal_radius: *mut f32,
4579 vertical_radius: *mut f32,
4580 border_width: *mut f32,
4581 ) -> FPDF_BOOL;
4582}
4583unsafe extern "C" {
4584 #[doc = " Experimental API.\n Get the JavaScript of an event of the annotation's additional actions.\n |buffer| is only modified if |buflen| is large enough to hold the whole\n JavaScript string. If |buflen| is smaller, the total size of the JavaScript\n is still returned, but nothing is copied. If there is no JavaScript for\n |event| in |annot|, an empty string is written to |buf| and 2 is returned,\n denoting the size of the null terminator in the buffer. On other errors,\n nothing is written to |buffer| and 0 is returned.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - handle to an interactive form annotation.\n event - event type, one of the FPDF_ANNOT_AACTION_* values.\n buffer - buffer for holding the value string, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the string value in bytes, including the 2-byte\n null terminator."]
4585 pub fn FPDFAnnot_GetFormAdditionalActionJavaScript(
4586 hHandle: FPDF_FORMHANDLE,
4587 annot: FPDF_ANNOTATION,
4588 event: ::std::os::raw::c_int,
4589 buffer: *mut FPDF_WCHAR,
4590 buflen: ::std::os::raw::c_ulong,
4591 ) -> ::std::os::raw::c_ulong;
4592}
4593unsafe extern "C" {
4594 #[doc = " Experimental API.\n Check if |annot|'s dictionary has |key| as a key.\n\n annot - handle to an annotation.\n key - the key to look for, encoded in UTF-8.\n\n Returns true if |key| exists."]
4595 pub fn FPDFAnnot_HasKey(annot: FPDF_ANNOTATION, key: FPDF_BYTESTRING) -> FPDF_BOOL;
4596}
4597unsafe extern "C" {
4598 #[doc = " Experimental API.\n Get the type of the value corresponding to |key| in |annot|'s dictionary.\n\n annot - handle to an annotation.\n key - the key to look for, encoded in UTF-8.\n\n Returns the type of the dictionary value."]
4599 pub fn FPDFAnnot_GetValueType(annot: FPDF_ANNOTATION, key: FPDF_BYTESTRING)
4600 -> FPDF_OBJECT_TYPE;
4601}
4602unsafe extern "C" {
4603 #[doc = " Experimental API.\n Set the string value corresponding to |key| in |annot|'s dictionary,\n overwriting the existing value if any. The value type would be\n FPDF_OBJECT_STRING after this function call succeeds.\n\n annot - handle to an annotation.\n key - the key to the dictionary entry to be set, encoded in UTF-8.\n value - the string value to be set, encoded in UTF-16LE.\n\n Returns true if successful."]
4604 pub fn FPDFAnnot_SetStringValue(
4605 annot: FPDF_ANNOTATION,
4606 key: FPDF_BYTESTRING,
4607 value: FPDF_WIDESTRING,
4608 ) -> FPDF_BOOL;
4609}
4610unsafe extern "C" {
4611 #[doc = " Experimental API.\n Get the string value corresponding to |key| in |annot|'s dictionary. |buffer|\n is only modified if |buflen| is longer than the length of contents. Note that\n if |key| does not exist in the dictionary or if |key|'s corresponding value\n in the dictionary is not a string (i.e. the value is not of type\n FPDF_OBJECT_STRING or FPDF_OBJECT_NAME), then an empty string would be copied\n to |buffer| and the return value would be 2. On other errors, nothing would\n be added to |buffer| and the return value would be 0.\n\n annot - handle to an annotation.\n key - the key to the requested dictionary entry, encoded in UTF-8.\n buffer - buffer for holding the value string, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the string value in bytes."]
4612 pub fn FPDFAnnot_GetStringValue(
4613 annot: FPDF_ANNOTATION,
4614 key: FPDF_BYTESTRING,
4615 buffer: *mut FPDF_WCHAR,
4616 buflen: ::std::os::raw::c_ulong,
4617 ) -> ::std::os::raw::c_ulong;
4618}
4619unsafe extern "C" {
4620 #[doc = " Experimental API.\n Get the float value corresponding to |key| in |annot|'s dictionary. Writes\n value to |value| and returns True if |key| exists in the dictionary and\n |key|'s corresponding value is a number (FPDF_OBJECT_NUMBER), False\n otherwise.\n\n annot - handle to an annotation.\n key - the key to the requested dictionary entry, encoded in UTF-8.\n value - receives the value, must not be NULL.\n\n Returns True if value found, False otherwise."]
4621 pub fn FPDFAnnot_GetNumberValue(
4622 annot: FPDF_ANNOTATION,
4623 key: FPDF_BYTESTRING,
4624 value: *mut f32,
4625 ) -> FPDF_BOOL;
4626}
4627unsafe extern "C" {
4628 #[doc = " Experimental API.\n Set the AP (appearance string) in |annot|'s dictionary for a given\n |appearanceMode|.\n\n annot - handle to an annotation.\n appearanceMode - the appearance mode (normal, rollover or down) for which\n to get the AP.\n value - the string value to be set, encoded in UTF-16LE. If\n nullptr is passed, the AP is cleared for that mode. If the\n mode is Normal, APs for all modes are cleared.\n\n Returns true if successful."]
4629 pub fn FPDFAnnot_SetAP(
4630 annot: FPDF_ANNOTATION,
4631 appearanceMode: FPDF_ANNOT_APPEARANCEMODE,
4632 value: FPDF_WIDESTRING,
4633 ) -> FPDF_BOOL;
4634}
4635unsafe extern "C" {
4636 #[doc = " Experimental API.\n Get the AP (appearance string) from |annot|'s dictionary for a given\n |appearanceMode|.\n |buffer| is only modified if |buflen| is large enough to hold the whole AP\n string. If |buflen| is smaller, the total size of the AP is still returned,\n but nothing is copied.\n If there is no appearance stream for |annot| in |appearanceMode|, an empty\n string is written to |buf| and 2 is returned.\n On other errors, nothing is written to |buffer| and 0 is returned.\n\n annot - handle to an annotation.\n appearanceMode - the appearance mode (normal, rollover or down) for which\n to get the AP.\n buffer - buffer for holding the value string, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the string value in bytes."]
4637 pub fn FPDFAnnot_GetAP(
4638 annot: FPDF_ANNOTATION,
4639 appearanceMode: FPDF_ANNOT_APPEARANCEMODE,
4640 buffer: *mut FPDF_WCHAR,
4641 buflen: ::std::os::raw::c_ulong,
4642 ) -> ::std::os::raw::c_ulong;
4643}
4644unsafe extern "C" {
4645 #[doc = " Experimental API.\n Get the annotation corresponding to |key| in |annot|'s dictionary. Common\n keys for linking annotations include \"IRT\" and \"Popup\". Must call\n FPDFPage_CloseAnnot() when the annotation returned by this function is no\n longer needed.\n\n annot - handle to an annotation.\n key - the key to the requested dictionary entry, encoded in UTF-8.\n\n Returns a handle to the linked annotation object, or NULL on failure."]
4646 pub fn FPDFAnnot_GetLinkedAnnot(
4647 annot: FPDF_ANNOTATION,
4648 key: FPDF_BYTESTRING,
4649 ) -> FPDF_ANNOTATION;
4650}
4651unsafe extern "C" {
4652 #[doc = " Experimental API.\n Get the annotation flags of |annot|.\n\n annot - handle to an annotation.\n\n Returns the annotation flags."]
4653 pub fn FPDFAnnot_GetFlags(annot: FPDF_ANNOTATION) -> ::std::os::raw::c_int;
4654}
4655unsafe extern "C" {
4656 #[doc = " Experimental API.\n Set the |annot|'s flags to be of the value |flags|.\n\n annot - handle to an annotation.\n flags - the flag values to be set.\n\n Returns true if successful."]
4657 pub fn FPDFAnnot_SetFlags(annot: FPDF_ANNOTATION, flags: ::std::os::raw::c_int) -> FPDF_BOOL;
4658}
4659unsafe extern "C" {
4660 #[doc = " Experimental API.\n Get the annotation flags of |annot|.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - handle to an interactive form annotation.\n\n Returns the annotation flags specific to interactive forms."]
4661 pub fn FPDFAnnot_GetFormFieldFlags(
4662 handle: FPDF_FORMHANDLE,
4663 annot: FPDF_ANNOTATION,
4664 ) -> ::std::os::raw::c_int;
4665}
4666unsafe extern "C" {
4667 #[doc = " Experimental API.\n Sets the form field flags for an interactive form annotation.\n\n handle - the handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - handle to an interactive form annotation.\n flags - the form field flags to be set.\n\n Returns true if successful."]
4668 pub fn FPDFAnnot_SetFormFieldFlags(
4669 handle: FPDF_FORMHANDLE,
4670 annot: FPDF_ANNOTATION,
4671 flags: ::std::os::raw::c_int,
4672 ) -> FPDF_BOOL;
4673}
4674unsafe extern "C" {
4675 #[doc = " Experimental API.\n Retrieves an interactive form annotation whose rectangle contains a given\n point on a page. Must call FPDFPage_CloseAnnot() when the annotation returned\n is no longer needed.\n\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n page - handle to the page, returned by FPDF_LoadPage function.\n point - position in PDF \"user space\".\n\n Returns the interactive form annotation whose rectangle contains the given\n coordinates on the page. If there is no such annotation, return NULL."]
4676 pub fn FPDFAnnot_GetFormFieldAtPoint(
4677 hHandle: FPDF_FORMHANDLE,
4678 page: FPDF_PAGE,
4679 point: *const FS_POINTF,
4680 ) -> FPDF_ANNOTATION;
4681}
4682unsafe extern "C" {
4683 #[doc = " Experimental API.\n Gets the name of |annot|, which is an interactive form annotation.\n |buffer| is only modified if |buflen| is longer than the length of contents.\n In case of error, nothing will be added to |buffer| and the return value will\n be 0. Note that return value of empty string is 2 for \"\\0\\0\".\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - handle to an interactive form annotation.\n buffer - buffer for holding the name string, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the string value in bytes."]
4684 pub fn FPDFAnnot_GetFormFieldName(
4685 hHandle: FPDF_FORMHANDLE,
4686 annot: FPDF_ANNOTATION,
4687 buffer: *mut FPDF_WCHAR,
4688 buflen: ::std::os::raw::c_ulong,
4689 ) -> ::std::os::raw::c_ulong;
4690}
4691unsafe extern "C" {
4692 #[doc = " Experimental API.\n Gets the alternate name of |annot|, which is an interactive form annotation.\n |buffer| is only modified if |buflen| is longer than the length of contents.\n In case of error, nothing will be added to |buffer| and the return value will\n be 0. Note that return value of empty string is 2 for \"\\0\\0\".\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - handle to an interactive form annotation.\n buffer - buffer for holding the alternate name string, encoded in\n UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the string value in bytes."]
4693 pub fn FPDFAnnot_GetFormFieldAlternateName(
4694 hHandle: FPDF_FORMHANDLE,
4695 annot: FPDF_ANNOTATION,
4696 buffer: *mut FPDF_WCHAR,
4697 buflen: ::std::os::raw::c_ulong,
4698 ) -> ::std::os::raw::c_ulong;
4699}
4700unsafe extern "C" {
4701 #[doc = " Experimental API.\n Gets the form field type of |annot|, which is an interactive form annotation.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - handle to an interactive form annotation.\n\n Returns the type of the form field (one of the FPDF_FORMFIELD_* values) on\n success. Returns -1 on error.\n See field types in fpdf_formfill.h."]
4702 pub fn FPDFAnnot_GetFormFieldType(
4703 hHandle: FPDF_FORMHANDLE,
4704 annot: FPDF_ANNOTATION,
4705 ) -> ::std::os::raw::c_int;
4706}
4707unsafe extern "C" {
4708 #[doc = " Experimental API.\n Gets the value of |annot|, which is an interactive form annotation.\n |buffer| is only modified if |buflen| is longer than the length of contents.\n In case of error, nothing will be added to |buffer| and the return value will\n be 0. Note that return value of empty string is 2 for \"\\0\\0\".\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - handle to an interactive form annotation.\n buffer - buffer for holding the value string, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the string value in bytes."]
4709 pub fn FPDFAnnot_GetFormFieldValue(
4710 hHandle: FPDF_FORMHANDLE,
4711 annot: FPDF_ANNOTATION,
4712 buffer: *mut FPDF_WCHAR,
4713 buflen: ::std::os::raw::c_ulong,
4714 ) -> ::std::os::raw::c_ulong;
4715}
4716unsafe extern "C" {
4717 #[doc = " Experimental API.\n Get the number of options in the |annot|'s \"Opt\" dictionary. Intended for\n use with listbox and combobox widget annotations.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n\n Returns the number of options in \"Opt\" dictionary on success. Return value\n will be -1 if annotation does not have an \"Opt\" dictionary or other error."]
4718 pub fn FPDFAnnot_GetOptionCount(
4719 hHandle: FPDF_FORMHANDLE,
4720 annot: FPDF_ANNOTATION,
4721 ) -> ::std::os::raw::c_int;
4722}
4723unsafe extern "C" {
4724 #[doc = " Experimental API.\n Get the string value for the label of the option at |index| in |annot|'s\n \"Opt\" dictionary. Intended for use with listbox and combobox widget\n annotations. |buffer| is only modified if |buflen| is longer than the length\n of contents. If index is out of range or in case of other error, nothing\n will be added to |buffer| and the return value will be 0. Note that\n return value of empty string is 2 for \"\\0\\0\".\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n index - numeric index of the option in the \"Opt\" array\n buffer - buffer for holding the value string, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the string value in bytes.\n If |annot| does not have an \"Opt\" array, |index| is out of range or if any\n other error occurs, returns 0."]
4725 pub fn FPDFAnnot_GetOptionLabel(
4726 hHandle: FPDF_FORMHANDLE,
4727 annot: FPDF_ANNOTATION,
4728 index: ::std::os::raw::c_int,
4729 buffer: *mut FPDF_WCHAR,
4730 buflen: ::std::os::raw::c_ulong,
4731 ) -> ::std::os::raw::c_ulong;
4732}
4733unsafe extern "C" {
4734 #[doc = " Experimental API.\n Determine whether or not the option at |index| in |annot|'s \"Opt\" dictionary\n is selected. Intended for use with listbox and combobox widget annotations.\n\n handle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n index - numeric index of the option in the \"Opt\" array.\n\n Returns true if the option at |index| in |annot|'s \"Opt\" dictionary is\n selected, false otherwise."]
4735 pub fn FPDFAnnot_IsOptionSelected(
4736 handle: FPDF_FORMHANDLE,
4737 annot: FPDF_ANNOTATION,
4738 index: ::std::os::raw::c_int,
4739 ) -> FPDF_BOOL;
4740}
4741unsafe extern "C" {
4742 #[doc = " Experimental API.\n Get the float value of the font size for an |annot| with variable text.\n If 0, the font is to be auto-sized: its size is computed as a function of\n the height of the annotation rectangle.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n value - Required. Float which will be set to font size on success.\n\n Returns true if the font size was set in |value|, false on error or if\n |value| not provided."]
4743 pub fn FPDFAnnot_GetFontSize(
4744 hHandle: FPDF_FORMHANDLE,
4745 annot: FPDF_ANNOTATION,
4746 value: *mut f32,
4747 ) -> FPDF_BOOL;
4748}
4749unsafe extern "C" {
4750 #[doc = " Experimental API.\n Set the text color of an annotation.\n\n handle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n R - the red component for the text color.\n G - the green component for the text color.\n B - the blue component for the text color.\n\n Returns true if successful.\n\n Currently supported subtypes: freetext.\n The range for the color components is 0 to 255."]
4751 pub fn FPDFAnnot_SetFontColor(
4752 handle: FPDF_FORMHANDLE,
4753 annot: FPDF_ANNOTATION,
4754 R: ::std::os::raw::c_uint,
4755 G: ::std::os::raw::c_uint,
4756 B: ::std::os::raw::c_uint,
4757 ) -> FPDF_BOOL;
4758}
4759unsafe extern "C" {
4760 #[doc = " Experimental API.\n Get the RGB value of the font color for an |annot| with variable text.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n R, G, B - buffer to hold the RGB value of the color. Ranges from 0 to 255.\n\n Returns true if the font color was set, false on error or if the font\n color was not provided."]
4761 pub fn FPDFAnnot_GetFontColor(
4762 hHandle: FPDF_FORMHANDLE,
4763 annot: FPDF_ANNOTATION,
4764 R: *mut ::std::os::raw::c_uint,
4765 G: *mut ::std::os::raw::c_uint,
4766 B: *mut ::std::os::raw::c_uint,
4767 ) -> FPDF_BOOL;
4768}
4769unsafe extern "C" {
4770 #[doc = " Experimental API.\n Determine if |annot| is a form widget that is checked. Intended for use with\n checkbox and radio button widgets.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n\n Returns true if |annot| is a form widget and is checked, false otherwise."]
4771 pub fn FPDFAnnot_IsChecked(hHandle: FPDF_FORMHANDLE, annot: FPDF_ANNOTATION) -> FPDF_BOOL;
4772}
4773unsafe extern "C" {
4774 #[doc = " Experimental API.\n Set the list of focusable annotation subtypes. Annotations of subtype\n FPDF_ANNOT_WIDGET are by default focusable. New subtypes set using this API\n will override the existing subtypes.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n subtypes - list of annotation subtype which can be tabbed over.\n count - total number of annotation subtype in list.\n Returns true if list of annotation subtype is set successfully, false\n otherwise."]
4775 pub fn FPDFAnnot_SetFocusableSubtypes(
4776 hHandle: FPDF_FORMHANDLE,
4777 subtypes: *const FPDF_ANNOTATION_SUBTYPE,
4778 count: usize,
4779 ) -> FPDF_BOOL;
4780}
4781unsafe extern "C" {
4782 #[doc = " Experimental API.\n Get the count of focusable annotation subtypes as set by host\n for a |hHandle|.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n Returns the count of focusable annotation subtypes or -1 on error.\n Note : Annotations of type FPDF_ANNOT_WIDGET are by default focusable."]
4783 pub fn FPDFAnnot_GetFocusableSubtypesCount(hHandle: FPDF_FORMHANDLE) -> ::std::os::raw::c_int;
4784}
4785unsafe extern "C" {
4786 #[doc = " Experimental API.\n Get the list of focusable annotation subtype as set by host.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n subtypes - receives the list of annotation subtype which can be tabbed\n over. Caller must have allocated |subtypes| more than or\n equal to the count obtained from\n FPDFAnnot_GetFocusableSubtypesCount() API.\n count - size of |subtypes|.\n Returns true on success and set list of annotation subtype to |subtypes|,\n false otherwise.\n Note : Annotations of type FPDF_ANNOT_WIDGET are by default focusable."]
4787 pub fn FPDFAnnot_GetFocusableSubtypes(
4788 hHandle: FPDF_FORMHANDLE,
4789 subtypes: *mut FPDF_ANNOTATION_SUBTYPE,
4790 count: usize,
4791 ) -> FPDF_BOOL;
4792}
4793unsafe extern "C" {
4794 #[doc = " Experimental API.\n Gets FPDF_LINK object for |annot|. Intended to use for link annotations.\n\n annot - handle to an annotation.\n\n Returns FPDF_LINK from the FPDF_ANNOTATION and NULL on failure,\n if the input annot is NULL or input annot's subtype is not link."]
4795 pub fn FPDFAnnot_GetLink(annot: FPDF_ANNOTATION) -> FPDF_LINK;
4796}
4797unsafe extern "C" {
4798 #[doc = " Experimental API.\n Gets the count of annotations in the |annot|'s control group.\n A group of interactive form annotations is collectively called a form\n control group. Here, |annot|, an interactive form annotation, should be\n either a radio button or a checkbox.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n\n Returns number of controls in its control group or -1 on error."]
4799 pub fn FPDFAnnot_GetFormControlCount(
4800 hHandle: FPDF_FORMHANDLE,
4801 annot: FPDF_ANNOTATION,
4802 ) -> ::std::os::raw::c_int;
4803}
4804unsafe extern "C" {
4805 #[doc = " Experimental API.\n Gets the index of |annot| in |annot|'s control group.\n A group of interactive form annotations is collectively called a form\n control group. Here, |annot|, an interactive form annotation, should be\n either a radio button or a checkbox.\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment.\n annot - handle to an annotation.\n\n Returns index of a given |annot| in its control group or -1 on error."]
4806 pub fn FPDFAnnot_GetFormControlIndex(
4807 hHandle: FPDF_FORMHANDLE,
4808 annot: FPDF_ANNOTATION,
4809 ) -> ::std::os::raw::c_int;
4810}
4811unsafe extern "C" {
4812 #[doc = " Experimental API.\n Gets the export value of |annot| which is an interactive form annotation.\n Intended for use with radio button and checkbox widget annotations.\n |buffer| is only modified if |buflen| is longer than the length of contents.\n In case of error, nothing will be added to |buffer| and the return value\n will be 0. Note that return value of empty string is 2 for \"\\0\\0\".\n\n hHandle - handle to the form fill module, returned by\n FPDFDOC_InitFormFillEnvironment().\n annot - handle to an interactive form annotation.\n buffer - buffer for holding the value string, encoded in UTF-16LE.\n buflen - length of the buffer in bytes.\n\n Returns the length of the string value in bytes."]
4813 pub fn FPDFAnnot_GetFormFieldExportValue(
4814 hHandle: FPDF_FORMHANDLE,
4815 annot: FPDF_ANNOTATION,
4816 buffer: *mut FPDF_WCHAR,
4817 buflen: ::std::os::raw::c_ulong,
4818 ) -> ::std::os::raw::c_ulong;
4819}
4820unsafe extern "C" {
4821 #[doc = " Experimental API.\n Add a URI action to |annot|, overwriting the existing action, if any.\n\n annot - handle to a link annotation.\n uri - the URI to be set, encoded in 7-bit ASCII.\n\n Returns true if successful."]
4822 pub fn FPDFAnnot_SetURI(
4823 annot: FPDF_ANNOTATION,
4824 uri: *const ::std::os::raw::c_char,
4825 ) -> FPDF_BOOL;
4826}
4827unsafe extern "C" {
4828 #[doc = " Experimental API.\n Get the attachment from |annot|.\n\n annot - handle to a file annotation.\n\n Returns the handle to the attachment object, or NULL on failure."]
4829 pub fn FPDFAnnot_GetFileAttachment(annot: FPDF_ANNOTATION) -> FPDF_ATTACHMENT;
4830}
4831unsafe extern "C" {
4832 #[doc = " Experimental API.\n Add an embedded file with |name| to |annot|.\n\n annot - handle to a file annotation.\n name - name of the new attachment.\n\n Returns a handle to the new attachment object, or NULL on failure."]
4833 pub fn FPDFAnnot_AddFileAttachment(
4834 annot: FPDF_ANNOTATION,
4835 name: FPDF_WIDESTRING,
4836 ) -> FPDF_ATTACHMENT;
4837}
4838#[doc = " IFPDF_RENDERINFO interface."]
4839#[repr(C)]
4840#[derive(Debug, Copy, Clone)]
4841pub struct _IFSDK_PAUSE {
4842 #[doc = " Version number of the interface. Currently must be 1."]
4843 pub version: ::std::os::raw::c_int,
4844 #[doc = " Method: NeedToPauseNow\n Check if we need to pause a progressive process now.\n Interface Version:\n 1\n Implementation Required:\n yes\n Parameters:\n pThis - Pointer to the interface structure itself\n Return Value:\n Non-zero for pause now, 0 for continue."]
4845 pub NeedToPauseNow:
4846 ::std::option::Option<unsafe extern "C" fn(pThis: *mut _IFSDK_PAUSE) -> FPDF_BOOL>,
4847 #[doc = " A user defined data pointer, used by user's application. Can be NULL."]
4848 pub user: *mut ::std::os::raw::c_void,
4849}
4850#[doc = " IFPDF_RENDERINFO interface."]
4851pub type IFSDK_PAUSE = _IFSDK_PAUSE;
4852unsafe extern "C" {
4853 #[doc = " Experimental API.\n Function: FPDF_RenderPageBitmapWithColorScheme_Start\n Start to render page contents to a device independent bitmap\n progressively with a specified color scheme for the content.\n Parameters:\n bitmap - Handle to the device independent bitmap (as the\n output buffer). Bitmap handle can be created by\n FPDFBitmap_Create function.\n page - Handle to the page as returned by FPDF_LoadPage\n function.\n start_x - Left pixel position of the display area in the\n bitmap coordinate.\n start_y - Top pixel position of the display area in the\n bitmap coordinate.\n size_x - Horizontal size (in pixels) for displaying the\n page.\n size_y - Vertical size (in pixels) for displaying the page.\n rotate - Page orientation: 0 (normal), 1 (rotated 90\n degrees clockwise), 2 (rotated 180 degrees),\n 3 (rotated 90 degrees counter-clockwise).\n flags - 0 for normal display, or combination of flags\n defined in fpdfview.h. With FPDF_ANNOT flag, it\n renders all annotations that does not require\n user-interaction, which are all annotations except\n widget and popup annotations.\n color_scheme - Color scheme to be used in rendering the |page|.\n If null, this function will work similar to\n FPDF_RenderPageBitmap_Start().\n pause - The IFSDK_PAUSE interface. A callback mechanism\n allowing the page rendering process.\n Return value:\n Rendering Status. See flags for progressive process status for the\n details."]
4854 pub fn FPDF_RenderPageBitmapWithColorScheme_Start(
4855 bitmap: FPDF_BITMAP,
4856 page: FPDF_PAGE,
4857 start_x: ::std::os::raw::c_int,
4858 start_y: ::std::os::raw::c_int,
4859 size_x: ::std::os::raw::c_int,
4860 size_y: ::std::os::raw::c_int,
4861 rotate: ::std::os::raw::c_int,
4862 flags: ::std::os::raw::c_int,
4863 color_scheme: *const FPDF_COLORSCHEME,
4864 pause: *mut IFSDK_PAUSE,
4865 ) -> ::std::os::raw::c_int;
4866}
4867unsafe extern "C" {
4868 #[doc = " Function: FPDF_RenderPageBitmap_Start\n Start to render page contents to a device independent bitmap\n progressively.\n Parameters:\n bitmap - Handle to the device independent bitmap (as the\n output buffer). Bitmap handle can be created by\n FPDFBitmap_Create().\n page - Handle to the page, as returned by FPDF_LoadPage().\n start_x - Left pixel position of the display area in the\n bitmap coordinates.\n start_y - Top pixel position of the display area in the bitmap\n coordinates.\n size_x - Horizontal size (in pixels) for displaying the page.\n size_y - Vertical size (in pixels) for displaying the page.\n rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees\n clockwise), 2 (rotated 180 degrees), 3 (rotated 90\n degrees counter-clockwise).\n flags - 0 for normal display, or combination of flags\n defined in fpdfview.h. With FPDF_ANNOT flag, it\n renders all annotations that does not require\n user-interaction, which are all annotations except\n widget and popup annotations.\n pause - The IFSDK_PAUSE interface.A callback mechanism\n allowing the page rendering process\n Return value:\n Rendering Status. See flags for progressive process status for the\n details."]
4869 pub fn FPDF_RenderPageBitmap_Start(
4870 bitmap: FPDF_BITMAP,
4871 page: FPDF_PAGE,
4872 start_x: ::std::os::raw::c_int,
4873 start_y: ::std::os::raw::c_int,
4874 size_x: ::std::os::raw::c_int,
4875 size_y: ::std::os::raw::c_int,
4876 rotate: ::std::os::raw::c_int,
4877 flags: ::std::os::raw::c_int,
4878 pause: *mut IFSDK_PAUSE,
4879 ) -> ::std::os::raw::c_int;
4880}
4881unsafe extern "C" {
4882 #[doc = " Function: FPDF_RenderPage_Continue\n Continue rendering a PDF page.\n Parameters:\n page - Handle to the page, as returned by FPDF_LoadPage().\n pause - The IFSDK_PAUSE interface (a callback mechanism\n allowing the page rendering process to be paused\n before it's finished). This can be NULL if you\n don't want to pause.\n Return value:\n The rendering status. See flags for progressive process status for\n the details."]
4883 pub fn FPDF_RenderPage_Continue(
4884 page: FPDF_PAGE,
4885 pause: *mut IFSDK_PAUSE,
4886 ) -> ::std::os::raw::c_int;
4887}
4888unsafe extern "C" {
4889 #[doc = " Function: FPDF_RenderPage_Close\n Release the resource allocate during page rendering. Need to be\n called after finishing rendering or\n cancel the rendering.\n Parameters:\n page - Handle to the page, as returned by FPDF_LoadPage().\n Return value:\n None."]
4890 pub fn FPDF_RenderPage_Close(page: FPDF_PAGE);
4891}
4892unsafe extern "C" {
4893 #[doc = " Experimental API.\n Import pages to a FPDF_DOCUMENT.\n\n dest_doc - The destination document for the pages.\n src_doc - The document to be imported.\n page_indices - An array of page indices to be imported. The first page is\n zero. If |page_indices| is NULL, all pages from |src_doc|\n are imported.\n length - The length of the |page_indices| array.\n index - The page index at which to insert the first imported page\n into |dest_doc|. The first page is zero.\n\n Returns TRUE on success. Returns FALSE if any pages in |page_indices| is\n invalid."]
4894 pub fn FPDF_ImportPagesByIndex(
4895 dest_doc: FPDF_DOCUMENT,
4896 src_doc: FPDF_DOCUMENT,
4897 page_indices: *const ::std::os::raw::c_int,
4898 length: ::std::os::raw::c_ulong,
4899 index: ::std::os::raw::c_int,
4900 ) -> FPDF_BOOL;
4901}
4902unsafe extern "C" {
4903 #[doc = " Import pages to a FPDF_DOCUMENT.\n\n dest_doc - The destination document for the pages.\n src_doc - The document to be imported.\n pagerange - A page range string, Such as \"1,3,5-7\". The first page is one.\n If |pagerange| is NULL, all pages from |src_doc| are imported.\n index - The page index at which to insert the first imported page into\n |dest_doc|. The first page is zero.\n\n Returns TRUE on success. Returns FALSE if any pages in |pagerange| is\n invalid or if |pagerange| cannot be read."]
4904 pub fn FPDF_ImportPages(
4905 dest_doc: FPDF_DOCUMENT,
4906 src_doc: FPDF_DOCUMENT,
4907 pagerange: FPDF_BYTESTRING,
4908 index: ::std::os::raw::c_int,
4909 ) -> FPDF_BOOL;
4910}
4911unsafe extern "C" {
4912 #[doc = " Experimental API.\n Create a new document from |src_doc|. The pages of |src_doc| will be\n combined to provide |num_pages_on_x_axis x num_pages_on_y_axis| pages per\n |output_doc| page.\n\n src_doc - The document to be imported.\n output_width - The output page width in PDF \"user space\" units.\n output_height - The output page height in PDF \"user space\" units.\n num_pages_on_x_axis - The number of pages on X Axis.\n num_pages_on_y_axis - The number of pages on Y Axis.\n\n Return value:\n A handle to the created document, or NULL on failure.\n\n Comments:\n number of pages per page = num_pages_on_x_axis * num_pages_on_y_axis\n"]
4913 pub fn FPDF_ImportNPagesToOne(
4914 src_doc: FPDF_DOCUMENT,
4915 output_width: f32,
4916 output_height: f32,
4917 num_pages_on_x_axis: usize,
4918 num_pages_on_y_axis: usize,
4919 ) -> FPDF_DOCUMENT;
4920}
4921unsafe extern "C" {
4922 #[doc = " Experimental API.\n Create a template to generate form xobjects from |src_doc|'s page at\n |src_page_index|, for use in |dest_doc|.\n\n Returns a handle on success, or NULL on failure. Caller owns the newly\n created object."]
4923 pub fn FPDF_NewXObjectFromPage(
4924 dest_doc: FPDF_DOCUMENT,
4925 src_doc: FPDF_DOCUMENT,
4926 src_page_index: ::std::os::raw::c_int,
4927 ) -> FPDF_XOBJECT;
4928}
4929unsafe extern "C" {
4930 #[doc = " Experimental API.\n Close an FPDF_XOBJECT handle created by FPDF_NewXObjectFromPage().\n FPDF_PAGEOBJECTs created from the FPDF_XOBJECT handle are not affected."]
4931 pub fn FPDF_CloseXObject(xobject: FPDF_XOBJECT);
4932}
4933unsafe extern "C" {
4934 #[doc = " Experimental API.\n Create a new form object from an FPDF_XOBJECT object.\n\n Returns a new form object on success, or NULL on failure. Caller owns the\n newly created object."]
4935 pub fn FPDF_NewFormObjectFromXObject(xobject: FPDF_XOBJECT) -> FPDF_PAGEOBJECT;
4936}
4937unsafe extern "C" {
4938 #[doc = " Copy the viewer preferences from |src_doc| into |dest_doc|.\n\n dest_doc - Document to write the viewer preferences into.\n src_doc - Document to read the viewer preferences from.\n\n Returns TRUE on success."]
4939 pub fn FPDF_CopyViewerPreferences(dest_doc: FPDF_DOCUMENT, src_doc: FPDF_DOCUMENT)
4940 -> FPDF_BOOL;
4941}
4942#[doc = " 13 = __LC_LAST."]
4943#[repr(C)]
4944#[derive(Debug, Copy, Clone)]
4945pub struct __locale_data {
4946 pub _address: u8,
4947}