pdfium/c_api/pdfium_types.rs
1// PDFium-rs -- Modern Rust interface to PDFium, the PDF library from Google
2//
3// Copyright (c) 2025-2026 Martin van der Werff <github (at) newinnovations.nl>
4//
5// This file is part of PDFium-rs.
6//
7// PDFium-rs is free software: you can redistribute it and/or modify it under the terms of
8// the GNU General Public License as published by the Free Software Foundation, either version 3
9// of the License, or (at your option) any later version.
10//
11// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
12// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
13// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
14// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
15// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
16// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
18// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19
20#![allow(non_camel_case_types)]
21#![allow(non_snake_case)]
22#![allow(dead_code)]
23
24//! Types (structures and typedefs) used by the PDFium C library
25pub use crate::c_api::pdfium_handle::Handle;
26
27/// Define 'max_align_t' to match the GCC definition.
28#[repr(C)]
29#[repr(align(16))]
30#[derive(Debug, Copy, Clone)]
31pub struct max_align_t {
32 /// A field used by Clang to help enforce maximum alignment.
33 pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
34 /// Padding field to ensure proper alignment and size.
35 pub __bindgen_padding_0: u64,
36 /// Another field used by Clang to enforce maximum alignment.
37 pub __clang_max_align_nonce2: u128,
38}
39
40#[repr(C)]
41#[derive(Debug, Copy, Clone)]
42/// C-API action pointer
43pub struct fpdf_action_t__ {
44 _unused: [u8; 0],
45}
46
47#[repr(C)]
48#[derive(Debug, Copy, Clone)]
49/// C-API annotation pointer
50pub struct fpdf_annotation_t__ {
51 _unused: [u8; 0],
52}
53
54#[repr(C)]
55#[derive(Debug, Copy, Clone)]
56/// C-API attachment pointer
57pub struct fpdf_attachment_t__ {
58 _unused: [u8; 0],
59}
60
61#[repr(C)]
62#[derive(Debug, Copy, Clone)]
63/// C-API availability pointer
64pub struct fpdf_avail_t__ {
65 _unused: [u8; 0],
66}
67
68#[repr(C)]
69#[derive(Debug, Copy, Clone)]
70/// C-API bitmap pointer
71pub struct fpdf_bitmap_t__ {
72 _unused: [u8; 0],
73}
74
75#[repr(C)]
76#[derive(Debug, Copy, Clone)]
77/// C-API bookmark pointer
78pub struct fpdf_bookmark_t__ {
79 _unused: [u8; 0],
80}
81
82#[repr(C)]
83#[derive(Debug, Copy, Clone)]
84/// C-API clippath pointer
85pub struct fpdf_clippath_t__ {
86 _unused: [u8; 0],
87}
88
89#[repr(C)]
90#[derive(Debug, Copy, Clone)]
91/// C-API destination pointer
92pub struct fpdf_dest_t__ {
93 _unused: [u8; 0],
94}
95
96#[repr(C)]
97#[derive(Debug, Copy, Clone)]
98/// C-API document pointer
99pub struct fpdf_document_t__ {
100 _unused: [u8; 0],
101}
102
103#[repr(C)]
104#[derive(Debug, Copy, Clone)]
105/// C-API font pointer
106pub struct fpdf_font_t__ {
107 _unused: [u8; 0],
108}
109
110#[repr(C)]
111#[derive(Debug, Copy, Clone)]
112/// C-API form pointer
113pub struct fpdf_form_handle_t__ {
114 _unused: [u8; 0],
115}
116
117#[repr(C)]
118#[derive(Debug, Copy, Clone)]
119/// C-API glyph path pointer
120pub struct fpdf_glyphpath_t__ {
121 _unused: [u8; 0],
122}
123
124#[repr(C)]
125#[derive(Debug, Copy, Clone)]
126/// C-API javascript action pointer
127pub struct fpdf_javascript_action_t {
128 _unused: [u8; 0],
129}
130
131#[repr(C)]
132#[derive(Debug, Copy, Clone)]
133/// C-API link pointer
134pub struct fpdf_link_t__ {
135 _unused: [u8; 0],
136}
137
138#[repr(C)]
139#[derive(Debug, Copy, Clone)]
140/// C-API page pointer
141pub struct fpdf_page_t__ {
142 _unused: [u8; 0],
143}
144
145#[repr(C)]
146#[derive(Debug, Copy, Clone)]
147/// C-API page link pointer
148pub struct fpdf_pagelink_t__ {
149 _unused: [u8; 0],
150}
151
152#[repr(C)]
153#[derive(Debug, Copy, Clone)]
154/// C-API page object pointer
155pub struct fpdf_pageobject_t__ {
156 _unused: [u8; 0],
157}
158
159#[repr(C)]
160#[derive(Debug, Copy, Clone)]
161/// C-API page object mark pointer
162pub struct fpdf_pageobjectmark_t__ {
163 _unused: [u8; 0],
164}
165
166#[repr(C)]
167#[derive(Debug, Copy, Clone)]
168/// C-API page range pointer
169pub struct fpdf_pagerange_t__ {
170 _unused: [u8; 0],
171}
172
173#[repr(C)]
174#[derive(Debug, Copy, Clone)]
175/// C-API path segment pointer
176pub struct fpdf_pathsegment_t {
177 _unused: [u8; 0],
178}
179
180#[repr(C)]
181#[derive(Debug, Copy, Clone)]
182/// C-API search pointer
183pub struct fpdf_schhandle_t__ {
184 _unused: [u8; 0],
185}
186
187#[repr(C)]
188#[derive(Debug, Copy, Clone)]
189/// C-API signature pointer
190pub struct fpdf_signature_t__ {
191 _unused: [u8; 0],
192}
193
194#[repr(C)]
195#[derive(Debug, Copy, Clone)]
196/// C-API struct element pointer
197pub struct fpdf_structelement_t__ {
198 _unused: [u8; 0],
199}
200
201#[repr(C)]
202#[derive(Debug, Copy, Clone)]
203/// C-API struct element attr pointer
204pub struct fpdf_structelement_attr_t__ {
205 _unused: [u8; 0],
206}
207
208#[repr(C)]
209#[derive(Debug, Copy, Clone)]
210/// C-API struct element attr value pointer
211pub struct fpdf_structelement_attr_value_t__ {
212 _unused: [u8; 0],
213}
214
215#[repr(C)]
216#[derive(Debug, Copy, Clone)]
217/// C-API struct tree pointer
218pub struct fpdf_structtree_t__ {
219 _unused: [u8; 0],
220}
221
222#[repr(C)]
223#[derive(Debug, Copy, Clone)]
224/// C-API text page pointer
225pub struct fpdf_textpage_t__ {
226 _unused: [u8; 0],
227}
228
229#[repr(C)]
230#[derive(Debug, Copy, Clone)]
231/// C-API widget pointer
232pub struct fpdf_widget_t__ {
233 _unused: [u8; 0],
234}
235
236#[repr(C)]
237#[derive(Debug, Copy, Clone)]
238/// C-API xobject pointer
239pub struct fpdf_xobject_t__ {
240 _unused: [u8; 0],
241}
242
243/// Structure for persisting a string beyond the duration of a callback.
244///
245/// C documentation:
246///
247/// ```text
248/// Structure for persisting a string beyond the duration of a callback.
249/// Note: although represented as a char*, string may be interpreted as
250/// a UTF-16LE formated string. Used only by XFA callbacks.
251/// ```
252#[repr(C)]
253#[derive(Debug, Copy, Clone)]
254pub struct FPDF_BSTR_ {
255 /// String buffer, manipulate only with FPDF_BStr_* methods.
256 pub str_: *mut ::std::os::raw::c_char,
257 /// Length of the string, in bytes.
258 pub len: ::std::os::raw::c_int,
259}
260
261/// Matrix for transformation
262///
263/// C documentation:
264///
265/// ```text
266/// Matrix for transformation, in the form \[a b c d e f\], equivalent to:
267/// | a b 0 |
268/// | c d 0 |
269/// | e f 1 |
270///
271/// Translation is performed with \[1 0 0 1 tx ty\].
272/// Scaling is performed with \[sx 0 0 sy 0 0\].
273/// See PDF Reference 1.7, 4.2.2 Common Transformations for more.
274/// ```
275#[repr(C)]
276#[derive(Debug, Copy, Clone)]
277pub struct _FS_MATRIX_ {
278 /// value `a` of the matrix
279 pub a: f32,
280 /// value `b` of the matrix
281 pub b: f32,
282 /// value `c` of the matrix
283 pub c: f32,
284 /// value `d` of the matrix
285 pub d: f32,
286 /// value `e` of the matrix
287 pub e: f32,
288 /// value `f` of the matrix
289 pub f: f32,
290}
291
292/// Rectangle area(float) in device or page coordinate system.
293#[repr(C)]
294#[derive(Debug, Copy, Clone)]
295pub struct _FS_RECTF_ {
296 /// The x-coordinate of the left-top corner.
297 pub left: f32,
298 /// The y-coordinate of the left-top corner.
299 pub top: f32,
300 /// The x-coordinate of the right-bottom corner.
301 pub right: f32,
302 /// The y-coordinate of the right-bottom corner.
303 pub bottom: f32,
304}
305
306/// Rectangle size. Coordinate system agnostic.
307#[repr(C)]
308#[derive(Debug, Copy, Clone)]
309pub struct FS_SIZEF_ {
310 /// `width` of the rectange
311 pub width: f32,
312 /// `height` of the rectange
313 pub height: f32,
314}
315
316/// 2D Point. Coordinate system agnostic.
317#[repr(C)]
318#[derive(Debug, Copy, Clone)]
319pub struct FS_POINTF_ {
320 /// `x` coordinate of the point
321 pub x: f32,
322 /// `y` coordinate of the point
323 pub y: f32,
324}
325
326#[repr(C)]
327#[derive(Debug, Copy, Clone)]
328/// Structure containing four points
329pub struct _FS_QUADPOINTSF {
330 /// `x` coordinate of the first point
331 pub x1: FS_FLOAT,
332 /// `y` coordinate of the first point
333 pub y1: FS_FLOAT,
334 /// `x` coordinate of the second point
335 pub x2: FS_FLOAT,
336 /// `y` coordinate of the second point
337 pub y2: FS_FLOAT,
338 /// `x` coordinate of the third point
339 pub x3: FS_FLOAT,
340 /// `y` coordinate of the third point
341 pub y3: FS_FLOAT,
342 /// `x` coordinate of the fourth point
343 pub x4: FS_FLOAT,
344 /// `y` coordinate of the fourth point
345 pub y4: FS_FLOAT,
346}
347
348/// Process-wide options for initializing the library.
349#[repr(C)]
350#[derive(Debug, Copy, Clone)]
351pub struct FPDF_LIBRARY_CONFIG_ {
352 /// Version number of the interface
353 ///
354 /// C documentation:
355 ///
356 /// ```text
357 /// Version number of the interface. Currently must be 2.
358 /// Support for version 1 will be deprecated in the future.
359 /// ```
360 pub version: ::std::os::raw::c_int,
361 /// Array of paths to scan in place of the defaults when using built-in
362 ///
363 /// C documentation:
364 ///
365 /// ```text
366 /// Array of paths to scan in place of the defaults when using built-in
367 /// FXGE font loading code. The array is terminated by a NULL pointer.
368 /// The Array may be NULL itself to use the default paths. May be ignored
369 /// entirely depending upon the platform.
370 /// ```
371 pub m_pUserFontPaths: *mut *const ::std::os::raw::c_char,
372 /// Pointer to the v8::Isolate to use, or NULL to force PDFium to create one.
373 pub m_pIsolate: *mut ::std::os::raw::c_void,
374 /// The embedder data slot to use in the v8::Isolate to store PDFium's
375 ///
376 /// C documentation:
377 ///
378 /// ```text
379 /// The embedder data slot to use in the v8::Isolate to store PDFium's
380 /// per-isolate data. The value needs to be in the range
381 /// \[0, |v8::Internals::kNumIsolateDataLots|). Note that 0 is fine for most
382 /// embedders.
383 /// ```
384 pub m_v8EmbedderSlot: ::std::os::raw::c_uint,
385 /// Pointer to the V8::Platform to use.
386 pub m_pPlatform: *mut ::std::os::raw::c_void,
387 /// Explicit specification of core renderer to use
388 ///
389 /// C documentation:
390 ///
391 /// ```text
392 /// Explicit specification of core renderer to use. |m_RendererType| must be
393 /// a valid value for |FPDF_LIBRARY_CONFIG| versions of this level or higher,
394 /// or else the initialization will fail with an immediate crash.
395 /// Note that use of a specified |FPDF_RENDERER_TYPE| value for which the
396 /// corresponding render library is not included in the build will similarly
397 /// fail with an immediate crash.
398 /// ```
399 pub m_RendererType: FPDF_RENDERER_TYPE,
400}
401
402/// Structure for custom file access.
403#[repr(C)]
404#[derive(Debug, Copy, Clone)]
405pub struct FPDF_FILEACCESS {
406 /// File length, in bytes.
407 pub m_FileLen: ::std::os::raw::c_ulong,
408 /// A function pointer for getting a block of data from a specific position.
409 ///
410 /// C documentation:
411 ///
412 /// ```text
413 /// A function pointer for getting a block of data from a specific position.
414 /// Position is specified by byte offset from the beginning of the file.
415 /// The pointer to the buffer is never NULL and the size is never 0.
416 /// The position and size will never go out of range of the file length.
417 /// It may be possible for PDFium to call this function multiple times for
418 /// the same position.
419 /// Return value: should be non-zero if successful, zero for error.
420 /// ```
421 pub m_GetBlock: ::std::option::Option<
422 unsafe extern "C" fn(
423 param: *mut ::std::os::raw::c_void,
424 position: ::std::os::raw::c_ulong,
425 pBuf: *mut ::std::os::raw::c_uchar,
426 size: ::std::os::raw::c_ulong,
427 ) -> ::std::os::raw::c_int,
428 >,
429 /// A custom pointer for all implementation specific data
430 ///
431 /// C documentation:
432 ///
433 /// ```text
434 /// A custom pointer for all implementation specific data. This pointer will
435 /// be used as the first parameter to the m_GetBlock callback.
436 /// ```
437 pub m_Param: *mut ::std::os::raw::c_void,
438}
439
440/// Structure for file reading or writing (I/O).
441///
442/// C documentation:
443///
444/// ```text
445/// Structure for file reading or writing (I/O).
446///
447/// Note: This is a handler and should be implemented by callers,
448/// and is only used from XFA.
449/// ```
450#[repr(C)]
451#[derive(Debug, Copy, Clone)]
452pub struct FPDF_FILEHANDLER_ {
453 /// User-defined data.
454 ///
455 /// C documentation:
456 ///
457 /// ```text
458 /// User-defined data.
459 /// Note: Callers can use this field to track controls.
460 /// ```
461 pub clientData: *mut ::std::os::raw::c_void,
462 /// Callback function to release the current file stream object.
463 ///
464 /// C documentation:
465 ///
466 /// ```text
467 /// Callback function to release the current file stream object.
468 ///
469 /// Parameters:
470 /// clientData - Pointer to user-defined data.
471 /// Returns:
472 /// None.
473 /// ```
474 pub Release:
475 ::std::option::Option<unsafe extern "C" fn(clientData: *mut ::std::os::raw::c_void)>,
476 /// Callback function to retrieve the current file stream size.
477 ///
478 /// C documentation:
479 ///
480 /// ```text
481 /// Callback function to retrieve the current file stream size.
482 ///
483 /// Parameters:
484 /// clientData - Pointer to user-defined data.
485 /// Returns:
486 /// Size of file stream.
487 /// ```
488 pub GetSize: ::std::option::Option<
489 unsafe extern "C" fn(clientData: *mut ::std::os::raw::c_void) -> FPDF_DWORD,
490 >,
491 /// Callback function to read data from the current file stream.
492 ///
493 /// C documentation:
494 ///
495 /// ```text
496 /// Callback function to read data from the current file stream.
497 ///
498 /// Parameters:
499 /// clientData - Pointer to user-defined data.
500 /// offset - Offset position starts from the beginning of file
501 /// stream. This parameter indicates reading position.
502 /// buffer - Memory buffer to store data which are read from
503 /// file stream. This parameter should not be NULL.
504 /// size - Size of data which should be read from file stream,
505 /// in bytes. The buffer indicated by |buffer| must be
506 /// large enough to store specified data.
507 /// Returns:
508 /// 0 for success, other value for failure.
509 /// ```
510 pub ReadBlock: ::std::option::Option<
511 unsafe extern "C" fn(
512 clientData: *mut ::std::os::raw::c_void,
513 offset: FPDF_DWORD,
514 buffer: *mut ::std::os::raw::c_void,
515 size: FPDF_DWORD,
516 ) -> FPDF_RESULT,
517 >,
518 /// Callback function to write data into the current file stream.
519 ///
520 /// C documentation:
521 ///
522 /// ```text
523 /// Callback function to write data into the current file stream.
524 ///
525 /// Parameters:
526 /// clientData - Pointer to user-defined data.
527 /// offset - Offset position starts from the beginning of file
528 /// stream. This parameter indicates writing position.
529 /// buffer - Memory buffer contains data which is written into
530 /// file stream. This parameter should not be NULL.
531 /// size - Size of data which should be written into file
532 /// stream, in bytes.
533 /// Returns:
534 /// 0 for success, other value for failure.
535 /// ```
536 pub WriteBlock: ::std::option::Option<
537 unsafe extern "C" fn(
538 clientData: *mut ::std::os::raw::c_void,
539 offset: FPDF_DWORD,
540 buffer: *const ::std::os::raw::c_void,
541 size: FPDF_DWORD,
542 ) -> FPDF_RESULT,
543 >,
544 /// Callback function to flush all internal accessing buffers.
545 ///
546 /// C documentation:
547 ///
548 /// ```text
549 /// Callback function to flush all internal accessing buffers.
550 ///
551 /// Parameters:
552 /// clientData - Pointer to user-defined data.
553 /// Returns:
554 /// 0 for success, other value for failure.
555 /// ```
556 pub Flush: ::std::option::Option<
557 unsafe extern "C" fn(clientData: *mut ::std::os::raw::c_void) -> FPDF_RESULT,
558 >,
559 /// Callback function to change file size.
560 ///
561 /// C documentation:
562 ///
563 /// ```text
564 /// Callback function to change file size.
565 ///
566 /// Description:
567 /// This function is called under writing mode usually. Implementer
568 /// can determine whether to realize it based on application requests.
569 /// Parameters:
570 /// clientData - Pointer to user-defined data.
571 /// size - New size of file stream, in bytes.
572 /// Returns:
573 /// 0 for success, other value for failure.
574 /// ```
575 pub Truncate: ::std::option::Option<
576 unsafe extern "C" fn(
577 clientData: *mut ::std::os::raw::c_void,
578 size: FPDF_DWORD,
579 ) -> FPDF_RESULT,
580 >,
581}
582
583/// Struct for color scheme.
584///
585/// C documentation:
586///
587/// ```text
588/// Struct for color scheme.
589/// Each should be a 32-bit value specifying the color, in 8888 ARGB format.
590/// ```
591#[repr(C)]
592#[derive(Debug, Copy, Clone)]
593pub struct FPDF_COLORSCHEME_ {
594 /// Path fill color
595 pub path_fill_color: FPDF_DWORD,
596 /// Path stroke color
597 pub path_stroke_color: FPDF_DWORD,
598 /// Text fill color
599 pub text_fill_color: FPDF_DWORD,
600 /// Text stroke color
601 pub text_stroke_color: FPDF_DWORD,
602}
603
604#[repr(C)]
605#[derive(Debug, Copy, Clone)]
606/// Javascript platform structure
607pub struct _IPDF_JsPlatform {
608 /// Version number of the interface. Currently must be 2.
609 pub version: ::std::os::raw::c_int,
610 /// Method: app_alert
611 ///
612 /// C documentation:
613 ///
614 /// ```text
615 /// Method: app_alert
616 /// Pop up a dialog to show warning or hint.
617 /// Interface Version:
618 /// 1
619 /// Implementation Required:
620 /// yes
621 /// Parameters:
622 /// pThis - Pointer to the interface structure itself.
623 /// Msg - A string containing the message to be displayed.
624 /// Title - The title of the dialog.
625 /// Type - The type of button group, one of the
626 /// JSPLATFORM_ALERT_BUTTON_* values above.
627 /// nIcon - The type of the icon, one of the
628 /// JSPLATFORM_ALERT_ICON_* above.
629 /// Return Value:
630 /// Option selected by user in dialogue, one of the
631 /// JSPLATFORM_ALERT_RETURN_* values above.
632 /// ```
633 pub app_alert: ::std::option::Option<
634 unsafe extern "C" fn(
635 pThis: *mut _IPDF_JsPlatform,
636 Msg: FPDF_WIDESTRING,
637 Title: FPDF_WIDESTRING,
638 Type: ::std::os::raw::c_int,
639 Icon: ::std::os::raw::c_int,
640 ) -> ::std::os::raw::c_int,
641 >,
642 /// Method: app_beep
643 ///
644 /// C documentation:
645 ///
646 /// ```text
647 /// Method: app_beep
648 /// Causes the system to play a sound.
649 /// Interface Version:
650 /// 1
651 /// Implementation Required:
652 /// yes
653 /// Parameters:
654 /// pThis - Pointer to the interface structure itself
655 /// nType - The sound type, see JSPLATFORM_BEEP_TYPE_*
656 /// above.
657 /// Return Value:
658 /// None
659 /// ```
660 pub app_beep: ::std::option::Option<
661 unsafe extern "C" fn(pThis: *mut _IPDF_JsPlatform, nType: ::std::os::raw::c_int),
662 >,
663 /// Method: app_response
664 ///
665 /// C documentation:
666 ///
667 /// ```text
668 /// Method: app_response
669 /// Displays a dialog box containing a question and an entry field for
670 /// the user to reply to the question.
671 /// Interface Version:
672 /// 1
673 /// Implementation Required:
674 /// yes
675 /// Parameters:
676 /// pThis - Pointer to the interface structure itself
677 /// Question - The question to be posed to the user.
678 /// Title - The title of the dialog box.
679 /// Default - A default value for the answer to the question. If
680 /// not specified, no default value is presented.
681 /// cLabel - A short string to appear in front of and on the
682 /// same line as the edit text field.
683 /// bPassword - If true, indicates that the user's response should
684 /// be shown as asterisks (*) or bullets (?) to mask
685 /// the response, which might be sensitive information.
686 /// response - A string buffer allocated by PDFium, to receive the
687 /// user's response.
688 /// length - The length of the buffer in bytes. Currently, it is
689 /// always 2048.
690 /// Return Value:
691 /// Number of bytes the complete user input would actually require, not
692 /// including trailing zeros, regardless of the value of the length
693 /// parameter or the presence of the response buffer.
694 /// Comments:
695 /// No matter on what platform, the response buffer should be always
696 /// written using UTF-16LE encoding. If a response buffer is
697 /// present and the size of the user input exceeds the capacity of the
698 /// buffer as specified by the length parameter, only the
699 /// first "length" bytes of the user input are to be written to the
700 /// buffer.
701 /// ```
702 pub app_response: ::std::option::Option<
703 unsafe extern "C" fn(
704 pThis: *mut _IPDF_JsPlatform,
705 Question: FPDF_WIDESTRING,
706 Title: FPDF_WIDESTRING,
707 Default: FPDF_WIDESTRING,
708 cLabel: FPDF_WIDESTRING,
709 bPassword: FPDF_BOOL,
710 response: *mut ::std::os::raw::c_void,
711 length: ::std::os::raw::c_int,
712 ) -> ::std::os::raw::c_int,
713 >,
714 /// Method: Doc_getFilePath
715 ///
716 /// C documentation:
717 ///
718 /// ```text
719 /// Method: Doc_getFilePath
720 /// Get the file path of the current document.
721 /// Interface Version:
722 /// 1
723 /// Implementation Required:
724 /// yes
725 /// Parameters:
726 /// pThis - Pointer to the interface structure itself
727 /// filePath - The string buffer to receive the file path. Can
728 /// be NULL.
729 /// length - The length of the buffer, number of bytes. Can
730 /// be 0.
731 /// Return Value:
732 /// Number of bytes the filePath consumes, including trailing zeros.
733 /// Comments:
734 /// The filePath should always be provided in the local encoding.
735 /// The return value always indicated number of bytes required for
736 /// the buffer, even when there is no buffer specified, or the buffer
737 /// size is less than required. In this case, the buffer will not
738 /// be modified.
739 /// ```
740 pub Doc_getFilePath: ::std::option::Option<
741 unsafe extern "C" fn(
742 pThis: *mut _IPDF_JsPlatform,
743 filePath: *mut ::std::os::raw::c_void,
744 length: ::std::os::raw::c_int,
745 ) -> ::std::os::raw::c_int,
746 >,
747 /// Method: Doc_mail
748 ///
749 /// C documentation:
750 ///
751 /// ```text
752 /// Method: Doc_mail
753 /// Mails the data buffer as an attachment to all recipients, with or
754 /// without user interaction.
755 /// Interface Version:
756 /// 1
757 /// Implementation Required:
758 /// yes
759 /// Parameters:
760 /// pThis - Pointer to the interface structure itself
761 /// mailData - Pointer to the data buffer to be sent. Can be NULL.
762 /// length - The size,in bytes, of the buffer pointed by
763 /// mailData parameter. Can be 0.
764 /// bUI - If true, the rest of the parameters are used in a
765 /// compose-new-message window that is displayed to the
766 /// user. If false, the cTo parameter is required and
767 /// all others are optional.
768 /// To - A semicolon-delimited list of recipients for the
769 /// message.
770 /// Subject - The subject of the message. The length limit is
771 /// 64 KB.
772 /// CC - A semicolon-delimited list of CC recipients for
773 /// the message.
774 /// BCC - A semicolon-delimited list of BCC recipients for
775 /// the message.
776 /// Msg - The content of the message. The length limit is
777 /// 64 KB.
778 /// Return Value:
779 /// None.
780 /// Comments:
781 /// If the parameter mailData is NULL or length is 0, the current
782 /// document will be mailed as an attachment to all recipients.
783 /// ```
784 pub Doc_mail: ::std::option::Option<
785 unsafe extern "C" fn(
786 pThis: *mut _IPDF_JsPlatform,
787 mailData: *mut ::std::os::raw::c_void,
788 length: ::std::os::raw::c_int,
789 bUI: FPDF_BOOL,
790 To: FPDF_WIDESTRING,
791 Subject: FPDF_WIDESTRING,
792 CC: FPDF_WIDESTRING,
793 BCC: FPDF_WIDESTRING,
794 Msg: FPDF_WIDESTRING,
795 ),
796 >,
797 /// Method: Doc_print
798 ///
799 /// C documentation:
800 ///
801 /// ```text
802 /// Method: Doc_print
803 /// Prints all or a specific number of pages of the document.
804 /// Interface Version:
805 /// 1
806 /// Implementation Required:
807 /// yes
808 /// Parameters:
809 /// pThis - Pointer to the interface structure itself.
810 /// bUI - If true, will cause a UI to be presented to the
811 /// user to obtain printing information and confirm
812 /// the action.
813 /// nStart - A 0-based index that defines the start of an
814 /// inclusive range of pages.
815 /// nEnd - A 0-based index that defines the end of an
816 /// inclusive page range.
817 /// bSilent - If true, suppresses the cancel dialog box while
818 /// the document is printing. The default is false.
819 /// bShrinkToFit - If true, the page is shrunk (if necessary) to
820 /// fit within the imageable area of the printed page.
821 /// bPrintAsImage - If true, print pages as an image.
822 /// bReverse - If true, print from nEnd to nStart.
823 /// bAnnotations - If true (the default), annotations are
824 /// printed.
825 /// Return Value:
826 /// None.
827 /// ```
828 pub Doc_print: ::std::option::Option<
829 unsafe extern "C" fn(
830 pThis: *mut _IPDF_JsPlatform,
831 bUI: FPDF_BOOL,
832 nStart: ::std::os::raw::c_int,
833 nEnd: ::std::os::raw::c_int,
834 bSilent: FPDF_BOOL,
835 bShrinkToFit: FPDF_BOOL,
836 bPrintAsImage: FPDF_BOOL,
837 bReverse: FPDF_BOOL,
838 bAnnotations: FPDF_BOOL,
839 ),
840 >,
841 /// Method: Doc_submitForm
842 ///
843 /// C documentation:
844 ///
845 /// ```text
846 /// Method: Doc_submitForm
847 /// Send the form data to a specified URL.
848 /// Interface Version:
849 /// 1
850 /// Implementation Required:
851 /// yes
852 /// Parameters:
853 /// pThis - Pointer to the interface structure itself
854 /// formData - Pointer to the data buffer to be sent.
855 /// length - The size,in bytes, of the buffer pointed by
856 /// formData parameter.
857 /// URL - The URL to send to.
858 /// Return Value:
859 /// None.
860 /// ```
861 pub Doc_submitForm: ::std::option::Option<
862 unsafe extern "C" fn(
863 pThis: *mut _IPDF_JsPlatform,
864 formData: *mut ::std::os::raw::c_void,
865 length: ::std::os::raw::c_int,
866 URL: FPDF_WIDESTRING,
867 ),
868 >,
869 /// Method: Doc_gotoPage
870 ///
871 /// C documentation:
872 ///
873 /// ```text
874 /// Method: Doc_gotoPage
875 /// Jump to a specified page.
876 /// Interface Version:
877 /// 1
878 /// Implementation Required:
879 /// yes
880 /// Parameters:
881 /// pThis - Pointer to the interface structure itself
882 /// nPageNum - The specified page number, zero for the first page.
883 /// Return Value:
884 /// None.
885 /// ```
886 pub Doc_gotoPage: ::std::option::Option<
887 unsafe extern "C" fn(pThis: *mut _IPDF_JsPlatform, nPageNum: ::std::os::raw::c_int),
888 >,
889 /// Method: Field_browse
890 ///
891 /// C documentation:
892 ///
893 /// ```text
894 /// Method: Field_browse
895 /// Show a file selection dialog, and return the selected file path.
896 /// Interface Version:
897 /// 1
898 /// Implementation Required:
899 /// yes
900 /// Parameters:
901 /// pThis - Pointer to the interface structure itself.
902 /// filePath - Pointer to the data buffer to receive the file
903 /// path. Can be NULL.
904 /// length - The length of the buffer, in bytes. Can be 0.
905 /// Return Value:
906 /// Number of bytes the filePath consumes, including trailing zeros.
907 /// Comments:
908 /// The filePath should always be provided in local encoding.
909 /// ```
910 pub Field_browse: ::std::option::Option<
911 unsafe extern "C" fn(
912 pThis: *mut _IPDF_JsPlatform,
913 filePath: *mut ::std::os::raw::c_void,
914 length: ::std::os::raw::c_int,
915 ) -> ::std::os::raw::c_int,
916 >,
917 /// Pointer for embedder-specific data
918 ///
919 /// C documentation:
920 ///
921 /// ```text
922 /// Pointer for embedder-specific data. Unused by PDFium, and despite
923 /// its name, can be any data the embedder desires, though traditionally
924 /// a FPDF_FORMFILLINFO interface.
925 /// ```
926 pub m_pFormfillinfo: *mut ::std::os::raw::c_void,
927 /// Unused in v3, retain for compatibility.
928 pub m_isolate: *mut ::std::os::raw::c_void,
929 /// Unused in v3, retain for compatibility.
930 pub m_v8EmbedderSlot: ::std::os::raw::c_uint,
931}
932
933/// Declares of a struct type to the local system time.
934#[repr(C)]
935#[derive(Debug, Copy, Clone)]
936pub struct _FPDF_SYSTEMTIME {
937 /// years since 1900
938 pub wYear: ::std::os::raw::c_ushort,
939 /// months since January - \[0,11\]
940 pub wMonth: ::std::os::raw::c_ushort,
941 /// days since Sunday - \[0,6\]
942 pub wDayOfWeek: ::std::os::raw::c_ushort,
943 /// day of the month - \[1,31\]
944 pub wDay: ::std::os::raw::c_ushort,
945 /// hours since midnight - \[0,23\]
946 pub wHour: ::std::os::raw::c_ushort,
947 /// minutes after the hour - \[0,59\]
948 pub wMinute: ::std::os::raw::c_ushort,
949 /// seconds after the minute - \[0,59\]
950 pub wSecond: ::std::os::raw::c_ushort,
951 /// milliseconds after the second - \[0,999\]
952 pub wMilliseconds: ::std::os::raw::c_ushort,
953}
954
955#[repr(C)]
956#[derive(Debug, Copy, Clone)]
957/// Form fill information
958pub struct _FPDF_FORMFILLINFO {
959 /// Version number of the interface.
960 ///
961 /// C documentation:
962 ///
963 /// ```text
964 /// Version number of the interface.
965 /// Version 1 contains stable interfaces. Version 2 has additional
966 /// experimental interfaces.
967 /// When PDFium is built without the XFA module, version can be 1 or 2.
968 /// With version 1, only stable interfaces are called. With version 2,
969 /// additional experimental interfaces are also called.
970 /// When PDFium is built with the XFA module, version must be 2.
971 /// All the XFA related interfaces are experimental. If PDFium is built with
972 /// the XFA module and version 1 then none of the XFA related interfaces
973 /// would be called. When PDFium is built with XFA module then the version
974 /// must be 2.
975 /// ```
976 pub version: ::std::os::raw::c_int,
977 /// Method: Release
978 ///
979 /// C documentation:
980 ///
981 /// ```text
982 /// Method: Release
983 /// Give the implementation a chance to release any resources after the
984 /// interface is no longer used.
985 /// Interface Version:
986 /// 1
987 /// Implementation Required:
988 /// No
989 /// Comments:
990 /// Called by PDFium during the final cleanup process.
991 /// Parameters:
992 /// pThis - Pointer to the interface structure itself
993 /// Return Value:
994 /// None
995 /// ```
996 pub Release: ::std::option::Option<unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO)>,
997 /// Method: FFI_Invalidate
998 ///
999 /// C documentation:
1000 ///
1001 /// ```text
1002 /// Method: FFI_Invalidate
1003 /// Invalidate the client area within the specified rectangle.
1004 /// Interface Version:
1005 /// 1
1006 /// Implementation Required:
1007 /// yes
1008 /// Parameters:
1009 /// pThis - Pointer to the interface structure itself.
1010 /// page - Handle to the page. Returned by FPDF_LoadPage().
1011 /// left - Left position of the client area in PDF page
1012 /// coordinates.
1013 /// top - Top position of the client area in PDF page
1014 /// coordinates.
1015 /// right - Right position of the client area in PDF page
1016 /// coordinates.
1017 /// bottom - Bottom position of the client area in PDF page
1018 /// coordinates.
1019 /// Return Value:
1020 /// None.
1021 /// Comments:
1022 /// All positions are measured in PDF "user space".
1023 /// Implementation should call FPDF_RenderPageBitmap() for repainting
1024 /// the specified page area.
1025 /// ```
1026 pub FFI_Invalidate: ::std::option::Option<
1027 unsafe extern "C" fn(
1028 pThis: *mut _FPDF_FORMFILLINFO,
1029 page: FPDF_PAGE,
1030 left: f64,
1031 top: f64,
1032 right: f64,
1033 bottom: f64,
1034 ),
1035 >,
1036 /// Method: FFI_OutputSelectedRect
1037 ///
1038 /// C documentation:
1039 ///
1040 /// ```text
1041 /// Method: FFI_OutputSelectedRect
1042 /// When the user selects text in form fields with the mouse, this
1043 /// callback function will be invoked with the selected areas.
1044 /// Interface Version:
1045 /// 1
1046 /// Implementation Required:
1047 /// No
1048 /// Parameters:
1049 /// pThis - Pointer to the interface structure itself.
1050 /// page - Handle to the page. Returned by FPDF_LoadPage()/
1051 /// left - Left position of the client area in PDF page
1052 /// coordinates.
1053 /// top - Top position of the client area in PDF page
1054 /// coordinates.
1055 /// right - Right position of the client area in PDF page
1056 /// coordinates.
1057 /// bottom - Bottom position of the client area in PDF page
1058 /// coordinates.
1059 /// Return Value:
1060 /// None.
1061 /// Comments:
1062 /// This callback function is useful for implementing special text
1063 /// selection effects. An implementation should first record the
1064 /// returned rectangles, then draw them one by one during the next
1065 /// painting period. Lastly, it should remove all the recorded
1066 /// rectangles when finished painting.
1067 /// ```
1068 pub FFI_OutputSelectedRect: ::std::option::Option<
1069 unsafe extern "C" fn(
1070 pThis: *mut _FPDF_FORMFILLINFO,
1071 page: FPDF_PAGE,
1072 left: f64,
1073 top: f64,
1074 right: f64,
1075 bottom: f64,
1076 ),
1077 >,
1078 /// Method: FFI_SetCursor
1079 ///
1080 /// C documentation:
1081 ///
1082 /// ```text
1083 /// Method: FFI_SetCursor
1084 /// Set the Cursor shape.
1085 /// Interface Version:
1086 /// 1
1087 /// Implementation Required:
1088 /// yes
1089 /// Parameters:
1090 /// pThis - Pointer to the interface structure itself.
1091 /// nCursorType - Cursor type, see Flags for Cursor type for details.
1092 /// Return value:
1093 /// None.
1094 /// ```
1095 pub FFI_SetCursor: ::std::option::Option<
1096 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, nCursorType: ::std::os::raw::c_int),
1097 >,
1098 /// Method: FFI_SetTimer
1099 ///
1100 /// C documentation:
1101 ///
1102 /// ```text
1103 /// Method: FFI_SetTimer
1104 /// This method installs a system timer. An interval value is specified,
1105 /// and every time that interval elapses, the system must call into the
1106 /// callback function with the timer ID as returned by this function.
1107 /// Interface Version:
1108 /// 1
1109 /// Implementation Required:
1110 /// yes
1111 /// Parameters:
1112 /// pThis - Pointer to the interface structure itself.
1113 /// uElapse - Specifies the time-out value, in milliseconds.
1114 /// lpTimerFunc - A pointer to the callback function-TimerCallback.
1115 /// Return value:
1116 /// The timer identifier of the new timer if the function is successful.
1117 /// An application passes this value to the FFI_KillTimer method to kill
1118 /// the timer. Nonzero if it is successful; otherwise, it is zero.
1119 /// ```
1120 pub FFI_SetTimer: ::std::option::Option<
1121 unsafe extern "C" fn(
1122 pThis: *mut _FPDF_FORMFILLINFO,
1123 uElapse: ::std::os::raw::c_int,
1124 lpTimerFunc: TimerCallback,
1125 ) -> ::std::os::raw::c_int,
1126 >,
1127 /// Method: FFI_KillTimer
1128 ///
1129 /// C documentation:
1130 ///
1131 /// ```text
1132 /// Method: FFI_KillTimer
1133 /// This method uninstalls a system timer, as set by an earlier call to
1134 /// FFI_SetTimer.
1135 /// Interface Version:
1136 /// 1
1137 /// Implementation Required:
1138 /// yes
1139 /// Parameters:
1140 /// pThis - Pointer to the interface structure itself.
1141 /// nTimerID - The timer ID returned by FFI_SetTimer function.
1142 /// Return value:
1143 /// None.
1144 /// ```
1145 pub FFI_KillTimer: ::std::option::Option<
1146 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, nTimerID: ::std::os::raw::c_int),
1147 >,
1148 /// Method: FFI_GetLocalTime
1149 ///
1150 /// C documentation:
1151 ///
1152 /// ```text
1153 /// Method: FFI_GetLocalTime
1154 /// This method receives the current local time on the system.
1155 /// Interface Version:
1156 /// 1
1157 /// Implementation Required:
1158 /// yes
1159 /// Parameters:
1160 /// pThis - Pointer to the interface structure itself.
1161 /// Return value:
1162 /// The local time. See FPDF_SYSTEMTIME above for details.
1163 /// Note: Unused.
1164 /// ```
1165 pub FFI_GetLocalTime: ::std::option::Option<
1166 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO) -> FPDF_SYSTEMTIME,
1167 >,
1168 /// Method: FFI_OnChange
1169 ///
1170 /// C documentation:
1171 ///
1172 /// ```text
1173 /// Method: FFI_OnChange
1174 /// This method will be invoked to notify the implementation when the
1175 /// value of any FormField on the document had been changed.
1176 /// Interface Version:
1177 /// 1
1178 /// Implementation Required:
1179 /// no
1180 /// Parameters:
1181 /// pThis - Pointer to the interface structure itself.
1182 /// Return value:
1183 /// None.
1184 /// ```
1185 pub FFI_OnChange: ::std::option::Option<unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO)>,
1186 /// Method: FFI_GetPage
1187 ///
1188 /// C documentation:
1189 ///
1190 /// ```text
1191 /// Method: FFI_GetPage
1192 /// This method receives the page handle associated with a specified
1193 /// page index.
1194 /// Interface Version:
1195 /// 1
1196 /// Implementation Required:
1197 /// yes
1198 /// Parameters:
1199 /// pThis - Pointer to the interface structure itself.
1200 /// document - Handle to document. Returned by FPDF_LoadDocument().
1201 /// nPageIndex - Index number of the page. 0 for the first page.
1202 /// Return value:
1203 /// Handle to the page, as previously returned to the implementation by
1204 /// FPDF_LoadPage().
1205 /// Comments:
1206 /// The implementation is expected to keep track of the page handles it
1207 /// receives from PDFium, and their mappings to page numbers. In some
1208 /// cases, the document-level JavaScript action may refer to a page
1209 /// which hadn't been loaded yet. To successfully run the Javascript
1210 /// action, the implementation needs to load the page.
1211 /// ```
1212 pub FFI_GetPage: ::std::option::Option<
1213 unsafe extern "C" fn(
1214 pThis: *mut _FPDF_FORMFILLINFO,
1215 document: FPDF_DOCUMENT,
1216 nPageIndex: ::std::os::raw::c_int,
1217 ) -> FPDF_PAGE,
1218 >,
1219 /// Method: FFI_GetCurrentPage
1220 ///
1221 /// C documentation:
1222 ///
1223 /// ```text
1224 /// Method: FFI_GetCurrentPage
1225 /// This method receives the handle to the current page.
1226 /// Interface Version:
1227 /// 1
1228 /// Implementation Required:
1229 /// Yes when V8 support is present, otherwise unused.
1230 /// Parameters:
1231 /// pThis - Pointer to the interface structure itself.
1232 /// document - Handle to document. Returned by FPDF_LoadDocument().
1233 /// Return value:
1234 /// Handle to the page. Returned by FPDF_LoadPage().
1235 /// Comments:
1236 /// PDFium doesn't keep keep track of the "current page" (e.g. the one
1237 /// that is most visible on screen), so it must ask the embedder for
1238 /// this information.
1239 /// ```
1240 pub FFI_GetCurrentPage: ::std::option::Option<
1241 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, document: FPDF_DOCUMENT) -> FPDF_PAGE,
1242 >,
1243 /// Method: FFI_GetRotation
1244 ///
1245 /// C documentation:
1246 ///
1247 /// ```text
1248 /// Method: FFI_GetRotation
1249 /// This method receives currently rotation of the page view.
1250 /// Interface Version:
1251 /// 1
1252 /// Implementation Required:
1253 /// yes
1254 /// Parameters:
1255 /// pThis - Pointer to the interface structure itself.
1256 /// page - Handle to page, as returned by FPDF_LoadPage().
1257 /// Return value:
1258 /// A number to indicate the page rotation in 90 degree increments
1259 /// in a clockwise direction:
1260 /// 0 - 0 degrees
1261 /// 1 - 90 degrees
1262 /// 2 - 180 degrees
1263 /// 3 - 270 degrees
1264 /// Note: Unused.
1265 /// ```
1266 pub FFI_GetRotation: ::std::option::Option<
1267 unsafe extern "C" fn(
1268 pThis: *mut _FPDF_FORMFILLINFO,
1269 page: FPDF_PAGE,
1270 ) -> ::std::os::raw::c_int,
1271 >,
1272 /// Method: FFI_ExecuteNamedAction
1273 ///
1274 /// C documentation:
1275 ///
1276 /// ```text
1277 /// Method: FFI_ExecuteNamedAction
1278 /// This method will execute a named action.
1279 /// Interface Version:
1280 /// 1
1281 /// Implementation Required:
1282 /// yes
1283 /// Parameters:
1284 /// pThis - Pointer to the interface structure itself.
1285 /// namedAction - A byte string which indicates the named action,
1286 /// terminated by 0.
1287 /// Return value:
1288 /// None.
1289 /// Comments:
1290 /// See ISO 32000-1:2008, section 12.6.4.11 for descriptions of the
1291 /// standard named actions, but note that a document may supply any
1292 /// name of its choosing.
1293 /// ```
1294 pub FFI_ExecuteNamedAction: ::std::option::Option<
1295 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, namedAction: FPDF_BYTESTRING),
1296 >,
1297 /// Method: FFI_SetTextFieldFocus
1298 ///
1299 /// C documentation:
1300 ///
1301 /// ```text
1302 /// Method: FFI_SetTextFieldFocus
1303 /// Called when a text field is getting or losing focus.
1304 /// Interface Version:
1305 /// 1
1306 /// Implementation Required:
1307 /// no
1308 /// Parameters:
1309 /// pThis - Pointer to the interface structure itself.
1310 /// value - The string value of the form field, in UTF-16LE
1311 /// format.
1312 /// valueLen - The length of the string value. This is the
1313 /// number of characters, not bytes.
1314 /// is_focus - True if the form field is getting focus, false
1315 /// if the form field is losing focus.
1316 /// Return value:
1317 /// None.
1318 /// Comments:
1319 /// Only supports text fields and combobox fields.
1320 /// ```
1321 pub FFI_SetTextFieldFocus: ::std::option::Option<
1322 unsafe extern "C" fn(
1323 pThis: *mut _FPDF_FORMFILLINFO,
1324 value: FPDF_WIDESTRING,
1325 valueLen: FPDF_DWORD,
1326 is_focus: FPDF_BOOL,
1327 ),
1328 >,
1329 /// Method: FFI_DoURIAction
1330 ///
1331 /// C documentation:
1332 ///
1333 /// ```text
1334 /// Method: FFI_DoURIAction
1335 /// Ask the implementation to navigate to a uniform resource identifier.
1336 /// Interface Version:
1337 /// 1
1338 /// Implementation Required:
1339 /// No
1340 /// Parameters:
1341 /// pThis - Pointer to the interface structure itself.
1342 /// bsURI - A byte string which indicates the uniform
1343 /// resource identifier, terminated by 0.
1344 /// Return value:
1345 /// None.
1346 /// Comments:
1347 /// If the embedder is version 2 or higher and have implementation for
1348 /// FFI_DoURIActionWithKeyboardModifier, then
1349 /// FFI_DoURIActionWithKeyboardModifier takes precedence over
1350 /// FFI_DoURIAction.
1351 /// See the URI actions description of <<PDF Reference, version 1.7>>
1352 /// for more details.
1353 /// ```
1354 pub FFI_DoURIAction: ::std::option::Option<
1355 unsafe extern "C" fn(pThis: *mut _FPDF_FORMFILLINFO, bsURI: FPDF_BYTESTRING),
1356 >,
1357 /// Method: FFI_DoGoToAction
1358 ///
1359 /// C documentation:
1360 ///
1361 /// ```text
1362 /// Method: FFI_DoGoToAction
1363 /// This action changes the view to a specified destination.
1364 /// Interface Version:
1365 /// 1
1366 /// Implementation Required:
1367 /// No
1368 /// Parameters:
1369 /// pThis - Pointer to the interface structure itself.
1370 /// nPageIndex - The index of the PDF page.
1371 /// zoomMode - The zoom mode for viewing page. See below.
1372 /// fPosArray - The float array which carries the position info.
1373 /// sizeofArray - The size of float array.
1374 /// PDFZoom values:
1375 /// - XYZ = 1
1376 /// - FITPAGE = 2
1377 /// - FITHORZ = 3
1378 /// - FITVERT = 4
1379 /// - FITRECT = 5
1380 /// - FITBBOX = 6
1381 /// - FITBHORZ = 7
1382 /// - FITBVERT = 8
1383 /// Return value:
1384 /// None.
1385 /// Comments:
1386 /// See the Destinations description of <<PDF Reference, version 1.7>>
1387 /// in 8.2.1 for more details.
1388 /// ```
1389 pub FFI_DoGoToAction: ::std::option::Option<
1390 unsafe extern "C" fn(
1391 pThis: *mut _FPDF_FORMFILLINFO,
1392 nPageIndex: ::std::os::raw::c_int,
1393 zoomMode: ::std::os::raw::c_int,
1394 fPosArray: *mut f32,
1395 sizeofArray: ::std::os::raw::c_int,
1396 ),
1397 >,
1398 /// Pointer to IPDF_JSPLATFORM interface.
1399 ///
1400 /// C documentation:
1401 ///
1402 /// ```text
1403 /// Pointer to IPDF_JSPLATFORM interface.
1404 /// Unused if PDFium is built without V8 support. Otherwise, if NULL, then
1405 /// JavaScript will be prevented from executing while rendering the document.
1406 /// ```
1407 pub m_pJsPlatform: *mut IPDF_JSPLATFORM,
1408 /// Whether the XFA module is disabled when built with the XFA module.
1409 ///
1410 /// C documentation:
1411 ///
1412 /// ```text
1413 /// Whether the XFA module is disabled when built with the XFA module.
1414 /// Interface Version:
1415 /// Ignored if |version| < 2.
1416 /// ```
1417 pub xfa_disabled: FPDF_BOOL,
1418 /// Method: FFI_DisplayCaret
1419 ///
1420 /// C documentation:
1421 ///
1422 /// ```text
1423 /// Method: FFI_DisplayCaret
1424 /// This method will show the caret at specified position.
1425 /// Interface Version:
1426 /// Ignored if |version| < 2.
1427 /// Implementation Required:
1428 /// Required for XFA, otherwise set to NULL.
1429 /// Parameters:
1430 /// pThis - Pointer to the interface structure itself.
1431 /// page - Handle to page. Returned by FPDF_LoadPage().
1432 /// left - Left position of the client area in PDF page
1433 /// coordinates.
1434 /// top - Top position of the client area in PDF page
1435 /// coordinates.
1436 /// right - Right position of the client area in PDF page
1437 /// coordinates.
1438 /// bottom - Bottom position of the client area in PDF page
1439 /// coordinates.
1440 /// Return value:
1441 /// None.
1442 /// ```
1443 pub FFI_DisplayCaret: ::std::option::Option<
1444 unsafe extern "C" fn(
1445 pThis: *mut _FPDF_FORMFILLINFO,
1446 page: FPDF_PAGE,
1447 bVisible: FPDF_BOOL,
1448 left: f64,
1449 top: f64,
1450 right: f64,
1451 bottom: f64,
1452 ),
1453 >,
1454 /// Method: FFI_GetCurrentPageIndex
1455 ///
1456 /// C documentation:
1457 ///
1458 /// ```text
1459 /// Method: FFI_GetCurrentPageIndex
1460 /// This method will get the current page index.
1461 /// Interface Version:
1462 /// Ignored if |version| < 2.
1463 /// Implementation Required:
1464 /// Required for XFA, otherwise set to NULL.
1465 /// Parameters:
1466 /// pThis - Pointer to the interface structure itself.
1467 /// document - Handle to document from FPDF_LoadDocument().
1468 /// Return value:
1469 /// The index of current page.
1470 /// ```
1471 pub FFI_GetCurrentPageIndex: ::std::option::Option<
1472 unsafe extern "C" fn(
1473 pThis: *mut _FPDF_FORMFILLINFO,
1474 document: FPDF_DOCUMENT,
1475 ) -> ::std::os::raw::c_int,
1476 >,
1477 /// Method: FFI_SetCurrentPage
1478 ///
1479 /// C documentation:
1480 ///
1481 /// ```text
1482 /// Method: FFI_SetCurrentPage
1483 /// This method will set the current page.
1484 /// Interface Version:
1485 /// Ignored if |version| < 2.
1486 /// Implementation Required:
1487 /// Required for XFA, otherwise set to NULL.
1488 /// Parameters:
1489 /// pThis - Pointer to the interface structure itself.
1490 /// document - Handle to document from FPDF_LoadDocument().
1491 /// iCurPage - The index of the PDF page.
1492 /// Return value:
1493 /// None.
1494 /// ```
1495 pub FFI_SetCurrentPage: ::std::option::Option<
1496 unsafe extern "C" fn(
1497 pThis: *mut _FPDF_FORMFILLINFO,
1498 document: FPDF_DOCUMENT,
1499 iCurPage: ::std::os::raw::c_int,
1500 ),
1501 >,
1502 /// Method: FFI_GotoURL
1503 ///
1504 /// C documentation:
1505 ///
1506 /// ```text
1507 /// Method: FFI_GotoURL
1508 /// This method will navigate to the specified URL.
1509 /// Interface Version:
1510 /// Ignored if |version| < 2.
1511 /// Implementation Required:
1512 /// Required for XFA, otherwise set to NULL.
1513 /// Parameters:
1514 /// pThis - Pointer to the interface structure itself.
1515 /// document - Handle to document from FPDF_LoadDocument().
1516 /// wsURL - The string value of the URL, in UTF-16LE format.
1517 /// Return value:
1518 /// None.
1519 /// ```
1520 pub FFI_GotoURL: ::std::option::Option<
1521 unsafe extern "C" fn(
1522 pThis: *mut _FPDF_FORMFILLINFO,
1523 document: FPDF_DOCUMENT,
1524 wsURL: FPDF_WIDESTRING,
1525 ),
1526 >,
1527 /// Method: FFI_GetPageViewRect
1528 ///
1529 /// C documentation:
1530 ///
1531 /// ```text
1532 /// Method: FFI_GetPageViewRect
1533 /// This method will get the current page view rectangle.
1534 /// Interface Version:
1535 /// Ignored if |version| < 2.
1536 /// Implementation Required:
1537 /// Required for XFA, otherwise set to NULL.
1538 /// Parameters:
1539 /// pThis - Pointer to the interface structure itself.
1540 /// page - Handle to page. Returned by FPDF_LoadPage().
1541 /// left - The pointer to receive left position of the page
1542 /// view area in PDF page coordinates.
1543 /// top - The pointer to receive top position of the page
1544 /// view area in PDF page coordinates.
1545 /// right - The pointer to receive right position of the
1546 /// page view area in PDF page coordinates.
1547 /// bottom - The pointer to receive bottom position of the
1548 /// page view area in PDF page coordinates.
1549 /// Return value:
1550 /// None.
1551 /// ```
1552 pub FFI_GetPageViewRect: ::std::option::Option<
1553 unsafe extern "C" fn(
1554 pThis: *mut _FPDF_FORMFILLINFO,
1555 page: FPDF_PAGE,
1556 left: *mut f64,
1557 top: *mut f64,
1558 right: *mut f64,
1559 bottom: *mut f64,
1560 ),
1561 >,
1562 /// Method: FFI_PageEvent
1563 ///
1564 /// C documentation:
1565 ///
1566 /// ```text
1567 /// Method: FFI_PageEvent
1568 /// This method fires when pages have been added to or deleted from
1569 /// the XFA document.
1570 /// Interface Version:
1571 /// Ignored if |version| < 2.
1572 /// Implementation Required:
1573 /// Required for XFA, otherwise set to NULL.
1574 /// Parameters:
1575 /// pThis - Pointer to the interface structure itself.
1576 /// page_count - The number of pages to be added or deleted.
1577 /// event_type - See FXFA_PAGEVIEWEVENT_* above.
1578 /// Return value:
1579 /// None.
1580 /// Comments:
1581 /// The pages to be added or deleted always start from the last page
1582 /// of document. This means that if parameter page_count is 2 and
1583 /// event type is FXFA_PAGEVIEWEVENT_POSTADDED, 2 new pages have been
1584 /// appended to the tail of document; If page_count is 2 and
1585 /// event type is FXFA_PAGEVIEWEVENT_POSTREMOVED, the last 2 pages
1586 /// have been deleted.
1587 /// ```
1588 pub FFI_PageEvent: ::std::option::Option<
1589 unsafe extern "C" fn(
1590 pThis: *mut _FPDF_FORMFILLINFO,
1591 page_count: ::std::os::raw::c_int,
1592 event_type: FPDF_DWORD,
1593 ),
1594 >,
1595 /// Method: FFI_PopupMenu
1596 ///
1597 /// C documentation:
1598 ///
1599 /// ```text
1600 /// Method: FFI_PopupMenu
1601 /// This method will track the right context menu for XFA fields.
1602 /// Interface Version:
1603 /// Ignored if |version| < 2.
1604 /// Implementation Required:
1605 /// Required for XFA, otherwise set to NULL.
1606 /// Parameters:
1607 /// pThis - Pointer to the interface structure itself.
1608 /// page - Handle to page. Returned by FPDF_LoadPage().
1609 /// hWidget - Always null, exists for compatibility.
1610 /// menuFlag - The menu flags. Please refer to macro definition
1611 /// of FXFA_MENU_XXX and this can be one or a
1612 /// combination of these macros.
1613 /// x - X position of the client area in PDF page
1614 /// coordinates.
1615 /// y - Y position of the client area in PDF page
1616 /// coordinates.
1617 /// Return value:
1618 /// TRUE indicates success; otherwise false.
1619 /// ```
1620 pub FFI_PopupMenu: ::std::option::Option<
1621 unsafe extern "C" fn(
1622 pThis: *mut _FPDF_FORMFILLINFO,
1623 page: FPDF_PAGE,
1624 hWidget: FPDF_WIDGET,
1625 menuFlag: ::std::os::raw::c_int,
1626 x: f32,
1627 y: f32,
1628 ) -> FPDF_BOOL,
1629 >,
1630 /// Method: FFI_OpenFile
1631 ///
1632 /// C documentation:
1633 ///
1634 /// ```text
1635 /// Method: FFI_OpenFile
1636 /// This method will open the specified file with the specified mode.
1637 /// Interface Version:
1638 /// Ignored if |version| < 2.
1639 /// Implementation Required:
1640 /// Required for XFA, otherwise set to NULL.
1641 /// Parameters:
1642 /// pThis - Pointer to the interface structure itself.
1643 /// fileFlag - The file flag. Please refer to macro definition
1644 /// of FXFA_SAVEAS_XXX and use one of these macros.
1645 /// wsURL - The string value of the file URL, in UTF-16LE
1646 /// format.
1647 /// mode - The mode for open file, e.g. "rb" or "wb".
1648 /// Return value:
1649 /// The handle to FPDF_FILEHANDLER.
1650 /// ```
1651 pub FFI_OpenFile: ::std::option::Option<
1652 unsafe extern "C" fn(
1653 pThis: *mut _FPDF_FORMFILLINFO,
1654 fileFlag: ::std::os::raw::c_int,
1655 wsURL: FPDF_WIDESTRING,
1656 mode: *const ::std::os::raw::c_char,
1657 ) -> *mut FPDF_FILEHANDLER,
1658 >,
1659 /// Method: FFI_EmailTo
1660 ///
1661 /// C documentation:
1662 ///
1663 /// ```text
1664 /// Method: FFI_EmailTo
1665 /// This method will email the specified file stream to the specified
1666 /// contact.
1667 /// Interface Version:
1668 /// Ignored if |version| < 2.
1669 /// Implementation Required:
1670 /// Required for XFA, otherwise set to NULL.
1671 /// Parameters:
1672 /// pThis - Pointer to the interface structure itself.
1673 /// pFileHandler - Handle to the FPDF_FILEHANDLER.
1674 /// pTo - A semicolon-delimited list of recipients for the
1675 /// message,in UTF-16LE format.
1676 /// pSubject - The subject of the message,in UTF-16LE format.
1677 /// pCC - A semicolon-delimited list of CC recipients for
1678 /// the message,in UTF-16LE format.
1679 /// pBcc - A semicolon-delimited list of BCC recipients for
1680 /// the message,in UTF-16LE format.
1681 /// pMsg - Pointer to the data buffer to be sent.Can be
1682 /// NULL,in UTF-16LE format.
1683 /// Return value:
1684 /// None.
1685 /// ```
1686 pub FFI_EmailTo: ::std::option::Option<
1687 unsafe extern "C" fn(
1688 pThis: *mut _FPDF_FORMFILLINFO,
1689 fileHandler: *mut FPDF_FILEHANDLER,
1690 pTo: FPDF_WIDESTRING,
1691 pSubject: FPDF_WIDESTRING,
1692 pCC: FPDF_WIDESTRING,
1693 pBcc: FPDF_WIDESTRING,
1694 pMsg: FPDF_WIDESTRING,
1695 ),
1696 >,
1697 /// Method: FFI_UploadTo
1698 ///
1699 /// C documentation:
1700 ///
1701 /// ```text
1702 /// Method: FFI_UploadTo
1703 /// This method will upload the specified file stream to the
1704 /// specified URL.
1705 /// Interface Version:
1706 /// Ignored if |version| < 2.
1707 /// Implementation Required:
1708 /// Required for XFA, otherwise set to NULL.
1709 /// Parameters:
1710 /// pThis - Pointer to the interface structure itself.
1711 /// pFileHandler - Handle to the FPDF_FILEHANDLER.
1712 /// fileFlag - The file flag. Please refer to macro definition
1713 /// of FXFA_SAVEAS_XXX and use one of these macros.
1714 /// uploadTo - Pointer to the URL path, in UTF-16LE format.
1715 /// Return value:
1716 /// None.
1717 /// ```
1718 pub FFI_UploadTo: ::std::option::Option<
1719 unsafe extern "C" fn(
1720 pThis: *mut _FPDF_FORMFILLINFO,
1721 fileHandler: *mut FPDF_FILEHANDLER,
1722 fileFlag: ::std::os::raw::c_int,
1723 uploadTo: FPDF_WIDESTRING,
1724 ),
1725 >,
1726 /// Method: FFI_GetPlatform
1727 ///
1728 /// C documentation:
1729 ///
1730 /// ```text
1731 /// Method: FFI_GetPlatform
1732 /// This method will get the current platform.
1733 /// Interface Version:
1734 /// Ignored if |version| < 2.
1735 /// Implementation Required:
1736 /// Required for XFA, otherwise set to NULL.
1737 /// Parameters:
1738 /// pThis - Pointer to the interface structure itself.
1739 /// platform - Pointer to the data buffer to receive the
1740 /// platform,in UTF-16LE format. Can be NULL.
1741 /// length - The length of the buffer in bytes. Can be
1742 /// 0 to query the required size.
1743 /// Return value:
1744 /// The length of the buffer, number of bytes.
1745 /// ```
1746 pub FFI_GetPlatform: ::std::option::Option<
1747 unsafe extern "C" fn(
1748 pThis: *mut _FPDF_FORMFILLINFO,
1749 platform: *mut ::std::os::raw::c_void,
1750 length: ::std::os::raw::c_int,
1751 ) -> ::std::os::raw::c_int,
1752 >,
1753 /// Method: FFI_GetLanguage
1754 ///
1755 /// C documentation:
1756 ///
1757 /// ```text
1758 /// Method: FFI_GetLanguage
1759 /// This method will get the current language.
1760 /// Interface Version:
1761 /// Ignored if |version| < 2.
1762 /// Implementation Required:
1763 /// Required for XFA, otherwise set to NULL.
1764 /// Parameters:
1765 /// pThis - Pointer to the interface structure itself.
1766 /// language - Pointer to the data buffer to receive the
1767 /// current language. Can be NULL.
1768 /// length - The length of the buffer in bytes. Can be
1769 /// 0 to query the required size.
1770 /// Return value:
1771 /// The length of the buffer, number of bytes.
1772 /// ```
1773 pub FFI_GetLanguage: ::std::option::Option<
1774 unsafe extern "C" fn(
1775 pThis: *mut _FPDF_FORMFILLINFO,
1776 language: *mut ::std::os::raw::c_void,
1777 length: ::std::os::raw::c_int,
1778 ) -> ::std::os::raw::c_int,
1779 >,
1780 /// Method: FFI_DownloadFromURL
1781 ///
1782 /// C documentation:
1783 ///
1784 /// ```text
1785 /// Method: FFI_DownloadFromURL
1786 /// This method will download the specified file from the URL.
1787 /// Interface Version:
1788 /// Ignored if |version| < 2.
1789 /// Implementation Required:
1790 /// Required for XFA, otherwise set to NULL.
1791 /// Parameters:
1792 /// pThis - Pointer to the interface structure itself.
1793 /// URL - The string value of the file URL, in UTF-16LE
1794 /// format.
1795 /// Return value:
1796 /// The handle to FPDF_FILEHANDLER.
1797 /// ```
1798 pub FFI_DownloadFromURL: ::std::option::Option<
1799 unsafe extern "C" fn(
1800 pThis: *mut _FPDF_FORMFILLINFO,
1801 URL: FPDF_WIDESTRING,
1802 ) -> *mut FPDF_FILEHANDLER,
1803 >,
1804 /// Method: FFI_PostRequestURL
1805 ///
1806 /// C documentation:
1807 ///
1808 /// ```text
1809 /// Method: FFI_PostRequestURL
1810 /// This method will post the request to the server URL.
1811 /// Interface Version:
1812 /// Ignored if |version| < 2.
1813 /// Implementation Required:
1814 /// Required for XFA, otherwise set to NULL.
1815 /// Parameters:
1816 /// pThis - Pointer to the interface structure itself.
1817 /// wsURL - The string value of the server URL, in UTF-16LE
1818 /// format.
1819 /// wsData - The post data,in UTF-16LE format.
1820 /// wsContentType - The content type of the request data, in
1821 /// UTF-16LE format.
1822 /// wsEncode - The encode type, in UTF-16LE format.
1823 /// wsHeader - The request header,in UTF-16LE format.
1824 /// response - Pointer to the FPDF_BSTR to receive the response
1825 /// data from the server, in UTF-16LE format.
1826 /// Return value:
1827 /// TRUE indicates success, otherwise FALSE.
1828 /// ```
1829 pub FFI_PostRequestURL: ::std::option::Option<
1830 unsafe extern "C" fn(
1831 pThis: *mut _FPDF_FORMFILLINFO,
1832 wsURL: FPDF_WIDESTRING,
1833 wsData: FPDF_WIDESTRING,
1834 wsContentType: FPDF_WIDESTRING,
1835 wsEncode: FPDF_WIDESTRING,
1836 wsHeader: FPDF_WIDESTRING,
1837 response: *mut FPDF_BSTR,
1838 ) -> FPDF_BOOL,
1839 >,
1840 /// Method: FFI_PutRequestURL
1841 ///
1842 /// C documentation:
1843 ///
1844 /// ```text
1845 /// Method: FFI_PutRequestURL
1846 /// This method will put the request to the server URL.
1847 /// Interface Version:
1848 /// Ignored if |version| < 2.
1849 /// Implementation Required:
1850 /// Required for XFA, otherwise set to NULL.
1851 /// Parameters:
1852 /// pThis - Pointer to the interface structure itself.
1853 /// wsURL - The string value of the server URL, in UTF-16LE
1854 /// format.
1855 /// wsData - The put data, in UTF-16LE format.
1856 /// wsEncode - The encode type, in UTR-16LE format.
1857 /// Return value:
1858 /// TRUE indicates success, otherwise FALSE.
1859 /// ```
1860 pub FFI_PutRequestURL: ::std::option::Option<
1861 unsafe extern "C" fn(
1862 pThis: *mut _FPDF_FORMFILLINFO,
1863 wsURL: FPDF_WIDESTRING,
1864 wsData: FPDF_WIDESTRING,
1865 wsEncode: FPDF_WIDESTRING,
1866 ) -> FPDF_BOOL,
1867 >,
1868 /// Method: FFI_OnFocusChange
1869 ///
1870 /// C documentation:
1871 ///
1872 /// ```text
1873 /// Method: FFI_OnFocusChange
1874 /// Called when the focused annotation is updated.
1875 /// Interface Version:
1876 /// Ignored if |version| < 2.
1877 /// Implementation Required:
1878 /// No
1879 /// Parameters:
1880 /// param - Pointer to the interface structure itself.
1881 /// annot - The focused annotation.
1882 /// page_index - Index number of the page which contains the
1883 /// focused annotation. 0 for the first page.
1884 /// Return value:
1885 /// None.
1886 /// Comments:
1887 /// This callback function is useful for implementing any view based
1888 /// action such as scrolling the annotation rect into view. The
1889 /// embedder should not copy and store the annot as its scope is
1890 /// limited to this call only.
1891 /// ```
1892 pub FFI_OnFocusChange: ::std::option::Option<
1893 unsafe extern "C" fn(
1894 param: *mut _FPDF_FORMFILLINFO,
1895 annot: FPDF_ANNOTATION,
1896 page_index: ::std::os::raw::c_int,
1897 ),
1898 >,
1899 /// Method: FFI_DoURIActionWithKeyboardModifier
1900 ///
1901 /// C documentation:
1902 ///
1903 /// ```text
1904 /// Method: FFI_DoURIActionWithKeyboardModifier
1905 /// Ask the implementation to navigate to a uniform resource identifier
1906 /// with the specified modifiers.
1907 /// Interface Version:
1908 /// Ignored if |version| < 2.
1909 /// Implementation Required:
1910 /// No
1911 /// Parameters:
1912 /// param - Pointer to the interface structure itself.
1913 /// uri - A byte string which indicates the uniform
1914 /// resource identifier, terminated by 0.
1915 /// modifiers - Keyboard modifier that indicates which of
1916 /// the virtual keys are down, if any.
1917 /// Return value:
1918 /// None.
1919 /// Comments:
1920 /// If the embedder who is version 2 and does not implement this API,
1921 /// then a call will be redirected to FFI_DoURIAction.
1922 /// See the URI actions description of <<PDF Reference, version 1.7>>
1923 /// for more details.
1924 /// ```
1925 pub FFI_DoURIActionWithKeyboardModifier: ::std::option::Option<
1926 unsafe extern "C" fn(
1927 param: *mut _FPDF_FORMFILLINFO,
1928 uri: FPDF_BYTESTRING,
1929 modifiers: ::std::os::raw::c_int,
1930 ),
1931 >,
1932}
1933
1934/// Interface for checking whether sections of the file are available.
1935#[repr(C)]
1936#[derive(Debug, Copy, Clone)]
1937pub struct _FX_FILEAVAIL {
1938 /// Version number of the interface. Must be 1.
1939 pub version: ::std::os::raw::c_int,
1940 /// Reports if the specified data section is currently available
1941 ///
1942 /// C documentation:
1943 ///
1944 /// ```text
1945 /// Reports if the specified data section is currently available. A section is
1946 /// available if all bytes in the section are available.
1947 ///
1948 /// Interface Version: 1
1949 /// Implementation Required: Yes
1950 ///
1951 /// pThis - pointer to the interface structure.
1952 /// offset - the offset of the data section in the file.
1953 /// size - the size of the data section.
1954 ///
1955 /// Returns true if the specified data section at |offset| of |size|
1956 /// is available.
1957 /// ```
1958 pub IsDataAvail: ::std::option::Option<
1959 unsafe extern "C" fn(pThis: *mut _FX_FILEAVAIL, offset: usize, size: usize) -> FPDF_BOOL,
1960 >,
1961}
1962
1963/// Download hints interface. Used to receive hints for further downloading.
1964#[repr(C)]
1965#[derive(Debug, Copy, Clone)]
1966pub struct _FX_DOWNLOADHINTS {
1967 /// Version number of the interface. Must be 1.
1968 pub version: ::std::os::raw::c_int,
1969 /// Add a section to be downloaded.
1970 ///
1971 /// C documentation:
1972 ///
1973 /// ```text
1974 /// Add a section to be downloaded.
1975 ///
1976 /// Interface Version: 1
1977 /// Implementation Required: Yes
1978 ///
1979 /// pThis - pointer to the interface structure.
1980 /// offset - the offset of the hint reported to be downloaded.
1981 /// size - the size of the hint reported to be downloaded.
1982 ///
1983 /// The |offset| and |size| of the section may not be unique. Part of the
1984 /// section might be already available. The download manager must deal with
1985 /// overlapping sections.
1986 /// ```
1987 pub AddSegment: ::std::option::Option<
1988 unsafe extern "C" fn(pThis: *mut _FX_DOWNLOADHINTS, offset: usize, size: usize),
1989 >,
1990}
1991
1992#[repr(C)]
1993#[derive(Debug, Copy, Clone)]
1994/// Image object metadata
1995pub struct FPDF_IMAGEOBJ_METADATA {
1996 /// The image width in pixels.
1997 pub width: ::std::os::raw::c_uint,
1998 /// The image height in pixels.
1999 pub height: ::std::os::raw::c_uint,
2000 /// The image's horizontal pixel-per-inch.
2001 pub horizontal_dpi: f32,
2002 /// The image's vertical pixel-per-inch.
2003 pub vertical_dpi: f32,
2004 /// The number of bits used to represent each pixel.
2005 pub bits_per_pixel: ::std::os::raw::c_uint,
2006 /// The image's colorspace. See above for the list of FPDF_COLORSPACE_*.
2007 pub colorspace: ::std::os::raw::c_int,
2008 /// The image's marked content ID
2009 ///
2010 /// C documentation:
2011 ///
2012 /// ```text
2013 /// The image's marked content ID. Useful for pairing with associated alt-text.
2014 /// A value of -1 indicates no ID.
2015 /// ```
2016 pub marked_content_id: ::std::os::raw::c_int,
2017}
2018
2019/// ISO C `broken-down time' structure.
2020#[repr(C)]
2021#[derive(Debug, Copy, Clone)]
2022pub struct tm {
2023 /// Seconds.\t\[0-60\] (1 leap second)
2024 pub tm_sec: ::std::os::raw::c_int,
2025 /// Minutes.\t\[0-59\]
2026 pub tm_min: ::std::os::raw::c_int,
2027 /// Hours.\t\[0-23\]
2028 pub tm_hour: ::std::os::raw::c_int,
2029 /// Day.\t\t\[1-31\]
2030 pub tm_mday: ::std::os::raw::c_int,
2031 /// Month.\t\[0-11\]
2032 pub tm_mon: ::std::os::raw::c_int,
2033 /// Year\t- 1900.
2034 pub tm_year: ::std::os::raw::c_int,
2035 /// Day of week.\t\[0-6\]
2036 pub tm_wday: ::std::os::raw::c_int,
2037 /// Days in year.\[0-365\]
2038 pub tm_yday: ::std::os::raw::c_int,
2039 /// DST.\t\t\[-1/0/1\]
2040 pub tm_isdst: ::std::os::raw::c_int,
2041 /// Seconds east of UTC.
2042 pub tm_gmtoff: ::std::os::raw::c_long,
2043 /// Timezone abbreviation.
2044 pub tm_zone: *const ::std::os::raw::c_char,
2045}
2046
2047/// POSIX.1b structure for a time value
2048///
2049/// C documentation:
2050///
2051/// ```text
2052/// POSIX.1b structure for a time value. This is like a `struct timeval' but
2053///has nanoseconds instead of microseconds.
2054/// ```
2055#[repr(C)]
2056#[derive(Debug, Copy, Clone)]
2057pub struct timespec {
2058 /// Seconds.
2059 pub tv_sec: __time_t,
2060 /// Nanoseconds.
2061 pub tv_nsec: __syscall_slong_t,
2062}
2063
2064/// POSIX.1b structure for timer start values and intervals.
2065#[repr(C)]
2066#[derive(Debug, Copy, Clone)]
2067pub struct itimerspec {
2068 /// timer interval
2069 pub it_interval: timespec,
2070 /// timer value
2071 pub it_value: timespec,
2072}
2073
2074#[repr(C)]
2075#[derive(Debug, Copy, Clone)]
2076/// Signal event pointer
2077pub struct sigevent {
2078 _unused: [u8; 0],
2079}
2080
2081/// Interface for unsupported feature notifications.
2082#[repr(C)]
2083#[derive(Debug, Copy, Clone)]
2084pub struct _UNSUPPORT_INFO {
2085 /// Version number of the interface. Must be 1.
2086 pub version: ::std::os::raw::c_int,
2087 /// Unsupported object notification function.
2088 ///
2089 /// C documentation:
2090 ///
2091 /// ```text
2092 /// Unsupported object notification function.
2093 /// Interface Version: 1
2094 /// Implementation Required: Yes
2095 ///
2096 /// pThis - pointer to the interface structure.
2097 /// nType - the type of unsupported object. One of the |FPDF_UNSP_*| entries.
2098 /// ```
2099 pub FSDK_UnSupport_Handler: ::std::option::Option<
2100 unsafe extern "C" fn(pThis: *mut _UNSUPPORT_INFO, nType: ::std::os::raw::c_int),
2101 >,
2102}
2103
2104/// IFPDF_RENDERINFO interface.
2105#[repr(C)]
2106#[derive(Debug, Copy, Clone)]
2107pub struct _IFSDK_PAUSE {
2108 /// Version number of the interface. Currently must be 1.
2109 pub version: ::std::os::raw::c_int,
2110 /// Method: NeedToPauseNow
2111 ///
2112 /// C documentation:
2113 ///
2114 /// ```text
2115 /// Method: NeedToPauseNow
2116 /// Check if we need to pause a progressive process now.
2117 /// Interface Version:
2118 /// 1
2119 /// Implementation Required:
2120 /// yes
2121 /// Parameters:
2122 /// pThis - Pointer to the interface structure itself
2123 /// Return Value:
2124 /// Non-zero for pause now, 0 for continue.
2125 /// ```
2126 pub NeedToPauseNow:
2127 ::std::option::Option<unsafe extern "C" fn(pThis: *mut _IFSDK_PAUSE) -> FPDF_BOOL>,
2128 /// A user defined data pointer, used by user's application. Can be NULL.
2129 pub user: *mut ::std::os::raw::c_void,
2130}
2131
2132/// Structure for custom file write
2133#[repr(C)]
2134#[derive(Debug, Copy, Clone)]
2135pub struct FPDF_FILEWRITE_ {
2136 /// Version number of the interface. Currently must be 1.
2137 pub version: ::std::os::raw::c_int,
2138 /// Method: WriteBlock
2139 ///
2140 /// C documentation:
2141 ///
2142 /// ```text
2143 /// Method: WriteBlock
2144 /// Output a block of data in your custom way.
2145 /// Interface Version:
2146 /// 1
2147 /// Implementation Required:
2148 /// Yes
2149 /// Comments:
2150 /// Called by function FPDF_SaveDocument
2151 /// Parameters:
2152 /// pThis - Pointer to the structure itself
2153 /// pData - Pointer to a buffer to output
2154 /// size - The size of the buffer.
2155 /// Return value:
2156 /// Should be non-zero if successful, zero for error.
2157 /// ```
2158 pub WriteBlock: ::std::option::Option<
2159 unsafe extern "C" fn(
2160 pThis: *mut FPDF_FILEWRITE_,
2161 pData: *const ::std::os::raw::c_void,
2162 size: ::std::os::raw::c_ulong,
2163 ) -> ::std::os::raw::c_int,
2164 >,
2165}
2166
2167/// Interface: FPDF_SYSFONTINFO
2168///
2169/// C documentation:
2170///
2171/// ```text
2172/// Interface: FPDF_SYSFONTINFO
2173/// Interface for getting system font information and font mapping
2174/// ```
2175#[repr(C)]
2176#[derive(Debug, Copy, Clone)]
2177pub struct _FPDF_SYSFONTINFO {
2178 /// Version number of the interface. Currently must be 1.
2179 pub version: ::std::os::raw::c_int,
2180 /// Method: Release
2181 ///
2182 /// C documentation:
2183 ///
2184 /// ```text
2185 /// Method: Release
2186 /// Give implementation a chance to release any data after the
2187 /// interface is no longer used.
2188 /// Interface Version:
2189 /// 1
2190 /// Implementation Required:
2191 /// No
2192 /// Parameters:
2193 /// pThis - Pointer to the interface structure itself
2194 /// Return Value:
2195 /// None
2196 /// Comments:
2197 /// Called by PDFium during the final cleanup process.
2198 /// ```
2199 pub Release: ::std::option::Option<unsafe extern "C" fn(pThis: *mut _FPDF_SYSFONTINFO)>,
2200 /// Method: EnumFonts
2201 ///
2202 /// C documentation:
2203 ///
2204 /// ```text
2205 /// Method: EnumFonts
2206 /// Enumerate all fonts installed on the system
2207 /// Interface Version:
2208 /// 1
2209 /// Implementation Required:
2210 /// No
2211 /// Parameters:
2212 /// pThis - Pointer to the interface structure itself
2213 /// pMapper - An opaque pointer to internal font mapper, used
2214 /// when calling FPDF_AddInstalledFont().
2215 /// Return Value:
2216 /// None
2217 /// Comments:
2218 /// Implementations should call FPDF_AddInstalledFont() function for
2219 /// each font found. Only TrueType/OpenType and Type1 fonts are
2220 /// accepted by PDFium.
2221 /// ```
2222 pub EnumFonts: ::std::option::Option<
2223 unsafe extern "C" fn(pThis: *mut _FPDF_SYSFONTINFO, pMapper: *mut ::std::os::raw::c_void),
2224 >,
2225 /// Method: MapFont
2226 ///
2227 /// C documentation:
2228 ///
2229 /// ```text
2230 /// Method: MapFont
2231 /// Use the system font mapper to get a font handle from requested
2232 /// parameters.
2233 /// Interface Version:
2234 /// 1
2235 /// Implementation Required:
2236 /// Required if GetFont method is not implemented.
2237 /// Parameters:
2238 /// pThis - Pointer to the interface structure itself
2239 /// weight - Weight of the requested font. 400 is normal and
2240 /// 700 is bold.
2241 /// bItalic - Italic option of the requested font, TRUE or
2242 /// FALSE.
2243 /// charset - Character set identifier for the requested font.
2244 /// See above defined constants.
2245 /// pitch_family - A combination of flags. See above defined
2246 /// constants.
2247 /// face - Typeface name. Currently use system local encoding
2248 /// only.
2249 /// bExact - Obsolete: this parameter is now ignored.
2250 /// Return Value:
2251 /// An opaque pointer for font handle, or NULL if system mapping is
2252 /// not supported.
2253 /// Comments:
2254 /// If the system supports native font mapper (like Windows),
2255 /// implementation can implement this method to get a font handle.
2256 /// Otherwise, PDFium will do the mapping and then call GetFont
2257 /// method. Only TrueType/OpenType and Type1 fonts are accepted
2258 /// by PDFium.
2259 /// ```
2260 pub MapFont: ::std::option::Option<
2261 unsafe extern "C" fn(
2262 pThis: *mut _FPDF_SYSFONTINFO,
2263 weight: ::std::os::raw::c_int,
2264 bItalic: FPDF_BOOL,
2265 charset: ::std::os::raw::c_int,
2266 pitch_family: ::std::os::raw::c_int,
2267 face: *const ::std::os::raw::c_char,
2268 bExact: *mut FPDF_BOOL,
2269 ) -> *mut ::std::os::raw::c_void,
2270 >,
2271 /// Method: GetFont
2272 ///
2273 /// C documentation:
2274 ///
2275 /// ```text
2276 /// Method: GetFont
2277 /// Get a handle to a particular font by its internal ID
2278 /// Interface Version:
2279 /// 1
2280 /// Implementation Required:
2281 /// Required if MapFont method is not implemented.
2282 /// Return Value:
2283 /// An opaque pointer for font handle.
2284 /// Parameters:
2285 /// pThis - Pointer to the interface structure itself
2286 /// face - Typeface name in system local encoding.
2287 /// Comments:
2288 /// If the system mapping not supported, PDFium will do the font
2289 /// mapping and use this method to get a font handle.
2290 /// ```
2291 pub GetFont: ::std::option::Option<
2292 unsafe extern "C" fn(
2293 pThis: *mut _FPDF_SYSFONTINFO,
2294 face: *const ::std::os::raw::c_char,
2295 ) -> *mut ::std::os::raw::c_void,
2296 >,
2297 /// Method: GetFontData
2298 ///
2299 /// C documentation:
2300 ///
2301 /// ```text
2302 /// Method: GetFontData
2303 /// Get font data from a font
2304 /// Interface Version:
2305 /// 1
2306 /// Implementation Required:
2307 /// Yes
2308 /// Parameters:
2309 /// pThis - Pointer to the interface structure itself
2310 /// hFont - Font handle returned by MapFont or GetFont method
2311 /// table - TrueType/OpenType table identifier (refer to
2312 /// TrueType specification), or 0 for the whole file.
2313 /// buffer - The buffer receiving the font data. Can be NULL if
2314 /// not provided.
2315 /// buf_size - Buffer size, can be zero if not provided.
2316 /// Return Value:
2317 /// Number of bytes needed, if buffer not provided or not large
2318 /// enough, or number of bytes written into buffer otherwise.
2319 /// Comments:
2320 /// Can read either the full font file, or a particular
2321 /// TrueType/OpenType table.
2322 /// ```
2323 pub GetFontData: ::std::option::Option<
2324 unsafe extern "C" fn(
2325 pThis: *mut _FPDF_SYSFONTINFO,
2326 hFont: *mut ::std::os::raw::c_void,
2327 table: ::std::os::raw::c_uint,
2328 buffer: *mut ::std::os::raw::c_uchar,
2329 buf_size: ::std::os::raw::c_ulong,
2330 ) -> ::std::os::raw::c_ulong,
2331 >,
2332 /// Method: GetFaceName
2333 ///
2334 /// C documentation:
2335 ///
2336 /// ```text
2337 /// Method: GetFaceName
2338 /// Get face name from a font handle
2339 /// Interface Version:
2340 /// 1
2341 /// Implementation Required:
2342 /// No
2343 /// Parameters:
2344 /// pThis - Pointer to the interface structure itself
2345 /// hFont - Font handle returned by MapFont or GetFont method
2346 /// buffer - The buffer receiving the face name. Can be NULL if
2347 /// not provided
2348 /// buf_size - Buffer size, can be zero if not provided
2349 /// Return Value:
2350 /// Number of bytes needed, if buffer not provided or not large
2351 /// enough, or number of bytes written into buffer otherwise.
2352 /// ```
2353 pub GetFaceName: ::std::option::Option<
2354 unsafe extern "C" fn(
2355 pThis: *mut _FPDF_SYSFONTINFO,
2356 hFont: *mut ::std::os::raw::c_void,
2357 buffer: *mut ::std::os::raw::c_char,
2358 buf_size: ::std::os::raw::c_ulong,
2359 ) -> ::std::os::raw::c_ulong,
2360 >,
2361 /// Method: GetFontCharset
2362 ///
2363 /// C documentation:
2364 ///
2365 /// ```text
2366 /// Method: GetFontCharset
2367 /// Get character set information for a font handle
2368 /// Interface Version:
2369 /// 1
2370 /// Implementation Required:
2371 /// No
2372 /// Parameters:
2373 /// pThis - Pointer to the interface structure itself
2374 /// hFont - Font handle returned by MapFont or GetFont method
2375 /// Return Value:
2376 /// Character set identifier. See defined constants above.
2377 /// ```
2378 pub GetFontCharset: ::std::option::Option<
2379 unsafe extern "C" fn(
2380 pThis: *mut _FPDF_SYSFONTINFO,
2381 hFont: *mut ::std::os::raw::c_void,
2382 ) -> ::std::os::raw::c_int,
2383 >,
2384 /// Method: DeleteFont
2385 ///
2386 /// C documentation:
2387 ///
2388 /// ```text
2389 /// Method: DeleteFont
2390 /// Delete a font handle
2391 /// Interface Version:
2392 /// 1
2393 /// Implementation Required:
2394 /// Yes
2395 /// Parameters:
2396 /// pThis - Pointer to the interface structure itself
2397 /// hFont - Font handle returned by MapFont or GetFont method
2398 /// Return Value:
2399 /// None
2400 /// ```
2401 pub DeleteFont: ::std::option::Option<
2402 unsafe extern "C" fn(pThis: *mut _FPDF_SYSFONTINFO, hFont: *mut ::std::os::raw::c_void),
2403 >,
2404}
2405
2406/// Struct: FPDF_CharsetFontMap
2407///
2408/// C documentation:
2409///
2410/// ```text
2411/// Struct: FPDF_CharsetFontMap
2412/// Provides the name of a font to use for a given charset value.
2413/// ```
2414#[repr(C)]
2415#[derive(Debug, Copy, Clone)]
2416pub struct FPDF_CharsetFontMap_ {
2417 /// Character Set Enum value, see FXFONT_*_CHARSET above.
2418 pub charset: ::std::os::raw::c_int,
2419 /// Name of default font to use with that charset.
2420 pub fontname: *const ::std::os::raw::c_char,
2421}
2422
2423/// PDF text rendering modes
2424pub type FPDF_TEXT_RENDERMODE = ::std::os::raw::c_int;
2425
2426/// PDF types - use incomplete types (never completed) to force API type safety.
2427/// C-API action pointer type definition
2428pub type FPDF_ACTION = *mut fpdf_action_t__;
2429
2430/// C-API annotation pointer type definition
2431pub type FPDF_ANNOTATION = *mut fpdf_annotation_t__;
2432
2433/// C-API attachment pointer type definition
2434pub type FPDF_ATTACHMENT = *mut fpdf_attachment_t__;
2435
2436/// C-API availability pointer type definition
2437pub type FPDF_AVAIL = *mut fpdf_avail_t__;
2438
2439/// C-API bitmap pointer type definition
2440pub type FPDF_BITMAP = *mut fpdf_bitmap_t__;
2441
2442/// C-API bookmark pointer type definition
2443pub type FPDF_BOOKMARK = *mut fpdf_bookmark_t__;
2444
2445/// C-API clippath pointer type definition
2446pub type FPDF_CLIPPATH = *mut fpdf_clippath_t__;
2447
2448/// C-API destination pointer type definition
2449pub type FPDF_DEST = *mut fpdf_dest_t__;
2450
2451/// C-API document pointer type definition
2452pub type FPDF_DOCUMENT = *mut fpdf_document_t__;
2453
2454/// C-API font pointer type definition
2455pub type FPDF_FONT = *mut fpdf_font_t__;
2456
2457/// C-API form pointer type definition
2458pub type FPDF_FORMHANDLE = *mut fpdf_form_handle_t__;
2459
2460/// C-API glyph path pointer type definition
2461pub type FPDF_GLYPHPATH = *const fpdf_glyphpath_t__;
2462
2463/// C-API javascript action pointer type definition
2464pub type FPDF_JAVASCRIPT_ACTION = *mut fpdf_javascript_action_t;
2465
2466/// C-API link pointer type definition
2467pub type FPDF_LINK = *mut fpdf_link_t__;
2468
2469/// C-API page pointer type definition
2470pub type FPDF_PAGE = *mut fpdf_page_t__;
2471
2472/// C-API page pointer type definition
2473pub type FPDF_PAGELINK = *mut fpdf_pagelink_t__;
2474
2475/// C-API page pointer type definition
2476pub type FPDF_PAGEOBJECT = *mut fpdf_pageobject_t__;
2477
2478/// C-API page pointer type definition
2479pub type FPDF_PAGEOBJECTMARK = *mut fpdf_pageobjectmark_t__;
2480
2481/// C-API page pointer type definition
2482pub type FPDF_PAGERANGE = *const fpdf_pagerange_t__;
2483
2484/// C-API path segment pointer type definition
2485pub type FPDF_PATHSEGMENT = *const fpdf_pathsegment_t;
2486
2487/// C-API search pointer type definition
2488pub type FPDF_SCHHANDLE = *mut fpdf_schhandle_t__;
2489
2490/// C-API signature pointer type definition
2491pub type FPDF_SIGNATURE = *const fpdf_signature_t__;
2492
2493/// C-API skia canvas type definition
2494pub type FPDF_SKIA_CANVAS = *mut ::std::os::raw::c_void;
2495
2496/// C-API struct element pointer type definition
2497pub type FPDF_STRUCTELEMENT = *mut fpdf_structelement_t__;
2498
2499/// C-API struct element pointer type definition
2500pub type FPDF_STRUCTELEMENT_ATTR = *const fpdf_structelement_attr_t__;
2501
2502/// C-API struct element pointer type definition
2503pub type FPDF_STRUCTELEMENT_ATTR_VALUE = *const fpdf_structelement_attr_value_t__;
2504
2505/// C-API struct tree pointer type definition
2506pub type FPDF_STRUCTTREE = *mut fpdf_structtree_t__;
2507
2508/// C-API text page pointer type definition
2509pub type FPDF_TEXTPAGE = *mut fpdf_textpage_t__;
2510
2511/// C-API widget pointer type definition
2512pub type FPDF_WIDGET = *mut fpdf_widget_t__;
2513
2514/// C-API xobject pointer type definition
2515pub type FPDF_XOBJECT = *mut fpdf_xobject_t__;
2516
2517/// Basic data types
2518/// Type mapping of a bool (c_int)
2519pub type FPDF_BOOL = ::std::os::raw::c_int;
2520
2521/// Type mapping of a result = (c_int)
2522pub type FPDF_RESULT = ::std::os::raw::c_int;
2523
2524/// Type mapping of a double word (c_ulong)
2525pub type FPDF_DWORD = ::std::os::raw::c_ulong;
2526
2527/// Type mapping of a float (f32)
2528pub type FS_FLOAT = f32;
2529
2530/// Duplex types
2531pub type _FPDF_DUPLEXTYPE_ = ::std::os::raw::c_uint;
2532
2533/// Duplex types
2534pub use self::_FPDF_DUPLEXTYPE_ as FPDF_DUPLEXTYPE;
2535
2536/// String types
2537pub type FPDF_WCHAR = ::std::os::raw::c_ushort;
2538
2539/// Public PDFium API type for byte strings.
2540pub type FPDF_BYTESTRING = *const ::std::os::raw::c_char;
2541
2542/// The public PDFium API always uses UTF-16LE encoded wide strings
2543///
2544/// C documentation:
2545///
2546/// ```text
2547/// The public PDFium API always uses UTF-16LE encoded wide strings, each
2548/// character uses 2 bytes (except surrogation), with the low byte first.
2549/// ```
2550pub type FPDF_WIDESTRING = *const FPDF_WCHAR;
2551
2552/// Structure for persisting a string beyond the duration of a callback.
2553///
2554/// C documentation:
2555///
2556/// ```text
2557/// Structure for persisting a string beyond the duration of a callback.
2558/// Note: although represented as a char*, string may be interpreted as
2559/// a UTF-16LE formated string. Used only by XFA callbacks.
2560/// ```
2561pub type FPDF_BSTR = FPDF_BSTR_;
2562
2563/// For Windows programmers: In most cases it's OK to treat FPDF_WIDESTRING as a
2564///
2565/// C documentation:
2566///
2567/// ```text
2568/// For Windows programmers: In most cases it's OK to treat FPDF_WIDESTRING as a
2569/// Windows unicode string, however, special care needs to be taken if you
2570/// expect to process Unicode larger than 0xffff.
2571///
2572/// For Linux/Unix programmers: most compiler/library environments use 4 bytes
2573/// for a Unicode character, and you have to convert between FPDF_WIDESTRING and
2574/// system wide string by yourself.
2575/// ```
2576pub type FPDF_STRING = *const ::std::os::raw::c_char;
2577
2578/// Matrix for transformation
2579///
2580/// C documentation:
2581///
2582/// ```text
2583/// Matrix for transformation, in the form \[a b c d e f\], equivalent to:
2584/// | a b 0 |
2585/// | c d 0 |
2586/// | e f 1 |
2587///
2588/// Translation is performed with \[1 0 0 1 tx ty\].
2589/// Scaling is performed with \[sx 0 0 sy 0 0\].
2590/// See PDF Reference 1.7, 4.2.2 Common Transformations for more.
2591/// ```
2592pub type FS_MATRIX = _FS_MATRIX_;
2593
2594/// Rectangle area(float) in device or page coordinate system.
2595pub type FS_LPRECTF = *mut _FS_RECTF_;
2596
2597/// Rectangle area(float) in device or page coordinate system.
2598pub type FS_RECTF = _FS_RECTF_;
2599
2600/// Const Pointer to FS_RECTF structure.
2601pub type FS_LPCRECTF = *const FS_RECTF;
2602
2603/// Rectangle size. Coordinate system agnostic.
2604pub type FS_LPSIZEF = *mut FS_SIZEF_;
2605
2606/// Rectangle size. Coordinate system agnostic.
2607pub type FS_SIZEF = FS_SIZEF_;
2608
2609/// Const Pointer to FS_SIZEF structure.
2610pub type FS_LPCSIZEF = *const FS_SIZEF;
2611
2612/// 2D Point. Coordinate system agnostic.
2613pub type FS_LPPOINTF = *mut FS_POINTF_;
2614
2615/// 2D Point. Coordinate system agnostic.
2616pub type FS_POINTF = FS_POINTF_;
2617
2618/// Const Pointer to FS_POINTF structure.
2619pub type FS_LPCPOINTF = *const FS_POINTF;
2620
2621/// Structure containing four points
2622pub type FS_QUADPOINTSF = _FS_QUADPOINTSF;
2623
2624/// Annotation enums.
2625/// C-API annotation pointer type definition
2626pub type FPDF_ANNOTATION_SUBTYPE = ::std::os::raw::c_int;
2627
2628/// Annotation appearance mode
2629pub type FPDF_ANNOT_APPEARANCEMODE = ::std::os::raw::c_int;
2630
2631/// Dictionary value types.
2632pub type FPDF_OBJECT_TYPE = ::std::os::raw::c_int;
2633
2634/// PDF renderer types - Experimental.
2635///
2636/// C documentation:
2637///
2638/// ```text
2639/// PDF renderer types - Experimental.
2640/// Selection of 2D graphics library to use for rendering to FPDF_BITMAPs.
2641/// ```
2642pub type FPDF_RENDERER_TYPE = ::std::os::raw::c_uint;
2643
2644/// Process-wide options for initializing the library.
2645pub type FPDF_LIBRARY_CONFIG = FPDF_LIBRARY_CONFIG_;
2646
2647/// Structure for file reading or writing (I/O).
2648///
2649/// C documentation:
2650///
2651/// ```text
2652/// Structure for file reading or writing (I/O).
2653///
2654/// Note: This is a handler and should be implemented by callers,
2655/// and is only used from XFA.
2656/// ```
2657pub type FPDF_FILEHANDLER = FPDF_FILEHANDLER_;
2658
2659/// Struct for color scheme.
2660///
2661/// C documentation:
2662///
2663/// ```text
2664/// Struct for color scheme.
2665/// Each should be a 32-bit value specifying the color, in 8888 ARGB format.
2666/// ```
2667pub type FPDF_COLORSCHEME = FPDF_COLORSCHEME_;
2668
2669/// Javascript platform structure
2670pub type IPDF_JSPLATFORM = _IPDF_JsPlatform;
2671
2672/// Function signature for the callback function passed to the FFI_SetTimer
2673///
2674/// C documentation:
2675///
2676/// ```text
2677/// Function signature for the callback function passed to the FFI_SetTimer
2678/// method.
2679/// Parameters:
2680/// idEvent - Identifier of the timer.
2681/// Return value:
2682/// None.
2683/// ```
2684pub type TimerCallback =
2685 ::std::option::Option<unsafe extern "C" fn(idEvent: ::std::os::raw::c_int)>;
2686
2687/// Declares of a struct type to the local system time.
2688pub type FPDF_SYSTEMTIME = _FPDF_SYSTEMTIME;
2689
2690/// Form fill information
2691pub type FPDF_FORMFILLINFO = _FPDF_FORMFILLINFO;
2692
2693/// Annotation color type
2694pub type FPDFANNOT_COLORTYPE = ::std::os::raw::c_uint;
2695
2696/// Interface for checking whether sections of the file are available.
2697pub type FX_FILEAVAIL = _FX_FILEAVAIL;
2698
2699/// Download hints interface. Used to receive hints for further downloading.
2700pub type FX_DOWNLOADHINTS = _FX_DOWNLOADHINTS;
2701
2702/// The file identifier entry type
2703///
2704/// C documentation:
2705///
2706/// ```text
2707/// The file identifier entry type. See section 14.4 "File Identifiers" of the
2708/// ISO 32000-1:2008 spec.
2709/// ```
2710pub type FPDF_FILEIDTYPE = ::std::os::raw::c_uint;
2711
2712/// C time type
2713pub type __time_t = ::std::os::raw::c_long;
2714
2715/// C syscall type
2716pub type __syscall_slong_t = ::std::os::raw::c_long;
2717
2718/// C syscall type
2719pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
2720
2721/// C time type
2722pub type time_t = __time_t;
2723
2724/// Interface for unsupported feature notifications.
2725pub type UNSUPPORT_INFO = _UNSUPPORT_INFO;
2726
2727/// Key flags.
2728pub type FWL_EVENTFLAG = ::std::os::raw::c_uint;
2729
2730/// Virtual keycodes.
2731pub type FWL_VKEYCODE = ::std::os::raw::c_uint;
2732
2733/// IFPDF_RENDERINFO interface.
2734pub type IFSDK_PAUSE = _IFSDK_PAUSE;
2735
2736/// Structure for custom file write
2737pub type FPDF_FILEWRITE = FPDF_FILEWRITE_;
2738
2739/// Interface: FPDF_SYSFONTINFO
2740///
2741/// C documentation:
2742///
2743/// ```text
2744/// Interface: FPDF_SYSFONTINFO
2745/// Interface for getting system font information and font mapping
2746/// ```
2747pub type FPDF_SYSFONTINFO = _FPDF_SYSFONTINFO;
2748
2749/// Struct: FPDF_CharsetFontMap
2750///
2751/// C documentation:
2752///
2753/// ```text
2754/// Struct: FPDF_CharsetFontMap
2755/// Provides the name of a font to use for a given charset value.
2756/// ```
2757pub type FPDF_CharsetFontMap = FPDF_CharsetFontMap_;
2758
2759/// Handle for the PDFium action pointer
2760pub type ActionHandle = Handle<fpdf_action_t__>;
2761
2762/// Handle for the PDFium annotation pointer
2763pub type AnnotationHandle = Handle<fpdf_annotation_t__>;
2764
2765/// Handle for the PDFium attachment pointer
2766pub type AttachmentHandle = Handle<fpdf_attachment_t__>;
2767
2768/// Handle for the PDFium availability pointer
2769pub type AvailabilityHandle = Handle<fpdf_avail_t__>;
2770
2771/// Handle for the PDFium bitmap pointer
2772pub type BitmapHandle = Handle<fpdf_bitmap_t__>;
2773
2774/// Handle for the PDFium bookmark pointer
2775pub type BookmarkHandle = Handle<fpdf_bookmark_t__>;
2776
2777/// Handle for the PDFium clippath pointer
2778pub type ClipPathHandle = Handle<fpdf_clippath_t__>;
2779
2780/// Handle for the PDFium destination pointer
2781pub type DestinationHandle = Handle<fpdf_dest_t__>;
2782
2783/// Handle for the PDFium document pointer
2784pub type DocumentHandle = Handle<fpdf_document_t__>;
2785
2786/// Handle for the PDFium font pointer
2787pub type FontHandle = Handle<fpdf_font_t__>;
2788
2789/// Handle for the PDFium form pointer
2790pub type FormHandle = Handle<fpdf_form_handle_t__>;
2791
2792/// Handle for the PDFium glyph path pointer
2793pub type GlyphPathHandle = Handle<fpdf_glyphpath_t__>;
2794
2795/// Handle for the PDFium javascript action pointer
2796pub type JavascriptActionHandle = Handle<fpdf_javascript_action_t>;
2797
2798/// Handle for the PDFium link pointer
2799pub type LinkHandle = Handle<fpdf_link_t__>;
2800
2801/// Handle for the PDFium page pointer
2802pub type PageHandle = Handle<fpdf_page_t__>;
2803
2804/// Handle for the PDFium page link pointer
2805pub type PageLinkHandle = Handle<fpdf_pagelink_t__>;
2806
2807/// Handle for the PDFium page object pointer
2808pub type PageObjectHandle = Handle<fpdf_pageobject_t__>;
2809
2810/// Handle for the PDFium page object mark pointer
2811pub type PageObjectMarkHandle = Handle<fpdf_pageobjectmark_t__>;
2812
2813/// Handle for the PDFium page range pointer
2814pub type PageRangeHandle = Handle<fpdf_pagerange_t__>;
2815
2816/// Handle for the PDFium path segment pointer
2817pub type PathSegmentHandle = Handle<fpdf_pathsegment_t>;
2818
2819/// Handle for the PDFium search pointer
2820pub type SearchHandle = Handle<fpdf_schhandle_t__>;
2821
2822/// Handle for the PDFium signature pointer
2823pub type SignatureHandle = Handle<fpdf_signature_t__>;
2824
2825/// Handle for the PDFium skia canvas
2826pub type SkiaCanvasHandle = Handle<::std::os::raw::c_void>;
2827
2828/// Handle for the PDFium struct element pointer
2829pub type StructElementHandle = Handle<fpdf_structelement_t__>;
2830
2831/// Handle for the PDFium struct element attr pointer
2832pub type StructElementAttrHandle = Handle<fpdf_structelement_attr_t__>;
2833
2834/// Handle for the PDFium struct element attr value pointer
2835pub type StructElementAttrValueHandle = Handle<fpdf_structelement_attr_value_t__>;
2836
2837/// Handle for the PDFium struct tree pointer
2838pub type StructTreeHandle = Handle<fpdf_structtree_t__>;
2839
2840/// Handle for the PDFium text page pointer
2841pub type TextPageHandle = Handle<fpdf_textpage_t__>;
2842
2843/// Handle for the PDFium widget pointer
2844pub type WidgetHandle = Handle<fpdf_widget_t__>;
2845
2846/// Handle for the PDFium xobject pointer
2847pub type XObjectHandle = Handle<fpdf_xobject_t__>;