poppler-rs-0.26.0/.cargo_vcs_info.json0000644000000001451046102023000132460ustar { "git": { "sha1": "dabba607b8987245708a06ee08817f3a6923c20c" }, "path_in_vcs": "poppler" }poppler-rs-0.26.0/Cargo.lock0000644000000254051046102023000112270ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "bitflags" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "cairo-rs" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cc8d9aa793480744cd9a0524fef1a2e197d9eaa0f739cde19d16aba530dcb95" dependencies = [ "bitflags", "cairo-sys-rs", "glib", "libc", ] [[package]] name = "cairo-sys-rs" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8b4985713047f5faee02b8db6a6ef32bbb50269ff53c1aee716d1d195b76d54" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "cfg-expr" version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21be0e1ce6cdb2ee7fff840f922fb04ead349e5cfb1e750b769132d44ce04720" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "futures-channel" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] [[package]] name = "futures-core" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", "futures-util", ] [[package]] name = "futures-io" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "futures-task" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-macro", "futures-task", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "gio" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb018ae3f3967134a833fac8a2568c3e698f4b95c658865360772d73803cc5de" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys", "glib", "libc", "pin-project-lite", "smallvec", ] [[package]] name = "gio-sys" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64729ba2772c080448f9f966dba8f4456beeb100d8c28a865ef8a0f2ef4987e1" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", "windows-sys", ] [[package]] name = "glib" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3b79a62980e85d61aae88988e5bcca6a35f05b0008e1333aa43bd61ef9bf35" dependencies = [ "bitflags", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", "gio-sys", "glib-macros", "glib-sys", "gobject-sys", "libc", "memchr", "smallvec", ] [[package]] name = "glib-macros" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b48a968528354e04603ae96205f00cf7e77347ffde0fc943a2159948d7d6d80" dependencies = [ "heck", "proc-macro2", "quote", "syn", ] [[package]] name = "glib-sys" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48073e3b228419faa80b9b7f7122759d4ab2f44cd52a065fde7ca08f34c03147" dependencies = [ "libc", "system-deps", ] [[package]] name = "gobject-sys" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18eda93f09d3778f38255b231b17ef67195013a592c91624a4daf8bead875565" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "libc" version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "memchr" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "pin-project-lite" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "poppler-rs" version = "0.26.0" dependencies = [ "cairo-rs", "gio", "glib", "libc", "poppler-sys-rs", ] [[package]] name = "poppler-sys-rs" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdab38777c8ba413671b744fdc4a9239d440ff301ddd1d54abb550a4364d6a2e" dependencies = [ "cairo-sys-rs", "gio-sys", "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "proc-macro2" version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" dependencies = [ "proc-macro2", ] [[package]] name = "serde_core" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_spanned" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ "serde_core", ] [[package]] name = "slab" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "syn" version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "7.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c8f33736f986f16d69b6cb8b03f55ddcad5c41acc4ccc39dd88e84aa805e7f" dependencies = [ "cfg-expr", "heck", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" [[package]] name = "toml" version = "0.9.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" dependencies = [ "indexmap", "serde_core", "serde_spanned", "toml_datetime", "toml_parser", "toml_writer", "winnow", ] [[package]] name = "toml_datetime" version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] [[package]] name = "toml_writer" version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "unicode-ident" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "version-compare" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-sys" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ "windows-link", ] [[package]] name = "winnow" version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" poppler-rs-0.26.0/Cargo.toml0000644000000052211046102023000112440ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2024" rust-version = "1.92.0" name = "poppler-rs" version = "0.26.0" authors = ["Bilal Elmoussaoui "] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "High-level (safe) bindings for poppler-glib" homepage = "https://world.pages.gitlab.gnome.org/Rust/poppler-rs/" documentation = "https://world.pages.gitlab.gnome.org/Rust/poppler-rs/stable/latest/docs/poppler" readme = "README.md" keywords = [ "poppler", "ffi", "pdf", ] categories = [ "api-bindings", "graphics", "rendering::data-formats", ] license = "MIT" repository = "https://gitlab.gnome.org/World/Rust/poppler-rs" [package.metadata.docs.rs] all-features = true rustdoc-args = ["--generate-link-to-definition"] [features] v0_72 = ["poppler-sys-rs/v0_72"] v0_73 = [ "v0_72", "poppler-sys-rs/v0_73", ] v0_78 = [ "v0_73", "poppler-sys-rs/v0_78", ] v0_80 = [ "v0_78", "poppler-sys-rs/v0_80", ] v0_82 = [ "v0_80", "poppler-sys-rs/v0_82", ] v0_88 = [ "v0_82", "poppler-sys-rs/v0_88", ] v0_89 = [ "v0_88", "poppler-sys-rs/v0_89", ] v0_90 = [ "v0_89", "poppler-sys-rs/v0_90", ] v20_4 = [ "v0_90", "poppler-sys-rs/v20_4", ] v20_9 = [ "v20_4", "poppler-sys-rs/v20_9", ] v21_12 = [ "v21_5", "poppler-sys-rs/v21_12", ] v21_5 = [ "v20_9", "poppler-sys-rs/v21_5", ] v22_2 = [ "v21_12", "poppler-sys-rs/v22_2", ] v22_7 = [ "v22_2", "poppler-sys-rs/v22_7", ] v23_7 = [ "v22_7", "poppler-sys-rs/v23_7", ] v23_8 = [ "v23_7", "poppler-sys-rs/v23_8", ] v24_12 = [ "v23_8", "poppler-sys-rs/v24_12", ] v25_10 = [ "v25_8", "poppler-sys-rs/v25_10", ] v25_2 = [ "v24_12", "poppler-sys-rs/v25_2", ] v25_6 = [ "v25_2", "poppler-sys-rs/v25_6", ] v25_8 = [ "v25_6", "poppler-sys-rs/v25_8", ] v26_1 = [ "v25_8", "poppler-sys-rs/v25_10", ] [lib] name = "poppler" path = "src/lib.rs" [dependencies.cairo-rs] version = "0.22" [dependencies.gio] version = "0.22" [dependencies.glib] version = "0.22" [dependencies.libc] version = "0.2.107" [dependencies.poppler-sys-rs] version = "0.26.0-alpha" poppler-rs-0.26.0/Cargo.toml.orig000064400000000000000000000036411046102023000147070ustar 00000000000000[package] name = "poppler-rs" license.workspace = true keywords.workspace = true categories = ["api-bindings", "graphics", "rendering::data-formats"] description = "High-level (safe) bindings for poppler-glib" readme = "README.md" version.workspace = true edition.workspace = true rust-version.workspace = true repository.workspace = true documentation = "https://world.pages.gitlab.gnome.org/Rust/poppler-rs/stable/latest/docs/poppler" homepage.workspace = true authors.workspace = true [lib] name = "poppler" [dependencies] libc = "0.2.107" [dependencies.glib] git = "https://github.com/gtk-rs/gtk-rs-core" version = "0.22" branch = "0.22" [dependencies.gio] git = "https://github.com/gtk-rs/gtk-rs-core" version = "0.22" branch = "0.22" [dependencies.cairo-rs] git = "https://github.com/gtk-rs/gtk-rs-core" version = "0.22" branch = "0.22" [dependencies.poppler-sys-rs] version = "0.26.0-alpha" path = "../sys" [package.metadata.docs.rs] all-features = true rustdoc-args = ["--generate-link-to-definition"] [features] v0_72 = ["poppler-sys-rs/v0_72"] v0_73 = ["v0_72", "poppler-sys-rs/v0_73"] v0_78 = ["v0_73", "poppler-sys-rs/v0_78"] v0_80 = ["v0_78", "poppler-sys-rs/v0_80"] v0_82 = ["v0_80", "poppler-sys-rs/v0_82"] v0_88 = ["v0_82", "poppler-sys-rs/v0_88"] v0_89 = ["v0_88", "poppler-sys-rs/v0_89"] v0_90 = ["v0_89", "poppler-sys-rs/v0_90"] v20_4 = ["v0_90", "poppler-sys-rs/v20_4"] v20_9 = ["v20_4", "poppler-sys-rs/v20_9"] v21_5 = ["v20_9", "poppler-sys-rs/v21_5"] v21_12 = ["v21_5", "poppler-sys-rs/v21_12"] v22_2 = ["v21_12", "poppler-sys-rs/v22_2"] v22_7 = ["v22_2", "poppler-sys-rs/v22_7"] v23_7 = ["v22_7", "poppler-sys-rs/v23_7"] v23_8 = ["v23_7", "poppler-sys-rs/v23_8"] v24_12 = ["v23_8", "poppler-sys-rs/v24_12"] v25_2 = ["v24_12", "poppler-sys-rs/v25_2"] v25_6 = ["v25_2", "poppler-sys-rs/v25_6"] v25_8 = ["v25_6", "poppler-sys-rs/v25_8"] v25_10 = ["v25_8", "poppler-sys-rs/v25_10"] v26_1 = ["v25_8", "poppler-sys-rs/v25_10"] poppler-rs-0.26.0/Gir.toml000064400000000000000000000142771046102023000134450ustar 00000000000000[options] library = "Poppler" version = "0.18" target_path = "." min_cfg_version = "0.70" girs_directories = ["../gir-files", "../"] work_mode = "normal" deprecate_by_min_version = true single_version_file = true external_libraries = [ "Gio", "GLib", "GObject", "Cairo", ] manual = [ "Gio.Cancellable", "Gio.File", "Gio.InputStream", "GLib.Bytes", "GLib.Date", "GLib.DateTime", "GLib.Error", "cairo.Context", "cairo.Surface", "cairo.Region", "Poppler.PageRange", ] generate = [ "Poppler.ActionLayerAction", "Poppler.ActionMovieOperation", "Poppler.ActionType", "Poppler.AdditionalActionType", "Poppler.AnnotCalloutLine", "Poppler.AnnotExternalDataType", "Poppler.AnnotFileAttachment", "Poppler.AnnotFlag", "Poppler.AnnotFreeText", "Poppler.AnnotFreeTextQuadding", "Poppler.AnnotMapping", "Poppler.AnnotMarkup", "Poppler.AnnotMarkupReplyType", "Poppler.AnnotTextState", "Poppler.AnnotType", "Poppler.Attachment", "Poppler.Backend", "Poppler.CertificateStatus", "Poppler.Dest", "Poppler.DestType", "Poppler.FindFlags", "Poppler.FontDescription", "Poppler.FontInfo", "Poppler.FontType", "Poppler.FontsIter", "Poppler.FormButtonType", "Poppler.FormChoiceType", "Poppler.FormField", "Poppler.FormFieldMapping", "Poppler.FormFieldType", "Poppler.FormTextType", "Poppler.ImageMapping", "Poppler.IndexIter", "Poppler.Layer", "Poppler.LayersIter", "Poppler.LinkMapping", "Poppler.MoviePlayMode", "Poppler.PageLayout", "Poppler.PageMode", "Poppler.PageTransition", "Poppler.PageTransitionType", "Poppler.PageTransitionAlignment", "Poppler.PageTransitionDirection", "Poppler.Permissions", "Poppler.PDFConformance", "Poppler.PDFPart", "Poppler.PDFSubtype", "Poppler.PrintDuplex", "Poppler.PrintFlags", "Poppler.PrintScaling", "Poppler.SelectionStyle", "Poppler.SignatureInfo", "Poppler.SignatureValidationFlags", "Poppler.SignatureStatus", "Poppler.StructureBlockAlign", "Poppler.StructureBorderStyle", "Poppler.StructureElement", "Poppler.StructureFormRole", "Poppler.StructureFormState", "Poppler.StructureGlyphOrientation", "Poppler.StructureInlineAlign", "Poppler.StructureElementKind", "Poppler.StructureListNumbering", "Poppler.StructurePlacement", "Poppler.StructureRubyAlign", "Poppler.StructureRubyPosition", "Poppler.StructureTableScope", "Poppler.StructureGetTextFlags", "Poppler.StructureTextAlign", "Poppler.StructureTextDecoration", "Poppler.StructureWritingMode", "Poppler.TextAttributes", "Poppler.TextSpan", "Poppler.ViewerPreferences", ] [[object]] name = "Poppler.*" status = "generate" [[object.function]] name = "date_parse" ignore = true [[object.function]] name = "get_available_signing_certificates" version = "23.7" [[object]] name = "Poppler.Annot" status = "generate" [[object.function]] name = "set_color" [[object.function.parameter]] name = "poppler_color" const = true [[object.function]] name = "get_border_width" ignore = true # Needs manual impl [[object]] name = "Poppler.AnnotCircle" status = "generate" [[object.function]] name = "set_interior_color" [[object.function.parameter]] name = "poppler_color" const = true [[object]] name = "Poppler.AnnotInk" status = "generate" version = "25.6" [[object.function]] name = "new" [[object.function.parameter]] name = "rect" const = true [[object.function]] name = "set_ink_list" ignore = true # Needs manual impl [[object]] name = "Poppler.Color" status = "generate" boxed_inline = true [[object]] name = "Poppler.Document" status = "generate" generate_builder = true [[object.function]] pattern = "(new_from_fd|save_to_fd)" cfg_condition = "target_os = \"linux\"" [[object.function]] name = "get_print_page_ranges" manual = true [[object]] name = "Poppler.Movie" status = "generate" [[object.function]] name = "get_aspect" manual = true # wrong in-out annotations [[object]] name = "Poppler.Page" status = "generate" [[object.function]] pattern = "(render|render_full|render_for_printing|render_for_printing_with_options|render_selection|render_transparent_selection)" [[object.function.parameter]] name = "cairo" const = true [[object.function]] name = "get_text_layout" ignore = true [[object.function]] name = "get_text_layout_for_area" ignore = true [[object.function]] name = "get_crop_box" ignore = true [[object.function]] name = "get_bounding_box" rename = "get_bounding_box" [[object.function]] pattern = "(free_annot_mapping|free_text_attributes|free_image_mapping|free_form_field_mapping|free_link_mapping)" ignore = true # unsafe probably [[object]] name = "Poppler.Point" status = "generate" boxed_inline = true [[object]] name = "Poppler.Quadrilateral" status = "generate" boxed_inline = true [[object]] name = "Poppler.Rectangle" status = "generate" boxed_inline = true [[object]] name = "Poppler.Error" status = "generate" [[object.member]] name = "signing" version = "23.7" [[object]] name = "Poppler.CertificateInfo" status = "generate" version = "23.7" [[object]] name = "Poppler.SigningData" status = "generate" version = "23.7" [[object]] name = "Poppler.Attachement" [[object.function]] name = "save_to_fd" cfg_condition = "target_os = \"linux\"" [[object]] name = "Poppler.Media" status = "generate" [[object.function]] name = "save_to_fd" cfg_condition = "target_os = \"linux\"" [[object]] name = "Poppler.PSFile" status = "generate" [[object.function]] name = "new_fd" cfg_condition = "target_os = \"linux\"" [[object]] name = "Poppler.Path" status = "generate" version = "25.6" [[object.function]] name = "new_from_array" [[object.function.parameter]] name = "points" const = true [[object.function]] name = "get_points" [[object.function.parameter]] name = "path" const = true [[object]] name = "Poppler.RenderAnnotsFlags" status = "generate" [[object]] name = "Poppler.Stretch" status = "generate" [[object]] name = "Poppler.StructureElementIter" status = "generate" [[object.function]] name = "new" [object.function.return] # TODO Remove after https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/2119 nullable = true [[object]] name = "Poppler.Style" status = "generate" [[object]] name = "Poppler.Weight" status = "generate" poppler-rs-0.26.0/README.md000064400000000000000000000006661046102023000133030ustar 00000000000000# poppler-rs A high-level (safe) set of Rust bindings for [poppler](https://poppler.freedesktop.org/)'s glib interface. poppler is a PDF rendering library with a cairo backend. ## Usage There's no nice tutorial or sample code for now: check out the rustdoc to see what types are available. But generally, usage involves: * Creating a `Document`, maybe from a `&[u8]` slice. * Enumerating pages, rendering them to a cairo surface poppler-rs-0.26.0/src/auto/annot.rs000064400000000000000000000100271046102023000152400ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::{AnnotFlag, AnnotType, Color, Rectangle, ffi}; use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "PopplerAnnot")] pub struct Annot(Object); match fn { type_ => || ffi::poppler_annot_get_type(), } } impl Annot { pub const NONE: Option<&'static Annot> = None; } pub trait AnnotExt: IsA + 'static { #[doc(alias = "poppler_annot_get_annot_type")] #[doc(alias = "get_annot_type")] fn annot_type(&self) -> AnnotType { unsafe { from_glib(ffi::poppler_annot_get_annot_type( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_get_color")] #[doc(alias = "get_color")] fn color(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_get_color(self.as_ref().to_glib_none().0)) } } #[doc(alias = "poppler_annot_get_contents")] #[doc(alias = "get_contents")] fn contents(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_get_contents( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_get_flags")] #[doc(alias = "get_flags")] fn flags(&self) -> AnnotFlag { unsafe { from_glib(ffi::poppler_annot_get_flags(self.as_ref().to_glib_none().0)) } } #[doc(alias = "poppler_annot_get_modified")] #[doc(alias = "get_modified")] fn modified(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_get_modified( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_get_name")] #[doc(alias = "get_name")] fn name(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_get_name(self.as_ref().to_glib_none().0)) } } #[doc(alias = "poppler_annot_get_page_index")] #[doc(alias = "get_page_index")] fn page_index(&self) -> i32 { unsafe { ffi::poppler_annot_get_page_index(self.as_ref().to_glib_none().0) } } #[doc(alias = "poppler_annot_get_rectangle")] #[doc(alias = "get_rectangle")] fn rectangle(&self) -> Rectangle { unsafe { let mut poppler_rect = Rectangle::uninitialized(); ffi::poppler_annot_get_rectangle( self.as_ref().to_glib_none().0, poppler_rect.to_glib_none_mut().0, ); poppler_rect } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(alias = "poppler_annot_set_border_width")] fn set_border_width(&self, width: f64) { unsafe { ffi::poppler_annot_set_border_width(self.as_ref().to_glib_none().0, width); } } #[doc(alias = "poppler_annot_set_color")] fn set_color(&self, poppler_color: Option<&Color>) { unsafe { ffi::poppler_annot_set_color( self.as_ref().to_glib_none().0, mut_override(poppler_color.to_glib_none().0), ); } } #[doc(alias = "poppler_annot_set_contents")] fn set_contents(&self, contents: &str) { unsafe { ffi::poppler_annot_set_contents( self.as_ref().to_glib_none().0, contents.to_glib_none().0, ); } } #[doc(alias = "poppler_annot_set_flags")] fn set_flags(&self, flags: AnnotFlag) { unsafe { ffi::poppler_annot_set_flags(self.as_ref().to_glib_none().0, flags.into_glib()); } } #[doc(alias = "poppler_annot_set_rectangle")] fn set_rectangle(&self, poppler_rect: &mut Rectangle) { unsafe { ffi::poppler_annot_set_rectangle( self.as_ref().to_glib_none().0, poppler_rect.to_glib_none_mut().0, ); } } } impl> AnnotExt for O {} poppler-rs-0.26.0/src/auto/annot_callout_line.rs000064400000000000000000000015271046102023000177770ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::translate::*; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct AnnotCalloutLine(Boxed); match fn { copy => |ptr| ffi::poppler_annot_callout_line_copy(mut_override(ptr)), free => |ptr| ffi::poppler_annot_callout_line_free(ptr), type_ => || ffi::poppler_annot_callout_line_get_type(), } } impl AnnotCalloutLine { #[doc(alias = "poppler_annot_callout_line_new")] pub fn new() -> AnnotCalloutLine { unsafe { from_glib_full(ffi::poppler_annot_callout_line_new()) } } } impl Default for AnnotCalloutLine { fn default() -> Self { Self::new() } } poppler-rs-0.26.0/src/auto/annot_circle.rs000064400000000000000000000027301046102023000165630ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::{Annot, AnnotMarkup, Color, Document, Rectangle, ffi}; use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "PopplerAnnotCircle")] pub struct AnnotCircle(Object) @extends AnnotMarkup, Annot; match fn { type_ => || ffi::poppler_annot_circle_get_type(), } } impl AnnotCircle { #[doc(alias = "poppler_annot_circle_new")] pub fn new(doc: &Document, rect: &mut Rectangle) -> AnnotCircle { unsafe { Annot::from_glib_full(ffi::poppler_annot_circle_new( doc.to_glib_none().0, rect.to_glib_none_mut().0, )) .unsafe_cast() } } #[doc(alias = "poppler_annot_circle_get_interior_color")] #[doc(alias = "get_interior_color")] pub fn interior_color(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_circle_get_interior_color( self.to_glib_none().0, )) } } #[doc(alias = "poppler_annot_circle_set_interior_color")] pub fn set_interior_color(&self, poppler_color: Option<&Color>) { unsafe { ffi::poppler_annot_circle_set_interior_color( self.to_glib_none().0, mut_override(poppler_color.to_glib_none().0), ); } } } poppler-rs-0.26.0/src/auto/annot_file_attachment.rs000064400000000000000000000021611046102023000204470ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::{Annot, AnnotMarkup, Attachment, ffi}; use glib::translate::*; glib::wrapper! { #[doc(alias = "PopplerAnnotFileAttachment")] pub struct AnnotFileAttachment(Object) @extends AnnotMarkup, Annot; match fn { type_ => || ffi::poppler_annot_file_attachment_get_type(), } } impl AnnotFileAttachment { #[doc(alias = "poppler_annot_file_attachment_get_attachment")] #[doc(alias = "get_attachment")] pub fn attachment(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_file_attachment_get_attachment( self.to_glib_none().0, )) } } #[doc(alias = "poppler_annot_file_attachment_get_name")] #[doc(alias = "get_name")] pub fn name(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_file_attachment_get_name( self.to_glib_none().0, )) } } } poppler-rs-0.26.0/src/auto/annot_free_text.rs000064400000000000000000000062251046102023000173120ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::{ Annot, AnnotCalloutLine, AnnotFreeTextQuadding, AnnotMarkup, Document, Rectangle, ffi, }; #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] use crate::{Color, FontDescription}; use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "PopplerAnnotFreeText")] pub struct AnnotFreeText(Object) @extends AnnotMarkup, Annot; match fn { type_ => || ffi::poppler_annot_free_text_get_type(), } } impl AnnotFreeText { #[doc(alias = "poppler_annot_free_text_new")] pub fn new(doc: &Document, rect: &mut Rectangle) -> AnnotFreeText { unsafe { Annot::from_glib_full(ffi::poppler_annot_free_text_new( doc.to_glib_none().0, rect.to_glib_none_mut().0, )) .unsafe_cast() } } #[doc(alias = "poppler_annot_free_text_get_callout_line")] #[doc(alias = "get_callout_line")] pub fn callout_line(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_free_text_get_callout_line( self.to_glib_none().0, )) } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(alias = "poppler_annot_free_text_get_font_color")] #[doc(alias = "get_font_color")] pub fn font_color(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_free_text_get_font_color( self.to_glib_none().0, )) } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(alias = "poppler_annot_free_text_get_font_desc")] #[doc(alias = "get_font_desc")] pub fn font_desc(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_free_text_get_font_desc( self.to_glib_none().0, )) } } #[doc(alias = "poppler_annot_free_text_get_quadding")] #[doc(alias = "get_quadding")] pub fn quadding(&self) -> AnnotFreeTextQuadding { unsafe { from_glib(ffi::poppler_annot_free_text_get_quadding( self.to_glib_none().0, )) } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(alias = "poppler_annot_free_text_set_font_color")] pub fn set_font_color(&self, color: &mut Color) { unsafe { ffi::poppler_annot_free_text_set_font_color( self.to_glib_none().0, color.to_glib_none_mut().0, ); } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(alias = "poppler_annot_free_text_set_font_desc")] pub fn set_font_desc(&self, font_desc: &mut FontDescription) { unsafe { ffi::poppler_annot_free_text_set_font_desc( self.to_glib_none().0, font_desc.to_glib_none_mut().0, ); } } } poppler-rs-0.26.0/src/auto/annot_ink.rs000064400000000000000000000036021046102023000161020ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::{Annot, AnnotMarkup, Document, Path, Rectangle, ffi}; use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "PopplerAnnotInk")] pub struct AnnotInk(Object) @extends AnnotMarkup, Annot; match fn { type_ => || ffi::poppler_annot_ink_get_type(), } } impl AnnotInk { #[doc(alias = "poppler_annot_ink_new")] pub fn new(doc: &Document, rect: &Rectangle) -> AnnotInk { unsafe { Annot::from_glib_full(ffi::poppler_annot_ink_new( doc.to_glib_none().0, mut_override(rect.to_glib_none().0), )) .unsafe_cast() } } #[cfg(feature = "v25_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v25_10")))] #[doc(alias = "poppler_annot_ink_get_draw_below")] #[doc(alias = "get_draw_below")] pub fn draws_below(&self) -> bool { unsafe { from_glib(ffi::poppler_annot_ink_get_draw_below(self.to_glib_none().0)) } } #[doc(alias = "poppler_annot_ink_get_ink_list")] #[doc(alias = "get_ink_list")] pub fn ink_list(&self) -> Vec { unsafe { let mut n_paths = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( ffi::poppler_annot_ink_get_ink_list(self.to_glib_none().0, n_paths.as_mut_ptr()), n_paths.assume_init() as _, ); ret } } #[cfg(feature = "v25_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v25_10")))] #[doc(alias = "poppler_annot_ink_set_draw_below")] pub fn set_draw_below(&self, draw_below: bool) { unsafe { ffi::poppler_annot_ink_set_draw_below(self.to_glib_none().0, draw_below.into_glib()); } } } poppler-rs-0.26.0/src/auto/annot_mapping.rs000064400000000000000000000014521046102023000167550ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::translate::*; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct AnnotMapping(Boxed); match fn { copy => |ptr| ffi::poppler_annot_mapping_copy(mut_override(ptr)), free => |ptr| ffi::poppler_annot_mapping_free(ptr), type_ => || ffi::poppler_annot_mapping_get_type(), } } impl AnnotMapping { #[doc(alias = "poppler_annot_mapping_new")] pub fn new() -> AnnotMapping { unsafe { from_glib_full(ffi::poppler_annot_mapping_new()) } } } impl Default for AnnotMapping { fn default() -> Self { Self::new() } } poppler-rs-0.26.0/src/auto/annot_markup.rs000064400000000000000000000114261046102023000166230ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::{Annot, AnnotExternalDataType, AnnotMarkupReplyType, Rectangle, ffi}; use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "PopplerAnnotMarkup")] pub struct AnnotMarkup(Object) @extends Annot; match fn { type_ => || ffi::poppler_annot_markup_get_type(), } } impl AnnotMarkup { pub const NONE: Option<&'static AnnotMarkup> = None; } pub trait AnnotMarkupExt: IsA + 'static { #[doc(alias = "poppler_annot_markup_get_date")] #[doc(alias = "get_date")] fn date(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_markup_get_date( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_markup_get_external_data")] #[doc(alias = "get_external_data")] fn external_data(&self) -> AnnotExternalDataType { unsafe { from_glib(ffi::poppler_annot_markup_get_external_data( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_markup_get_label")] #[doc(alias = "get_label")] fn label(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_markup_get_label( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_markup_get_opacity")] #[doc(alias = "get_opacity")] fn opacity(&self) -> f64 { unsafe { ffi::poppler_annot_markup_get_opacity(self.as_ref().to_glib_none().0) } } #[doc(alias = "poppler_annot_markup_get_popup_is_open")] #[doc(alias = "get_popup_is_open")] fn is_popup_is_open(&self) -> bool { unsafe { from_glib(ffi::poppler_annot_markup_get_popup_is_open( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_markup_get_popup_rectangle")] #[doc(alias = "get_popup_rectangle")] fn popup_rectangle(&self) -> Option { unsafe { let mut poppler_rect = Rectangle::uninitialized(); let ret = from_glib(ffi::poppler_annot_markup_get_popup_rectangle( self.as_ref().to_glib_none().0, poppler_rect.to_glib_none_mut().0, )); if ret { Some(poppler_rect) } else { None } } } #[doc(alias = "poppler_annot_markup_get_reply_to")] #[doc(alias = "get_reply_to")] fn reply_to(&self) -> AnnotMarkupReplyType { unsafe { from_glib(ffi::poppler_annot_markup_get_reply_to( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_markup_get_subject")] #[doc(alias = "get_subject")] fn subject(&self) -> Option { unsafe { from_glib_full(ffi::poppler_annot_markup_get_subject( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_markup_has_popup")] fn has_popup(&self) -> bool { unsafe { from_glib(ffi::poppler_annot_markup_has_popup( self.as_ref().to_glib_none().0, )) } } #[doc(alias = "poppler_annot_markup_set_label")] fn set_label(&self, label: Option<&str>) { unsafe { ffi::poppler_annot_markup_set_label( self.as_ref().to_glib_none().0, label.to_glib_none().0, ); } } #[doc(alias = "poppler_annot_markup_set_opacity")] fn set_opacity(&self, opacity: f64) { unsafe { ffi::poppler_annot_markup_set_opacity(self.as_ref().to_glib_none().0, opacity); } } #[doc(alias = "poppler_annot_markup_set_popup")] fn set_popup(&self, popup_rect: &mut Rectangle) { unsafe { ffi::poppler_annot_markup_set_popup( self.as_ref().to_glib_none().0, popup_rect.to_glib_none_mut().0, ); } } #[doc(alias = "poppler_annot_markup_set_popup_is_open")] fn set_popup_is_open(&self, is_open: bool) { unsafe { ffi::poppler_annot_markup_set_popup_is_open( self.as_ref().to_glib_none().0, is_open.into_glib(), ); } } #[doc(alias = "poppler_annot_markup_set_popup_rectangle")] fn set_popup_rectangle(&self, poppler_rect: &mut Rectangle) { unsafe { ffi::poppler_annot_markup_set_popup_rectangle( self.as_ref().to_glib_none().0, poppler_rect.to_glib_none_mut().0, ); } } } impl> AnnotMarkupExt for O {} poppler-rs-0.26.0/src/auto/attachment.rs000064400000000000000000000101611046102023000162500ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "PopplerAttachment")] pub struct Attachment(Object); match fn { type_ => || ffi::poppler_attachment_get_type(), } } impl Attachment { pub const NONE: Option<&'static Attachment> = None; } pub trait AttachmentExt: IsA + 'static { //#[cfg(feature = "v20_9")] //#[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] //#[doc(alias = "poppler_attachment_get_checksum")] //#[doc(alias = "get_checksum")] //fn checksum(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:poppler_attachment_get_checksum() } //} #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_attachment_get_ctime")] #[doc(alias = "get_ctime")] fn ctime(&self) -> Option { unsafe { from_glib_none(ffi::poppler_attachment_get_ctime( self.as_ref().to_glib_none().0, )) } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_attachment_get_description")] #[doc(alias = "get_description")] fn description(&self) -> Option { unsafe { from_glib_none(ffi::poppler_attachment_get_description( self.as_ref().to_glib_none().0, )) } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_attachment_get_mtime")] #[doc(alias = "get_mtime")] fn mtime(&self) -> Option { unsafe { from_glib_none(ffi::poppler_attachment_get_mtime( self.as_ref().to_glib_none().0, )) } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_attachment_get_name")] #[doc(alias = "get_name")] fn name(&self) -> Option { unsafe { from_glib_none(ffi::poppler_attachment_get_name( self.as_ref().to_glib_none().0, )) } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_attachment_get_size")] #[doc(alias = "get_size")] fn size(&self) -> usize { unsafe { ffi::poppler_attachment_get_size(self.as_ref().to_glib_none().0) } } #[doc(alias = "poppler_attachment_save")] fn save(&self, filename: &str) -> Result<(), glib::Error> { unsafe { let mut error = std::ptr::null_mut(); let is_ok = ffi::poppler_attachment_save( self.as_ref().to_glib_none().0, filename.to_glib_none().0, &mut error, ); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } //#[doc(alias = "poppler_attachment_save_to_callback")] //fn save_to_callback, usize, Option<&glib::Error>) -> bool>(&self, save_func: P) -> Result<(), glib::Error> { // unsafe { TODO: call ffi:poppler_attachment_save_to_callback() } //} #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[doc(alias = "poppler_attachment_save_to_fd")] fn save_to_fd(&self, fd: i32) -> Result<(), glib::Error> { unsafe { let mut error = std::ptr::null_mut(); let is_ok = ffi::poppler_attachment_save_to_fd(self.as_ref().to_glib_none().0, fd, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } } impl> AttachmentExt for O {} poppler-rs-0.26.0/src/auto/certificate_info.rs000064400000000000000000000105311046102023000174160ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::translate::*; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct CertificateInfo(Boxed); match fn { copy => |ptr| ffi::poppler_certificate_info_copy(ptr), free => |ptr| ffi::poppler_certificate_info_free(ptr), type_ => || ffi::poppler_certificate_info_get_type(), } } impl CertificateInfo { #[doc(alias = "poppler_certificate_info_new")] pub fn new() -> CertificateInfo { unsafe { from_glib_full(ffi::poppler_certificate_info_new()) } } #[cfg(feature = "v23_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_8")))] #[doc(alias = "poppler_certificate_info_get_expiration_time")] #[doc(alias = "get_expiration_time")] pub fn expiration_time(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_expiration_time( self.to_glib_none().0, )) } } #[doc(alias = "poppler_certificate_info_get_id")] #[doc(alias = "get_id")] pub fn id(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_id(self.to_glib_none().0)) } } #[cfg(feature = "v23_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_8")))] #[doc(alias = "poppler_certificate_info_get_issuance_time")] #[doc(alias = "get_issuance_time")] pub fn issuance_time(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_issuance_time( self.to_glib_none().0, )) } } #[cfg(feature = "v23_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_8")))] #[doc(alias = "poppler_certificate_info_get_issuer_common_name")] #[doc(alias = "get_issuer_common_name")] pub fn issuer_common_name(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_issuer_common_name( self.to_glib_none().0, )) } } #[cfg(feature = "v23_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_8")))] #[doc(alias = "poppler_certificate_info_get_issuer_email")] #[doc(alias = "get_issuer_email")] pub fn issuer_email(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_issuer_email( self.to_glib_none().0, )) } } #[cfg(feature = "v23_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_8")))] #[doc(alias = "poppler_certificate_info_get_issuer_organization")] #[doc(alias = "get_issuer_organization")] pub fn issuer_organization(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_issuer_organization( self.to_glib_none().0, )) } } #[doc(alias = "poppler_certificate_info_get_subject_common_name")] #[doc(alias = "get_subject_common_name")] pub fn subject_common_name(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_subject_common_name( self.to_glib_none().0, )) } } #[cfg(feature = "v23_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_8")))] #[doc(alias = "poppler_certificate_info_get_subject_email")] #[doc(alias = "get_subject_email")] pub fn subject_email(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_subject_email( self.to_glib_none().0, )) } } #[cfg(feature = "v23_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_8")))] #[doc(alias = "poppler_certificate_info_get_subject_organization")] #[doc(alias = "get_subject_organization")] pub fn subject_organization(&self) -> Option { unsafe { from_glib_none(ffi::poppler_certificate_info_get_subject_organization( self.to_glib_none().0, )) } } } #[cfg(feature = "v23_7")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_7")))] impl Default for CertificateInfo { fn default() -> Self { Self::new() } } poppler-rs-0.26.0/src/auto/color.rs000064400000000000000000000012521046102023000152370ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::translate::*; glib::wrapper! { pub struct Color(BoxedInline); match fn { copy => |ptr| ffi::poppler_color_copy(mut_override(ptr)), free => |ptr| ffi::poppler_color_free(ptr), type_ => || ffi::poppler_color_get_type(), } } impl Color { #[doc(alias = "poppler_color_new")] pub fn new() -> Color { unsafe { from_glib_full(ffi::poppler_color_new()) } } } impl Default for Color { fn default() -> Self { Self::new() } } poppler-rs-0.26.0/src/auto/constants.rs000064400000000000000000000071161046102023000161420ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::GStr; #[cfg(feature = "v26_1")] #[cfg_attr(docsrs, doc(cfg(feature = "v26_1")))] #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_CHECK")] pub static ANNOT_TEXT_ICON_CHECK: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_CHECK) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_CIRCLE")] pub static ANNOT_TEXT_ICON_CIRCLE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_CIRCLE) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_COMMENT")] pub static ANNOT_TEXT_ICON_COMMENT: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_COMMENT) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_CROSS")] pub static ANNOT_TEXT_ICON_CROSS: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_CROSS) }; #[cfg(feature = "v26_1")] #[cfg_attr(docsrs, doc(cfg(feature = "v26_1")))] #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_CROSS_HAIRS")] pub static ANNOT_TEXT_ICON_CROSS_HAIRS: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_CROSS_HAIRS) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_HELP")] pub static ANNOT_TEXT_ICON_HELP: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_HELP) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_INSERT")] pub static ANNOT_TEXT_ICON_INSERT: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_INSERT) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_KEY")] pub static ANNOT_TEXT_ICON_KEY: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_KEY) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_NEW_PARAGRAPH")] pub static ANNOT_TEXT_ICON_NEW_PARAGRAPH: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_NEW_PARAGRAPH) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_NOTE")] pub static ANNOT_TEXT_ICON_NOTE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_NOTE) }; #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_PARAGRAPH")] pub static ANNOT_TEXT_ICON_PARAGRAPH: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_PARAGRAPH) }; #[cfg(feature = "v26_1")] #[cfg_attr(docsrs, doc(cfg(feature = "v26_1")))] #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_RIGHT_ARROW")] pub static ANNOT_TEXT_ICON_RIGHT_ARROW: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_RIGHT_ARROW) }; #[cfg(feature = "v26_1")] #[cfg_attr(docsrs, doc(cfg(feature = "v26_1")))] #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_RIGHT_POINTER")] pub static ANNOT_TEXT_ICON_RIGHT_POINTER: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_RIGHT_POINTER) }; #[cfg(feature = "v26_1")] #[cfg_attr(docsrs, doc(cfg(feature = "v26_1")))] #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_STAR")] pub static ANNOT_TEXT_ICON_STAR: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_STAR) }; #[cfg(feature = "v26_1")] #[cfg_attr(docsrs, doc(cfg(feature = "v26_1")))] #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_UP_ARROW")] pub static ANNOT_TEXT_ICON_UP_ARROW: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_UP_ARROW) }; #[cfg(feature = "v26_1")] #[cfg_attr(docsrs, doc(cfg(feature = "v26_1")))] #[doc(alias = "POPPLER_ANNOT_TEXT_ICON_UP_LEFT_ARROW")] pub static ANNOT_TEXT_ICON_UP_LEFT_ARROW: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::POPPLER_ANNOT_TEXT_ICON_UP_LEFT_ARROW) }; poppler-rs-0.26.0/src/auto/dest.rs000064400000000000000000000007631046102023000150660ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::translate::*; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Dest(Boxed); match fn { copy => |ptr| ffi::poppler_dest_copy(mut_override(ptr)), free => |ptr| ffi::poppler_dest_free(ptr), type_ => || ffi::poppler_dest_get_type(), } } poppler-rs-0.26.0/src/auto/document.rs000064400000000000000000001521131046102023000157420ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT #![allow(deprecated)] #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] use crate::PrintDuplex; #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] use crate::PrintScaling; #[cfg(feature = "v23_7")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_7")))] use crate::SigningData; use crate::{ Attachment, Dest, FormField, PDFConformance, PDFPart, PDFSubtype, Page, PageLayout, PageMode, Permissions, ViewerPreferences, ffi, }; use glib::{ prelude::*, signal::{SignalHandlerId, connect_raw}, translate::*, }; use std::boxed::Box as Box_; #[cfg(feature = "v23_7")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_7")))] use std::pin::Pin; glib::wrapper! { #[doc(alias = "PopplerDocument")] pub struct Document(Object); match fn { type_ => || ffi::poppler_document_get_type(), } } impl Document { #[cfg(feature = "v0_82")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_82")))] #[doc(alias = "poppler_document_new_from_bytes")] #[doc(alias = "new_from_bytes")] pub fn from_bytes( bytes: &glib::Bytes, password: Option<&str>, ) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::poppler_document_new_from_bytes( bytes.to_glib_none().0, password.to_glib_none().0, &mut error, ); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[cfg_attr(feature = "v0_82", deprecated = "Since 0.82")] #[allow(deprecated)] #[doc(alias = "poppler_document_new_from_data")] #[doc(alias = "new_from_data")] pub fn from_data(data: &[u8], password: Option<&str>) -> Result { let length = data.len() as _; unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::poppler_document_new_from_data( data.to_glib_none().0, length, password.to_glib_none().0, &mut error, ); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[cfg(target_os = "linux")] #[cfg_attr(docsrs, doc(cfg(target_os = "linux")))] #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[doc(alias = "poppler_document_new_from_fd")] #[doc(alias = "new_from_fd")] pub fn from_fd(fd: i32, password: Option<&str>) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::poppler_document_new_from_fd(fd, password.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "poppler_document_new_from_file")] #[doc(alias = "new_from_file")] pub fn from_file(uri: &str, password: Option<&str>) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::poppler_document_new_from_file( uri.to_glib_none().0, password.to_glib_none().0, &mut error, ); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "poppler_document_new_from_gfile")] #[doc(alias = "new_from_gfile")] pub fn from_gfile( file: &impl IsA, password: Option<&str>, cancellable: Option<&impl IsA>, ) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::poppler_document_new_from_gfile( file.as_ref().to_glib_none().0, password.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error, ); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "poppler_document_new_from_stream")] #[doc(alias = "new_from_stream")] pub fn from_stream( stream: &impl IsA, length: i64, password: Option<&str>, cancellable: Option<&impl IsA>, ) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::poppler_document_new_from_stream( stream.as_ref().to_glib_none().0, length, password.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error, ); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } // rustdoc-stripper-ignore-next /// Creates a new builder-pattern struct instance to construct [`Document`] objects. /// /// This method returns an instance of [`DocumentBuilder`](crate::builders::DocumentBuilder) which can be used to create [`Document`] objects. pub fn builder() -> DocumentBuilder { DocumentBuilder::new() } //#[cfg(feature = "v0_78")] //#[cfg_attr(docsrs, doc(cfg(feature = "v0_78")))] //#[doc(alias = "poppler_document_create_dests_tree")] //pub fn create_dests_tree(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:poppler_document_create_dests_tree() } //} #[doc(alias = "poppler_document_find_dest")] pub fn find_dest(&self, link_name: &str) -> Option { unsafe { from_glib_full(ffi::poppler_document_find_dest( self.to_glib_none().0, link_name.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_attachments")] #[doc(alias = "get_attachments")] pub fn attachments(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::poppler_document_get_attachments( self.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_author")] #[doc(alias = "get_author")] pub fn author(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_author(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_creation_date")] #[doc(alias = "get_creation_date")] #[doc(alias = "creation-date")] pub fn creation_date(&self) -> libc::time_t { unsafe { ffi::poppler_document_get_creation_date(self.to_glib_none().0) } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_document_get_creation_date_time")] #[doc(alias = "get_creation_date_time")] pub fn creation_date_time(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_creation_date_time( self.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_creator")] #[doc(alias = "get_creator")] pub fn creator(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_creator(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_form_field")] #[doc(alias = "get_form_field")] pub fn form_field(&self, id: i32) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_form_field( self.to_glib_none().0, id, )) } } #[doc(alias = "poppler_document_get_id")] #[doc(alias = "get_id")] pub fn id(&self) -> Option<(glib::GString, glib::GString)> { unsafe { let mut permanent_id = std::ptr::null_mut(); let mut update_id = std::ptr::null_mut(); let ret = from_glib(ffi::poppler_document_get_id( self.to_glib_none().0, &mut permanent_id, &mut update_id, )); if ret { Some((from_glib_full(permanent_id), from_glib_full(update_id))) } else { None } } } #[doc(alias = "poppler_document_get_keywords")] #[doc(alias = "get_keywords")] pub fn keywords(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_keywords(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_metadata")] #[doc(alias = "get_metadata")] pub fn metadata(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_metadata(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_modification_date")] #[doc(alias = "get_modification_date")] pub fn modification_date(&self) -> libc::time_t { unsafe { ffi::poppler_document_get_modification_date(self.to_glib_none().0) } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_document_get_modification_date_time")] #[doc(alias = "get_modification_date_time")] pub fn modification_date_time(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_modification_date_time( self.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_n_attachments")] #[doc(alias = "get_n_attachments")] pub fn n_attachments(&self) -> u32 { unsafe { ffi::poppler_document_get_n_attachments(self.to_glib_none().0) } } #[doc(alias = "poppler_document_get_n_pages")] #[doc(alias = "get_n_pages")] pub fn n_pages(&self) -> i32 { unsafe { ffi::poppler_document_get_n_pages(self.to_glib_none().0) } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[doc(alias = "poppler_document_get_n_signatures")] #[doc(alias = "get_n_signatures")] pub fn n_signatures(&self) -> i32 { unsafe { ffi::poppler_document_get_n_signatures(self.to_glib_none().0) } } #[doc(alias = "poppler_document_get_page")] #[doc(alias = "get_page")] pub fn page(&self, index: i32) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_page(self.to_glib_none().0, index)) } } #[doc(alias = "poppler_document_get_page_by_label")] #[doc(alias = "get_page_by_label")] pub fn page_by_label(&self, label: &str) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_page_by_label( self.to_glib_none().0, label.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_page_layout")] #[doc(alias = "get_page_layout")] #[doc(alias = "page-layout")] pub fn page_layout(&self) -> PageLayout { unsafe { from_glib(ffi::poppler_document_get_page_layout(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_page_mode")] #[doc(alias = "get_page_mode")] #[doc(alias = "page-mode")] pub fn page_mode(&self) -> PageMode { unsafe { from_glib(ffi::poppler_document_get_page_mode(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_pdf_conformance")] #[doc(alias = "get_pdf_conformance")] pub fn pdf_conformance(&self) -> PDFConformance { unsafe { from_glib(ffi::poppler_document_get_pdf_conformance( self.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_pdf_part")] #[doc(alias = "get_pdf_part")] pub fn pdf_part(&self) -> PDFPart { unsafe { from_glib(ffi::poppler_document_get_pdf_part(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_pdf_subtype")] #[doc(alias = "get_pdf_subtype")] pub fn pdf_subtype(&self) -> PDFSubtype { unsafe { from_glib(ffi::poppler_document_get_pdf_subtype(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_pdf_subtype_string")] #[doc(alias = "get_pdf_subtype_string")] pub fn pdf_subtype_string(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_pdf_subtype_string( self.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_pdf_version")] #[doc(alias = "get_pdf_version")] pub fn pdf_version(&self) -> (u32, u32) { unsafe { let mut major_version = std::mem::MaybeUninit::uninit(); let mut minor_version = std::mem::MaybeUninit::uninit(); ffi::poppler_document_get_pdf_version( self.to_glib_none().0, major_version.as_mut_ptr(), minor_version.as_mut_ptr(), ); (major_version.assume_init(), minor_version.assume_init()) } } #[doc(alias = "poppler_document_get_pdf_version_string")] #[doc(alias = "get_pdf_version_string")] pub fn pdf_version_string(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_pdf_version_string( self.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_permissions")] #[doc(alias = "get_permissions")] pub fn permissions(&self) -> Permissions { unsafe { from_glib(ffi::poppler_document_get_permissions(self.to_glib_none().0)) } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] #[doc(alias = "poppler_document_get_print_duplex")] #[doc(alias = "get_print_duplex")] #[doc(alias = "print-duplex")] pub fn print_duplex(&self) -> PrintDuplex { unsafe { from_glib(ffi::poppler_document_get_print_duplex( self.to_glib_none().0, )) } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] #[doc(alias = "poppler_document_get_print_n_copies")] #[doc(alias = "get_print_n_copies")] #[doc(alias = "print-n-copies")] pub fn print_n_copies(&self) -> i32 { unsafe { ffi::poppler_document_get_print_n_copies(self.to_glib_none().0) } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] #[doc(alias = "poppler_document_get_print_scaling")] #[doc(alias = "get_print_scaling")] #[doc(alias = "print-scaling")] pub fn print_scaling(&self) -> PrintScaling { unsafe { from_glib(ffi::poppler_document_get_print_scaling( self.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_producer")] #[doc(alias = "get_producer")] pub fn producer(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_producer(self.to_glib_none().0)) } } #[cfg(feature = "v22_2")] #[cfg_attr(docsrs, doc(cfg(feature = "v22_2")))] #[doc(alias = "poppler_document_get_signature_fields")] #[doc(alias = "get_signature_fields")] pub fn signature_fields(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::poppler_document_get_signature_fields( self.to_glib_none().0, )) } } #[doc(alias = "poppler_document_get_subject")] #[doc(alias = "get_subject")] pub fn subject(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_subject(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_get_title")] #[doc(alias = "get_title")] pub fn title(&self) -> Option { unsafe { from_glib_full(ffi::poppler_document_get_title(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_has_attachments")] pub fn has_attachments(&self) -> bool { unsafe { from_glib(ffi::poppler_document_has_attachments(self.to_glib_none().0)) } } #[cfg(feature = "v0_90")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_90")))] #[doc(alias = "poppler_document_has_javascript")] pub fn has_javascript(&self) -> bool { unsafe { from_glib(ffi::poppler_document_has_javascript(self.to_glib_none().0)) } } #[doc(alias = "poppler_document_is_linearized")] #[doc(alias = "linearized")] pub fn is_linearized(&self) -> bool { unsafe { from_glib(ffi::poppler_document_is_linearized(self.to_glib_none().0)) } } #[cfg(feature = "v0_90")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_90")))] #[doc(alias = "poppler_document_reset_form")] pub fn reset_form(&self, fields: &[&str], exclude_fields: bool) { unsafe { ffi::poppler_document_reset_form( self.to_glib_none().0, fields.to_glib_none().0, exclude_fields.into_glib(), ); } } #[doc(alias = "poppler_document_save")] pub fn save(&self, uri: &str) -> Result<(), glib::Error> { unsafe { let mut error = std::ptr::null_mut(); let is_ok = ffi::poppler_document_save(self.to_glib_none().0, uri.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } #[doc(alias = "poppler_document_save_a_copy")] pub fn save_a_copy(&self, uri: &str) -> Result<(), glib::Error> { unsafe { let mut error = std::ptr::null_mut(); let is_ok = ffi::poppler_document_save_a_copy( self.to_glib_none().0, uri.to_glib_none().0, &mut error, ); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } #[cfg(target_os = "linux")] #[cfg_attr(docsrs, doc(cfg(target_os = "linux")))] #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[doc(alias = "poppler_document_save_to_fd")] pub fn save_to_fd(&self, fd: i32, include_changes: bool) -> Result<(), glib::Error> { unsafe { let mut error = std::ptr::null_mut(); let is_ok = ffi::poppler_document_save_to_fd( self.to_glib_none().0, fd, include_changes.into_glib(), &mut error, ); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } #[doc(alias = "poppler_document_set_author")] #[doc(alias = "author")] pub fn set_author(&self, author: &str) { unsafe { ffi::poppler_document_set_author(self.to_glib_none().0, author.to_glib_none().0); } } #[doc(alias = "poppler_document_set_creation_date")] #[doc(alias = "creation-date")] pub fn set_creation_date(&self, creation_date: libc::time_t) { unsafe { ffi::poppler_document_set_creation_date(self.to_glib_none().0, creation_date); } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_document_set_creation_date_time")] pub fn set_creation_date_time(&self, creation_datetime: Option<&glib::DateTime>) { unsafe { ffi::poppler_document_set_creation_date_time( self.to_glib_none().0, creation_datetime.to_glib_none().0, ); } } #[doc(alias = "poppler_document_set_creator")] #[doc(alias = "creator")] pub fn set_creator(&self, creator: &str) { unsafe { ffi::poppler_document_set_creator(self.to_glib_none().0, creator.to_glib_none().0); } } #[doc(alias = "poppler_document_set_keywords")] #[doc(alias = "keywords")] pub fn set_keywords(&self, keywords: &str) { unsafe { ffi::poppler_document_set_keywords(self.to_glib_none().0, keywords.to_glib_none().0); } } #[doc(alias = "poppler_document_set_modification_date")] pub fn set_modification_date(&self, modification_date: libc::time_t) { unsafe { ffi::poppler_document_set_modification_date(self.to_glib_none().0, modification_date); } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "poppler_document_set_modification_date_time")] pub fn set_modification_date_time(&self, modification_datetime: Option<&glib::DateTime>) { unsafe { ffi::poppler_document_set_modification_date_time( self.to_glib_none().0, modification_datetime.to_glib_none().0, ); } } #[doc(alias = "poppler_document_set_producer")] #[doc(alias = "producer")] pub fn set_producer(&self, producer: &str) { unsafe { ffi::poppler_document_set_producer(self.to_glib_none().0, producer.to_glib_none().0); } } #[doc(alias = "poppler_document_set_subject")] #[doc(alias = "subject")] pub fn set_subject(&self, subject: &str) { unsafe { ffi::poppler_document_set_subject(self.to_glib_none().0, subject.to_glib_none().0); } } #[doc(alias = "poppler_document_set_title")] #[doc(alias = "title")] pub fn set_title(&self, title: &str) { unsafe { ffi::poppler_document_set_title(self.to_glib_none().0, title.to_glib_none().0); } } #[cfg(feature = "v23_7")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_7")))] #[doc(alias = "poppler_document_sign")] pub fn sign) + 'static>( &self, signing_data: &SigningData, cancellable: Option<&impl IsA>, callback: P, ) { let main_context = glib::MainContext::ref_thread_default(); let is_main_context_owner = main_context.is_owner(); let has_acquired_main_context = (!is_main_context_owner) .then(|| main_context.acquire().ok()) .flatten(); assert!( is_main_context_owner || has_acquired_main_context.is_some(), "Async operations only allowed if the thread is owning the MainContext" ); let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn sign_trampoline) + 'static>( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { unsafe { let mut error = std::ptr::null_mut(); ffi::poppler_document_sign_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; let callback: Box_> = Box_::from_raw(user_data as *mut _); let callback: P = callback.into_inner(); callback(result); } } let callback = sign_trampoline::

; unsafe { ffi::poppler_document_sign( self.to_glib_none().0, signing_data.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box_::into_raw(user_data) as *mut _, ); } } #[cfg(feature = "v23_7")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_7")))] pub fn sign_future( &self, signing_data: &SigningData, ) -> Pin> + 'static>> { let signing_data = signing_data.clone(); Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| { obj.sign(&signing_data, Some(cancellable), move |res| { send.resolve(res); }); })) } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "creation-datetime")] pub fn creation_datetime(&self) -> Option { ObjectExt::property(self, "creation-datetime") } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "creation-datetime")] pub fn set_creation_datetime(&self, creation_datetime: Option<&glib::DateTime>) { ObjectExt::set_property(self, "creation-datetime", creation_datetime) } pub fn format(&self) -> Option { ObjectExt::property(self, "format") } #[doc(alias = "format-major")] pub fn format_major(&self) -> u32 { ObjectExt::property(self, "format-major") } #[doc(alias = "format-minor")] pub fn format_minor(&self) -> u32 { ObjectExt::property(self, "format-minor") } #[cfg_attr(feature = "v20_9", deprecated = "Since 20.9")] #[doc(alias = "mod-date")] pub fn mod_date(&self) -> i32 { ObjectExt::property(self, "mod-date") } #[cfg_attr(feature = "v20_9", deprecated = "Since 20.9")] #[doc(alias = "mod-date")] pub fn set_mod_date(&self, mod_date: i32) { ObjectExt::set_property(self, "mod-date", mod_date) } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "mod-datetime")] pub fn mod_datetime(&self) -> Option { ObjectExt::property(self, "mod-datetime") } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "mod-datetime")] pub fn set_mod_datetime(&self, mod_datetime: Option<&glib::DateTime>) { ObjectExt::set_property(self, "mod-datetime", mod_datetime) } pub fn subtype(&self) -> PDFSubtype { ObjectExt::property(self, "subtype") } #[doc(alias = "subtype-conformance")] pub fn subtype_conformance(&self) -> PDFConformance { ObjectExt::property(self, "subtype-conformance") } #[doc(alias = "subtype-part")] pub fn subtype_part(&self) -> PDFPart { ObjectExt::property(self, "subtype-part") } #[doc(alias = "subtype-string")] pub fn subtype_string(&self) -> Option { ObjectExt::property(self, "subtype-string") } #[doc(alias = "viewer-preferences")] pub fn viewer_preferences(&self) -> ViewerPreferences { ObjectExt::property(self, "viewer-preferences") } #[doc(alias = "author")] pub fn connect_author_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_author_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::author".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_author_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg_attr(feature = "v20_9", deprecated = "Since 20.9")] #[doc(alias = "creation-date")] pub fn connect_creation_date_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_creation_date_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::creation-date".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_creation_date_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "creation-datetime")] pub fn connect_creation_datetime_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_creation_datetime_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::creation-datetime".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_creation_datetime_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "creator")] pub fn connect_creator_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_creator_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::creator".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_creator_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "format")] pub fn connect_format_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_format_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::format".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_format_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "format-major")] pub fn connect_format_major_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_format_major_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::format-major".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_format_major_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "format-minor")] pub fn connect_format_minor_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_format_minor_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::format-minor".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_format_minor_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "keywords")] pub fn connect_keywords_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_keywords_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::keywords".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_keywords_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "linearized")] pub fn connect_linearized_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_linearized_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::linearized".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_linearized_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "metadata")] pub fn connect_metadata_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_metadata_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::metadata".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_metadata_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg_attr(feature = "v20_9", deprecated = "Since 20.9")] #[doc(alias = "mod-date")] pub fn connect_mod_date_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mod_date_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::mod-date".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_mod_date_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] #[doc(alias = "mod-datetime")] pub fn connect_mod_datetime_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_mod_datetime_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::mod-datetime".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_mod_datetime_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "page-layout")] pub fn connect_page_layout_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_page_layout_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::page-layout".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_page_layout_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "page-mode")] pub fn connect_page_mode_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_page_mode_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::page-mode".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_page_mode_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "permissions")] pub fn connect_permissions_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_permissions_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::permissions".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_permissions_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] #[doc(alias = "print-duplex")] pub fn connect_print_duplex_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_print_duplex_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::print-duplex".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_print_duplex_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] #[doc(alias = "print-n-copies")] pub fn connect_print_n_copies_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_print_n_copies_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::print-n-copies".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_print_n_copies_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] #[doc(alias = "print-scaling")] pub fn connect_print_scaling_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_print_scaling_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::print-scaling".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_print_scaling_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "producer")] pub fn connect_producer_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_producer_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::producer".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_producer_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "subject")] pub fn connect_subject_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_subject_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::subject".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_subject_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "subtype")] pub fn connect_subtype_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_subtype_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::subtype".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_subtype_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "subtype-conformance")] pub fn connect_subtype_conformance_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_subtype_conformance_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::subtype-conformance".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_subtype_conformance_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "subtype-part")] pub fn connect_subtype_part_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_subtype_part_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::subtype-part".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_subtype_part_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "subtype-string")] pub fn connect_subtype_string_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_subtype_string_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::subtype-string".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_subtype_string_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "title")] pub fn connect_title_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_title_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::title".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_title_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "viewer-preferences")] pub fn connect_viewer_preferences_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_viewer_preferences_trampoline( this: *mut ffi::PopplerDocument, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { unsafe { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::viewer-preferences".as_ptr(), Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_viewer_preferences_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } // rustdoc-stripper-ignore-next /// A [builder-pattern] type to construct [`Document`] objects. /// /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html #[must_use = "The builder must be built to be used"] pub struct DocumentBuilder { builder: glib::object::ObjectBuilder<'static, Document>, } impl DocumentBuilder { fn new() -> Self { Self { builder: glib::object::Object::builder(), } } pub fn author(self, author: impl Into) -> Self { Self { builder: self.builder.property("author", author.into()), } } #[cfg_attr(feature = "v20_9", deprecated = "Since 20.9")] pub fn creation_date(self, creation_date: i32) -> Self { Self { builder: self.builder.property("creation-date", creation_date), } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] pub fn creation_datetime(self, creation_datetime: &glib::DateTime) -> Self { Self { builder: self .builder .property("creation-datetime", creation_datetime.clone()), } } pub fn creator(self, creator: impl Into) -> Self { Self { builder: self.builder.property("creator", creator.into()), } } pub fn keywords(self, keywords: impl Into) -> Self { Self { builder: self.builder.property("keywords", keywords.into()), } } #[cfg_attr(feature = "v20_9", deprecated = "Since 20.9")] pub fn mod_date(self, mod_date: i32) -> Self { Self { builder: self.builder.property("mod-date", mod_date), } } #[cfg(feature = "v20_9")] #[cfg_attr(docsrs, doc(cfg(feature = "v20_9")))] pub fn mod_datetime(self, mod_datetime: &glib::DateTime) -> Self { Self { builder: self.builder.property("mod-datetime", mod_datetime.clone()), } } pub fn producer(self, producer: impl Into) -> Self { Self { builder: self.builder.property("producer", producer.into()), } } pub fn subject(self, subject: impl Into) -> Self { Self { builder: self.builder.property("subject", subject.into()), } } pub fn title(self, title: impl Into) -> Self { Self { builder: self.builder.property("title", title.into()), } } // rustdoc-stripper-ignore-next /// Build the [`Document`]. #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] pub fn build(self) -> Document { self.builder.build() } } poppler-rs-0.26.0/src/auto/enums.rs000064400000000000000000005254161046102023000152650ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use crate::ffi; use glib::{prelude::*, translate::*}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerActionLayerAction")] pub enum ActionLayerAction { #[doc(alias = "POPPLER_ACTION_LAYER_ON")] On, #[doc(alias = "POPPLER_ACTION_LAYER_OFF")] Off, #[doc(alias = "POPPLER_ACTION_LAYER_TOGGLE")] Toggle, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for ActionLayerAction { type GlibType = ffi::PopplerActionLayerAction; #[inline] fn into_glib(self) -> ffi::PopplerActionLayerAction { match self { Self::On => ffi::POPPLER_ACTION_LAYER_ON, Self::Off => ffi::POPPLER_ACTION_LAYER_OFF, Self::Toggle => ffi::POPPLER_ACTION_LAYER_TOGGLE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for ActionLayerAction { #[inline] unsafe fn from_glib(value: ffi::PopplerActionLayerAction) -> Self { match value { ffi::POPPLER_ACTION_LAYER_ON => Self::On, ffi::POPPLER_ACTION_LAYER_OFF => Self::Off, ffi::POPPLER_ACTION_LAYER_TOGGLE => Self::Toggle, value => Self::__Unknown(value), } } } impl StaticType for ActionLayerAction { #[inline] #[doc(alias = "poppler_action_layer_action_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_action_layer_action_get_type()) } } } impl glib::HasParamSpec for ActionLayerAction { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for ActionLayerAction { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for ActionLayerAction { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for ActionLayerAction { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: ActionLayerAction) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerActionMovieOperation")] pub enum ActionMovieOperation { #[doc(alias = "POPPLER_ACTION_MOVIE_PLAY")] Play, #[doc(alias = "POPPLER_ACTION_MOVIE_PAUSE")] Pause, #[doc(alias = "POPPLER_ACTION_MOVIE_RESUME")] Resume, #[doc(alias = "POPPLER_ACTION_MOVIE_STOP")] Stop, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for ActionMovieOperation { type GlibType = ffi::PopplerActionMovieOperation; #[inline] fn into_glib(self) -> ffi::PopplerActionMovieOperation { match self { Self::Play => ffi::POPPLER_ACTION_MOVIE_PLAY, Self::Pause => ffi::POPPLER_ACTION_MOVIE_PAUSE, Self::Resume => ffi::POPPLER_ACTION_MOVIE_RESUME, Self::Stop => ffi::POPPLER_ACTION_MOVIE_STOP, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for ActionMovieOperation { #[inline] unsafe fn from_glib(value: ffi::PopplerActionMovieOperation) -> Self { match value { ffi::POPPLER_ACTION_MOVIE_PLAY => Self::Play, ffi::POPPLER_ACTION_MOVIE_PAUSE => Self::Pause, ffi::POPPLER_ACTION_MOVIE_RESUME => Self::Resume, ffi::POPPLER_ACTION_MOVIE_STOP => Self::Stop, value => Self::__Unknown(value), } } } impl StaticType for ActionMovieOperation { #[inline] #[doc(alias = "poppler_action_movie_operation_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_action_movie_operation_get_type()) } } } impl glib::HasParamSpec for ActionMovieOperation { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for ActionMovieOperation { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for ActionMovieOperation { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for ActionMovieOperation { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: ActionMovieOperation) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerActionType")] pub enum ActionType { #[doc(alias = "POPPLER_ACTION_UNKNOWN")] Unknown, #[doc(alias = "POPPLER_ACTION_NONE")] None, #[doc(alias = "POPPLER_ACTION_GOTO_DEST")] GotoDest, #[doc(alias = "POPPLER_ACTION_GOTO_REMOTE")] GotoRemote, #[doc(alias = "POPPLER_ACTION_LAUNCH")] Launch, #[doc(alias = "POPPLER_ACTION_URI")] Uri, #[doc(alias = "POPPLER_ACTION_NAMED")] Named, #[doc(alias = "POPPLER_ACTION_MOVIE")] Movie, #[doc(alias = "POPPLER_ACTION_RENDITION")] Rendition, #[doc(alias = "POPPLER_ACTION_OCG_STATE")] OcgState, #[doc(alias = "POPPLER_ACTION_JAVASCRIPT")] Javascript, #[doc(alias = "POPPLER_ACTION_RESET_FORM")] ResetForm, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for ActionType { type GlibType = ffi::PopplerActionType; #[inline] fn into_glib(self) -> ffi::PopplerActionType { match self { Self::Unknown => ffi::POPPLER_ACTION_UNKNOWN, Self::None => ffi::POPPLER_ACTION_NONE, Self::GotoDest => ffi::POPPLER_ACTION_GOTO_DEST, Self::GotoRemote => ffi::POPPLER_ACTION_GOTO_REMOTE, Self::Launch => ffi::POPPLER_ACTION_LAUNCH, Self::Uri => ffi::POPPLER_ACTION_URI, Self::Named => ffi::POPPLER_ACTION_NAMED, Self::Movie => ffi::POPPLER_ACTION_MOVIE, Self::Rendition => ffi::POPPLER_ACTION_RENDITION, Self::OcgState => ffi::POPPLER_ACTION_OCG_STATE, Self::Javascript => ffi::POPPLER_ACTION_JAVASCRIPT, Self::ResetForm => ffi::POPPLER_ACTION_RESET_FORM, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for ActionType { #[inline] unsafe fn from_glib(value: ffi::PopplerActionType) -> Self { match value { ffi::POPPLER_ACTION_UNKNOWN => Self::Unknown, ffi::POPPLER_ACTION_NONE => Self::None, ffi::POPPLER_ACTION_GOTO_DEST => Self::GotoDest, ffi::POPPLER_ACTION_GOTO_REMOTE => Self::GotoRemote, ffi::POPPLER_ACTION_LAUNCH => Self::Launch, ffi::POPPLER_ACTION_URI => Self::Uri, ffi::POPPLER_ACTION_NAMED => Self::Named, ffi::POPPLER_ACTION_MOVIE => Self::Movie, ffi::POPPLER_ACTION_RENDITION => Self::Rendition, ffi::POPPLER_ACTION_OCG_STATE => Self::OcgState, ffi::POPPLER_ACTION_JAVASCRIPT => Self::Javascript, ffi::POPPLER_ACTION_RESET_FORM => Self::ResetForm, value => Self::__Unknown(value), } } } impl StaticType for ActionType { #[inline] #[doc(alias = "poppler_action_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_action_type_get_type()) } } } impl glib::HasParamSpec for ActionType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for ActionType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for ActionType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for ActionType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: ActionType) -> Self { ToValue::to_value(&v) } } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerAdditionalActionType")] pub enum AdditionalActionType { #[doc(alias = "POPPLER_ADDITIONAL_ACTION_FIELD_MODIFIED")] FieldModified, #[doc(alias = "POPPLER_ADDITIONAL_ACTION_FORMAT_FIELD")] FormatField, #[doc(alias = "POPPLER_ADDITIONAL_ACTION_VALIDATE_FIELD")] ValidateField, #[doc(alias = "POPPLER_ADDITIONAL_ACTION_CALCULATE_FIELD")] CalculateField, #[doc(hidden)] __Unknown(i32), } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] #[doc(hidden)] impl IntoGlib for AdditionalActionType { type GlibType = ffi::PopplerAdditionalActionType; #[inline] fn into_glib(self) -> ffi::PopplerAdditionalActionType { match self { Self::FieldModified => ffi::POPPLER_ADDITIONAL_ACTION_FIELD_MODIFIED, Self::FormatField => ffi::POPPLER_ADDITIONAL_ACTION_FORMAT_FIELD, Self::ValidateField => ffi::POPPLER_ADDITIONAL_ACTION_VALIDATE_FIELD, Self::CalculateField => ffi::POPPLER_ADDITIONAL_ACTION_CALCULATE_FIELD, Self::__Unknown(value) => value, } } } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] #[doc(hidden)] impl FromGlib for AdditionalActionType { #[inline] unsafe fn from_glib(value: ffi::PopplerAdditionalActionType) -> Self { match value { ffi::POPPLER_ADDITIONAL_ACTION_FIELD_MODIFIED => Self::FieldModified, ffi::POPPLER_ADDITIONAL_ACTION_FORMAT_FIELD => Self::FormatField, ffi::POPPLER_ADDITIONAL_ACTION_VALIDATE_FIELD => Self::ValidateField, ffi::POPPLER_ADDITIONAL_ACTION_CALCULATE_FIELD => Self::CalculateField, value => Self::__Unknown(value), } } } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] impl StaticType for AdditionalActionType { #[inline] #[doc(alias = "poppler_additional_action_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_additional_action_type_get_type()) } } } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] impl glib::HasParamSpec for AdditionalActionType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] impl glib::value::ValueType for AdditionalActionType { type Type = Self; } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] unsafe impl<'a> glib::value::FromValue<'a> for AdditionalActionType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] impl ToValue for AdditionalActionType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(feature = "v0_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))] impl From for glib::Value { #[inline] fn from(v: AdditionalActionType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerAnnotExternalDataType")] pub enum AnnotExternalDataType { #[doc(alias = "POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D")] _3d, #[doc(alias = "POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN")] Unknown, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for AnnotExternalDataType { type GlibType = ffi::PopplerAnnotExternalDataType; #[inline] fn into_glib(self) -> ffi::PopplerAnnotExternalDataType { match self { Self::_3d => ffi::POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D, Self::Unknown => ffi::POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for AnnotExternalDataType { #[inline] unsafe fn from_glib(value: ffi::PopplerAnnotExternalDataType) -> Self { match value { ffi::POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_3D => Self::_3d, ffi::POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_UNKNOWN => Self::Unknown, value => Self::__Unknown(value), } } } impl StaticType for AnnotExternalDataType { #[inline] #[doc(alias = "poppler_annot_external_data_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_annot_external_data_type_get_type()) } } } impl glib::HasParamSpec for AnnotExternalDataType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for AnnotExternalDataType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for AnnotExternalDataType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for AnnotExternalDataType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: AnnotExternalDataType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerAnnotFreeTextQuadding")] pub enum AnnotFreeTextQuadding { #[doc(alias = "POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED")] LeftJustified, #[doc(alias = "POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED")] Centered, #[doc(alias = "POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED")] RightJustified, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for AnnotFreeTextQuadding { type GlibType = ffi::PopplerAnnotFreeTextQuadding; #[inline] fn into_glib(self) -> ffi::PopplerAnnotFreeTextQuadding { match self { Self::LeftJustified => ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED, Self::Centered => ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED, Self::RightJustified => ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for AnnotFreeTextQuadding { #[inline] unsafe fn from_glib(value: ffi::PopplerAnnotFreeTextQuadding) -> Self { match value { ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_LEFT_JUSTIFIED => Self::LeftJustified, ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_CENTERED => Self::Centered, ffi::POPPLER_ANNOT_FREE_TEXT_QUADDING_RIGHT_JUSTIFIED => Self::RightJustified, value => Self::__Unknown(value), } } } impl StaticType for AnnotFreeTextQuadding { #[inline] #[doc(alias = "poppler_annot_free_text_quadding_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_annot_free_text_quadding_get_type()) } } } impl glib::HasParamSpec for AnnotFreeTextQuadding { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for AnnotFreeTextQuadding { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for AnnotFreeTextQuadding { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for AnnotFreeTextQuadding { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: AnnotFreeTextQuadding) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerAnnotMarkupReplyType")] pub enum AnnotMarkupReplyType { #[doc(alias = "POPPLER_ANNOT_MARKUP_REPLY_TYPE_R")] R, #[doc(alias = "POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP")] Group, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for AnnotMarkupReplyType { type GlibType = ffi::PopplerAnnotMarkupReplyType; #[inline] fn into_glib(self) -> ffi::PopplerAnnotMarkupReplyType { match self { Self::R => ffi::POPPLER_ANNOT_MARKUP_REPLY_TYPE_R, Self::Group => ffi::POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for AnnotMarkupReplyType { #[inline] unsafe fn from_glib(value: ffi::PopplerAnnotMarkupReplyType) -> Self { match value { ffi::POPPLER_ANNOT_MARKUP_REPLY_TYPE_R => Self::R, ffi::POPPLER_ANNOT_MARKUP_REPLY_TYPE_GROUP => Self::Group, value => Self::__Unknown(value), } } } impl StaticType for AnnotMarkupReplyType { #[inline] #[doc(alias = "poppler_annot_markup_reply_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_annot_markup_reply_type_get_type()) } } } impl glib::HasParamSpec for AnnotMarkupReplyType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for AnnotMarkupReplyType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for AnnotMarkupReplyType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for AnnotMarkupReplyType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: AnnotMarkupReplyType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerAnnotTextState")] pub enum AnnotTextState { #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_MARKED")] Marked, #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_UNMARKED")] Unmarked, #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_ACCEPTED")] Accepted, #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_REJECTED")] Rejected, #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_CANCELLED")] Cancelled, #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_COMPLETED")] Completed, #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_NONE")] None, #[doc(alias = "POPPLER_ANNOT_TEXT_STATE_UNKNOWN")] Unknown, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for AnnotTextState { type GlibType = ffi::PopplerAnnotTextState; #[inline] fn into_glib(self) -> ffi::PopplerAnnotTextState { match self { Self::Marked => ffi::POPPLER_ANNOT_TEXT_STATE_MARKED, Self::Unmarked => ffi::POPPLER_ANNOT_TEXT_STATE_UNMARKED, Self::Accepted => ffi::POPPLER_ANNOT_TEXT_STATE_ACCEPTED, Self::Rejected => ffi::POPPLER_ANNOT_TEXT_STATE_REJECTED, Self::Cancelled => ffi::POPPLER_ANNOT_TEXT_STATE_CANCELLED, Self::Completed => ffi::POPPLER_ANNOT_TEXT_STATE_COMPLETED, Self::None => ffi::POPPLER_ANNOT_TEXT_STATE_NONE, Self::Unknown => ffi::POPPLER_ANNOT_TEXT_STATE_UNKNOWN, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for AnnotTextState { #[inline] unsafe fn from_glib(value: ffi::PopplerAnnotTextState) -> Self { match value { ffi::POPPLER_ANNOT_TEXT_STATE_MARKED => Self::Marked, ffi::POPPLER_ANNOT_TEXT_STATE_UNMARKED => Self::Unmarked, ffi::POPPLER_ANNOT_TEXT_STATE_ACCEPTED => Self::Accepted, ffi::POPPLER_ANNOT_TEXT_STATE_REJECTED => Self::Rejected, ffi::POPPLER_ANNOT_TEXT_STATE_CANCELLED => Self::Cancelled, ffi::POPPLER_ANNOT_TEXT_STATE_COMPLETED => Self::Completed, ffi::POPPLER_ANNOT_TEXT_STATE_NONE => Self::None, ffi::POPPLER_ANNOT_TEXT_STATE_UNKNOWN => Self::Unknown, value => Self::__Unknown(value), } } } impl StaticType for AnnotTextState { #[inline] #[doc(alias = "poppler_annot_text_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_annot_text_state_get_type()) } } } impl glib::HasParamSpec for AnnotTextState { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for AnnotTextState { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for AnnotTextState { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for AnnotTextState { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: AnnotTextState) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerAnnotType")] pub enum AnnotType { #[doc(alias = "POPPLER_ANNOT_UNKNOWN")] Unknown, #[doc(alias = "POPPLER_ANNOT_TEXT")] Text, #[doc(alias = "POPPLER_ANNOT_LINK")] Link, #[doc(alias = "POPPLER_ANNOT_FREE_TEXT")] FreeText, #[doc(alias = "POPPLER_ANNOT_LINE")] Line, #[doc(alias = "POPPLER_ANNOT_SQUARE")] Square, #[doc(alias = "POPPLER_ANNOT_CIRCLE")] Circle, #[doc(alias = "POPPLER_ANNOT_POLYGON")] Polygon, #[doc(alias = "POPPLER_ANNOT_POLY_LINE")] PolyLine, #[doc(alias = "POPPLER_ANNOT_HIGHLIGHT")] Highlight, #[doc(alias = "POPPLER_ANNOT_UNDERLINE")] Underline, #[doc(alias = "POPPLER_ANNOT_SQUIGGLY")] Squiggly, #[doc(alias = "POPPLER_ANNOT_STRIKE_OUT")] StrikeOut, #[doc(alias = "POPPLER_ANNOT_STAMP")] Stamp, #[doc(alias = "POPPLER_ANNOT_CARET")] Caret, #[doc(alias = "POPPLER_ANNOT_INK")] Ink, #[doc(alias = "POPPLER_ANNOT_POPUP")] Popup, #[doc(alias = "POPPLER_ANNOT_FILE_ATTACHMENT")] FileAttachment, #[doc(alias = "POPPLER_ANNOT_SOUND")] Sound, #[doc(alias = "POPPLER_ANNOT_MOVIE")] Movie, #[doc(alias = "POPPLER_ANNOT_WIDGET")] Widget, #[doc(alias = "POPPLER_ANNOT_SCREEN")] Screen, #[doc(alias = "POPPLER_ANNOT_PRINTER_MARK")] PrinterMark, #[doc(alias = "POPPLER_ANNOT_TRAP_NET")] TrapNet, #[doc(alias = "POPPLER_ANNOT_WATERMARK")] Watermark, #[doc(alias = "POPPLER_ANNOT_3D")] _3d, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for AnnotType { type GlibType = ffi::PopplerAnnotType; fn into_glib(self) -> ffi::PopplerAnnotType { match self { Self::Unknown => ffi::POPPLER_ANNOT_UNKNOWN, Self::Text => ffi::POPPLER_ANNOT_TEXT, Self::Link => ffi::POPPLER_ANNOT_LINK, Self::FreeText => ffi::POPPLER_ANNOT_FREE_TEXT, Self::Line => ffi::POPPLER_ANNOT_LINE, Self::Square => ffi::POPPLER_ANNOT_SQUARE, Self::Circle => ffi::POPPLER_ANNOT_CIRCLE, Self::Polygon => ffi::POPPLER_ANNOT_POLYGON, Self::PolyLine => ffi::POPPLER_ANNOT_POLY_LINE, Self::Highlight => ffi::POPPLER_ANNOT_HIGHLIGHT, Self::Underline => ffi::POPPLER_ANNOT_UNDERLINE, Self::Squiggly => ffi::POPPLER_ANNOT_SQUIGGLY, Self::StrikeOut => ffi::POPPLER_ANNOT_STRIKE_OUT, Self::Stamp => ffi::POPPLER_ANNOT_STAMP, Self::Caret => ffi::POPPLER_ANNOT_CARET, Self::Ink => ffi::POPPLER_ANNOT_INK, Self::Popup => ffi::POPPLER_ANNOT_POPUP, Self::FileAttachment => ffi::POPPLER_ANNOT_FILE_ATTACHMENT, Self::Sound => ffi::POPPLER_ANNOT_SOUND, Self::Movie => ffi::POPPLER_ANNOT_MOVIE, Self::Widget => ffi::POPPLER_ANNOT_WIDGET, Self::Screen => ffi::POPPLER_ANNOT_SCREEN, Self::PrinterMark => ffi::POPPLER_ANNOT_PRINTER_MARK, Self::TrapNet => ffi::POPPLER_ANNOT_TRAP_NET, Self::Watermark => ffi::POPPLER_ANNOT_WATERMARK, Self::_3d => ffi::POPPLER_ANNOT_3D, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for AnnotType { unsafe fn from_glib(value: ffi::PopplerAnnotType) -> Self { match value { ffi::POPPLER_ANNOT_UNKNOWN => Self::Unknown, ffi::POPPLER_ANNOT_TEXT => Self::Text, ffi::POPPLER_ANNOT_LINK => Self::Link, ffi::POPPLER_ANNOT_FREE_TEXT => Self::FreeText, ffi::POPPLER_ANNOT_LINE => Self::Line, ffi::POPPLER_ANNOT_SQUARE => Self::Square, ffi::POPPLER_ANNOT_CIRCLE => Self::Circle, ffi::POPPLER_ANNOT_POLYGON => Self::Polygon, ffi::POPPLER_ANNOT_POLY_LINE => Self::PolyLine, ffi::POPPLER_ANNOT_HIGHLIGHT => Self::Highlight, ffi::POPPLER_ANNOT_UNDERLINE => Self::Underline, ffi::POPPLER_ANNOT_SQUIGGLY => Self::Squiggly, ffi::POPPLER_ANNOT_STRIKE_OUT => Self::StrikeOut, ffi::POPPLER_ANNOT_STAMP => Self::Stamp, ffi::POPPLER_ANNOT_CARET => Self::Caret, ffi::POPPLER_ANNOT_INK => Self::Ink, ffi::POPPLER_ANNOT_POPUP => Self::Popup, ffi::POPPLER_ANNOT_FILE_ATTACHMENT => Self::FileAttachment, ffi::POPPLER_ANNOT_SOUND => Self::Sound, ffi::POPPLER_ANNOT_MOVIE => Self::Movie, ffi::POPPLER_ANNOT_WIDGET => Self::Widget, ffi::POPPLER_ANNOT_SCREEN => Self::Screen, ffi::POPPLER_ANNOT_PRINTER_MARK => Self::PrinterMark, ffi::POPPLER_ANNOT_TRAP_NET => Self::TrapNet, ffi::POPPLER_ANNOT_WATERMARK => Self::Watermark, ffi::POPPLER_ANNOT_3D => Self::_3d, value => Self::__Unknown(value), } } } impl StaticType for AnnotType { #[inline] #[doc(alias = "poppler_annot_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_annot_type_get_type()) } } } impl glib::HasParamSpec for AnnotType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for AnnotType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for AnnotType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for AnnotType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: AnnotType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerBackend")] pub enum Backend { #[doc(alias = "POPPLER_BACKEND_UNKNOWN")] Unknown, #[doc(alias = "POPPLER_BACKEND_SPLASH")] Splash, #[doc(alias = "POPPLER_BACKEND_CAIRO")] Cairo, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for Backend { type GlibType = ffi::PopplerBackend; #[inline] fn into_glib(self) -> ffi::PopplerBackend { match self { Self::Unknown => ffi::POPPLER_BACKEND_UNKNOWN, Self::Splash => ffi::POPPLER_BACKEND_SPLASH, Self::Cairo => ffi::POPPLER_BACKEND_CAIRO, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for Backend { #[inline] unsafe fn from_glib(value: ffi::PopplerBackend) -> Self { match value { ffi::POPPLER_BACKEND_UNKNOWN => Self::Unknown, ffi::POPPLER_BACKEND_SPLASH => Self::Splash, ffi::POPPLER_BACKEND_CAIRO => Self::Cairo, value => Self::__Unknown(value), } } } impl StaticType for Backend { #[inline] #[doc(alias = "poppler_backend_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_backend_get_type()) } } } impl glib::HasParamSpec for Backend { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for Backend { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for Backend { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for Backend { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: Backend) -> Self { ToValue::to_value(&v) } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerCertificateStatus")] pub enum CertificateStatus { #[doc(alias = "POPPLER_CERTIFICATE_TRUSTED")] Trusted, #[doc(alias = "POPPLER_CERTIFICATE_UNTRUSTED_ISSUER")] UntrustedIssuer, #[doc(alias = "POPPLER_CERTIFICATE_UNKNOWN_ISSUER")] UnknownIssuer, #[doc(alias = "POPPLER_CERTIFICATE_REVOKED")] Revoked, #[doc(alias = "POPPLER_CERTIFICATE_EXPIRED")] Expired, #[doc(alias = "POPPLER_CERTIFICATE_GENERIC_ERROR")] GenericError, #[doc(alias = "POPPLER_CERTIFICATE_NOT_VERIFIED")] NotVerified, #[doc(hidden)] __Unknown(i32), } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[doc(hidden)] impl IntoGlib for CertificateStatus { type GlibType = ffi::PopplerCertificateStatus; #[inline] fn into_glib(self) -> ffi::PopplerCertificateStatus { match self { Self::Trusted => ffi::POPPLER_CERTIFICATE_TRUSTED, Self::UntrustedIssuer => ffi::POPPLER_CERTIFICATE_UNTRUSTED_ISSUER, Self::UnknownIssuer => ffi::POPPLER_CERTIFICATE_UNKNOWN_ISSUER, Self::Revoked => ffi::POPPLER_CERTIFICATE_REVOKED, Self::Expired => ffi::POPPLER_CERTIFICATE_EXPIRED, Self::GenericError => ffi::POPPLER_CERTIFICATE_GENERIC_ERROR, Self::NotVerified => ffi::POPPLER_CERTIFICATE_NOT_VERIFIED, Self::__Unknown(value) => value, } } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[doc(hidden)] impl FromGlib for CertificateStatus { #[inline] unsafe fn from_glib(value: ffi::PopplerCertificateStatus) -> Self { match value { ffi::POPPLER_CERTIFICATE_TRUSTED => Self::Trusted, ffi::POPPLER_CERTIFICATE_UNTRUSTED_ISSUER => Self::UntrustedIssuer, ffi::POPPLER_CERTIFICATE_UNKNOWN_ISSUER => Self::UnknownIssuer, ffi::POPPLER_CERTIFICATE_REVOKED => Self::Revoked, ffi::POPPLER_CERTIFICATE_EXPIRED => Self::Expired, ffi::POPPLER_CERTIFICATE_GENERIC_ERROR => Self::GenericError, ffi::POPPLER_CERTIFICATE_NOT_VERIFIED => Self::NotVerified, value => Self::__Unknown(value), } } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl StaticType for CertificateStatus { #[inline] #[doc(alias = "poppler_certificate_status_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_certificate_status_get_type()) } } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl glib::HasParamSpec for CertificateStatus { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl glib::value::ValueType for CertificateStatus { type Type = Self; } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] unsafe impl<'a> glib::value::FromValue<'a> for CertificateStatus { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl ToValue for CertificateStatus { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl From for glib::Value { #[inline] fn from(v: CertificateStatus) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerDestType")] pub enum DestType { #[doc(alias = "POPPLER_DEST_UNKNOWN")] Unknown, #[doc(alias = "POPPLER_DEST_XYZ")] Xyz, #[doc(alias = "POPPLER_DEST_FIT")] Fit, #[doc(alias = "POPPLER_DEST_FITH")] Fith, #[doc(alias = "POPPLER_DEST_FITV")] Fitv, #[doc(alias = "POPPLER_DEST_FITR")] Fitr, #[doc(alias = "POPPLER_DEST_FITB")] Fitb, #[doc(alias = "POPPLER_DEST_FITBH")] Fitbh, #[doc(alias = "POPPLER_DEST_FITBV")] Fitbv, #[doc(alias = "POPPLER_DEST_NAMED")] Named, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for DestType { type GlibType = ffi::PopplerDestType; #[inline] fn into_glib(self) -> ffi::PopplerDestType { match self { Self::Unknown => ffi::POPPLER_DEST_UNKNOWN, Self::Xyz => ffi::POPPLER_DEST_XYZ, Self::Fit => ffi::POPPLER_DEST_FIT, Self::Fith => ffi::POPPLER_DEST_FITH, Self::Fitv => ffi::POPPLER_DEST_FITV, Self::Fitr => ffi::POPPLER_DEST_FITR, Self::Fitb => ffi::POPPLER_DEST_FITB, Self::Fitbh => ffi::POPPLER_DEST_FITBH, Self::Fitbv => ffi::POPPLER_DEST_FITBV, Self::Named => ffi::POPPLER_DEST_NAMED, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for DestType { #[inline] unsafe fn from_glib(value: ffi::PopplerDestType) -> Self { match value { ffi::POPPLER_DEST_UNKNOWN => Self::Unknown, ffi::POPPLER_DEST_XYZ => Self::Xyz, ffi::POPPLER_DEST_FIT => Self::Fit, ffi::POPPLER_DEST_FITH => Self::Fith, ffi::POPPLER_DEST_FITV => Self::Fitv, ffi::POPPLER_DEST_FITR => Self::Fitr, ffi::POPPLER_DEST_FITB => Self::Fitb, ffi::POPPLER_DEST_FITBH => Self::Fitbh, ffi::POPPLER_DEST_FITBV => Self::Fitbv, ffi::POPPLER_DEST_NAMED => Self::Named, value => Self::__Unknown(value), } } } impl StaticType for DestType { #[inline] #[doc(alias = "poppler_dest_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_dest_type_get_type()) } } } impl glib::HasParamSpec for DestType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for DestType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for DestType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for DestType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: DestType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerError")] pub enum Error { #[doc(alias = "POPPLER_ERROR_INVALID")] Invalid, #[doc(alias = "POPPLER_ERROR_ENCRYPTED")] Encrypted, #[doc(alias = "POPPLER_ERROR_OPEN_FILE")] OpenFile, #[doc(alias = "POPPLER_ERROR_BAD_CATALOG")] BadCatalog, #[doc(alias = "POPPLER_ERROR_DAMAGED")] Damaged, #[cfg(feature = "v23_7")] #[cfg_attr(docsrs, doc(cfg(feature = "v23_7")))] #[doc(alias = "POPPLER_ERROR_SIGNING")] Signing, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for Error { type GlibType = ffi::PopplerError; #[inline] fn into_glib(self) -> ffi::PopplerError { match self { Self::Invalid => ffi::POPPLER_ERROR_INVALID, Self::Encrypted => ffi::POPPLER_ERROR_ENCRYPTED, Self::OpenFile => ffi::POPPLER_ERROR_OPEN_FILE, Self::BadCatalog => ffi::POPPLER_ERROR_BAD_CATALOG, Self::Damaged => ffi::POPPLER_ERROR_DAMAGED, #[cfg(feature = "v23_7")] Self::Signing => ffi::POPPLER_ERROR_SIGNING, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for Error { #[inline] unsafe fn from_glib(value: ffi::PopplerError) -> Self { match value { ffi::POPPLER_ERROR_INVALID => Self::Invalid, ffi::POPPLER_ERROR_ENCRYPTED => Self::Encrypted, ffi::POPPLER_ERROR_OPEN_FILE => Self::OpenFile, ffi::POPPLER_ERROR_BAD_CATALOG => Self::BadCatalog, ffi::POPPLER_ERROR_DAMAGED => Self::Damaged, #[cfg(feature = "v23_7")] ffi::POPPLER_ERROR_SIGNING => Self::Signing, value => Self::__Unknown(value), } } } impl glib::error::ErrorDomain for Error { #[inline] fn domain() -> glib::Quark { unsafe { from_glib(ffi::poppler_error_quark()) } } #[inline] fn code(self) -> i32 { self.into_glib() } #[inline] #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { match unsafe { from_glib(code) } { value => Some(value), } } } impl StaticType for Error { #[inline] #[doc(alias = "poppler_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_error_get_type()) } } } impl glib::HasParamSpec for Error { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for Error { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for Error { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for Error { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: Error) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerFontType")] pub enum FontType { #[doc(alias = "POPPLER_FONT_TYPE_UNKNOWN")] Unknown, #[doc(alias = "POPPLER_FONT_TYPE_TYPE1")] Type1, #[doc(alias = "POPPLER_FONT_TYPE_TYPE1C")] Type1c, #[doc(alias = "POPPLER_FONT_TYPE_TYPE1COT")] Type1cot, #[doc(alias = "POPPLER_FONT_TYPE_TYPE3")] Type3, #[doc(alias = "POPPLER_FONT_TYPE_TRUETYPE")] Truetype, #[doc(alias = "POPPLER_FONT_TYPE_TRUETYPEOT")] Truetypeot, #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE0")] CidType0, #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE0C")] CidType0c, #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE0COT")] CidType0cot, #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE2")] CidType2, #[doc(alias = "POPPLER_FONT_TYPE_CID_TYPE2OT")] CidType2ot, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for FontType { type GlibType = ffi::PopplerFontType; #[inline] fn into_glib(self) -> ffi::PopplerFontType { match self { Self::Unknown => ffi::POPPLER_FONT_TYPE_UNKNOWN, Self::Type1 => ffi::POPPLER_FONT_TYPE_TYPE1, Self::Type1c => ffi::POPPLER_FONT_TYPE_TYPE1C, Self::Type1cot => ffi::POPPLER_FONT_TYPE_TYPE1COT, Self::Type3 => ffi::POPPLER_FONT_TYPE_TYPE3, Self::Truetype => ffi::POPPLER_FONT_TYPE_TRUETYPE, Self::Truetypeot => ffi::POPPLER_FONT_TYPE_TRUETYPEOT, Self::CidType0 => ffi::POPPLER_FONT_TYPE_CID_TYPE0, Self::CidType0c => ffi::POPPLER_FONT_TYPE_CID_TYPE0C, Self::CidType0cot => ffi::POPPLER_FONT_TYPE_CID_TYPE0COT, Self::CidType2 => ffi::POPPLER_FONT_TYPE_CID_TYPE2, Self::CidType2ot => ffi::POPPLER_FONT_TYPE_CID_TYPE2OT, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for FontType { #[inline] unsafe fn from_glib(value: ffi::PopplerFontType) -> Self { match value { ffi::POPPLER_FONT_TYPE_UNKNOWN => Self::Unknown, ffi::POPPLER_FONT_TYPE_TYPE1 => Self::Type1, ffi::POPPLER_FONT_TYPE_TYPE1C => Self::Type1c, ffi::POPPLER_FONT_TYPE_TYPE1COT => Self::Type1cot, ffi::POPPLER_FONT_TYPE_TYPE3 => Self::Type3, ffi::POPPLER_FONT_TYPE_TRUETYPE => Self::Truetype, ffi::POPPLER_FONT_TYPE_TRUETYPEOT => Self::Truetypeot, ffi::POPPLER_FONT_TYPE_CID_TYPE0 => Self::CidType0, ffi::POPPLER_FONT_TYPE_CID_TYPE0C => Self::CidType0c, ffi::POPPLER_FONT_TYPE_CID_TYPE0COT => Self::CidType0cot, ffi::POPPLER_FONT_TYPE_CID_TYPE2 => Self::CidType2, ffi::POPPLER_FONT_TYPE_CID_TYPE2OT => Self::CidType2ot, value => Self::__Unknown(value), } } } impl StaticType for FontType { #[inline] #[doc(alias = "poppler_font_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_font_type_get_type()) } } } impl glib::HasParamSpec for FontType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for FontType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for FontType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for FontType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: FontType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerFormButtonType")] pub enum FormButtonType { #[doc(alias = "POPPLER_FORM_BUTTON_PUSH")] Push, #[doc(alias = "POPPLER_FORM_BUTTON_CHECK")] Check, #[doc(alias = "POPPLER_FORM_BUTTON_RADIO")] Radio, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for FormButtonType { type GlibType = ffi::PopplerFormButtonType; #[inline] fn into_glib(self) -> ffi::PopplerFormButtonType { match self { Self::Push => ffi::POPPLER_FORM_BUTTON_PUSH, Self::Check => ffi::POPPLER_FORM_BUTTON_CHECK, Self::Radio => ffi::POPPLER_FORM_BUTTON_RADIO, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for FormButtonType { #[inline] unsafe fn from_glib(value: ffi::PopplerFormButtonType) -> Self { match value { ffi::POPPLER_FORM_BUTTON_PUSH => Self::Push, ffi::POPPLER_FORM_BUTTON_CHECK => Self::Check, ffi::POPPLER_FORM_BUTTON_RADIO => Self::Radio, value => Self::__Unknown(value), } } } impl StaticType for FormButtonType { #[inline] #[doc(alias = "poppler_form_button_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_form_button_type_get_type()) } } } impl glib::HasParamSpec for FormButtonType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for FormButtonType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for FormButtonType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for FormButtonType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: FormButtonType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerFormChoiceType")] pub enum FormChoiceType { #[doc(alias = "POPPLER_FORM_CHOICE_COMBO")] Combo, #[doc(alias = "POPPLER_FORM_CHOICE_LIST")] List, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for FormChoiceType { type GlibType = ffi::PopplerFormChoiceType; #[inline] fn into_glib(self) -> ffi::PopplerFormChoiceType { match self { Self::Combo => ffi::POPPLER_FORM_CHOICE_COMBO, Self::List => ffi::POPPLER_FORM_CHOICE_LIST, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for FormChoiceType { #[inline] unsafe fn from_glib(value: ffi::PopplerFormChoiceType) -> Self { match value { ffi::POPPLER_FORM_CHOICE_COMBO => Self::Combo, ffi::POPPLER_FORM_CHOICE_LIST => Self::List, value => Self::__Unknown(value), } } } impl StaticType for FormChoiceType { #[inline] #[doc(alias = "poppler_form_choice_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_form_choice_type_get_type()) } } } impl glib::HasParamSpec for FormChoiceType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for FormChoiceType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for FormChoiceType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for FormChoiceType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: FormChoiceType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerFormFieldType")] pub enum FormFieldType { #[doc(alias = "POPPLER_FORM_FIELD_UNKNOWN")] Unknown, #[doc(alias = "POPPLER_FORM_FIELD_BUTTON")] Button, #[doc(alias = "POPPLER_FORM_FIELD_TEXT")] Text, #[doc(alias = "POPPLER_FORM_FIELD_CHOICE")] Choice, #[doc(alias = "POPPLER_FORM_FIELD_SIGNATURE")] Signature, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for FormFieldType { type GlibType = ffi::PopplerFormFieldType; #[inline] fn into_glib(self) -> ffi::PopplerFormFieldType { match self { Self::Unknown => ffi::POPPLER_FORM_FIELD_UNKNOWN, Self::Button => ffi::POPPLER_FORM_FIELD_BUTTON, Self::Text => ffi::POPPLER_FORM_FIELD_TEXT, Self::Choice => ffi::POPPLER_FORM_FIELD_CHOICE, Self::Signature => ffi::POPPLER_FORM_FIELD_SIGNATURE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for FormFieldType { #[inline] unsafe fn from_glib(value: ffi::PopplerFormFieldType) -> Self { match value { ffi::POPPLER_FORM_FIELD_UNKNOWN => Self::Unknown, ffi::POPPLER_FORM_FIELD_BUTTON => Self::Button, ffi::POPPLER_FORM_FIELD_TEXT => Self::Text, ffi::POPPLER_FORM_FIELD_CHOICE => Self::Choice, ffi::POPPLER_FORM_FIELD_SIGNATURE => Self::Signature, value => Self::__Unknown(value), } } } impl StaticType for FormFieldType { #[inline] #[doc(alias = "poppler_form_field_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_form_field_type_get_type()) } } } impl glib::HasParamSpec for FormFieldType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for FormFieldType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for FormFieldType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for FormFieldType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: FormFieldType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerFormTextType")] pub enum FormTextType { #[doc(alias = "POPPLER_FORM_TEXT_NORMAL")] Normal, #[doc(alias = "POPPLER_FORM_TEXT_MULTILINE")] Multiline, #[doc(alias = "POPPLER_FORM_TEXT_FILE_SELECT")] FileSelect, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for FormTextType { type GlibType = ffi::PopplerFormTextType; #[inline] fn into_glib(self) -> ffi::PopplerFormTextType { match self { Self::Normal => ffi::POPPLER_FORM_TEXT_NORMAL, Self::Multiline => ffi::POPPLER_FORM_TEXT_MULTILINE, Self::FileSelect => ffi::POPPLER_FORM_TEXT_FILE_SELECT, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for FormTextType { #[inline] unsafe fn from_glib(value: ffi::PopplerFormTextType) -> Self { match value { ffi::POPPLER_FORM_TEXT_NORMAL => Self::Normal, ffi::POPPLER_FORM_TEXT_MULTILINE => Self::Multiline, ffi::POPPLER_FORM_TEXT_FILE_SELECT => Self::FileSelect, value => Self::__Unknown(value), } } } impl StaticType for FormTextType { #[inline] #[doc(alias = "poppler_form_text_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_form_text_type_get_type()) } } } impl glib::HasParamSpec for FormTextType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for FormTextType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for FormTextType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for FormTextType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: FormTextType) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerMoviePlayMode")] pub enum MoviePlayMode { #[doc(alias = "POPPLER_MOVIE_PLAY_MODE_ONCE")] Once, #[doc(alias = "POPPLER_MOVIE_PLAY_MODE_OPEN")] Open, #[doc(alias = "POPPLER_MOVIE_PLAY_MODE_REPEAT")] Repeat, #[doc(alias = "POPPLER_MOVIE_PLAY_MODE_PALINDROME")] Palindrome, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for MoviePlayMode { type GlibType = ffi::PopplerMoviePlayMode; #[inline] fn into_glib(self) -> ffi::PopplerMoviePlayMode { match self { Self::Once => ffi::POPPLER_MOVIE_PLAY_MODE_ONCE, Self::Open => ffi::POPPLER_MOVIE_PLAY_MODE_OPEN, Self::Repeat => ffi::POPPLER_MOVIE_PLAY_MODE_REPEAT, Self::Palindrome => ffi::POPPLER_MOVIE_PLAY_MODE_PALINDROME, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for MoviePlayMode { #[inline] unsafe fn from_glib(value: ffi::PopplerMoviePlayMode) -> Self { match value { ffi::POPPLER_MOVIE_PLAY_MODE_ONCE => Self::Once, ffi::POPPLER_MOVIE_PLAY_MODE_OPEN => Self::Open, ffi::POPPLER_MOVIE_PLAY_MODE_REPEAT => Self::Repeat, ffi::POPPLER_MOVIE_PLAY_MODE_PALINDROME => Self::Palindrome, value => Self::__Unknown(value), } } } impl StaticType for MoviePlayMode { #[inline] #[doc(alias = "poppler_movie_play_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_movie_play_mode_get_type()) } } } impl glib::HasParamSpec for MoviePlayMode { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for MoviePlayMode { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for MoviePlayMode { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for MoviePlayMode { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: MoviePlayMode) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPDFConformance")] pub enum PDFConformance { #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_UNSET")] Unset, #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_A")] A, #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_B")] B, #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_G")] G, #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_N")] N, #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_P")] P, #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_PG")] Pg, #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_U")] U, #[doc(alias = "POPPLER_PDF_SUBTYPE_CONF_NONE")] None, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for PDFConformance { type GlibType = ffi::PopplerPDFConformance; #[inline] fn into_glib(self) -> ffi::PopplerPDFConformance { match self { Self::Unset => ffi::POPPLER_PDF_SUBTYPE_CONF_UNSET, Self::A => ffi::POPPLER_PDF_SUBTYPE_CONF_A, Self::B => ffi::POPPLER_PDF_SUBTYPE_CONF_B, Self::G => ffi::POPPLER_PDF_SUBTYPE_CONF_G, Self::N => ffi::POPPLER_PDF_SUBTYPE_CONF_N, Self::P => ffi::POPPLER_PDF_SUBTYPE_CONF_P, Self::Pg => ffi::POPPLER_PDF_SUBTYPE_CONF_PG, Self::U => ffi::POPPLER_PDF_SUBTYPE_CONF_U, Self::None => ffi::POPPLER_PDF_SUBTYPE_CONF_NONE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PDFConformance { #[inline] unsafe fn from_glib(value: ffi::PopplerPDFConformance) -> Self { match value { ffi::POPPLER_PDF_SUBTYPE_CONF_UNSET => Self::Unset, ffi::POPPLER_PDF_SUBTYPE_CONF_A => Self::A, ffi::POPPLER_PDF_SUBTYPE_CONF_B => Self::B, ffi::POPPLER_PDF_SUBTYPE_CONF_G => Self::G, ffi::POPPLER_PDF_SUBTYPE_CONF_N => Self::N, ffi::POPPLER_PDF_SUBTYPE_CONF_P => Self::P, ffi::POPPLER_PDF_SUBTYPE_CONF_PG => Self::Pg, ffi::POPPLER_PDF_SUBTYPE_CONF_U => Self::U, ffi::POPPLER_PDF_SUBTYPE_CONF_NONE => Self::None, value => Self::__Unknown(value), } } } impl StaticType for PDFConformance { #[inline] #[doc(alias = "poppler_pdf_conformance_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_pdf_conformance_get_type()) } } } impl glib::HasParamSpec for PDFConformance { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for PDFConformance { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for PDFConformance { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for PDFConformance { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: PDFConformance) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPDFPart")] pub enum PDFPart { #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_UNSET")] Unset, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_1")] _1, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_2")] _2, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_3")] _3, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_4")] _4, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_5")] _5, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_6")] _6, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_7")] _7, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_8")] _8, #[doc(alias = "POPPLER_PDF_SUBTYPE_PART_NONE")] None, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for PDFPart { type GlibType = ffi::PopplerPDFPart; #[inline] fn into_glib(self) -> ffi::PopplerPDFPart { match self { Self::Unset => ffi::POPPLER_PDF_SUBTYPE_PART_UNSET, Self::_1 => ffi::POPPLER_PDF_SUBTYPE_PART_1, Self::_2 => ffi::POPPLER_PDF_SUBTYPE_PART_2, Self::_3 => ffi::POPPLER_PDF_SUBTYPE_PART_3, Self::_4 => ffi::POPPLER_PDF_SUBTYPE_PART_4, Self::_5 => ffi::POPPLER_PDF_SUBTYPE_PART_5, Self::_6 => ffi::POPPLER_PDF_SUBTYPE_PART_6, Self::_7 => ffi::POPPLER_PDF_SUBTYPE_PART_7, Self::_8 => ffi::POPPLER_PDF_SUBTYPE_PART_8, Self::None => ffi::POPPLER_PDF_SUBTYPE_PART_NONE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PDFPart { #[inline] unsafe fn from_glib(value: ffi::PopplerPDFPart) -> Self { match value { ffi::POPPLER_PDF_SUBTYPE_PART_UNSET => Self::Unset, ffi::POPPLER_PDF_SUBTYPE_PART_1 => Self::_1, ffi::POPPLER_PDF_SUBTYPE_PART_2 => Self::_2, ffi::POPPLER_PDF_SUBTYPE_PART_3 => Self::_3, ffi::POPPLER_PDF_SUBTYPE_PART_4 => Self::_4, ffi::POPPLER_PDF_SUBTYPE_PART_5 => Self::_5, ffi::POPPLER_PDF_SUBTYPE_PART_6 => Self::_6, ffi::POPPLER_PDF_SUBTYPE_PART_7 => Self::_7, ffi::POPPLER_PDF_SUBTYPE_PART_8 => Self::_8, ffi::POPPLER_PDF_SUBTYPE_PART_NONE => Self::None, value => Self::__Unknown(value), } } } impl StaticType for PDFPart { #[inline] #[doc(alias = "poppler_pdf_part_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_pdf_part_get_type()) } } } impl glib::HasParamSpec for PDFPart { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for PDFPart { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for PDFPart { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for PDFPart { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: PDFPart) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPDFSubtype")] pub enum PDFSubtype { #[doc(alias = "POPPLER_PDF_SUBTYPE_UNSET")] Unset, #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_A")] PdfA, #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_E")] PdfE, #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_UA")] PdfUa, #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_VT")] PdfVt, #[doc(alias = "POPPLER_PDF_SUBTYPE_PDF_X")] PdfX, #[doc(alias = "POPPLER_PDF_SUBTYPE_NONE")] None, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for PDFSubtype { type GlibType = ffi::PopplerPDFSubtype; #[inline] fn into_glib(self) -> ffi::PopplerPDFSubtype { match self { Self::Unset => ffi::POPPLER_PDF_SUBTYPE_UNSET, Self::PdfA => ffi::POPPLER_PDF_SUBTYPE_PDF_A, Self::PdfE => ffi::POPPLER_PDF_SUBTYPE_PDF_E, Self::PdfUa => ffi::POPPLER_PDF_SUBTYPE_PDF_UA, Self::PdfVt => ffi::POPPLER_PDF_SUBTYPE_PDF_VT, Self::PdfX => ffi::POPPLER_PDF_SUBTYPE_PDF_X, Self::None => ffi::POPPLER_PDF_SUBTYPE_NONE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PDFSubtype { #[inline] unsafe fn from_glib(value: ffi::PopplerPDFSubtype) -> Self { match value { ffi::POPPLER_PDF_SUBTYPE_UNSET => Self::Unset, ffi::POPPLER_PDF_SUBTYPE_PDF_A => Self::PdfA, ffi::POPPLER_PDF_SUBTYPE_PDF_E => Self::PdfE, ffi::POPPLER_PDF_SUBTYPE_PDF_UA => Self::PdfUa, ffi::POPPLER_PDF_SUBTYPE_PDF_VT => Self::PdfVt, ffi::POPPLER_PDF_SUBTYPE_PDF_X => Self::PdfX, ffi::POPPLER_PDF_SUBTYPE_NONE => Self::None, value => Self::__Unknown(value), } } } impl StaticType for PDFSubtype { #[inline] #[doc(alias = "poppler_pdf_subtype_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_pdf_subtype_get_type()) } } } impl glib::HasParamSpec for PDFSubtype { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for PDFSubtype { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for PDFSubtype { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for PDFSubtype { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: PDFSubtype) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPageLayout")] pub enum PageLayout { #[doc(alias = "POPPLER_PAGE_LAYOUT_UNSET")] Unset, #[doc(alias = "POPPLER_PAGE_LAYOUT_SINGLE_PAGE")] SinglePage, #[doc(alias = "POPPLER_PAGE_LAYOUT_ONE_COLUMN")] OneColumn, #[doc(alias = "POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT")] TwoColumnLeft, #[doc(alias = "POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT")] TwoColumnRight, #[doc(alias = "POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT")] TwoPageLeft, #[doc(alias = "POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT")] TwoPageRight, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for PageLayout { type GlibType = ffi::PopplerPageLayout; #[inline] fn into_glib(self) -> ffi::PopplerPageLayout { match self { Self::Unset => ffi::POPPLER_PAGE_LAYOUT_UNSET, Self::SinglePage => ffi::POPPLER_PAGE_LAYOUT_SINGLE_PAGE, Self::OneColumn => ffi::POPPLER_PAGE_LAYOUT_ONE_COLUMN, Self::TwoColumnLeft => ffi::POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT, Self::TwoColumnRight => ffi::POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT, Self::TwoPageLeft => ffi::POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT, Self::TwoPageRight => ffi::POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PageLayout { #[inline] unsafe fn from_glib(value: ffi::PopplerPageLayout) -> Self { match value { ffi::POPPLER_PAGE_LAYOUT_UNSET => Self::Unset, ffi::POPPLER_PAGE_LAYOUT_SINGLE_PAGE => Self::SinglePage, ffi::POPPLER_PAGE_LAYOUT_ONE_COLUMN => Self::OneColumn, ffi::POPPLER_PAGE_LAYOUT_TWO_COLUMN_LEFT => Self::TwoColumnLeft, ffi::POPPLER_PAGE_LAYOUT_TWO_COLUMN_RIGHT => Self::TwoColumnRight, ffi::POPPLER_PAGE_LAYOUT_TWO_PAGE_LEFT => Self::TwoPageLeft, ffi::POPPLER_PAGE_LAYOUT_TWO_PAGE_RIGHT => Self::TwoPageRight, value => Self::__Unknown(value), } } } impl StaticType for PageLayout { #[inline] #[doc(alias = "poppler_page_layout_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_page_layout_get_type()) } } } impl glib::HasParamSpec for PageLayout { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for PageLayout { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for PageLayout { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for PageLayout { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: PageLayout) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPageMode")] pub enum PageMode { #[doc(alias = "POPPLER_PAGE_MODE_UNSET")] Unset, #[doc(alias = "POPPLER_PAGE_MODE_NONE")] None, #[doc(alias = "POPPLER_PAGE_MODE_USE_OUTLINES")] UseOutlines, #[doc(alias = "POPPLER_PAGE_MODE_USE_THUMBS")] UseThumbs, #[doc(alias = "POPPLER_PAGE_MODE_FULL_SCREEN")] FullScreen, #[doc(alias = "POPPLER_PAGE_MODE_USE_OC")] UseOc, #[doc(alias = "POPPLER_PAGE_MODE_USE_ATTACHMENTS")] UseAttachments, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for PageMode { type GlibType = ffi::PopplerPageMode; #[inline] fn into_glib(self) -> ffi::PopplerPageMode { match self { Self::Unset => ffi::POPPLER_PAGE_MODE_UNSET, Self::None => ffi::POPPLER_PAGE_MODE_NONE, Self::UseOutlines => ffi::POPPLER_PAGE_MODE_USE_OUTLINES, Self::UseThumbs => ffi::POPPLER_PAGE_MODE_USE_THUMBS, Self::FullScreen => ffi::POPPLER_PAGE_MODE_FULL_SCREEN, Self::UseOc => ffi::POPPLER_PAGE_MODE_USE_OC, Self::UseAttachments => ffi::POPPLER_PAGE_MODE_USE_ATTACHMENTS, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PageMode { #[inline] unsafe fn from_glib(value: ffi::PopplerPageMode) -> Self { match value { ffi::POPPLER_PAGE_MODE_UNSET => Self::Unset, ffi::POPPLER_PAGE_MODE_NONE => Self::None, ffi::POPPLER_PAGE_MODE_USE_OUTLINES => Self::UseOutlines, ffi::POPPLER_PAGE_MODE_USE_THUMBS => Self::UseThumbs, ffi::POPPLER_PAGE_MODE_FULL_SCREEN => Self::FullScreen, ffi::POPPLER_PAGE_MODE_USE_OC => Self::UseOc, ffi::POPPLER_PAGE_MODE_USE_ATTACHMENTS => Self::UseAttachments, value => Self::__Unknown(value), } } } impl StaticType for PageMode { #[inline] #[doc(alias = "poppler_page_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_page_mode_get_type()) } } } impl glib::HasParamSpec for PageMode { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for PageMode { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for PageMode { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for PageMode { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: PageMode) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPageTransitionAlignment")] pub enum PageTransitionAlignment { #[doc(alias = "POPPLER_PAGE_TRANSITION_HORIZONTAL")] Horizontal, #[doc(alias = "POPPLER_PAGE_TRANSITION_VERTICAL")] Vertical, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for PageTransitionAlignment { type GlibType = ffi::PopplerPageTransitionAlignment; #[inline] fn into_glib(self) -> ffi::PopplerPageTransitionAlignment { match self { Self::Horizontal => ffi::POPPLER_PAGE_TRANSITION_HORIZONTAL, Self::Vertical => ffi::POPPLER_PAGE_TRANSITION_VERTICAL, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PageTransitionAlignment { #[inline] unsafe fn from_glib(value: ffi::PopplerPageTransitionAlignment) -> Self { match value { ffi::POPPLER_PAGE_TRANSITION_HORIZONTAL => Self::Horizontal, ffi::POPPLER_PAGE_TRANSITION_VERTICAL => Self::Vertical, value => Self::__Unknown(value), } } } impl StaticType for PageTransitionAlignment { #[inline] #[doc(alias = "poppler_page_transition_alignment_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_page_transition_alignment_get_type()) } } } impl glib::HasParamSpec for PageTransitionAlignment { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for PageTransitionAlignment { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for PageTransitionAlignment { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for PageTransitionAlignment { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: PageTransitionAlignment) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPageTransitionDirection")] pub enum PageTransitionDirection { #[doc(alias = "POPPLER_PAGE_TRANSITION_INWARD")] Inward, #[doc(alias = "POPPLER_PAGE_TRANSITION_OUTWARD")] Outward, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for PageTransitionDirection { type GlibType = ffi::PopplerPageTransitionDirection; #[inline] fn into_glib(self) -> ffi::PopplerPageTransitionDirection { match self { Self::Inward => ffi::POPPLER_PAGE_TRANSITION_INWARD, Self::Outward => ffi::POPPLER_PAGE_TRANSITION_OUTWARD, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PageTransitionDirection { #[inline] unsafe fn from_glib(value: ffi::PopplerPageTransitionDirection) -> Self { match value { ffi::POPPLER_PAGE_TRANSITION_INWARD => Self::Inward, ffi::POPPLER_PAGE_TRANSITION_OUTWARD => Self::Outward, value => Self::__Unknown(value), } } } impl StaticType for PageTransitionDirection { #[inline] #[doc(alias = "poppler_page_transition_direction_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_page_transition_direction_get_type()) } } } impl glib::HasParamSpec for PageTransitionDirection { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for PageTransitionDirection { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for PageTransitionDirection { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for PageTransitionDirection { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: PageTransitionDirection) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPageTransitionType")] pub enum PageTransitionType { #[doc(alias = "POPPLER_PAGE_TRANSITION_REPLACE")] Replace, #[doc(alias = "POPPLER_PAGE_TRANSITION_SPLIT")] Split, #[doc(alias = "POPPLER_PAGE_TRANSITION_BLINDS")] Blinds, #[doc(alias = "POPPLER_PAGE_TRANSITION_BOX")] Box, #[doc(alias = "POPPLER_PAGE_TRANSITION_WIPE")] Wipe, #[doc(alias = "POPPLER_PAGE_TRANSITION_DISSOLVE")] Dissolve, #[doc(alias = "POPPLER_PAGE_TRANSITION_GLITTER")] Glitter, #[doc(alias = "POPPLER_PAGE_TRANSITION_FLY")] Fly, #[doc(alias = "POPPLER_PAGE_TRANSITION_PUSH")] Push, #[doc(alias = "POPPLER_PAGE_TRANSITION_COVER")] Cover, #[doc(alias = "POPPLER_PAGE_TRANSITION_UNCOVER")] Uncover, #[doc(alias = "POPPLER_PAGE_TRANSITION_FADE")] Fade, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for PageTransitionType { type GlibType = ffi::PopplerPageTransitionType; #[inline] fn into_glib(self) -> ffi::PopplerPageTransitionType { match self { Self::Replace => ffi::POPPLER_PAGE_TRANSITION_REPLACE, Self::Split => ffi::POPPLER_PAGE_TRANSITION_SPLIT, Self::Blinds => ffi::POPPLER_PAGE_TRANSITION_BLINDS, Self::Box => ffi::POPPLER_PAGE_TRANSITION_BOX, Self::Wipe => ffi::POPPLER_PAGE_TRANSITION_WIPE, Self::Dissolve => ffi::POPPLER_PAGE_TRANSITION_DISSOLVE, Self::Glitter => ffi::POPPLER_PAGE_TRANSITION_GLITTER, Self::Fly => ffi::POPPLER_PAGE_TRANSITION_FLY, Self::Push => ffi::POPPLER_PAGE_TRANSITION_PUSH, Self::Cover => ffi::POPPLER_PAGE_TRANSITION_COVER, Self::Uncover => ffi::POPPLER_PAGE_TRANSITION_UNCOVER, Self::Fade => ffi::POPPLER_PAGE_TRANSITION_FADE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PageTransitionType { #[inline] unsafe fn from_glib(value: ffi::PopplerPageTransitionType) -> Self { match value { ffi::POPPLER_PAGE_TRANSITION_REPLACE => Self::Replace, ffi::POPPLER_PAGE_TRANSITION_SPLIT => Self::Split, ffi::POPPLER_PAGE_TRANSITION_BLINDS => Self::Blinds, ffi::POPPLER_PAGE_TRANSITION_BOX => Self::Box, ffi::POPPLER_PAGE_TRANSITION_WIPE => Self::Wipe, ffi::POPPLER_PAGE_TRANSITION_DISSOLVE => Self::Dissolve, ffi::POPPLER_PAGE_TRANSITION_GLITTER => Self::Glitter, ffi::POPPLER_PAGE_TRANSITION_FLY => Self::Fly, ffi::POPPLER_PAGE_TRANSITION_PUSH => Self::Push, ffi::POPPLER_PAGE_TRANSITION_COVER => Self::Cover, ffi::POPPLER_PAGE_TRANSITION_UNCOVER => Self::Uncover, ffi::POPPLER_PAGE_TRANSITION_FADE => Self::Fade, value => Self::__Unknown(value), } } } impl StaticType for PageTransitionType { #[inline] #[doc(alias = "poppler_page_transition_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_page_transition_type_get_type()) } } } impl glib::HasParamSpec for PageTransitionType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for PageTransitionType { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for PageTransitionType { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for PageTransitionType { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: PageTransitionType) -> Self { ToValue::to_value(&v) } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPrintDuplex")] pub enum PrintDuplex { #[doc(alias = "POPPLER_PRINT_DUPLEX_NONE")] None, #[doc(alias = "POPPLER_PRINT_DUPLEX_SIMPLEX")] Simplex, #[doc(alias = "POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE")] DuplexFlipShortEdge, #[doc(alias = "POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE")] DuplexFlipLongEdge, #[doc(hidden)] __Unknown(i32), } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] #[doc(hidden)] impl IntoGlib for PrintDuplex { type GlibType = ffi::PopplerPrintDuplex; #[inline] fn into_glib(self) -> ffi::PopplerPrintDuplex { match self { Self::None => ffi::POPPLER_PRINT_DUPLEX_NONE, Self::Simplex => ffi::POPPLER_PRINT_DUPLEX_SIMPLEX, Self::DuplexFlipShortEdge => ffi::POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE, Self::DuplexFlipLongEdge => ffi::POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE, Self::__Unknown(value) => value, } } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] #[doc(hidden)] impl FromGlib for PrintDuplex { #[inline] unsafe fn from_glib(value: ffi::PopplerPrintDuplex) -> Self { match value { ffi::POPPLER_PRINT_DUPLEX_NONE => Self::None, ffi::POPPLER_PRINT_DUPLEX_SIMPLEX => Self::Simplex, ffi::POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_SHORT_EDGE => Self::DuplexFlipShortEdge, ffi::POPPLER_PRINT_DUPLEX_DUPLEX_FLIP_LONG_EDGE => Self::DuplexFlipLongEdge, value => Self::__Unknown(value), } } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] impl StaticType for PrintDuplex { #[inline] #[doc(alias = "poppler_print_duplex_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_print_duplex_get_type()) } } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] impl glib::HasParamSpec for PrintDuplex { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] impl glib::value::ValueType for PrintDuplex { type Type = Self; } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] unsafe impl<'a> glib::value::FromValue<'a> for PrintDuplex { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] impl ToValue for PrintDuplex { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(feature = "v0_80")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_80")))] impl From for glib::Value { #[inline] fn from(v: PrintDuplex) -> Self { ToValue::to_value(&v) } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerPrintScaling")] pub enum PrintScaling { #[doc(alias = "POPPLER_PRINT_SCALING_APP_DEFAULT")] AppDefault, #[doc(alias = "POPPLER_PRINT_SCALING_NONE")] None, #[doc(hidden)] __Unknown(i32), } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] #[doc(hidden)] impl IntoGlib for PrintScaling { type GlibType = ffi::PopplerPrintScaling; #[inline] fn into_glib(self) -> ffi::PopplerPrintScaling { match self { Self::AppDefault => ffi::POPPLER_PRINT_SCALING_APP_DEFAULT, Self::None => ffi::POPPLER_PRINT_SCALING_NONE, Self::__Unknown(value) => value, } } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] #[doc(hidden)] impl FromGlib for PrintScaling { #[inline] unsafe fn from_glib(value: ffi::PopplerPrintScaling) -> Self { match value { ffi::POPPLER_PRINT_SCALING_APP_DEFAULT => Self::AppDefault, ffi::POPPLER_PRINT_SCALING_NONE => Self::None, value => Self::__Unknown(value), } } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] impl StaticType for PrintScaling { #[inline] #[doc(alias = "poppler_print_scaling_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_print_scaling_get_type()) } } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] impl glib::HasParamSpec for PrintScaling { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] impl glib::value::ValueType for PrintScaling { type Type = Self; } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] unsafe impl<'a> glib::value::FromValue<'a> for PrintScaling { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] impl ToValue for PrintScaling { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(feature = "v0_73")] #[cfg_attr(docsrs, doc(cfg(feature = "v0_73")))] impl From for glib::Value { #[inline] fn from(v: PrintScaling) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerSelectionStyle")] pub enum SelectionStyle { #[doc(alias = "POPPLER_SELECTION_GLYPH")] Glyph, #[doc(alias = "POPPLER_SELECTION_WORD")] Word, #[doc(alias = "POPPLER_SELECTION_LINE")] Line, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for SelectionStyle { type GlibType = ffi::PopplerSelectionStyle; #[inline] fn into_glib(self) -> ffi::PopplerSelectionStyle { match self { Self::Glyph => ffi::POPPLER_SELECTION_GLYPH, Self::Word => ffi::POPPLER_SELECTION_WORD, Self::Line => ffi::POPPLER_SELECTION_LINE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for SelectionStyle { #[inline] unsafe fn from_glib(value: ffi::PopplerSelectionStyle) -> Self { match value { ffi::POPPLER_SELECTION_GLYPH => Self::Glyph, ffi::POPPLER_SELECTION_WORD => Self::Word, ffi::POPPLER_SELECTION_LINE => Self::Line, value => Self::__Unknown(value), } } } impl StaticType for SelectionStyle { #[inline] #[doc(alias = "poppler_selection_style_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_selection_style_get_type()) } } } impl glib::HasParamSpec for SelectionStyle { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for SelectionStyle { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for SelectionStyle { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for SelectionStyle { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: SelectionStyle) -> Self { ToValue::to_value(&v) } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerSignatureStatus")] pub enum SignatureStatus { #[doc(alias = "POPPLER_SIGNATURE_VALID")] Valid, #[doc(alias = "POPPLER_SIGNATURE_INVALID")] Invalid, #[doc(alias = "POPPLER_SIGNATURE_DIGEST_MISMATCH")] DigestMismatch, #[doc(alias = "POPPLER_SIGNATURE_DECODING_ERROR")] DecodingError, #[doc(alias = "POPPLER_SIGNATURE_GENERIC_ERROR")] GenericError, #[doc(alias = "POPPLER_SIGNATURE_NOT_FOUND")] NotFound, #[doc(alias = "POPPLER_SIGNATURE_NOT_VERIFIED")] NotVerified, #[doc(hidden)] __Unknown(i32), } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[doc(hidden)] impl IntoGlib for SignatureStatus { type GlibType = ffi::PopplerSignatureStatus; #[inline] fn into_glib(self) -> ffi::PopplerSignatureStatus { match self { Self::Valid => ffi::POPPLER_SIGNATURE_VALID, Self::Invalid => ffi::POPPLER_SIGNATURE_INVALID, Self::DigestMismatch => ffi::POPPLER_SIGNATURE_DIGEST_MISMATCH, Self::DecodingError => ffi::POPPLER_SIGNATURE_DECODING_ERROR, Self::GenericError => ffi::POPPLER_SIGNATURE_GENERIC_ERROR, Self::NotFound => ffi::POPPLER_SIGNATURE_NOT_FOUND, Self::NotVerified => ffi::POPPLER_SIGNATURE_NOT_VERIFIED, Self::__Unknown(value) => value, } } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] #[doc(hidden)] impl FromGlib for SignatureStatus { #[inline] unsafe fn from_glib(value: ffi::PopplerSignatureStatus) -> Self { match value { ffi::POPPLER_SIGNATURE_VALID => Self::Valid, ffi::POPPLER_SIGNATURE_INVALID => Self::Invalid, ffi::POPPLER_SIGNATURE_DIGEST_MISMATCH => Self::DigestMismatch, ffi::POPPLER_SIGNATURE_DECODING_ERROR => Self::DecodingError, ffi::POPPLER_SIGNATURE_GENERIC_ERROR => Self::GenericError, ffi::POPPLER_SIGNATURE_NOT_FOUND => Self::NotFound, ffi::POPPLER_SIGNATURE_NOT_VERIFIED => Self::NotVerified, value => Self::__Unknown(value), } } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl StaticType for SignatureStatus { #[inline] #[doc(alias = "poppler_signature_status_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_signature_status_get_type()) } } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl glib::HasParamSpec for SignatureStatus { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl glib::value::ValueType for SignatureStatus { type Type = Self; } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] unsafe impl<'a> glib::value::FromValue<'a> for SignatureStatus { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl ToValue for SignatureStatus { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(feature = "v21_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v21_12")))] impl From for glib::Value { #[inline] fn from(v: SignatureStatus) -> Self { ToValue::to_value(&v) } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStretch")] pub enum Stretch { #[doc(alias = "POPPLER_STRETCH_ULTRA_CONDENSED")] UltraCondensed, #[doc(alias = "POPPLER_STRETCH_EXTRA_CONDENSED")] ExtraCondensed, #[doc(alias = "POPPLER_STRETCH_CONDENSED")] Condensed, #[doc(alias = "POPPLER_STRETCH_SEMI_CONDENSED")] SemiCondensed, #[doc(alias = "POPPLER_STRETCH_NORMAL")] Normal, #[doc(alias = "POPPLER_STRETCH_SEMI_EXPANDED")] SemiExpanded, #[doc(alias = "POPPLER_STRETCH_EXPANDED")] Expanded, #[doc(alias = "POPPLER_STRETCH_EXTRA_EXPANDED")] ExtraExpanded, #[doc(alias = "POPPLER_STRETCH_ULTRA_EXPANDED")] UltraExpanded, #[doc(hidden)] __Unknown(i32), } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(hidden)] impl IntoGlib for Stretch { type GlibType = ffi::PopplerStretch; #[inline] fn into_glib(self) -> ffi::PopplerStretch { match self { Self::UltraCondensed => ffi::POPPLER_STRETCH_ULTRA_CONDENSED, Self::ExtraCondensed => ffi::POPPLER_STRETCH_EXTRA_CONDENSED, Self::Condensed => ffi::POPPLER_STRETCH_CONDENSED, Self::SemiCondensed => ffi::POPPLER_STRETCH_SEMI_CONDENSED, Self::Normal => ffi::POPPLER_STRETCH_NORMAL, Self::SemiExpanded => ffi::POPPLER_STRETCH_SEMI_EXPANDED, Self::Expanded => ffi::POPPLER_STRETCH_EXPANDED, Self::ExtraExpanded => ffi::POPPLER_STRETCH_EXTRA_EXPANDED, Self::UltraExpanded => ffi::POPPLER_STRETCH_ULTRA_EXPANDED, Self::__Unknown(value) => value, } } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(hidden)] impl FromGlib for Stretch { #[inline] unsafe fn from_glib(value: ffi::PopplerStretch) -> Self { match value { ffi::POPPLER_STRETCH_ULTRA_CONDENSED => Self::UltraCondensed, ffi::POPPLER_STRETCH_EXTRA_CONDENSED => Self::ExtraCondensed, ffi::POPPLER_STRETCH_CONDENSED => Self::Condensed, ffi::POPPLER_STRETCH_SEMI_CONDENSED => Self::SemiCondensed, ffi::POPPLER_STRETCH_NORMAL => Self::Normal, ffi::POPPLER_STRETCH_SEMI_EXPANDED => Self::SemiExpanded, ffi::POPPLER_STRETCH_EXPANDED => Self::Expanded, ffi::POPPLER_STRETCH_EXTRA_EXPANDED => Self::ExtraExpanded, ffi::POPPLER_STRETCH_ULTRA_EXPANDED => Self::UltraExpanded, value => Self::__Unknown(value), } } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl StaticType for Stretch { #[inline] #[doc(alias = "poppler_stretch_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_stretch_get_type()) } } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl glib::HasParamSpec for Stretch { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl glib::value::ValueType for Stretch { type Type = Self; } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] unsafe impl<'a> glib::value::FromValue<'a> for Stretch { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl ToValue for Stretch { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl From for glib::Value { #[inline] fn from(v: Stretch) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureBlockAlign")] pub enum StructureBlockAlign { #[doc(alias = "POPPLER_STRUCTURE_BLOCK_ALIGN_BEFORE")] Before, #[doc(alias = "POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE")] Middle, #[doc(alias = "POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER")] After, #[doc(alias = "POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY")] Justify, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureBlockAlign { type GlibType = ffi::PopplerStructureBlockAlign; #[inline] fn into_glib(self) -> ffi::PopplerStructureBlockAlign { match self { Self::Before => ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_BEFORE, Self::Middle => ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE, Self::After => ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER, Self::Justify => ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureBlockAlign { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureBlockAlign) -> Self { match value { ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_BEFORE => Self::Before, ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE => Self::Middle, ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER => Self::After, ffi::POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY => Self::Justify, value => Self::__Unknown(value), } } } impl StaticType for StructureBlockAlign { #[inline] #[doc(alias = "poppler_structure_block_align_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_block_align_get_type()) } } } impl glib::HasParamSpec for StructureBlockAlign { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureBlockAlign { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureBlockAlign { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureBlockAlign { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureBlockAlign) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureBorderStyle")] pub enum StructureBorderStyle { #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_NONE")] None, #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_HIDDEN")] Hidden, #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_DOTTED")] Dotted, #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_DASHED")] Dashed, #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_SOLID")] Solid, #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_DOUBLE")] Double, #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_GROOVE")] Groove, #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_INSET")] Inset, #[doc(alias = "POPPLER_STRUCTURE_BORDER_STYLE_OUTSET")] Outset, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureBorderStyle { type GlibType = ffi::PopplerStructureBorderStyle; #[inline] fn into_glib(self) -> ffi::PopplerStructureBorderStyle { match self { Self::None => ffi::POPPLER_STRUCTURE_BORDER_STYLE_NONE, Self::Hidden => ffi::POPPLER_STRUCTURE_BORDER_STYLE_HIDDEN, Self::Dotted => ffi::POPPLER_STRUCTURE_BORDER_STYLE_DOTTED, Self::Dashed => ffi::POPPLER_STRUCTURE_BORDER_STYLE_DASHED, Self::Solid => ffi::POPPLER_STRUCTURE_BORDER_STYLE_SOLID, Self::Double => ffi::POPPLER_STRUCTURE_BORDER_STYLE_DOUBLE, Self::Groove => ffi::POPPLER_STRUCTURE_BORDER_STYLE_GROOVE, Self::Inset => ffi::POPPLER_STRUCTURE_BORDER_STYLE_INSET, Self::Outset => ffi::POPPLER_STRUCTURE_BORDER_STYLE_OUTSET, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureBorderStyle { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureBorderStyle) -> Self { match value { ffi::POPPLER_STRUCTURE_BORDER_STYLE_NONE => Self::None, ffi::POPPLER_STRUCTURE_BORDER_STYLE_HIDDEN => Self::Hidden, ffi::POPPLER_STRUCTURE_BORDER_STYLE_DOTTED => Self::Dotted, ffi::POPPLER_STRUCTURE_BORDER_STYLE_DASHED => Self::Dashed, ffi::POPPLER_STRUCTURE_BORDER_STYLE_SOLID => Self::Solid, ffi::POPPLER_STRUCTURE_BORDER_STYLE_DOUBLE => Self::Double, ffi::POPPLER_STRUCTURE_BORDER_STYLE_GROOVE => Self::Groove, ffi::POPPLER_STRUCTURE_BORDER_STYLE_INSET => Self::Inset, ffi::POPPLER_STRUCTURE_BORDER_STYLE_OUTSET => Self::Outset, value => Self::__Unknown(value), } } } impl StaticType for StructureBorderStyle { #[inline] #[doc(alias = "poppler_structure_border_style_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_border_style_get_type()) } } } impl glib::HasParamSpec for StructureBorderStyle { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureBorderStyle { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureBorderStyle { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureBorderStyle { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureBorderStyle) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureElementKind")] pub enum StructureElementKind { #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_CONTENT")] Content, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_OBJECT_REFERENCE")] ObjectReference, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_DOCUMENT")] Document, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_PART")] Part, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_ARTICLE")] Article, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_SECTION")] Section, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_DIV")] Div, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_SPAN")] Span, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_QUOTE")] Quote, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_NOTE")] Note, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_REFERENCE")] Reference, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_BIBENTRY")] Bibentry, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_CODE")] Code, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LINK")] Link, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_ANNOT")] Annot, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_BLOCKQUOTE")] Blockquote, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_CAPTION")] Caption, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_NONSTRUCT")] Nonstruct, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TOC")] Toc, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TOC_ITEM")] TocItem, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_INDEX")] Index, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_PRIVATE")] Private, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_PARAGRAPH")] Paragraph, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING")] Heading, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_1")] Heading1, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_2")] Heading2, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_3")] Heading3, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_4")] Heading4, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_5")] Heading5, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_HEADING_6")] Heading6, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LIST")] List, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LIST_ITEM")] ListItem, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LIST_LABEL")] ListLabel, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_LIST_BODY")] ListBody, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE")] Table, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_ROW")] TableRow, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_HEADING")] TableHeading, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_DATA")] TableData, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_HEADER")] TableHeader, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_FOOTER")] TableFooter, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_TABLE_BODY")] TableBody, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_RUBY")] Ruby, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_RUBY_BASE_TEXT")] RubyBaseText, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_RUBY_ANNOT_TEXT")] RubyAnnotText, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_RUBY_PUNCTUATION")] RubyPunctuation, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_WARICHU")] Warichu, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_WARICHU_TEXT")] WarichuText, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_WARICHU_PUNCTUATION")] WarichuPunctuation, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_FIGURE")] Figure, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_FORMULA")] Formula, #[doc(alias = "POPPLER_STRUCTURE_ELEMENT_FORM")] Form, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureElementKind { type GlibType = ffi::PopplerStructureElementKind; fn into_glib(self) -> ffi::PopplerStructureElementKind { match self { Self::Content => ffi::POPPLER_STRUCTURE_ELEMENT_CONTENT, Self::ObjectReference => ffi::POPPLER_STRUCTURE_ELEMENT_OBJECT_REFERENCE, Self::Document => ffi::POPPLER_STRUCTURE_ELEMENT_DOCUMENT, Self::Part => ffi::POPPLER_STRUCTURE_ELEMENT_PART, Self::Article => ffi::POPPLER_STRUCTURE_ELEMENT_ARTICLE, Self::Section => ffi::POPPLER_STRUCTURE_ELEMENT_SECTION, Self::Div => ffi::POPPLER_STRUCTURE_ELEMENT_DIV, Self::Span => ffi::POPPLER_STRUCTURE_ELEMENT_SPAN, Self::Quote => ffi::POPPLER_STRUCTURE_ELEMENT_QUOTE, Self::Note => ffi::POPPLER_STRUCTURE_ELEMENT_NOTE, Self::Reference => ffi::POPPLER_STRUCTURE_ELEMENT_REFERENCE, Self::Bibentry => ffi::POPPLER_STRUCTURE_ELEMENT_BIBENTRY, Self::Code => ffi::POPPLER_STRUCTURE_ELEMENT_CODE, Self::Link => ffi::POPPLER_STRUCTURE_ELEMENT_LINK, Self::Annot => ffi::POPPLER_STRUCTURE_ELEMENT_ANNOT, Self::Blockquote => ffi::POPPLER_STRUCTURE_ELEMENT_BLOCKQUOTE, Self::Caption => ffi::POPPLER_STRUCTURE_ELEMENT_CAPTION, Self::Nonstruct => ffi::POPPLER_STRUCTURE_ELEMENT_NONSTRUCT, Self::Toc => ffi::POPPLER_STRUCTURE_ELEMENT_TOC, Self::TocItem => ffi::POPPLER_STRUCTURE_ELEMENT_TOC_ITEM, Self::Index => ffi::POPPLER_STRUCTURE_ELEMENT_INDEX, Self::Private => ffi::POPPLER_STRUCTURE_ELEMENT_PRIVATE, Self::Paragraph => ffi::POPPLER_STRUCTURE_ELEMENT_PARAGRAPH, Self::Heading => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING, Self::Heading1 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_1, Self::Heading2 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_2, Self::Heading3 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_3, Self::Heading4 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_4, Self::Heading5 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_5, Self::Heading6 => ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_6, Self::List => ffi::POPPLER_STRUCTURE_ELEMENT_LIST, Self::ListItem => ffi::POPPLER_STRUCTURE_ELEMENT_LIST_ITEM, Self::ListLabel => ffi::POPPLER_STRUCTURE_ELEMENT_LIST_LABEL, Self::ListBody => ffi::POPPLER_STRUCTURE_ELEMENT_LIST_BODY, Self::Table => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE, Self::TableRow => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_ROW, Self::TableHeading => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_HEADING, Self::TableData => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_DATA, Self::TableHeader => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_HEADER, Self::TableFooter => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_FOOTER, Self::TableBody => ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_BODY, Self::Ruby => ffi::POPPLER_STRUCTURE_ELEMENT_RUBY, Self::RubyBaseText => ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_BASE_TEXT, Self::RubyAnnotText => ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_ANNOT_TEXT, Self::RubyPunctuation => ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_PUNCTUATION, Self::Warichu => ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU, Self::WarichuText => ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU_TEXT, Self::WarichuPunctuation => ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU_PUNCTUATION, Self::Figure => ffi::POPPLER_STRUCTURE_ELEMENT_FIGURE, Self::Formula => ffi::POPPLER_STRUCTURE_ELEMENT_FORMULA, Self::Form => ffi::POPPLER_STRUCTURE_ELEMENT_FORM, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureElementKind { unsafe fn from_glib(value: ffi::PopplerStructureElementKind) -> Self { match value { ffi::POPPLER_STRUCTURE_ELEMENT_CONTENT => Self::Content, ffi::POPPLER_STRUCTURE_ELEMENT_OBJECT_REFERENCE => Self::ObjectReference, ffi::POPPLER_STRUCTURE_ELEMENT_DOCUMENT => Self::Document, ffi::POPPLER_STRUCTURE_ELEMENT_PART => Self::Part, ffi::POPPLER_STRUCTURE_ELEMENT_ARTICLE => Self::Article, ffi::POPPLER_STRUCTURE_ELEMENT_SECTION => Self::Section, ffi::POPPLER_STRUCTURE_ELEMENT_DIV => Self::Div, ffi::POPPLER_STRUCTURE_ELEMENT_SPAN => Self::Span, ffi::POPPLER_STRUCTURE_ELEMENT_QUOTE => Self::Quote, ffi::POPPLER_STRUCTURE_ELEMENT_NOTE => Self::Note, ffi::POPPLER_STRUCTURE_ELEMENT_REFERENCE => Self::Reference, ffi::POPPLER_STRUCTURE_ELEMENT_BIBENTRY => Self::Bibentry, ffi::POPPLER_STRUCTURE_ELEMENT_CODE => Self::Code, ffi::POPPLER_STRUCTURE_ELEMENT_LINK => Self::Link, ffi::POPPLER_STRUCTURE_ELEMENT_ANNOT => Self::Annot, ffi::POPPLER_STRUCTURE_ELEMENT_BLOCKQUOTE => Self::Blockquote, ffi::POPPLER_STRUCTURE_ELEMENT_CAPTION => Self::Caption, ffi::POPPLER_STRUCTURE_ELEMENT_NONSTRUCT => Self::Nonstruct, ffi::POPPLER_STRUCTURE_ELEMENT_TOC => Self::Toc, ffi::POPPLER_STRUCTURE_ELEMENT_TOC_ITEM => Self::TocItem, ffi::POPPLER_STRUCTURE_ELEMENT_INDEX => Self::Index, ffi::POPPLER_STRUCTURE_ELEMENT_PRIVATE => Self::Private, ffi::POPPLER_STRUCTURE_ELEMENT_PARAGRAPH => Self::Paragraph, ffi::POPPLER_STRUCTURE_ELEMENT_HEADING => Self::Heading, ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_1 => Self::Heading1, ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_2 => Self::Heading2, ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_3 => Self::Heading3, ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_4 => Self::Heading4, ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_5 => Self::Heading5, ffi::POPPLER_STRUCTURE_ELEMENT_HEADING_6 => Self::Heading6, ffi::POPPLER_STRUCTURE_ELEMENT_LIST => Self::List, ffi::POPPLER_STRUCTURE_ELEMENT_LIST_ITEM => Self::ListItem, ffi::POPPLER_STRUCTURE_ELEMENT_LIST_LABEL => Self::ListLabel, ffi::POPPLER_STRUCTURE_ELEMENT_LIST_BODY => Self::ListBody, ffi::POPPLER_STRUCTURE_ELEMENT_TABLE => Self::Table, ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_ROW => Self::TableRow, ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_HEADING => Self::TableHeading, ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_DATA => Self::TableData, ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_HEADER => Self::TableHeader, ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_FOOTER => Self::TableFooter, ffi::POPPLER_STRUCTURE_ELEMENT_TABLE_BODY => Self::TableBody, ffi::POPPLER_STRUCTURE_ELEMENT_RUBY => Self::Ruby, ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_BASE_TEXT => Self::RubyBaseText, ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_ANNOT_TEXT => Self::RubyAnnotText, ffi::POPPLER_STRUCTURE_ELEMENT_RUBY_PUNCTUATION => Self::RubyPunctuation, ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU => Self::Warichu, ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU_TEXT => Self::WarichuText, ffi::POPPLER_STRUCTURE_ELEMENT_WARICHU_PUNCTUATION => Self::WarichuPunctuation, ffi::POPPLER_STRUCTURE_ELEMENT_FIGURE => Self::Figure, ffi::POPPLER_STRUCTURE_ELEMENT_FORMULA => Self::Formula, ffi::POPPLER_STRUCTURE_ELEMENT_FORM => Self::Form, value => Self::__Unknown(value), } } } impl StaticType for StructureElementKind { #[inline] #[doc(alias = "poppler_structure_element_kind_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_element_kind_get_type()) } } } impl glib::HasParamSpec for StructureElementKind { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureElementKind { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureElementKind { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureElementKind { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureElementKind) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureFormRole")] pub enum StructureFormRole { #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_UNDEFINED")] Undefined, #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_RADIO_BUTTON")] RadioButton, #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON")] PushButton, #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE")] TextValue, #[doc(alias = "POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX")] Checkbox, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureFormRole { type GlibType = ffi::PopplerStructureFormRole; #[inline] fn into_glib(self) -> ffi::PopplerStructureFormRole { match self { Self::Undefined => ffi::POPPLER_STRUCTURE_FORM_ROLE_UNDEFINED, Self::RadioButton => ffi::POPPLER_STRUCTURE_FORM_ROLE_RADIO_BUTTON, Self::PushButton => ffi::POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON, Self::TextValue => ffi::POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE, Self::Checkbox => ffi::POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureFormRole { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureFormRole) -> Self { match value { ffi::POPPLER_STRUCTURE_FORM_ROLE_UNDEFINED => Self::Undefined, ffi::POPPLER_STRUCTURE_FORM_ROLE_RADIO_BUTTON => Self::RadioButton, ffi::POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON => Self::PushButton, ffi::POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE => Self::TextValue, ffi::POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX => Self::Checkbox, value => Self::__Unknown(value), } } } impl StaticType for StructureFormRole { #[inline] #[doc(alias = "poppler_structure_form_role_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_form_role_get_type()) } } } impl glib::HasParamSpec for StructureFormRole { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureFormRole { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureFormRole { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureFormRole { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureFormRole) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureFormState")] pub enum StructureFormState { #[doc(alias = "POPPLER_STRUCTURE_FORM_STATE_ON")] On, #[doc(alias = "POPPLER_STRUCTURE_FORM_STATE_OFF")] Off, #[doc(alias = "POPPLER_STRUCTURE_FORM_STATE_NEUTRAL")] Neutral, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureFormState { type GlibType = ffi::PopplerStructureFormState; #[inline] fn into_glib(self) -> ffi::PopplerStructureFormState { match self { Self::On => ffi::POPPLER_STRUCTURE_FORM_STATE_ON, Self::Off => ffi::POPPLER_STRUCTURE_FORM_STATE_OFF, Self::Neutral => ffi::POPPLER_STRUCTURE_FORM_STATE_NEUTRAL, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureFormState { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureFormState) -> Self { match value { ffi::POPPLER_STRUCTURE_FORM_STATE_ON => Self::On, ffi::POPPLER_STRUCTURE_FORM_STATE_OFF => Self::Off, ffi::POPPLER_STRUCTURE_FORM_STATE_NEUTRAL => Self::Neutral, value => Self::__Unknown(value), } } } impl StaticType for StructureFormState { #[inline] #[doc(alias = "poppler_structure_form_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_form_state_get_type()) } } } impl glib::HasParamSpec for StructureFormState { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureFormState { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureFormState { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureFormState { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureFormState) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureGlyphOrientation")] pub enum StructureGlyphOrientation { #[doc(alias = "POPPLER_STRUCTURE_GLYPH_ORIENTATION_AUTO")] Auto, #[doc(alias = "POPPLER_STRUCTURE_GLYPH_ORIENTATION_90")] _90, #[doc(alias = "POPPLER_STRUCTURE_GLYPH_ORIENTATION_180")] _180, #[doc(alias = "POPPLER_STRUCTURE_GLYPH_ORIENTATION_270")] _270, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureGlyphOrientation { type GlibType = ffi::PopplerStructureGlyphOrientation; #[inline] fn into_glib(self) -> ffi::PopplerStructureGlyphOrientation { match self { Self::Auto => ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_AUTO, Self::_90 => ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_90, Self::_180 => ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_180, Self::_270 => ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_270, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureGlyphOrientation { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureGlyphOrientation) -> Self { match value { ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_AUTO => Self::Auto, ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_90 => Self::_90, ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_180 => Self::_180, ffi::POPPLER_STRUCTURE_GLYPH_ORIENTATION_270 => Self::_270, value => Self::__Unknown(value), } } } impl StaticType for StructureGlyphOrientation { #[inline] #[doc(alias = "poppler_structure_glyph_orientation_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_glyph_orientation_get_type()) } } } impl glib::HasParamSpec for StructureGlyphOrientation { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureGlyphOrientation { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureGlyphOrientation { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureGlyphOrientation { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureGlyphOrientation) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureInlineAlign")] pub enum StructureInlineAlign { #[doc(alias = "POPPLER_STRUCTURE_INLINE_ALIGN_START")] Start, #[doc(alias = "POPPLER_STRUCTURE_INLINE_ALIGN_CENTER")] Center, #[doc(alias = "POPPLER_STRUCTURE_INLINE_ALIGN_END")] End, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureInlineAlign { type GlibType = ffi::PopplerStructureInlineAlign; #[inline] fn into_glib(self) -> ffi::PopplerStructureInlineAlign { match self { Self::Start => ffi::POPPLER_STRUCTURE_INLINE_ALIGN_START, Self::Center => ffi::POPPLER_STRUCTURE_INLINE_ALIGN_CENTER, Self::End => ffi::POPPLER_STRUCTURE_INLINE_ALIGN_END, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureInlineAlign { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureInlineAlign) -> Self { match value { ffi::POPPLER_STRUCTURE_INLINE_ALIGN_START => Self::Start, ffi::POPPLER_STRUCTURE_INLINE_ALIGN_CENTER => Self::Center, ffi::POPPLER_STRUCTURE_INLINE_ALIGN_END => Self::End, value => Self::__Unknown(value), } } } impl StaticType for StructureInlineAlign { #[inline] #[doc(alias = "poppler_structure_inline_align_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_inline_align_get_type()) } } } impl glib::HasParamSpec for StructureInlineAlign { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureInlineAlign { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureInlineAlign { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureInlineAlign { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureInlineAlign) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureListNumbering")] pub enum StructureListNumbering { #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_NONE")] None, #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_DISC")] Disc, #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_CIRCLE")] Circle, #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_SQUARE")] Square, #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_DECIMAL")] Decimal, #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ROMAN")] UpperRoman, #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN")] LowerRoman, #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA")] UpperAlpha, #[doc(alias = "POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA")] LowerAlpha, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureListNumbering { type GlibType = ffi::PopplerStructureListNumbering; #[inline] fn into_glib(self) -> ffi::PopplerStructureListNumbering { match self { Self::None => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_NONE, Self::Disc => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_DISC, Self::Circle => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_CIRCLE, Self::Square => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_SQUARE, Self::Decimal => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_DECIMAL, Self::UpperRoman => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ROMAN, Self::LowerRoman => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN, Self::UpperAlpha => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA, Self::LowerAlpha => ffi::POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureListNumbering { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureListNumbering) -> Self { match value { ffi::POPPLER_STRUCTURE_LIST_NUMBERING_NONE => Self::None, ffi::POPPLER_STRUCTURE_LIST_NUMBERING_DISC => Self::Disc, ffi::POPPLER_STRUCTURE_LIST_NUMBERING_CIRCLE => Self::Circle, ffi::POPPLER_STRUCTURE_LIST_NUMBERING_SQUARE => Self::Square, ffi::POPPLER_STRUCTURE_LIST_NUMBERING_DECIMAL => Self::Decimal, ffi::POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ROMAN => Self::UpperRoman, ffi::POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN => Self::LowerRoman, ffi::POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA => Self::UpperAlpha, ffi::POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA => Self::LowerAlpha, value => Self::__Unknown(value), } } } impl StaticType for StructureListNumbering { #[inline] #[doc(alias = "poppler_structure_list_numbering_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_list_numbering_get_type()) } } } impl glib::HasParamSpec for StructureListNumbering { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureListNumbering { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureListNumbering { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureListNumbering { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureListNumbering) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructurePlacement")] pub enum StructurePlacement { #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_BLOCK")] Block, #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_INLINE")] Inline, #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_BEFORE")] Before, #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_START")] Start, #[doc(alias = "POPPLER_STRUCTURE_PLACEMENT_END")] End, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructurePlacement { type GlibType = ffi::PopplerStructurePlacement; #[inline] fn into_glib(self) -> ffi::PopplerStructurePlacement { match self { Self::Block => ffi::POPPLER_STRUCTURE_PLACEMENT_BLOCK, Self::Inline => ffi::POPPLER_STRUCTURE_PLACEMENT_INLINE, Self::Before => ffi::POPPLER_STRUCTURE_PLACEMENT_BEFORE, Self::Start => ffi::POPPLER_STRUCTURE_PLACEMENT_START, Self::End => ffi::POPPLER_STRUCTURE_PLACEMENT_END, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructurePlacement { #[inline] unsafe fn from_glib(value: ffi::PopplerStructurePlacement) -> Self { match value { ffi::POPPLER_STRUCTURE_PLACEMENT_BLOCK => Self::Block, ffi::POPPLER_STRUCTURE_PLACEMENT_INLINE => Self::Inline, ffi::POPPLER_STRUCTURE_PLACEMENT_BEFORE => Self::Before, ffi::POPPLER_STRUCTURE_PLACEMENT_START => Self::Start, ffi::POPPLER_STRUCTURE_PLACEMENT_END => Self::End, value => Self::__Unknown(value), } } } impl StaticType for StructurePlacement { #[inline] #[doc(alias = "poppler_structure_placement_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_placement_get_type()) } } } impl glib::HasParamSpec for StructurePlacement { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructurePlacement { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructurePlacement { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructurePlacement { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructurePlacement) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureRubyAlign")] pub enum StructureRubyAlign { #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_START")] Start, #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_CENTER")] Center, #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_END")] End, #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY")] Justify, #[doc(alias = "POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE")] Distribute, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureRubyAlign { type GlibType = ffi::PopplerStructureRubyAlign; #[inline] fn into_glib(self) -> ffi::PopplerStructureRubyAlign { match self { Self::Start => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_START, Self::Center => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_CENTER, Self::End => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_END, Self::Justify => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY, Self::Distribute => ffi::POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureRubyAlign { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureRubyAlign) -> Self { match value { ffi::POPPLER_STRUCTURE_RUBY_ALIGN_START => Self::Start, ffi::POPPLER_STRUCTURE_RUBY_ALIGN_CENTER => Self::Center, ffi::POPPLER_STRUCTURE_RUBY_ALIGN_END => Self::End, ffi::POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY => Self::Justify, ffi::POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE => Self::Distribute, value => Self::__Unknown(value), } } } impl StaticType for StructureRubyAlign { #[inline] #[doc(alias = "poppler_structure_ruby_align_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_ruby_align_get_type()) } } } impl glib::HasParamSpec for StructureRubyAlign { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureRubyAlign { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureRubyAlign { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureRubyAlign { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureRubyAlign) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureRubyPosition")] pub enum StructureRubyPosition { #[doc(alias = "POPPLER_STRUCTURE_RUBY_POSITION_BEFORE")] Before, #[doc(alias = "POPPLER_STRUCTURE_RUBY_POSITION_AFTER")] After, #[doc(alias = "POPPLER_STRUCTURE_RUBY_POSITION_WARICHU")] Warichu, #[doc(alias = "POPPLER_STRUCTURE_RUBY_POSITION_INLINE")] Inline, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureRubyPosition { type GlibType = ffi::PopplerStructureRubyPosition; #[inline] fn into_glib(self) -> ffi::PopplerStructureRubyPosition { match self { Self::Before => ffi::POPPLER_STRUCTURE_RUBY_POSITION_BEFORE, Self::After => ffi::POPPLER_STRUCTURE_RUBY_POSITION_AFTER, Self::Warichu => ffi::POPPLER_STRUCTURE_RUBY_POSITION_WARICHU, Self::Inline => ffi::POPPLER_STRUCTURE_RUBY_POSITION_INLINE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureRubyPosition { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureRubyPosition) -> Self { match value { ffi::POPPLER_STRUCTURE_RUBY_POSITION_BEFORE => Self::Before, ffi::POPPLER_STRUCTURE_RUBY_POSITION_AFTER => Self::After, ffi::POPPLER_STRUCTURE_RUBY_POSITION_WARICHU => Self::Warichu, ffi::POPPLER_STRUCTURE_RUBY_POSITION_INLINE => Self::Inline, value => Self::__Unknown(value), } } } impl StaticType for StructureRubyPosition { #[inline] #[doc(alias = "poppler_structure_ruby_position_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_ruby_position_get_type()) } } } impl glib::HasParamSpec for StructureRubyPosition { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureRubyPosition { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureRubyPosition { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureRubyPosition { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureRubyPosition) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureTableScope")] pub enum StructureTableScope { #[doc(alias = "POPPLER_STRUCTURE_TABLE_SCOPE_ROW")] Row, #[doc(alias = "POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN")] Column, #[doc(alias = "POPPLER_STRUCTURE_TABLE_SCOPE_BOTH")] Both, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureTableScope { type GlibType = ffi::PopplerStructureTableScope; #[inline] fn into_glib(self) -> ffi::PopplerStructureTableScope { match self { Self::Row => ffi::POPPLER_STRUCTURE_TABLE_SCOPE_ROW, Self::Column => ffi::POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN, Self::Both => ffi::POPPLER_STRUCTURE_TABLE_SCOPE_BOTH, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureTableScope { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureTableScope) -> Self { match value { ffi::POPPLER_STRUCTURE_TABLE_SCOPE_ROW => Self::Row, ffi::POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN => Self::Column, ffi::POPPLER_STRUCTURE_TABLE_SCOPE_BOTH => Self::Both, value => Self::__Unknown(value), } } } impl StaticType for StructureTableScope { #[inline] #[doc(alias = "poppler_structure_table_scope_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_table_scope_get_type()) } } } impl glib::HasParamSpec for StructureTableScope { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureTableScope { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureTableScope { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureTableScope { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureTableScope) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureTextAlign")] pub enum StructureTextAlign { #[doc(alias = "POPPLER_STRUCTURE_TEXT_ALIGN_START")] Start, #[doc(alias = "POPPLER_STRUCTURE_TEXT_ALIGN_CENTER")] Center, #[doc(alias = "POPPLER_STRUCTURE_TEXT_ALIGN_END")] End, #[doc(alias = "POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY")] Justify, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureTextAlign { type GlibType = ffi::PopplerStructureTextAlign; #[inline] fn into_glib(self) -> ffi::PopplerStructureTextAlign { match self { Self::Start => ffi::POPPLER_STRUCTURE_TEXT_ALIGN_START, Self::Center => ffi::POPPLER_STRUCTURE_TEXT_ALIGN_CENTER, Self::End => ffi::POPPLER_STRUCTURE_TEXT_ALIGN_END, Self::Justify => ffi::POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureTextAlign { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureTextAlign) -> Self { match value { ffi::POPPLER_STRUCTURE_TEXT_ALIGN_START => Self::Start, ffi::POPPLER_STRUCTURE_TEXT_ALIGN_CENTER => Self::Center, ffi::POPPLER_STRUCTURE_TEXT_ALIGN_END => Self::End, ffi::POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY => Self::Justify, value => Self::__Unknown(value), } } } impl StaticType for StructureTextAlign { #[inline] #[doc(alias = "poppler_structure_text_align_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_text_align_get_type()) } } } impl glib::HasParamSpec for StructureTextAlign { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureTextAlign { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureTextAlign { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureTextAlign { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureTextAlign) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureTextDecoration")] pub enum StructureTextDecoration { #[doc(alias = "POPPLER_STRUCTURE_TEXT_DECORATION_NONE")] None, #[doc(alias = "POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE")] Underline, #[doc(alias = "POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE")] Overline, #[doc(alias = "POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH")] Linethrough, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureTextDecoration { type GlibType = ffi::PopplerStructureTextDecoration; #[inline] fn into_glib(self) -> ffi::PopplerStructureTextDecoration { match self { Self::None => ffi::POPPLER_STRUCTURE_TEXT_DECORATION_NONE, Self::Underline => ffi::POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE, Self::Overline => ffi::POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE, Self::Linethrough => ffi::POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureTextDecoration { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureTextDecoration) -> Self { match value { ffi::POPPLER_STRUCTURE_TEXT_DECORATION_NONE => Self::None, ffi::POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE => Self::Underline, ffi::POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE => Self::Overline, ffi::POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH => Self::Linethrough, value => Self::__Unknown(value), } } } impl StaticType for StructureTextDecoration { #[inline] #[doc(alias = "poppler_structure_text_decoration_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_text_decoration_get_type()) } } } impl glib::HasParamSpec for StructureTextDecoration { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureTextDecoration { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureTextDecoration { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureTextDecoration { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureTextDecoration) -> Self { ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStructureWritingMode")] pub enum StructureWritingMode { #[doc(alias = "POPPLER_STRUCTURE_WRITING_MODE_LR_TB")] LrTb, #[doc(alias = "POPPLER_STRUCTURE_WRITING_MODE_RL_TB")] RlTb, #[doc(alias = "POPPLER_STRUCTURE_WRITING_MODE_TB_RL")] TbRl, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for StructureWritingMode { type GlibType = ffi::PopplerStructureWritingMode; #[inline] fn into_glib(self) -> ffi::PopplerStructureWritingMode { match self { Self::LrTb => ffi::POPPLER_STRUCTURE_WRITING_MODE_LR_TB, Self::RlTb => ffi::POPPLER_STRUCTURE_WRITING_MODE_RL_TB, Self::TbRl => ffi::POPPLER_STRUCTURE_WRITING_MODE_TB_RL, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StructureWritingMode { #[inline] unsafe fn from_glib(value: ffi::PopplerStructureWritingMode) -> Self { match value { ffi::POPPLER_STRUCTURE_WRITING_MODE_LR_TB => Self::LrTb, ffi::POPPLER_STRUCTURE_WRITING_MODE_RL_TB => Self::RlTb, ffi::POPPLER_STRUCTURE_WRITING_MODE_TB_RL => Self::TbRl, value => Self::__Unknown(value), } } } impl StaticType for StructureWritingMode { #[inline] #[doc(alias = "poppler_structure_writing_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_structure_writing_mode_get_type()) } } } impl glib::HasParamSpec for StructureWritingMode { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for StructureWritingMode { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for StructureWritingMode { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } impl ToValue for StructureWritingMode { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: StructureWritingMode) -> Self { ToValue::to_value(&v) } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "PopplerStyle")] pub enum Style { #[doc(alias = "POPPLER_STYLE_NORMAL")] Normal, #[doc(alias = "POPPLER_STYLE_OBLIQUE")] Oblique, #[doc(alias = "POPPLER_STYLE_ITALIC")] Italic, #[doc(hidden)] __Unknown(i32), } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(hidden)] impl IntoGlib for Style { type GlibType = ffi::PopplerStyle; #[inline] fn into_glib(self) -> ffi::PopplerStyle { match self { Self::Normal => ffi::POPPLER_STYLE_NORMAL, Self::Oblique => ffi::POPPLER_STYLE_OBLIQUE, Self::Italic => ffi::POPPLER_STYLE_ITALIC, Self::__Unknown(value) => value, } } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] #[doc(hidden)] impl FromGlib for Style { #[inline] unsafe fn from_glib(value: ffi::PopplerStyle) -> Self { match value { ffi::POPPLER_STYLE_NORMAL => Self::Normal, ffi::POPPLER_STYLE_OBLIQUE => Self::Oblique, ffi::POPPLER_STYLE_ITALIC => Self::Italic, value => Self::__Unknown(value), } } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl StaticType for Style { #[inline] #[doc(alias = "poppler_style_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::poppler_style_get_type()) } } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl glib::HasParamSpec for Style { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl glib::value::ValueType for Style { type Type = Self; } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] unsafe impl<'a> glib::value::FromValue<'a> for Style { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { unsafe { from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl ToValue for Style { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(feature = "v24_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v24_12")))] impl From