atk-0.7.0/.gitignore010064400007650000024000000001451350341527500125110ustar0000000000000000test/bin/ target/ doc/ configure.in config.log config.status *.dylib .rust *.so *.o *.swp Cargo.lock atk-0.7.0/.gitmodules010064400007650000024000000002301350341527500126710ustar0000000000000000[submodule "gir"] path = gir url = https://github.com/gtk-rs/gir [submodule "gir-files"] path = gir-files url = https://github.com/gtk-rs/gir-files atk-0.7.0/.travis.yml010064400007650000024000000035541350341657000126400ustar0000000000000000dist: xenial language: rust matrix: include: - os: linux rust: nightly env: GTK=3.14 FEATURES= - os: linux rust: nightly env: GTK=3.24 FEATURES= - os: linux rust: beta env: GTK=3.14 FEATURES= - os: linux rust: beta env: GTK=3.24 FEATURES= - os: linux rust: 1.34.0 # to check gstreamer compatibility env: GTK=3.14 FEATURES= - os: linux rust: 1.34.0 # to check gstreamer compatibility env: GTK=3.24 FEATURES= - os: osx rust: nightly env: GTK=3.14 FEATURES= # - os: osx # rust: nightly # env: GTK=3.24 FEATURES=v3_16 - os: osx rust: beta env: GTK=3.14 FEATURES= # - os: osx # rust: beta # env: GTK=3.24 FEATURES=v3_16 - os: osx rust: stable env: GTK=3.14 FEATURES= # - os: osx # rust: stable # env: GTK=3.24 FEATURES=v3_16 addons: apt: packages: - libgtk-3-dev - libmount-dev before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gtk+3 cairo atk; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig; fi script: - rustc --version - if [ "$TRAVIS_RUST_VERSION" == "nightly" ] && [ "$GTK" == "3.14" ]; then rustup component add rustfmt; make regen_check; fi - cargo doc --features "dox,embed-lgpl-docs" - cargo test --features "$FEATURES,embed-lgpl-docs" # catch any sneaked in lgpl docs - cargo build --features "$FEATURES,purge-lgpl-docs" --jobs 1 - git diff -R --exit-code - rustc --version - mkdir .cargo - echo 'paths = ["."]' > .cargo/config - git clone -q --depth 50 -b pending https://github.com/gtk-rs/examples _examples - cd _examples - ./build_travis.sh atk-0.7.0/appveyor.yml010064400007650000024000000014471350341527500131170ustar0000000000000000environment: matrix: - RUST: stable BITS: 32 - RUST: stable BITS: 64 install: - IF "%BITS%" == "32" SET ARCH=i686 - IF "%BITS%" == "64" SET ARCH=x86_64 - curl -sSf -o rustup-init.exe https://win.rustup.rs - rustup-init.exe --default-host "%ARCH%-pc-windows-gnu" --default-toolchain %RUST% -y - SET PATH=C:\Users\appveyor\.cargo\bin;C:\msys64\mingw%BITS%\bin;%PATH%;C:\msys64\usr\bin - rustc -Vv - cargo -Vv - pacman --noconfirm -S mingw-w64-%ARCH%-gtk3 build_script: - cargo doc --features "dox" - cargo test - cargo test --features v2_30 - mkdir .cargo - echo paths = ["."] > .cargo\config - git clone -q --depth 50 -b pending https://github.com/gtk-rs/examples _examples - cd _examples - cargo build - cargo build --features gtk_3_24 test: false atk-0.7.0/build.rs010064400007650000024000000010251350341657000121630ustar0000000000000000fn main() { manage_docs(); } #[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))] fn manage_docs() { extern crate lgpl_docs; const PATH: &'static str = "src"; const IGNORES: &'static [&'static str] = &["lib.rs", "prelude.rs", "rt.rs", "signal.rs"]; lgpl_docs::purge(PATH, IGNORES); if cfg!(feature = "embed-lgpl-docs") { lgpl_docs::embed(lgpl_docs::Library::Atk, PATH, IGNORES); } } #[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))] fn manage_docs() {} atk-0.7.0/Cargo.toml.orig010064400007650000024000000016751350341713700134200ustar0000000000000000[package] documentation = "http://gtk-rs.org/docs/atk/" categories = ["api-bindings", "gui"] license = "MIT" description = "Rust bindings for the ATK library" name = "atk" homepage = "http://gtk-rs.org/" authors = ["The Gtk-rs Project Developers"] readme = "README.md" version = "0.7.0" keywords = ["atk", "gtk-rs", "gnome", "accessibility"] repository = "https://github.com/gtk-rs/atk" build = "build.rs" exclude = [ "gir-files/*", ] [badges] appveyor = { repository = "GuillaumeGomez/atk", service = "github" } travis-ci = { repository = "gtk-rs/atk" } [lib] name = "atk" [features] purge-lgpl-docs = ["gtk-rs-lgpl-docs"] embed-lgpl-docs = ["gtk-rs-lgpl-docs"] dox = ["atk-sys/dox"] v2_30 = ["atk-sys/v2_30"] [build-dependencies.gtk-rs-lgpl-docs] version = "0.1.3" optional = true [dependencies] libc = "0.2" bitflags = "1.0" atk-sys = "0.9.0" glib-sys = "0.9.0" gobject-sys = "0.9.0" glib = "0.8.0" [dev-dependencies] gir-format-check = "^0.1" atk-0.7.0/Cargo.toml0000644000000031040000000000000076520ustar00# 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 believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "atk" version = "0.7.0" authors = ["The Gtk-rs Project Developers"] build = "build.rs" exclude = ["gir-files/*"] description = "Rust bindings for the ATK library" homepage = "http://gtk-rs.org/" documentation = "http://gtk-rs.org/docs/atk/" readme = "README.md" keywords = ["atk", "gtk-rs", "gnome", "accessibility"] categories = ["api-bindings", "gui"] license = "MIT" repository = "https://github.com/gtk-rs/atk" [lib] name = "atk" [dependencies.atk-sys] version = "0.9.0" [dependencies.bitflags] version = "1.0" [dependencies.glib] version = "0.8.0" [dependencies.glib-sys] version = "0.9.0" [dependencies.gobject-sys] version = "0.9.0" [dependencies.libc] version = "0.2" [dev-dependencies.gir-format-check] version = "^0.1" [build-dependencies.gtk-rs-lgpl-docs] version = "0.1.3" optional = true [features] dox = ["atk-sys/dox"] embed-lgpl-docs = ["gtk-rs-lgpl-docs"] purge-lgpl-docs = ["gtk-rs-lgpl-docs"] v2_30 = ["atk-sys/v2_30"] [badges.appveyor] repository = "GuillaumeGomez/atk" service = "github" [badges.travis-ci] repository = "gtk-rs/atk" atk-0.7.0/CHANGELOG.md010064400007650000024000000073121350341527500123350ustar0000000000000000## 0.0.8 (master) ## 0.0.7 (16-Mar-2016) ### Breaking changes - [Object reform][gtk221] introduced autogenerated high-level bindings and broke some conventions. - Constructors don't return `Option`, they never fail. - Companion traits renamed e.g. `ButtonTrait` -> `ButtonExt`. - Modules are private now, all items are exported at the crate level (e.g. `gtk::button::Button` is no longer visible, use `gtk::Button` instead). - Dialog APIs made less Rust-y for consistency with upstream. - File name types [changed][gtk236] from `&str` to `T: AsRef`. - A few signatures and spellings corrected to match upstream. - Version features [reintroduced][gtk248] and autodetection is no more. The fallback version is 3.4. Select the minimal version required by your application like this: ```toml [dependencies.gtk] features = ["v3_10"] ``` - Signal handlers [take the receiver by reference][gtk226-1] and support [more specific receiver types][gtk226-2]. - New [safe event bindings][gdk95] are [passed to signal handlers][gtk244]. These bindings have [safe getters][gdk107] while the low-level event structs are still reachable [via `as_ref`][examples68]. - New safe [`Error`][glib86-error] and [`Value`][glib95] bindings. `ListStore` and `TreeStore` [changed accordingly][gtk238], traded `set_string` for more powerful [`set`][gtk241]. - In an ongoing move to [reflect integer unsignedness properly][gtk246] `Notebook` switched from `i32` to `u32`, `ListStore` and `TreeStore` partly switched to `u32` and `EntryBuffer` switched to `u16`. ### Improvements - [Object reform][gtk221] benefits include: - Automatic generation of [the majority of code][auto-dir], expanding the number of implemented classes, eliminating typos and making maintenance easier. - Unified upcasting and downcasting via the `Cast` trait, proper interface support. In particular this makes `Builder` safe to use. - Each crate has a `prelude` module, which reexports all traits and some ubiquitous types (`Continue`, `Inhibit`). `gtk`'s prelude incorporates `glib`'s one. - Removal of the C glue layer and gcc dependency. - The upstream documentation excised from all crates earlier lives in the [`lgpl-docs`][lgpl-docs] crate now. It can be embedded into your local copy of `gtk` and other crates by enabling the [`embed-lgpl-docs` feature][gtk245]. - [Building][sys21]: - Windows users no longer need to delete Rust's bundled gcc. - In the absence of `pkg-config` we try to link anyway assuming the libraries can be found in the default search path. There are no version checks in this case. - Setting `GTK_LIB_DIR` skips `pkg-config` altogether. [auto-dir]: https://github.com/gtk-rs/gtk/tree/master/src/auto [examples68]: https://github.com/gtk-rs/examples/pull/68 [gdk95]: https://github.com/gtk-rs/gdk/pull/95 [gdk107]: https://github.com/gtk-rs/gdk/pull/107 [glib86-error]: https://github.com/gtk-rs/glib/commit/c1a30e97 [glib95]: https://github.com/gtk-rs/glib/pull/95 [gtk221]: https://github.com/gtk-rs/gtk/pull/221 [gtk226-1]: https://github.com/gkoz/gtk-rs-gtk/commit/edfafb8f [gtk226-2]: https://github.com/gkoz/gtk-rs-gtk/commit/dda2a242 [gtk236]: https://github.com/gtk-rs/gtk/pull/236 [gtk238]: https://github.com/gtk-rs/gtk/pull/238 [gtk241]: https://github.com/gtk-rs/gtk/pull/241 [gtk244]: https://github.com/gtk-rs/gtk/pull/244 [gtk245]: https://github.com/gtk-rs/gtk/pull/245 [gtk246]: https://github.com/gtk-rs/gtk/issues/246 [gtk248]: https://github.com/gtk-rs/gtk/pull/248 [lgpl-docs]: https://github.com/gtk-rs/lgpl-docs [prelude]: https://github.com/gtk-rs/gtk/blob/master/src/prelude.rs [sys21]: https://github.com/gtk-rs/sys/pull/21 ## v0.0.6 (28-Nov-2015) - TBD atk-0.7.0/check_init_asserts010075500007650000024000000010321350341527500143070ustar0000000000000000#!/bin/sh perl -0777 -ne ' BEGIN { $e = 0 } while (/^(\N*)\V*fn\s+(\w+)\s*(<[^(]+>)?\s*(\([^{;]+)\{\N*\n^(\N*)$/gms) { ($modifiers, $name, $signature, $first_line) = ($1, $2, $4, $5); unless ($modifiers =~ /^\s*(\/\/|(pub )?unsafe)/ || $signature =~ /^\((&(\x27\w+ )?)?(mut )?self\b/ || $signature =~ /^\(\)/ || $first_line =~ /^\s*( assert_initialized_main_thread | assert_not_initialized | skip_assert_initialized )!\(\)/x) { print "$ARGV: $name$signature\n"; $e = 1 } } END { exit $e }' src/*.rs src/auto/*.rs atk-0.7.0/COPYRIGHT010064400007650000024000000050021350341527500120110ustar0000000000000000The Gtk-rs Project is copyright 2013-2016, The Gtk-rs Project Developers: Adam Crume Adolfo Ochagavía Andre Bogus Anton Konjahin Arne Dussin Boden Garman Brian Kropf Bryant Mairs Chris Greenaway Chris Palmer Corey Farwell Daniel Zalevskiy David Li Edward Shaw Edward Yang Esption Evgenii Pashkin Geoffrey French Gleb Kozyrev Glenn Watson Google Inc. Guillaume Gomez Gulshan Singh Jakob Gillich James Shepherdson Jeremy Letang John Vrbanac kennytm Laurence Tratt Lionel Flandrin Lucas Werkmeister Lukas Diekmann Mathijs Henquet Maxwell Koo mitaa Nick Herman Nicolas Koch Oliver Schneider Ömer Sinan Ağacan Ralph Giles Paul Dennis Paul Hendry Philipp Brüschweiler Raphael Nestler Robertas Romain Gauthier S.J.R. van Schaik Sebastian Schulze Silvio Fricke Simon Sapin Steve Klabnik Tobias Bales trolleyman Umur Gedik UrKr Vojtech Kral Zach Oakes Zach Ploskey The Gtk-rs Project is licensed under the MIT license, see the LICENSE file or . This project provides interoperability with various GNOME libraries but doesn't distribute any parts of them. Distributing compiled libraries and executables that link to those libraries may be subject to terms of the GNU LGPL, see the LGPL file. atk-0.7.0/Gir.toml010064400007650000024000000051711350341527500121430ustar0000000000000000[options] girs_dir = "gir-files" library = "Atk" version = "1.0" min_cfg_version = "2.14" target_path = "." work_mode = "normal" generate_safety_asserts = true deprecate_by_min_version = true single_version_file = true generate = [ "Atk.Component", "Atk.CoordType", "Atk.Document", "Atk.EventListener", "Atk.EventListenerInit", "Atk.FocusHandler", "Atk.GObjectAccessible", "Atk.Hyperlink", "Atk.HyperlinkImpl", "Atk.HyperlinkStateFlags", "Atk.Hypertext", # "Atk.Implementor", # "Atk.KeyEventStruct", "Atk.Layer", "Atk.NoOpObjectFactory", "Atk.ObjectFactory", "Atk.PropertyChangeHandler", # "Atk.PropertyValues", "Atk.Rectangle", "Atk.Registry", "Atk.Relation", "Atk.RelationType", "Atk.RelationSet", "Atk.Role", "Atk.ScrollType", "Atk.Selection", "Atk.State", "Atk.StateType", "Atk.StateSet", "Atk.StreamableContent", "Atk.TableCell", "Atk.TextAttribute", "Atk.TextBoundary", "Atk.TextClipType", "Atk.TextGranularity", "Atk.TextRange", "Atk.Util", "Atk.Value", "Atk.ValueType", ] ignore = [ ] manual = [ "Atk.Attribute", "Atk.AttributeSet", "Atk.TextRectangle", # "GLib.SList", # "GLib.IOChannel", "GObject.Object", "GObject.Value", "GObject.ValueArray", ] [[object]] name = "Atk.Action" status = "generate" trait_name = "AtkActionExt" # duplicate with gio [[object]] name = "Atk.EditableText" status = "generate" [[object.function]] name = "insert_text" # Expected pointer, received integer ignore = true [[object]] name = "Atk.Image" status = "generate" trait_name = "AtkImageExt" # duplicate with gtk [[object]] name = "Atk.Misc" status = "generate" trait_name = "AtkMiscExt" # duplicate with gtk [[object]] name = "Atk.NoOpObject" status = "generate" version = "2.12" [[object]] name = "Atk.Object" status = "generate" trait_name = "AtkObjectExt" [[object]] name = "Atk.Range" status = "generate" trait_name = "AtkRangeExt" # duplicate with gtk [[object]] name = "Atk.Table" status = "generate" [[object.function]] name = "get_selected_columns" ignore = true [[object.function]] name = "get_selected_rows" ignore = true [[object]] name = "Atk.Text" status = "generate" [[object.function]] name = "free_ranges" ignore = true # don't know yet how to give back memory... [[object]] name = "Atk.Window" status = "generate" trait_name = "AtkWindowExt" # duplicate with gtk [[object]] name = "Atk.Plug" status = "generate" trait_name = "AtkPlugExt" [[object]] name = "Atk.Socket" status = "generate" trait_name = "AtkSocketExt" atk-0.7.0/LGPL010064400007650000024000000613141350341527500112070ustar0000000000000000 GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! atk-0.7.0/LICENSE010064400007650000024000000021201350341527500115210ustar0000000000000000The MIT License (MIT) Copyright (c) 2013-2015, The Gtk-rs Project Developers. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. atk-0.7.0/Makefile010064400007650000024000000012611350341657000121600ustar0000000000000000GIR = gir/target/bin/gir GIR_SRC != find gir/src -name '*.rs' GIR_SRC += gir/Cargo.toml gir/Cargo.lock gir/build.rs GIR_FILES = gir-files/Gtk-3.0.gir # Run `gir` generating the bindings gir : src/auto/mod.rs cargo fmt doc: $(GIR) $(GIR_FILES) $(GIR) -m doc -c Gir.toml not_bound: $(GIR) $(GIR_FILES) $(GIR) -m not_bound -c Gir.toml regen_check: $(GIR) $(GIR_FILES) rm src/auto/* $(GIR) -c Gir.toml cargo fmt git diff -R --exit-code src/auto/mod.rs : Gir.toml $(GIR) $(GIR_FILES) $(GIR) -c Gir.toml $(GIR) : $(GIR_SRC) rm -f gir/target/bin/gir cargo install --path gir --root gir/target rm -f gir/target/.crates.toml $(GIR_SRC) $(GIR_FILES) : git submodule update --init atk-0.7.0/README.md010064400007650000024000000010371350341527500120010ustar0000000000000000# atk [![Build Status](https://travis-ci.org/gtk-rs/atk.png?branch=master)](https://travis-ci.org/gtk-rs/atk) [![Build status](https://ci.appveyor.com/api/projects/status/gaybdnw603c942a0?svg=true)](https://ci.appveyor.com/project/GuillaumeGomez/atk) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gtk-rs/atk) [Project site](http://gtk-rs.org/) | [Online documentation](http://gtk-rs.org/docs/) __Rust__ bindings and wrappers for __Atk__. ## License __Atk__ is available under the MIT License, please refer to it. atk-0.7.0/src/attribute.rs010064400007650000024000000023141350341657000136600ustar0000000000000000// Copyright 2013-2018, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or use atk_sys; use glib::translate::*; use glib::GString; use std::fmt; pub struct Attribute { pub name: GString, pub value: GString, } impl fmt::Display for Attribute { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("Attribute") .field("name", &self.name) .field("value", &self.value) .finish() } } #[doc(hidden)] impl FromGlib for Attribute { fn from_glib(value: atk_sys::AtkAttribute) -> Self { skip_assert_initialized!(); unsafe { Attribute { name: from_glib_full(value.name), value: from_glib_full(value.value), } } } } #[doc(hidden)] impl ToGlib for Attribute { type GlibType = atk_sys::AtkAttribute; fn to_glib(&self) -> atk_sys::AtkAttribute { atk_sys::AtkAttribute { name: self.name.to_glib_none().0, value: self.value.to_glib_none().0, } } } atk-0.7.0/src/attribute_set.rs010064400007650000024000000004361350341527500145370ustar0000000000000000// Copyright 2013-2018, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or use glib; pub type AttributeSet = glib::translate::SList; atk-0.7.0/src/auto/action.rs010064400007650000024000000050061350341657000141030ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use glib::GString; use std::fmt; glib_wrapper! { pub struct Action(Interface); match fn { get_type => || atk_sys::atk_action_get_type(), } } pub const NONE_ACTION: Option<&Action> = None; pub trait AtkActionExt: 'static { fn do_action(&self, i: i32) -> bool; fn get_description(&self, i: i32) -> Option; fn get_keybinding(&self, i: i32) -> Option; fn get_localized_name(&self, i: i32) -> Option; fn get_n_actions(&self) -> i32; fn get_name(&self, i: i32) -> Option; fn set_description(&self, i: i32, desc: &str) -> bool; } impl> AtkActionExt for O { fn do_action(&self, i: i32) -> bool { unsafe { from_glib(atk_sys::atk_action_do_action( self.as_ref().to_glib_none().0, i, )) } } fn get_description(&self, i: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_action_get_description( self.as_ref().to_glib_none().0, i, )) } } fn get_keybinding(&self, i: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_action_get_keybinding( self.as_ref().to_glib_none().0, i, )) } } fn get_localized_name(&self, i: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_action_get_localized_name( self.as_ref().to_glib_none().0, i, )) } } fn get_n_actions(&self) -> i32 { unsafe { atk_sys::atk_action_get_n_actions(self.as_ref().to_glib_none().0) } } fn get_name(&self, i: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_action_get_name( self.as_ref().to_glib_none().0, i, )) } } fn set_description(&self, i: i32, desc: &str) -> bool { unsafe { from_glib(atk_sys::atk_action_set_description( self.as_ref().to_glib_none().0, i, desc.to_glib_none().0, )) } } } impl fmt::Display for Action { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Action") } } atk-0.7.0/src/auto/alias.rs010064400007650000024000000003071350341527500137170ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT #[allow(unused_imports)] use auto::*; pub type State = u64; atk-0.7.0/src/auto/component.rs010064400007650000024000000157171350341657000146420ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib_sys; use std::boxed::Box as Box_; use std::fmt; use std::mem; use std::mem::transmute; use CoordType; use Layer; use Object; use Rectangle; #[cfg(any(feature = "v2_30", feature = "dox"))] use ScrollType; glib_wrapper! { pub struct Component(Interface); match fn { get_type => || atk_sys::atk_component_get_type(), } } pub const NONE_COMPONENT: Option<&Component> = None; pub trait ComponentExt: 'static { fn contains(&self, x: i32, y: i32, coord_type: CoordType) -> bool; fn get_alpha(&self) -> f64; fn get_extents(&self, coord_type: CoordType) -> (i32, i32, i32, i32); fn get_layer(&self) -> Layer; fn get_mdi_zorder(&self) -> i32; fn get_position(&self, coord_type: CoordType) -> (i32, i32); fn get_size(&self) -> (i32, i32); fn grab_focus(&self) -> bool; fn ref_accessible_at_point(&self, x: i32, y: i32, coord_type: CoordType) -> Option; #[cfg(any(feature = "v2_30", feature = "dox"))] fn scroll_to(&self, type_: ScrollType) -> bool; #[cfg(any(feature = "v2_30", feature = "dox"))] fn scroll_to_point(&self, coords: CoordType, x: i32, y: i32) -> bool; fn set_extents(&self, x: i32, y: i32, width: i32, height: i32, coord_type: CoordType) -> bool; fn set_position(&self, x: i32, y: i32, coord_type: CoordType) -> bool; fn set_size(&self, width: i32, height: i32) -> bool; fn connect_bounds_changed(&self, f: F) -> SignalHandlerId; } impl> ComponentExt for O { fn contains(&self, x: i32, y: i32, coord_type: CoordType) -> bool { unsafe { from_glib(atk_sys::atk_component_contains( self.as_ref().to_glib_none().0, x, y, coord_type.to_glib(), )) } } fn get_alpha(&self) -> f64 { unsafe { atk_sys::atk_component_get_alpha(self.as_ref().to_glib_none().0) } } fn get_extents(&self, coord_type: CoordType) -> (i32, i32, i32, i32) { unsafe { let mut x = mem::uninitialized(); let mut y = mem::uninitialized(); let mut width = mem::uninitialized(); let mut height = mem::uninitialized(); atk_sys::atk_component_get_extents( self.as_ref().to_glib_none().0, &mut x, &mut y, &mut width, &mut height, coord_type.to_glib(), ); (x, y, width, height) } } fn get_layer(&self) -> Layer { unsafe { from_glib(atk_sys::atk_component_get_layer( self.as_ref().to_glib_none().0, )) } } fn get_mdi_zorder(&self) -> i32 { unsafe { atk_sys::atk_component_get_mdi_zorder(self.as_ref().to_glib_none().0) } } fn get_position(&self, coord_type: CoordType) -> (i32, i32) { unsafe { let mut x = mem::uninitialized(); let mut y = mem::uninitialized(); atk_sys::atk_component_get_position( self.as_ref().to_glib_none().0, &mut x, &mut y, coord_type.to_glib(), ); (x, y) } } fn get_size(&self) -> (i32, i32) { unsafe { let mut width = mem::uninitialized(); let mut height = mem::uninitialized(); atk_sys::atk_component_get_size( self.as_ref().to_glib_none().0, &mut width, &mut height, ); (width, height) } } fn grab_focus(&self) -> bool { unsafe { from_glib(atk_sys::atk_component_grab_focus( self.as_ref().to_glib_none().0, )) } } fn ref_accessible_at_point(&self, x: i32, y: i32, coord_type: CoordType) -> Option { unsafe { from_glib_full(atk_sys::atk_component_ref_accessible_at_point( self.as_ref().to_glib_none().0, x, y, coord_type.to_glib(), )) } } #[cfg(any(feature = "v2_30", feature = "dox"))] fn scroll_to(&self, type_: ScrollType) -> bool { unsafe { from_glib(atk_sys::atk_component_scroll_to( self.as_ref().to_glib_none().0, type_.to_glib(), )) } } #[cfg(any(feature = "v2_30", feature = "dox"))] fn scroll_to_point(&self, coords: CoordType, x: i32, y: i32) -> bool { unsafe { from_glib(atk_sys::atk_component_scroll_to_point( self.as_ref().to_glib_none().0, coords.to_glib(), x, y, )) } } fn set_extents(&self, x: i32, y: i32, width: i32, height: i32, coord_type: CoordType) -> bool { unsafe { from_glib(atk_sys::atk_component_set_extents( self.as_ref().to_glib_none().0, x, y, width, height, coord_type.to_glib(), )) } } fn set_position(&self, x: i32, y: i32, coord_type: CoordType) -> bool { unsafe { from_glib(atk_sys::atk_component_set_position( self.as_ref().to_glib_none().0, x, y, coord_type.to_glib(), )) } } fn set_size(&self, width: i32, height: i32) -> bool { unsafe { from_glib(atk_sys::atk_component_set_size( self.as_ref().to_glib_none().0, width, height, )) } } fn connect_bounds_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn bounds_changed_trampoline( this: *mut atk_sys::AtkComponent, arg1: *mut atk_sys::AtkRectangle, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f( &Component::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(arg1), ) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"bounds-changed\0".as_ptr() as *const _, Some(transmute(bounds_changed_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Component { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Component") } } atk-0.7.0/src/auto/document.rs010064400007650000024000000136701350341657000144520ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::GString; use glib_sys; use libc; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; glib_wrapper! { pub struct Document(Interface); match fn { get_type => || atk_sys::atk_document_get_type(), } } pub const NONE_DOCUMENT: Option<&Document> = None; pub trait DocumentExt: 'static { fn get_attribute_value(&self, attribute_name: &str) -> Option; //fn get_attributes(&self) -> /*Ignored*/Option; fn get_current_page_number(&self) -> i32; //fn get_document(&self) -> /*Unimplemented*/Option; fn get_document_type(&self) -> Option; fn get_page_count(&self) -> i32; fn set_attribute_value(&self, attribute_name: &str, attribute_value: &str) -> bool; fn connect_load_complete(&self, f: F) -> SignalHandlerId; fn connect_load_stopped(&self, f: F) -> SignalHandlerId; fn connect_page_changed(&self, f: F) -> SignalHandlerId; fn connect_reload(&self, f: F) -> SignalHandlerId; } impl> DocumentExt for O { fn get_attribute_value(&self, attribute_name: &str) -> Option { unsafe { from_glib_none(atk_sys::atk_document_get_attribute_value( self.as_ref().to_glib_none().0, attribute_name.to_glib_none().0, )) } } //fn get_attributes(&self) -> /*Ignored*/Option { // unsafe { TODO: call atk_sys:atk_document_get_attributes() } //} fn get_current_page_number(&self) -> i32 { unsafe { atk_sys::atk_document_get_current_page_number(self.as_ref().to_glib_none().0) } } //fn get_document(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call atk_sys:atk_document_get_document() } //} fn get_document_type(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_document_get_document_type( self.as_ref().to_glib_none().0, )) } } fn get_page_count(&self) -> i32 { unsafe { atk_sys::atk_document_get_page_count(self.as_ref().to_glib_none().0) } } fn set_attribute_value(&self, attribute_name: &str, attribute_value: &str) -> bool { unsafe { from_glib(atk_sys::atk_document_set_attribute_value( self.as_ref().to_glib_none().0, attribute_name.to_glib_none().0, attribute_value.to_glib_none().0, )) } } fn connect_load_complete(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn load_complete_trampoline( this: *mut atk_sys::AtkDocument, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Document::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"load-complete\0".as_ptr() as *const _, Some(transmute(load_complete_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_load_stopped(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn load_stopped_trampoline( this: *mut atk_sys::AtkDocument, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Document::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"load-stopped\0".as_ptr() as *const _, Some(transmute(load_stopped_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_page_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn page_changed_trampoline( this: *mut atk_sys::AtkDocument, page_number: libc::c_int, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Document::from_glib_borrow(this).unsafe_cast(), page_number) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"page-changed\0".as_ptr() as *const _, Some(transmute(page_changed_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_reload(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn reload_trampoline( this: *mut atk_sys::AtkDocument, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Document::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"reload\0".as_ptr() as *const _, Some(transmute(reload_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Document { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Document") } } atk-0.7.0/src/auto/editable_text.rs010064400007650000024000000045171350341657000154510ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use std::fmt; glib_wrapper! { pub struct EditableText(Interface); match fn { get_type => || atk_sys::atk_editable_text_get_type(), } } pub const NONE_EDITABLE_TEXT: Option<&EditableText> = None; pub trait EditableTextExt: 'static { fn copy_text(&self, start_pos: i32, end_pos: i32); fn cut_text(&self, start_pos: i32, end_pos: i32); fn delete_text(&self, start_pos: i32, end_pos: i32); fn paste_text(&self, position: i32); //fn set_run_attributes(&self, attrib_set: /*Ignored*/&mut AttributeSet, start_offset: i32, end_offset: i32) -> bool; fn set_text_contents(&self, string: &str); } impl> EditableTextExt for O { fn copy_text(&self, start_pos: i32, end_pos: i32) { unsafe { atk_sys::atk_editable_text_copy_text( self.as_ref().to_glib_none().0, start_pos, end_pos, ); } } fn cut_text(&self, start_pos: i32, end_pos: i32) { unsafe { atk_sys::atk_editable_text_cut_text(self.as_ref().to_glib_none().0, start_pos, end_pos); } } fn delete_text(&self, start_pos: i32, end_pos: i32) { unsafe { atk_sys::atk_editable_text_delete_text( self.as_ref().to_glib_none().0, start_pos, end_pos, ); } } fn paste_text(&self, position: i32) { unsafe { atk_sys::atk_editable_text_paste_text(self.as_ref().to_glib_none().0, position); } } //fn set_run_attributes(&self, attrib_set: /*Ignored*/&mut AttributeSet, start_offset: i32, end_offset: i32) -> bool { // unsafe { TODO: call atk_sys:atk_editable_text_set_run_attributes() } //} fn set_text_contents(&self, string: &str) { unsafe { atk_sys::atk_editable_text_set_text_contents( self.as_ref().to_glib_none().0, string.to_glib_none().0, ); } } } impl fmt::Display for EditableText { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "EditableText") } } atk-0.7.0/src/auto/enums.rs010064400007650000024000001722731350341657000137700ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::translate::*; use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; use glib::StaticType; use glib::Type; use gobject_sys; use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum CoordType { Screen, Window, Parent, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for CoordType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "CoordType::{}", match *self { CoordType::Screen => "Screen", CoordType::Window => "Window", CoordType::Parent => "Parent", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for CoordType { type GlibType = atk_sys::AtkCoordType; fn to_glib(&self) -> atk_sys::AtkCoordType { match *self { CoordType::Screen => atk_sys::ATK_XY_SCREEN, CoordType::Window => atk_sys::ATK_XY_WINDOW, CoordType::Parent => atk_sys::ATK_XY_PARENT, CoordType::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for CoordType { fn from_glib(value: atk_sys::AtkCoordType) -> Self { skip_assert_initialized!(); match value { 0 => CoordType::Screen, 1 => CoordType::Window, 2 => CoordType::Parent, value => CoordType::__Unknown(value), } } } impl StaticType for CoordType { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_coord_type_get_type()) } } } impl<'a> FromValueOptional<'a> for CoordType { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for CoordType { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for CoordType { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum Layer { Invalid, Background, Canvas, Widget, Mdi, Popup, Overlay, Window, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for Layer { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "Layer::{}", match *self { Layer::Invalid => "Invalid", Layer::Background => "Background", Layer::Canvas => "Canvas", Layer::Widget => "Widget", Layer::Mdi => "Mdi", Layer::Popup => "Popup", Layer::Overlay => "Overlay", Layer::Window => "Window", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for Layer { type GlibType = atk_sys::AtkLayer; fn to_glib(&self) -> atk_sys::AtkLayer { match *self { Layer::Invalid => atk_sys::ATK_LAYER_INVALID, Layer::Background => atk_sys::ATK_LAYER_BACKGROUND, Layer::Canvas => atk_sys::ATK_LAYER_CANVAS, Layer::Widget => atk_sys::ATK_LAYER_WIDGET, Layer::Mdi => atk_sys::ATK_LAYER_MDI, Layer::Popup => atk_sys::ATK_LAYER_POPUP, Layer::Overlay => atk_sys::ATK_LAYER_OVERLAY, Layer::Window => atk_sys::ATK_LAYER_WINDOW, Layer::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for Layer { fn from_glib(value: atk_sys::AtkLayer) -> Self { skip_assert_initialized!(); match value { 0 => Layer::Invalid, 1 => Layer::Background, 2 => Layer::Canvas, 3 => Layer::Widget, 4 => Layer::Mdi, 5 => Layer::Popup, 6 => Layer::Overlay, 7 => Layer::Window, value => Layer::__Unknown(value), } } } impl StaticType for Layer { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_layer_get_type()) } } } impl<'a> FromValueOptional<'a> for Layer { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for Layer { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for Layer { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum RelationType { Null, ControlledBy, ControllerFor, LabelFor, LabelledBy, MemberOf, NodeChildOf, FlowsTo, FlowsFrom, SubwindowOf, Embeds, EmbeddedBy, PopupFor, ParentWindowOf, DescribedBy, DescriptionFor, NodeParentOf, Details, DetailsFor, ErrorMessage, ErrorFor, LastDefined, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for RelationType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "RelationType::{}", match *self { RelationType::Null => "Null", RelationType::ControlledBy => "ControlledBy", RelationType::ControllerFor => "ControllerFor", RelationType::LabelFor => "LabelFor", RelationType::LabelledBy => "LabelledBy", RelationType::MemberOf => "MemberOf", RelationType::NodeChildOf => "NodeChildOf", RelationType::FlowsTo => "FlowsTo", RelationType::FlowsFrom => "FlowsFrom", RelationType::SubwindowOf => "SubwindowOf", RelationType::Embeds => "Embeds", RelationType::EmbeddedBy => "EmbeddedBy", RelationType::PopupFor => "PopupFor", RelationType::ParentWindowOf => "ParentWindowOf", RelationType::DescribedBy => "DescribedBy", RelationType::DescriptionFor => "DescriptionFor", RelationType::NodeParentOf => "NodeParentOf", RelationType::Details => "Details", RelationType::DetailsFor => "DetailsFor", RelationType::ErrorMessage => "ErrorMessage", RelationType::ErrorFor => "ErrorFor", RelationType::LastDefined => "LastDefined", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for RelationType { type GlibType = atk_sys::AtkRelationType; fn to_glib(&self) -> atk_sys::AtkRelationType { match *self { RelationType::Null => atk_sys::ATK_RELATION_NULL, RelationType::ControlledBy => atk_sys::ATK_RELATION_CONTROLLED_BY, RelationType::ControllerFor => atk_sys::ATK_RELATION_CONTROLLER_FOR, RelationType::LabelFor => atk_sys::ATK_RELATION_LABEL_FOR, RelationType::LabelledBy => atk_sys::ATK_RELATION_LABELLED_BY, RelationType::MemberOf => atk_sys::ATK_RELATION_MEMBER_OF, RelationType::NodeChildOf => atk_sys::ATK_RELATION_NODE_CHILD_OF, RelationType::FlowsTo => atk_sys::ATK_RELATION_FLOWS_TO, RelationType::FlowsFrom => atk_sys::ATK_RELATION_FLOWS_FROM, RelationType::SubwindowOf => atk_sys::ATK_RELATION_SUBWINDOW_OF, RelationType::Embeds => atk_sys::ATK_RELATION_EMBEDS, RelationType::EmbeddedBy => atk_sys::ATK_RELATION_EMBEDDED_BY, RelationType::PopupFor => atk_sys::ATK_RELATION_POPUP_FOR, RelationType::ParentWindowOf => atk_sys::ATK_RELATION_PARENT_WINDOW_OF, RelationType::DescribedBy => atk_sys::ATK_RELATION_DESCRIBED_BY, RelationType::DescriptionFor => atk_sys::ATK_RELATION_DESCRIPTION_FOR, RelationType::NodeParentOf => atk_sys::ATK_RELATION_NODE_PARENT_OF, RelationType::Details => atk_sys::ATK_RELATION_DETAILS, RelationType::DetailsFor => atk_sys::ATK_RELATION_DETAILS_FOR, RelationType::ErrorMessage => atk_sys::ATK_RELATION_ERROR_MESSAGE, RelationType::ErrorFor => atk_sys::ATK_RELATION_ERROR_FOR, RelationType::LastDefined => atk_sys::ATK_RELATION_LAST_DEFINED, RelationType::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for RelationType { fn from_glib(value: atk_sys::AtkRelationType) -> Self { skip_assert_initialized!(); match value { 0 => RelationType::Null, 1 => RelationType::ControlledBy, 2 => RelationType::ControllerFor, 3 => RelationType::LabelFor, 4 => RelationType::LabelledBy, 5 => RelationType::MemberOf, 6 => RelationType::NodeChildOf, 7 => RelationType::FlowsTo, 8 => RelationType::FlowsFrom, 9 => RelationType::SubwindowOf, 10 => RelationType::Embeds, 11 => RelationType::EmbeddedBy, 12 => RelationType::PopupFor, 13 => RelationType::ParentWindowOf, 14 => RelationType::DescribedBy, 15 => RelationType::DescriptionFor, 16 => RelationType::NodeParentOf, 17 => RelationType::Details, 18 => RelationType::DetailsFor, 19 => RelationType::ErrorMessage, 20 => RelationType::ErrorFor, 21 => RelationType::LastDefined, value => RelationType::__Unknown(value), } } } impl StaticType for RelationType { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_relation_type_get_type()) } } } impl<'a> FromValueOptional<'a> for RelationType { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for RelationType { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for RelationType { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum Role { Invalid, AcceleratorLabel, Alert, Animation, Arrow, Calendar, Canvas, CheckBox, CheckMenuItem, ColorChooser, ColumnHeader, ComboBox, DateEditor, DesktopIcon, DesktopFrame, Dial, Dialog, DirectoryPane, DrawingArea, FileChooser, Filler, FontChooser, Frame, GlassPane, HtmlContainer, Icon, Image, InternalFrame, Label, LayeredPane, List, ListItem, Menu, MenuBar, MenuItem, OptionPane, PageTab, PageTabList, Panel, PasswordText, PopupMenu, ProgressBar, PushButton, RadioButton, RadioMenuItem, RootPane, RowHeader, ScrollBar, ScrollPane, Separator, Slider, SplitPane, SpinButton, Statusbar, Table, TableCell, TableColumnHeader, TableRowHeader, TearOffMenuItem, Terminal, Text, ToggleButton, ToolBar, ToolTip, Tree, TreeTable, Unknown, Viewport, Window, Header, Footer, Paragraph, Ruler, Application, Autocomplete, EditBar, Embedded, Entry, Chart, Caption, DocumentFrame, Heading, Page, Section, RedundantObject, Form, Link, InputMethodWindow, TableRow, TreeItem, DocumentSpreadsheet, DocumentPresentation, DocumentText, DocumentWeb, DocumentEmail, Comment, ListBox, Grouping, ImageMap, Notification, InfoBar, LevelBar, TitleBar, BlockQuote, Audio, Video, Definition, Article, Landmark, Log, Marquee, Math, Rating, Timer, DescriptionList, DescriptionTerm, DescriptionValue, Static, MathFraction, MathRoot, Subscript, Superscript, Footnote, LastDefined, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for Role { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "Role::{}", match *self { Role::Invalid => "Invalid", Role::AcceleratorLabel => "AcceleratorLabel", Role::Alert => "Alert", Role::Animation => "Animation", Role::Arrow => "Arrow", Role::Calendar => "Calendar", Role::Canvas => "Canvas", Role::CheckBox => "CheckBox", Role::CheckMenuItem => "CheckMenuItem", Role::ColorChooser => "ColorChooser", Role::ColumnHeader => "ColumnHeader", Role::ComboBox => "ComboBox", Role::DateEditor => "DateEditor", Role::DesktopIcon => "DesktopIcon", Role::DesktopFrame => "DesktopFrame", Role::Dial => "Dial", Role::Dialog => "Dialog", Role::DirectoryPane => "DirectoryPane", Role::DrawingArea => "DrawingArea", Role::FileChooser => "FileChooser", Role::Filler => "Filler", Role::FontChooser => "FontChooser", Role::Frame => "Frame", Role::GlassPane => "GlassPane", Role::HtmlContainer => "HtmlContainer", Role::Icon => "Icon", Role::Image => "Image", Role::InternalFrame => "InternalFrame", Role::Label => "Label", Role::LayeredPane => "LayeredPane", Role::List => "List", Role::ListItem => "ListItem", Role::Menu => "Menu", Role::MenuBar => "MenuBar", Role::MenuItem => "MenuItem", Role::OptionPane => "OptionPane", Role::PageTab => "PageTab", Role::PageTabList => "PageTabList", Role::Panel => "Panel", Role::PasswordText => "PasswordText", Role::PopupMenu => "PopupMenu", Role::ProgressBar => "ProgressBar", Role::PushButton => "PushButton", Role::RadioButton => "RadioButton", Role::RadioMenuItem => "RadioMenuItem", Role::RootPane => "RootPane", Role::RowHeader => "RowHeader", Role::ScrollBar => "ScrollBar", Role::ScrollPane => "ScrollPane", Role::Separator => "Separator", Role::Slider => "Slider", Role::SplitPane => "SplitPane", Role::SpinButton => "SpinButton", Role::Statusbar => "Statusbar", Role::Table => "Table", Role::TableCell => "TableCell", Role::TableColumnHeader => "TableColumnHeader", Role::TableRowHeader => "TableRowHeader", Role::TearOffMenuItem => "TearOffMenuItem", Role::Terminal => "Terminal", Role::Text => "Text", Role::ToggleButton => "ToggleButton", Role::ToolBar => "ToolBar", Role::ToolTip => "ToolTip", Role::Tree => "Tree", Role::TreeTable => "TreeTable", Role::Unknown => "Unknown", Role::Viewport => "Viewport", Role::Window => "Window", Role::Header => "Header", Role::Footer => "Footer", Role::Paragraph => "Paragraph", Role::Ruler => "Ruler", Role::Application => "Application", Role::Autocomplete => "Autocomplete", Role::EditBar => "EditBar", Role::Embedded => "Embedded", Role::Entry => "Entry", Role::Chart => "Chart", Role::Caption => "Caption", Role::DocumentFrame => "DocumentFrame", Role::Heading => "Heading", Role::Page => "Page", Role::Section => "Section", Role::RedundantObject => "RedundantObject", Role::Form => "Form", Role::Link => "Link", Role::InputMethodWindow => "InputMethodWindow", Role::TableRow => "TableRow", Role::TreeItem => "TreeItem", Role::DocumentSpreadsheet => "DocumentSpreadsheet", Role::DocumentPresentation => "DocumentPresentation", Role::DocumentText => "DocumentText", Role::DocumentWeb => "DocumentWeb", Role::DocumentEmail => "DocumentEmail", Role::Comment => "Comment", Role::ListBox => "ListBox", Role::Grouping => "Grouping", Role::ImageMap => "ImageMap", Role::Notification => "Notification", Role::InfoBar => "InfoBar", Role::LevelBar => "LevelBar", Role::TitleBar => "TitleBar", Role::BlockQuote => "BlockQuote", Role::Audio => "Audio", Role::Video => "Video", Role::Definition => "Definition", Role::Article => "Article", Role::Landmark => "Landmark", Role::Log => "Log", Role::Marquee => "Marquee", Role::Math => "Math", Role::Rating => "Rating", Role::Timer => "Timer", Role::DescriptionList => "DescriptionList", Role::DescriptionTerm => "DescriptionTerm", Role::DescriptionValue => "DescriptionValue", Role::Static => "Static", Role::MathFraction => "MathFraction", Role::MathRoot => "MathRoot", Role::Subscript => "Subscript", Role::Superscript => "Superscript", Role::Footnote => "Footnote", Role::LastDefined => "LastDefined", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for Role { type GlibType = atk_sys::AtkRole; fn to_glib(&self) -> atk_sys::AtkRole { match *self { Role::Invalid => atk_sys::ATK_ROLE_INVALID, Role::AcceleratorLabel => atk_sys::ATK_ROLE_ACCEL_LABEL, Role::Alert => atk_sys::ATK_ROLE_ALERT, Role::Animation => atk_sys::ATK_ROLE_ANIMATION, Role::Arrow => atk_sys::ATK_ROLE_ARROW, Role::Calendar => atk_sys::ATK_ROLE_CALENDAR, Role::Canvas => atk_sys::ATK_ROLE_CANVAS, Role::CheckBox => atk_sys::ATK_ROLE_CHECK_BOX, Role::CheckMenuItem => atk_sys::ATK_ROLE_CHECK_MENU_ITEM, Role::ColorChooser => atk_sys::ATK_ROLE_COLOR_CHOOSER, Role::ColumnHeader => atk_sys::ATK_ROLE_COLUMN_HEADER, Role::ComboBox => atk_sys::ATK_ROLE_COMBO_BOX, Role::DateEditor => atk_sys::ATK_ROLE_DATE_EDITOR, Role::DesktopIcon => atk_sys::ATK_ROLE_DESKTOP_ICON, Role::DesktopFrame => atk_sys::ATK_ROLE_DESKTOP_FRAME, Role::Dial => atk_sys::ATK_ROLE_DIAL, Role::Dialog => atk_sys::ATK_ROLE_DIALOG, Role::DirectoryPane => atk_sys::ATK_ROLE_DIRECTORY_PANE, Role::DrawingArea => atk_sys::ATK_ROLE_DRAWING_AREA, Role::FileChooser => atk_sys::ATK_ROLE_FILE_CHOOSER, Role::Filler => atk_sys::ATK_ROLE_FILLER, Role::FontChooser => atk_sys::ATK_ROLE_FONT_CHOOSER, Role::Frame => atk_sys::ATK_ROLE_FRAME, Role::GlassPane => atk_sys::ATK_ROLE_GLASS_PANE, Role::HtmlContainer => atk_sys::ATK_ROLE_HTML_CONTAINER, Role::Icon => atk_sys::ATK_ROLE_ICON, Role::Image => atk_sys::ATK_ROLE_IMAGE, Role::InternalFrame => atk_sys::ATK_ROLE_INTERNAL_FRAME, Role::Label => atk_sys::ATK_ROLE_LABEL, Role::LayeredPane => atk_sys::ATK_ROLE_LAYERED_PANE, Role::List => atk_sys::ATK_ROLE_LIST, Role::ListItem => atk_sys::ATK_ROLE_LIST_ITEM, Role::Menu => atk_sys::ATK_ROLE_MENU, Role::MenuBar => atk_sys::ATK_ROLE_MENU_BAR, Role::MenuItem => atk_sys::ATK_ROLE_MENU_ITEM, Role::OptionPane => atk_sys::ATK_ROLE_OPTION_PANE, Role::PageTab => atk_sys::ATK_ROLE_PAGE_TAB, Role::PageTabList => atk_sys::ATK_ROLE_PAGE_TAB_LIST, Role::Panel => atk_sys::ATK_ROLE_PANEL, Role::PasswordText => atk_sys::ATK_ROLE_PASSWORD_TEXT, Role::PopupMenu => atk_sys::ATK_ROLE_POPUP_MENU, Role::ProgressBar => atk_sys::ATK_ROLE_PROGRESS_BAR, Role::PushButton => atk_sys::ATK_ROLE_PUSH_BUTTON, Role::RadioButton => atk_sys::ATK_ROLE_RADIO_BUTTON, Role::RadioMenuItem => atk_sys::ATK_ROLE_RADIO_MENU_ITEM, Role::RootPane => atk_sys::ATK_ROLE_ROOT_PANE, Role::RowHeader => atk_sys::ATK_ROLE_ROW_HEADER, Role::ScrollBar => atk_sys::ATK_ROLE_SCROLL_BAR, Role::ScrollPane => atk_sys::ATK_ROLE_SCROLL_PANE, Role::Separator => atk_sys::ATK_ROLE_SEPARATOR, Role::Slider => atk_sys::ATK_ROLE_SLIDER, Role::SplitPane => atk_sys::ATK_ROLE_SPLIT_PANE, Role::SpinButton => atk_sys::ATK_ROLE_SPIN_BUTTON, Role::Statusbar => atk_sys::ATK_ROLE_STATUSBAR, Role::Table => atk_sys::ATK_ROLE_TABLE, Role::TableCell => atk_sys::ATK_ROLE_TABLE_CELL, Role::TableColumnHeader => atk_sys::ATK_ROLE_TABLE_COLUMN_HEADER, Role::TableRowHeader => atk_sys::ATK_ROLE_TABLE_ROW_HEADER, Role::TearOffMenuItem => atk_sys::ATK_ROLE_TEAR_OFF_MENU_ITEM, Role::Terminal => atk_sys::ATK_ROLE_TERMINAL, Role::Text => atk_sys::ATK_ROLE_TEXT, Role::ToggleButton => atk_sys::ATK_ROLE_TOGGLE_BUTTON, Role::ToolBar => atk_sys::ATK_ROLE_TOOL_BAR, Role::ToolTip => atk_sys::ATK_ROLE_TOOL_TIP, Role::Tree => atk_sys::ATK_ROLE_TREE, Role::TreeTable => atk_sys::ATK_ROLE_TREE_TABLE, Role::Unknown => atk_sys::ATK_ROLE_UNKNOWN, Role::Viewport => atk_sys::ATK_ROLE_VIEWPORT, Role::Window => atk_sys::ATK_ROLE_WINDOW, Role::Header => atk_sys::ATK_ROLE_HEADER, Role::Footer => atk_sys::ATK_ROLE_FOOTER, Role::Paragraph => atk_sys::ATK_ROLE_PARAGRAPH, Role::Ruler => atk_sys::ATK_ROLE_RULER, Role::Application => atk_sys::ATK_ROLE_APPLICATION, Role::Autocomplete => atk_sys::ATK_ROLE_AUTOCOMPLETE, Role::EditBar => atk_sys::ATK_ROLE_EDITBAR, Role::Embedded => atk_sys::ATK_ROLE_EMBEDDED, Role::Entry => atk_sys::ATK_ROLE_ENTRY, Role::Chart => atk_sys::ATK_ROLE_CHART, Role::Caption => atk_sys::ATK_ROLE_CAPTION, Role::DocumentFrame => atk_sys::ATK_ROLE_DOCUMENT_FRAME, Role::Heading => atk_sys::ATK_ROLE_HEADING, Role::Page => atk_sys::ATK_ROLE_PAGE, Role::Section => atk_sys::ATK_ROLE_SECTION, Role::RedundantObject => atk_sys::ATK_ROLE_REDUNDANT_OBJECT, Role::Form => atk_sys::ATK_ROLE_FORM, Role::Link => atk_sys::ATK_ROLE_LINK, Role::InputMethodWindow => atk_sys::ATK_ROLE_INPUT_METHOD_WINDOW, Role::TableRow => atk_sys::ATK_ROLE_TABLE_ROW, Role::TreeItem => atk_sys::ATK_ROLE_TREE_ITEM, Role::DocumentSpreadsheet => atk_sys::ATK_ROLE_DOCUMENT_SPREADSHEET, Role::DocumentPresentation => atk_sys::ATK_ROLE_DOCUMENT_PRESENTATION, Role::DocumentText => atk_sys::ATK_ROLE_DOCUMENT_TEXT, Role::DocumentWeb => atk_sys::ATK_ROLE_DOCUMENT_WEB, Role::DocumentEmail => atk_sys::ATK_ROLE_DOCUMENT_EMAIL, Role::Comment => atk_sys::ATK_ROLE_COMMENT, Role::ListBox => atk_sys::ATK_ROLE_LIST_BOX, Role::Grouping => atk_sys::ATK_ROLE_GROUPING, Role::ImageMap => atk_sys::ATK_ROLE_IMAGE_MAP, Role::Notification => atk_sys::ATK_ROLE_NOTIFICATION, Role::InfoBar => atk_sys::ATK_ROLE_INFO_BAR, Role::LevelBar => atk_sys::ATK_ROLE_LEVEL_BAR, Role::TitleBar => atk_sys::ATK_ROLE_TITLE_BAR, Role::BlockQuote => atk_sys::ATK_ROLE_BLOCK_QUOTE, Role::Audio => atk_sys::ATK_ROLE_AUDIO, Role::Video => atk_sys::ATK_ROLE_VIDEO, Role::Definition => atk_sys::ATK_ROLE_DEFINITION, Role::Article => atk_sys::ATK_ROLE_ARTICLE, Role::Landmark => atk_sys::ATK_ROLE_LANDMARK, Role::Log => atk_sys::ATK_ROLE_LOG, Role::Marquee => atk_sys::ATK_ROLE_MARQUEE, Role::Math => atk_sys::ATK_ROLE_MATH, Role::Rating => atk_sys::ATK_ROLE_RATING, Role::Timer => atk_sys::ATK_ROLE_TIMER, Role::DescriptionList => atk_sys::ATK_ROLE_DESCRIPTION_LIST, Role::DescriptionTerm => atk_sys::ATK_ROLE_DESCRIPTION_TERM, Role::DescriptionValue => atk_sys::ATK_ROLE_DESCRIPTION_VALUE, Role::Static => atk_sys::ATK_ROLE_STATIC, Role::MathFraction => atk_sys::ATK_ROLE_MATH_FRACTION, Role::MathRoot => atk_sys::ATK_ROLE_MATH_ROOT, Role::Subscript => atk_sys::ATK_ROLE_SUBSCRIPT, Role::Superscript => atk_sys::ATK_ROLE_SUPERSCRIPT, Role::Footnote => atk_sys::ATK_ROLE_FOOTNOTE, Role::LastDefined => atk_sys::ATK_ROLE_LAST_DEFINED, Role::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for Role { fn from_glib(value: atk_sys::AtkRole) -> Self { skip_assert_initialized!(); match value { 0 => Role::Invalid, 1 => Role::AcceleratorLabel, 2 => Role::Alert, 3 => Role::Animation, 4 => Role::Arrow, 5 => Role::Calendar, 6 => Role::Canvas, 7 => Role::CheckBox, 8 => Role::CheckMenuItem, 9 => Role::ColorChooser, 10 => Role::ColumnHeader, 11 => Role::ComboBox, 12 => Role::DateEditor, 13 => Role::DesktopIcon, 14 => Role::DesktopFrame, 15 => Role::Dial, 16 => Role::Dialog, 17 => Role::DirectoryPane, 18 => Role::DrawingArea, 19 => Role::FileChooser, 20 => Role::Filler, 21 => Role::FontChooser, 22 => Role::Frame, 23 => Role::GlassPane, 24 => Role::HtmlContainer, 25 => Role::Icon, 26 => Role::Image, 27 => Role::InternalFrame, 28 => Role::Label, 29 => Role::LayeredPane, 30 => Role::List, 31 => Role::ListItem, 32 => Role::Menu, 33 => Role::MenuBar, 34 => Role::MenuItem, 35 => Role::OptionPane, 36 => Role::PageTab, 37 => Role::PageTabList, 38 => Role::Panel, 39 => Role::PasswordText, 40 => Role::PopupMenu, 41 => Role::ProgressBar, 42 => Role::PushButton, 43 => Role::RadioButton, 44 => Role::RadioMenuItem, 45 => Role::RootPane, 46 => Role::RowHeader, 47 => Role::ScrollBar, 48 => Role::ScrollPane, 49 => Role::Separator, 50 => Role::Slider, 51 => Role::SplitPane, 52 => Role::SpinButton, 53 => Role::Statusbar, 54 => Role::Table, 55 => Role::TableCell, 56 => Role::TableColumnHeader, 57 => Role::TableRowHeader, 58 => Role::TearOffMenuItem, 59 => Role::Terminal, 60 => Role::Text, 61 => Role::ToggleButton, 62 => Role::ToolBar, 63 => Role::ToolTip, 64 => Role::Tree, 65 => Role::TreeTable, 66 => Role::Unknown, 67 => Role::Viewport, 68 => Role::Window, 69 => Role::Header, 70 => Role::Footer, 71 => Role::Paragraph, 72 => Role::Ruler, 73 => Role::Application, 74 => Role::Autocomplete, 75 => Role::EditBar, 76 => Role::Embedded, 77 => Role::Entry, 78 => Role::Chart, 79 => Role::Caption, 80 => Role::DocumentFrame, 81 => Role::Heading, 82 => Role::Page, 83 => Role::Section, 84 => Role::RedundantObject, 85 => Role::Form, 86 => Role::Link, 87 => Role::InputMethodWindow, 88 => Role::TableRow, 89 => Role::TreeItem, 90 => Role::DocumentSpreadsheet, 91 => Role::DocumentPresentation, 92 => Role::DocumentText, 93 => Role::DocumentWeb, 94 => Role::DocumentEmail, 95 => Role::Comment, 96 => Role::ListBox, 97 => Role::Grouping, 98 => Role::ImageMap, 99 => Role::Notification, 100 => Role::InfoBar, 101 => Role::LevelBar, 102 => Role::TitleBar, 103 => Role::BlockQuote, 104 => Role::Audio, 105 => Role::Video, 106 => Role::Definition, 107 => Role::Article, 108 => Role::Landmark, 109 => Role::Log, 110 => Role::Marquee, 111 => Role::Math, 112 => Role::Rating, 113 => Role::Timer, 114 => Role::DescriptionList, 115 => Role::DescriptionTerm, 116 => Role::DescriptionValue, 117 => Role::Static, 118 => Role::MathFraction, 119 => Role::MathRoot, 120 => Role::Subscript, 121 => Role::Superscript, 122 => Role::Footnote, 123 => Role::LastDefined, value => Role::__Unknown(value), } } } impl StaticType for Role { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_role_get_type()) } } } impl<'a> FromValueOptional<'a> for Role { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for Role { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for Role { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[cfg(any(feature = "v2_30", feature = "dox"))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum ScrollType { TopLeft, BottomRight, TopEdge, BottomEdge, LeftEdge, RightEdge, Anywhere, #[doc(hidden)] __Unknown(i32), } #[cfg(any(feature = "v2_30", feature = "dox"))] impl fmt::Display for ScrollType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "ScrollType::{}", match *self { ScrollType::TopLeft => "TopLeft", ScrollType::BottomRight => "BottomRight", ScrollType::TopEdge => "TopEdge", ScrollType::BottomEdge => "BottomEdge", ScrollType::LeftEdge => "LeftEdge", ScrollType::RightEdge => "RightEdge", ScrollType::Anywhere => "Anywhere", _ => "Unknown", } ) } } #[cfg(any(feature = "v2_30", feature = "dox"))] #[doc(hidden)] impl ToGlib for ScrollType { type GlibType = atk_sys::AtkScrollType; fn to_glib(&self) -> atk_sys::AtkScrollType { match *self { ScrollType::TopLeft => atk_sys::ATK_SCROLL_TOP_LEFT, ScrollType::BottomRight => atk_sys::ATK_SCROLL_BOTTOM_RIGHT, ScrollType::TopEdge => atk_sys::ATK_SCROLL_TOP_EDGE, ScrollType::BottomEdge => atk_sys::ATK_SCROLL_BOTTOM_EDGE, ScrollType::LeftEdge => atk_sys::ATK_SCROLL_LEFT_EDGE, ScrollType::RightEdge => atk_sys::ATK_SCROLL_RIGHT_EDGE, ScrollType::Anywhere => atk_sys::ATK_SCROLL_ANYWHERE, ScrollType::__Unknown(value) => value, } } } #[cfg(any(feature = "v2_30", feature = "dox"))] #[doc(hidden)] impl FromGlib for ScrollType { fn from_glib(value: atk_sys::AtkScrollType) -> Self { skip_assert_initialized!(); match value { 0 => ScrollType::TopLeft, 1 => ScrollType::BottomRight, 2 => ScrollType::TopEdge, 3 => ScrollType::BottomEdge, 4 => ScrollType::LeftEdge, 5 => ScrollType::RightEdge, 6 => ScrollType::Anywhere, value => ScrollType::__Unknown(value), } } } #[cfg(any(feature = "v2_30", feature = "dox"))] impl StaticType for ScrollType { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_scroll_type_get_type()) } } } #[cfg(any(feature = "v2_30", feature = "dox"))] impl<'a> FromValueOptional<'a> for ScrollType { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } #[cfg(any(feature = "v2_30", feature = "dox"))] impl<'a> FromValue<'a> for ScrollType { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } #[cfg(any(feature = "v2_30", feature = "dox"))] impl SetValue for ScrollType { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum StateType { Invalid, Active, Armed, Busy, Checked, Defunct, Editable, Enabled, Expandable, Expanded, Focusable, Focused, Horizontal, Iconified, Modal, MultiLine, Multiselectable, Opaque, Pressed, Resizable, Selectable, Selected, Sensitive, Showing, SingleLine, Stale, Transient, Vertical, Visible, ManagesDescendants, Indeterminate, Truncated, Required, InvalidEntry, SupportsAutocompletion, SelectableText, Default, Animated, Visited, Checkable, HasPopup, HasTooltip, ReadOnly, LastDefined, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for StateType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "StateType::{}", match *self { StateType::Invalid => "Invalid", StateType::Active => "Active", StateType::Armed => "Armed", StateType::Busy => "Busy", StateType::Checked => "Checked", StateType::Defunct => "Defunct", StateType::Editable => "Editable", StateType::Enabled => "Enabled", StateType::Expandable => "Expandable", StateType::Expanded => "Expanded", StateType::Focusable => "Focusable", StateType::Focused => "Focused", StateType::Horizontal => "Horizontal", StateType::Iconified => "Iconified", StateType::Modal => "Modal", StateType::MultiLine => "MultiLine", StateType::Multiselectable => "Multiselectable", StateType::Opaque => "Opaque", StateType::Pressed => "Pressed", StateType::Resizable => "Resizable", StateType::Selectable => "Selectable", StateType::Selected => "Selected", StateType::Sensitive => "Sensitive", StateType::Showing => "Showing", StateType::SingleLine => "SingleLine", StateType::Stale => "Stale", StateType::Transient => "Transient", StateType::Vertical => "Vertical", StateType::Visible => "Visible", StateType::ManagesDescendants => "ManagesDescendants", StateType::Indeterminate => "Indeterminate", StateType::Truncated => "Truncated", StateType::Required => "Required", StateType::InvalidEntry => "InvalidEntry", StateType::SupportsAutocompletion => "SupportsAutocompletion", StateType::SelectableText => "SelectableText", StateType::Default => "Default", StateType::Animated => "Animated", StateType::Visited => "Visited", StateType::Checkable => "Checkable", StateType::HasPopup => "HasPopup", StateType::HasTooltip => "HasTooltip", StateType::ReadOnly => "ReadOnly", StateType::LastDefined => "LastDefined", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for StateType { type GlibType = atk_sys::AtkStateType; fn to_glib(&self) -> atk_sys::AtkStateType { match *self { StateType::Invalid => atk_sys::ATK_STATE_INVALID, StateType::Active => atk_sys::ATK_STATE_ACTIVE, StateType::Armed => atk_sys::ATK_STATE_ARMED, StateType::Busy => atk_sys::ATK_STATE_BUSY, StateType::Checked => atk_sys::ATK_STATE_CHECKED, StateType::Defunct => atk_sys::ATK_STATE_DEFUNCT, StateType::Editable => atk_sys::ATK_STATE_EDITABLE, StateType::Enabled => atk_sys::ATK_STATE_ENABLED, StateType::Expandable => atk_sys::ATK_STATE_EXPANDABLE, StateType::Expanded => atk_sys::ATK_STATE_EXPANDED, StateType::Focusable => atk_sys::ATK_STATE_FOCUSABLE, StateType::Focused => atk_sys::ATK_STATE_FOCUSED, StateType::Horizontal => atk_sys::ATK_STATE_HORIZONTAL, StateType::Iconified => atk_sys::ATK_STATE_ICONIFIED, StateType::Modal => atk_sys::ATK_STATE_MODAL, StateType::MultiLine => atk_sys::ATK_STATE_MULTI_LINE, StateType::Multiselectable => atk_sys::ATK_STATE_MULTISELECTABLE, StateType::Opaque => atk_sys::ATK_STATE_OPAQUE, StateType::Pressed => atk_sys::ATK_STATE_PRESSED, StateType::Resizable => atk_sys::ATK_STATE_RESIZABLE, StateType::Selectable => atk_sys::ATK_STATE_SELECTABLE, StateType::Selected => atk_sys::ATK_STATE_SELECTED, StateType::Sensitive => atk_sys::ATK_STATE_SENSITIVE, StateType::Showing => atk_sys::ATK_STATE_SHOWING, StateType::SingleLine => atk_sys::ATK_STATE_SINGLE_LINE, StateType::Stale => atk_sys::ATK_STATE_STALE, StateType::Transient => atk_sys::ATK_STATE_TRANSIENT, StateType::Vertical => atk_sys::ATK_STATE_VERTICAL, StateType::Visible => atk_sys::ATK_STATE_VISIBLE, StateType::ManagesDescendants => atk_sys::ATK_STATE_MANAGES_DESCENDANTS, StateType::Indeterminate => atk_sys::ATK_STATE_INDETERMINATE, StateType::Truncated => atk_sys::ATK_STATE_TRUNCATED, StateType::Required => atk_sys::ATK_STATE_REQUIRED, StateType::InvalidEntry => atk_sys::ATK_STATE_INVALID_ENTRY, StateType::SupportsAutocompletion => atk_sys::ATK_STATE_SUPPORTS_AUTOCOMPLETION, StateType::SelectableText => atk_sys::ATK_STATE_SELECTABLE_TEXT, StateType::Default => atk_sys::ATK_STATE_DEFAULT, StateType::Animated => atk_sys::ATK_STATE_ANIMATED, StateType::Visited => atk_sys::ATK_STATE_VISITED, StateType::Checkable => atk_sys::ATK_STATE_CHECKABLE, StateType::HasPopup => atk_sys::ATK_STATE_HAS_POPUP, StateType::HasTooltip => atk_sys::ATK_STATE_HAS_TOOLTIP, StateType::ReadOnly => atk_sys::ATK_STATE_READ_ONLY, StateType::LastDefined => atk_sys::ATK_STATE_LAST_DEFINED, StateType::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for StateType { fn from_glib(value: atk_sys::AtkStateType) -> Self { skip_assert_initialized!(); match value { 0 => StateType::Invalid, 1 => StateType::Active, 2 => StateType::Armed, 3 => StateType::Busy, 4 => StateType::Checked, 5 => StateType::Defunct, 6 => StateType::Editable, 7 => StateType::Enabled, 8 => StateType::Expandable, 9 => StateType::Expanded, 10 => StateType::Focusable, 11 => StateType::Focused, 12 => StateType::Horizontal, 13 => StateType::Iconified, 14 => StateType::Modal, 15 => StateType::MultiLine, 16 => StateType::Multiselectable, 17 => StateType::Opaque, 18 => StateType::Pressed, 19 => StateType::Resizable, 20 => StateType::Selectable, 21 => StateType::Selected, 22 => StateType::Sensitive, 23 => StateType::Showing, 24 => StateType::SingleLine, 25 => StateType::Stale, 26 => StateType::Transient, 27 => StateType::Vertical, 28 => StateType::Visible, 29 => StateType::ManagesDescendants, 30 => StateType::Indeterminate, 31 => StateType::Truncated, 32 => StateType::Required, 33 => StateType::InvalidEntry, 34 => StateType::SupportsAutocompletion, 35 => StateType::SelectableText, 36 => StateType::Default, 37 => StateType::Animated, 38 => StateType::Visited, 39 => StateType::Checkable, 40 => StateType::HasPopup, 41 => StateType::HasTooltip, 42 => StateType::ReadOnly, 43 => StateType::LastDefined, value => StateType::__Unknown(value), } } } impl StaticType for StateType { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_state_type_get_type()) } } } impl<'a> FromValueOptional<'a> for StateType { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for StateType { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StateType { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum TextAttribute { Invalid, LeftMargin, RightMargin, Indent, Invisible, Editable, PixelsAboveLines, PixelsBelowLines, PixelsInsideWrap, BgFullHeight, Rise, Underline, Strikethrough, Size, Scale, Weight, Language, FamilyName, BgColor, FgColor, BgStipple, FgStipple, WrapMode, Direction, Justification, Stretch, Variant, Style, LastDefined, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for TextAttribute { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "TextAttribute::{}", match *self { TextAttribute::Invalid => "Invalid", TextAttribute::LeftMargin => "LeftMargin", TextAttribute::RightMargin => "RightMargin", TextAttribute::Indent => "Indent", TextAttribute::Invisible => "Invisible", TextAttribute::Editable => "Editable", TextAttribute::PixelsAboveLines => "PixelsAboveLines", TextAttribute::PixelsBelowLines => "PixelsBelowLines", TextAttribute::PixelsInsideWrap => "PixelsInsideWrap", TextAttribute::BgFullHeight => "BgFullHeight", TextAttribute::Rise => "Rise", TextAttribute::Underline => "Underline", TextAttribute::Strikethrough => "Strikethrough", TextAttribute::Size => "Size", TextAttribute::Scale => "Scale", TextAttribute::Weight => "Weight", TextAttribute::Language => "Language", TextAttribute::FamilyName => "FamilyName", TextAttribute::BgColor => "BgColor", TextAttribute::FgColor => "FgColor", TextAttribute::BgStipple => "BgStipple", TextAttribute::FgStipple => "FgStipple", TextAttribute::WrapMode => "WrapMode", TextAttribute::Direction => "Direction", TextAttribute::Justification => "Justification", TextAttribute::Stretch => "Stretch", TextAttribute::Variant => "Variant", TextAttribute::Style => "Style", TextAttribute::LastDefined => "LastDefined", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for TextAttribute { type GlibType = atk_sys::AtkTextAttribute; fn to_glib(&self) -> atk_sys::AtkTextAttribute { match *self { TextAttribute::Invalid => atk_sys::ATK_TEXT_ATTR_INVALID, TextAttribute::LeftMargin => atk_sys::ATK_TEXT_ATTR_LEFT_MARGIN, TextAttribute::RightMargin => atk_sys::ATK_TEXT_ATTR_RIGHT_MARGIN, TextAttribute::Indent => atk_sys::ATK_TEXT_ATTR_INDENT, TextAttribute::Invisible => atk_sys::ATK_TEXT_ATTR_INVISIBLE, TextAttribute::Editable => atk_sys::ATK_TEXT_ATTR_EDITABLE, TextAttribute::PixelsAboveLines => atk_sys::ATK_TEXT_ATTR_PIXELS_ABOVE_LINES, TextAttribute::PixelsBelowLines => atk_sys::ATK_TEXT_ATTR_PIXELS_BELOW_LINES, TextAttribute::PixelsInsideWrap => atk_sys::ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP, TextAttribute::BgFullHeight => atk_sys::ATK_TEXT_ATTR_BG_FULL_HEIGHT, TextAttribute::Rise => atk_sys::ATK_TEXT_ATTR_RISE, TextAttribute::Underline => atk_sys::ATK_TEXT_ATTR_UNDERLINE, TextAttribute::Strikethrough => atk_sys::ATK_TEXT_ATTR_STRIKETHROUGH, TextAttribute::Size => atk_sys::ATK_TEXT_ATTR_SIZE, TextAttribute::Scale => atk_sys::ATK_TEXT_ATTR_SCALE, TextAttribute::Weight => atk_sys::ATK_TEXT_ATTR_WEIGHT, TextAttribute::Language => atk_sys::ATK_TEXT_ATTR_LANGUAGE, TextAttribute::FamilyName => atk_sys::ATK_TEXT_ATTR_FAMILY_NAME, TextAttribute::BgColor => atk_sys::ATK_TEXT_ATTR_BG_COLOR, TextAttribute::FgColor => atk_sys::ATK_TEXT_ATTR_FG_COLOR, TextAttribute::BgStipple => atk_sys::ATK_TEXT_ATTR_BG_STIPPLE, TextAttribute::FgStipple => atk_sys::ATK_TEXT_ATTR_FG_STIPPLE, TextAttribute::WrapMode => atk_sys::ATK_TEXT_ATTR_WRAP_MODE, TextAttribute::Direction => atk_sys::ATK_TEXT_ATTR_DIRECTION, TextAttribute::Justification => atk_sys::ATK_TEXT_ATTR_JUSTIFICATION, TextAttribute::Stretch => atk_sys::ATK_TEXT_ATTR_STRETCH, TextAttribute::Variant => atk_sys::ATK_TEXT_ATTR_VARIANT, TextAttribute::Style => atk_sys::ATK_TEXT_ATTR_STYLE, TextAttribute::LastDefined => atk_sys::ATK_TEXT_ATTR_LAST_DEFINED, TextAttribute::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for TextAttribute { fn from_glib(value: atk_sys::AtkTextAttribute) -> Self { skip_assert_initialized!(); match value { 0 => TextAttribute::Invalid, 1 => TextAttribute::LeftMargin, 2 => TextAttribute::RightMargin, 3 => TextAttribute::Indent, 4 => TextAttribute::Invisible, 5 => TextAttribute::Editable, 6 => TextAttribute::PixelsAboveLines, 7 => TextAttribute::PixelsBelowLines, 8 => TextAttribute::PixelsInsideWrap, 9 => TextAttribute::BgFullHeight, 10 => TextAttribute::Rise, 11 => TextAttribute::Underline, 12 => TextAttribute::Strikethrough, 13 => TextAttribute::Size, 14 => TextAttribute::Scale, 15 => TextAttribute::Weight, 16 => TextAttribute::Language, 17 => TextAttribute::FamilyName, 18 => TextAttribute::BgColor, 19 => TextAttribute::FgColor, 20 => TextAttribute::BgStipple, 21 => TextAttribute::FgStipple, 22 => TextAttribute::WrapMode, 23 => TextAttribute::Direction, 24 => TextAttribute::Justification, 25 => TextAttribute::Stretch, 26 => TextAttribute::Variant, 27 => TextAttribute::Style, 28 => TextAttribute::LastDefined, value => TextAttribute::__Unknown(value), } } } impl StaticType for TextAttribute { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_text_attribute_get_type()) } } } impl<'a> FromValueOptional<'a> for TextAttribute { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for TextAttribute { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TextAttribute { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum TextBoundary { Char, WordStart, WordEnd, SentenceStart, SentenceEnd, LineStart, LineEnd, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for TextBoundary { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "TextBoundary::{}", match *self { TextBoundary::Char => "Char", TextBoundary::WordStart => "WordStart", TextBoundary::WordEnd => "WordEnd", TextBoundary::SentenceStart => "SentenceStart", TextBoundary::SentenceEnd => "SentenceEnd", TextBoundary::LineStart => "LineStart", TextBoundary::LineEnd => "LineEnd", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for TextBoundary { type GlibType = atk_sys::AtkTextBoundary; fn to_glib(&self) -> atk_sys::AtkTextBoundary { match *self { TextBoundary::Char => atk_sys::ATK_TEXT_BOUNDARY_CHAR, TextBoundary::WordStart => atk_sys::ATK_TEXT_BOUNDARY_WORD_START, TextBoundary::WordEnd => atk_sys::ATK_TEXT_BOUNDARY_WORD_END, TextBoundary::SentenceStart => atk_sys::ATK_TEXT_BOUNDARY_SENTENCE_START, TextBoundary::SentenceEnd => atk_sys::ATK_TEXT_BOUNDARY_SENTENCE_END, TextBoundary::LineStart => atk_sys::ATK_TEXT_BOUNDARY_LINE_START, TextBoundary::LineEnd => atk_sys::ATK_TEXT_BOUNDARY_LINE_END, TextBoundary::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for TextBoundary { fn from_glib(value: atk_sys::AtkTextBoundary) -> Self { skip_assert_initialized!(); match value { 0 => TextBoundary::Char, 1 => TextBoundary::WordStart, 2 => TextBoundary::WordEnd, 3 => TextBoundary::SentenceStart, 4 => TextBoundary::SentenceEnd, 5 => TextBoundary::LineStart, 6 => TextBoundary::LineEnd, value => TextBoundary::__Unknown(value), } } } impl StaticType for TextBoundary { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_text_boundary_get_type()) } } } impl<'a> FromValueOptional<'a> for TextBoundary { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for TextBoundary { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TextBoundary { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum TextClipType { None, Min, Max, Both, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for TextClipType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "TextClipType::{}", match *self { TextClipType::None => "None", TextClipType::Min => "Min", TextClipType::Max => "Max", TextClipType::Both => "Both", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for TextClipType { type GlibType = atk_sys::AtkTextClipType; fn to_glib(&self) -> atk_sys::AtkTextClipType { match *self { TextClipType::None => atk_sys::ATK_TEXT_CLIP_NONE, TextClipType::Min => atk_sys::ATK_TEXT_CLIP_MIN, TextClipType::Max => atk_sys::ATK_TEXT_CLIP_MAX, TextClipType::Both => atk_sys::ATK_TEXT_CLIP_BOTH, TextClipType::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for TextClipType { fn from_glib(value: atk_sys::AtkTextClipType) -> Self { skip_assert_initialized!(); match value { 0 => TextClipType::None, 1 => TextClipType::Min, 2 => TextClipType::Max, 3 => TextClipType::Both, value => TextClipType::__Unknown(value), } } } impl StaticType for TextClipType { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_text_clip_type_get_type()) } } } impl<'a> FromValueOptional<'a> for TextClipType { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for TextClipType { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TextClipType { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum TextGranularity { Char, Word, Sentence, Line, Paragraph, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for TextGranularity { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "TextGranularity::{}", match *self { TextGranularity::Char => "Char", TextGranularity::Word => "Word", TextGranularity::Sentence => "Sentence", TextGranularity::Line => "Line", TextGranularity::Paragraph => "Paragraph", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for TextGranularity { type GlibType = atk_sys::AtkTextGranularity; fn to_glib(&self) -> atk_sys::AtkTextGranularity { match *self { TextGranularity::Char => atk_sys::ATK_TEXT_GRANULARITY_CHAR, TextGranularity::Word => atk_sys::ATK_TEXT_GRANULARITY_WORD, TextGranularity::Sentence => atk_sys::ATK_TEXT_GRANULARITY_SENTENCE, TextGranularity::Line => atk_sys::ATK_TEXT_GRANULARITY_LINE, TextGranularity::Paragraph => atk_sys::ATK_TEXT_GRANULARITY_PARAGRAPH, TextGranularity::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for TextGranularity { fn from_glib(value: atk_sys::AtkTextGranularity) -> Self { skip_assert_initialized!(); match value { 0 => TextGranularity::Char, 1 => TextGranularity::Word, 2 => TextGranularity::Sentence, 3 => TextGranularity::Line, 4 => TextGranularity::Paragraph, value => TextGranularity::__Unknown(value), } } } impl StaticType for TextGranularity { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_text_granularity_get_type()) } } } impl<'a> FromValueOptional<'a> for TextGranularity { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for TextGranularity { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TextGranularity { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub enum ValueType { VeryWeak, Weak, Acceptable, Strong, VeryStrong, VeryLow, Low, Medium, High, VeryHigh, VeryBad, Bad, Good, VeryGood, Best, LastDefined, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for ValueType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "ValueType::{}", match *self { ValueType::VeryWeak => "VeryWeak", ValueType::Weak => "Weak", ValueType::Acceptable => "Acceptable", ValueType::Strong => "Strong", ValueType::VeryStrong => "VeryStrong", ValueType::VeryLow => "VeryLow", ValueType::Low => "Low", ValueType::Medium => "Medium", ValueType::High => "High", ValueType::VeryHigh => "VeryHigh", ValueType::VeryBad => "VeryBad", ValueType::Bad => "Bad", ValueType::Good => "Good", ValueType::VeryGood => "VeryGood", ValueType::Best => "Best", ValueType::LastDefined => "LastDefined", _ => "Unknown", } ) } } #[doc(hidden)] impl ToGlib for ValueType { type GlibType = atk_sys::AtkValueType; fn to_glib(&self) -> atk_sys::AtkValueType { match *self { ValueType::VeryWeak => atk_sys::ATK_VALUE_VERY_WEAK, ValueType::Weak => atk_sys::ATK_VALUE_WEAK, ValueType::Acceptable => atk_sys::ATK_VALUE_ACCEPTABLE, ValueType::Strong => atk_sys::ATK_VALUE_STRONG, ValueType::VeryStrong => atk_sys::ATK_VALUE_VERY_STRONG, ValueType::VeryLow => atk_sys::ATK_VALUE_VERY_LOW, ValueType::Low => atk_sys::ATK_VALUE_LOW, ValueType::Medium => atk_sys::ATK_VALUE_MEDIUM, ValueType::High => atk_sys::ATK_VALUE_HIGH, ValueType::VeryHigh => atk_sys::ATK_VALUE_VERY_HIGH, ValueType::VeryBad => atk_sys::ATK_VALUE_VERY_BAD, ValueType::Bad => atk_sys::ATK_VALUE_BAD, ValueType::Good => atk_sys::ATK_VALUE_GOOD, ValueType::VeryGood => atk_sys::ATK_VALUE_VERY_GOOD, ValueType::Best => atk_sys::ATK_VALUE_BEST, ValueType::LastDefined => atk_sys::ATK_VALUE_LAST_DEFINED, ValueType::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for ValueType { fn from_glib(value: atk_sys::AtkValueType) -> Self { skip_assert_initialized!(); match value { 0 => ValueType::VeryWeak, 1 => ValueType::Weak, 2 => ValueType::Acceptable, 3 => ValueType::Strong, 4 => ValueType::VeryStrong, 5 => ValueType::VeryLow, 6 => ValueType::Low, 7 => ValueType::Medium, 8 => ValueType::High, 9 => ValueType::VeryHigh, 10 => ValueType::VeryBad, 11 => ValueType::Bad, 12 => ValueType::Good, 13 => ValueType::VeryGood, 14 => ValueType::Best, 15 => ValueType::LastDefined, value => ValueType::__Unknown(value), } } } impl StaticType for ValueType { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_value_type_get_type()) } } } impl<'a> FromValueOptional<'a> for ValueType { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for ValueType { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ValueType { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } atk-0.7.0/src/auto/flags.rs010064400007650000024000000031051350341657000137200ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::translate::*; use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::value::Value; use glib::StaticType; use glib::Type; use gobject_sys; bitflags! { pub struct HyperlinkStateFlags: u32 { const INLINE = 1; } } #[doc(hidden)] impl ToGlib for HyperlinkStateFlags { type GlibType = atk_sys::AtkHyperlinkStateFlags; fn to_glib(&self) -> atk_sys::AtkHyperlinkStateFlags { self.bits() } } #[doc(hidden)] impl FromGlib for HyperlinkStateFlags { fn from_glib(value: atk_sys::AtkHyperlinkStateFlags) -> HyperlinkStateFlags { skip_assert_initialized!(); HyperlinkStateFlags::from_bits_truncate(value) } } impl StaticType for HyperlinkStateFlags { fn static_type() -> Type { unsafe { from_glib(atk_sys::atk_hyperlink_state_flags_get_type()) } } } impl<'a> FromValueOptional<'a> for HyperlinkStateFlags { unsafe fn from_value_optional(value: &Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for HyperlinkStateFlags { unsafe fn from_value(value: &Value) -> Self { from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for HyperlinkStateFlags { unsafe fn set_value(value: &mut Value, this: &Self) { gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } atk-0.7.0/src/auto/gobject_accessible.rs010064400007650000024000000025661350341657000164300ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib; use glib::object::IsA; use glib::translate::*; use std::fmt; use Object; glib_wrapper! { pub struct GObjectAccessible(Object) @extends Object; match fn { get_type => || atk_sys::atk_gobject_accessible_get_type(), } } impl GObjectAccessible { pub fn for_object>(obj: &P) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(atk_sys::atk_gobject_accessible_for_object( obj.as_ref().to_glib_none().0, )) } } } pub const NONE_GOBJECT_ACCESSIBLE: Option<&GObjectAccessible> = None; pub trait GObjectAccessibleExt: 'static { fn get_object(&self) -> Option; } impl> GObjectAccessibleExt for O { fn get_object(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_gobject_accessible_get_object( self.as_ref().to_glib_none().0, )) } } } impl fmt::Display for GObjectAccessible { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "GObjectAccessible") } } atk-0.7.0/src/auto/hyperlink.rs010064400007650000024000000150351350341657000146360ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::GString; use glib::StaticType; use glib::Value; use glib_sys; use gobject_sys; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; use Action; use Object; glib_wrapper! { pub struct Hyperlink(Object) @implements Action; match fn { get_type => || atk_sys::atk_hyperlink_get_type(), } } pub const NONE_HYPERLINK: Option<&Hyperlink> = None; pub trait HyperlinkExt: 'static { fn get_end_index(&self) -> i32; fn get_n_anchors(&self) -> i32; fn get_object(&self, i: i32) -> Option; fn get_start_index(&self) -> i32; fn get_uri(&self, i: i32) -> Option; fn is_inline(&self) -> bool; fn is_valid(&self) -> bool; fn get_property_number_of_anchors(&self) -> i32; fn connect_link_activated(&self, f: F) -> SignalHandlerId; fn connect_property_end_index_notify(&self, f: F) -> SignalHandlerId; fn connect_property_number_of_anchors_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_start_index_notify(&self, f: F) -> SignalHandlerId; } impl> HyperlinkExt for O { fn get_end_index(&self) -> i32 { unsafe { atk_sys::atk_hyperlink_get_end_index(self.as_ref().to_glib_none().0) } } fn get_n_anchors(&self) -> i32 { unsafe { atk_sys::atk_hyperlink_get_n_anchors(self.as_ref().to_glib_none().0) } } fn get_object(&self, i: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_hyperlink_get_object( self.as_ref().to_glib_none().0, i, )) } } fn get_start_index(&self) -> i32 { unsafe { atk_sys::atk_hyperlink_get_start_index(self.as_ref().to_glib_none().0) } } fn get_uri(&self, i: i32) -> Option { unsafe { from_glib_full(atk_sys::atk_hyperlink_get_uri( self.as_ref().to_glib_none().0, i, )) } } fn is_inline(&self) -> bool { unsafe { from_glib(atk_sys::atk_hyperlink_is_inline( self.as_ref().to_glib_none().0, )) } } fn is_valid(&self) -> bool { unsafe { from_glib(atk_sys::atk_hyperlink_is_valid( self.as_ref().to_glib_none().0, )) } } fn get_property_number_of_anchors(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"number-of-anchors\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get().unwrap() } } fn connect_link_activated(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn link_activated_trampoline( this: *mut atk_sys::AtkHyperlink, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Hyperlink::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"link-activated\0".as_ptr() as *const _, Some(transmute(link_activated_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_property_end_index_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_end_index_trampoline( this: *mut atk_sys::AtkHyperlink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Hyperlink::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::end-index\0".as_ptr() as *const _, Some(transmute(notify_end_index_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_property_number_of_anchors_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_number_of_anchors_trampoline( this: *mut atk_sys::AtkHyperlink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Hyperlink::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::number-of-anchors\0".as_ptr() as *const _, Some(transmute( notify_number_of_anchors_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_start_index_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_start_index_trampoline( this: *mut atk_sys::AtkHyperlink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Hyperlink::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::start-index\0".as_ptr() as *const _, Some(transmute(notify_start_index_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Hyperlink { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Hyperlink") } } atk-0.7.0/src/auto/hyperlink_impl.rs010064400007650000024000000017071350341657000156600ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use std::fmt; use Hyperlink; glib_wrapper! { pub struct HyperlinkImpl(Interface); match fn { get_type => || atk_sys::atk_hyperlink_impl_get_type(), } } pub const NONE_HYPERLINK_IMPL: Option<&HyperlinkImpl> = None; pub trait HyperlinkImplExt: 'static { fn get_hyperlink(&self) -> Option; } impl> HyperlinkImplExt for O { fn get_hyperlink(&self) -> Option { unsafe { from_glib_full(atk_sys::atk_hyperlink_impl_get_hyperlink( self.as_ref().to_glib_none().0, )) } } } impl fmt::Display for HyperlinkImpl { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "HyperlinkImpl") } } atk-0.7.0/src/auto/hypertext.rs010064400007650000024000000045441350341657000146700ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib_sys; use libc; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; use Hyperlink; glib_wrapper! { pub struct Hypertext(Interface); match fn { get_type => || atk_sys::atk_hypertext_get_type(), } } pub const NONE_HYPERTEXT: Option<&Hypertext> = None; pub trait HypertextExt: 'static { fn get_link(&self, link_index: i32) -> Option; fn get_link_index(&self, char_index: i32) -> i32; fn get_n_links(&self) -> i32; fn connect_link_selected(&self, f: F) -> SignalHandlerId; } impl> HypertextExt for O { fn get_link(&self, link_index: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_hypertext_get_link( self.as_ref().to_glib_none().0, link_index, )) } } fn get_link_index(&self, char_index: i32) -> i32 { unsafe { atk_sys::atk_hypertext_get_link_index(self.as_ref().to_glib_none().0, char_index) } } fn get_n_links(&self) -> i32 { unsafe { atk_sys::atk_hypertext_get_n_links(self.as_ref().to_glib_none().0) } } fn connect_link_selected(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn link_selected_trampoline( this: *mut atk_sys::AtkHypertext, arg1: libc::c_int, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Hypertext::from_glib_borrow(this).unsafe_cast(), arg1) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"link-selected\0".as_ptr() as *const _, Some(transmute(link_selected_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Hypertext { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Hypertext") } } atk-0.7.0/src/auto/image.rs010064400007650000024000000046161350341657000137160ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use glib::GString; use std::fmt; use std::mem; use CoordType; glib_wrapper! { pub struct Image(Interface); match fn { get_type => || atk_sys::atk_image_get_type(), } } pub const NONE_IMAGE: Option<&Image> = None; pub trait AtkImageExt: 'static { fn get_image_description(&self) -> Option; fn get_image_locale(&self) -> Option; fn get_image_position(&self, coord_type: CoordType) -> (i32, i32); fn get_image_size(&self) -> (i32, i32); fn set_image_description(&self, description: &str) -> bool; } impl> AtkImageExt for O { fn get_image_description(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_image_get_image_description( self.as_ref().to_glib_none().0, )) } } fn get_image_locale(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_image_get_image_locale( self.as_ref().to_glib_none().0, )) } } fn get_image_position(&self, coord_type: CoordType) -> (i32, i32) { unsafe { let mut x = mem::uninitialized(); let mut y = mem::uninitialized(); atk_sys::atk_image_get_image_position( self.as_ref().to_glib_none().0, &mut x, &mut y, coord_type.to_glib(), ); (x, y) } } fn get_image_size(&self) -> (i32, i32) { unsafe { let mut width = mem::uninitialized(); let mut height = mem::uninitialized(); atk_sys::atk_image_get_image_size( self.as_ref().to_glib_none().0, &mut width, &mut height, ); (width, height) } } fn set_image_description(&self, description: &str) -> bool { unsafe { from_glib(atk_sys::atk_image_set_image_description( self.as_ref().to_glib_none().0, description.to_glib_none().0, )) } } } impl fmt::Display for Image { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Image") } } atk-0.7.0/src/auto/misc.rs010064400007650000024000000021721350341657000135620ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use std::fmt; glib_wrapper! { pub struct Misc(Object); match fn { get_type => || atk_sys::atk_misc_get_type(), } } impl Misc { pub fn get_instance() -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(atk_sys::atk_misc_get_instance()) } } } pub const NONE_MISC: Option<&Misc> = None; pub trait AtkMiscExt: 'static { fn threads_enter(&self); fn threads_leave(&self); } impl> AtkMiscExt for O { fn threads_enter(&self) { unsafe { atk_sys::atk_misc_threads_enter(self.as_ref().to_glib_none().0); } } fn threads_leave(&self) { unsafe { atk_sys::atk_misc_threads_leave(self.as_ref().to_glib_none().0); } } } impl fmt::Display for Misc { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Misc") } } atk-0.7.0/src/auto/mod.rs010064400007650000024000000113471350341657000134120ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT mod action; pub use self::action::AtkActionExt; pub use self::action::{Action, NONE_ACTION}; mod component; pub use self::component::ComponentExt; pub use self::component::{Component, NONE_COMPONENT}; mod document; pub use self::document::DocumentExt; pub use self::document::{Document, NONE_DOCUMENT}; mod editable_text; pub use self::editable_text::EditableTextExt; pub use self::editable_text::{EditableText, NONE_EDITABLE_TEXT}; mod gobject_accessible; pub use self::gobject_accessible::GObjectAccessibleExt; pub use self::gobject_accessible::{ GObjectAccessible, GObjectAccessibleClass, NONE_GOBJECT_ACCESSIBLE, }; mod hyperlink; pub use self::hyperlink::HyperlinkExt; pub use self::hyperlink::{Hyperlink, HyperlinkClass, NONE_HYPERLINK}; mod hyperlink_impl; pub use self::hyperlink_impl::HyperlinkImplExt; pub use self::hyperlink_impl::{HyperlinkImpl, NONE_HYPERLINK_IMPL}; mod hypertext; pub use self::hypertext::HypertextExt; pub use self::hypertext::{Hypertext, NONE_HYPERTEXT}; mod image; pub use self::image::AtkImageExt; pub use self::image::{Image, NONE_IMAGE}; mod misc; pub use self::misc::AtkMiscExt; pub use self::misc::{Misc, MiscClass, NONE_MISC}; mod no_op_object; pub use self::no_op_object::{NoOpObject, NoOpObjectClass, NONE_NO_OP_OBJECT}; mod no_op_object_factory; pub use self::no_op_object_factory::{ NoOpObjectFactory, NoOpObjectFactoryClass, NONE_NO_OP_OBJECT_FACTORY, }; mod object; pub use self::object::AtkObjectExt; pub use self::object::{Object, ObjectClass, NONE_OBJECT}; mod object_factory; pub use self::object_factory::ObjectFactoryExt; pub use self::object_factory::{ObjectFactory, ObjectFactoryClass, NONE_OBJECT_FACTORY}; mod plug; pub use self::plug::AtkPlugExt; pub use self::plug::{Plug, PlugClass, NONE_PLUG}; mod registry; pub use self::registry::RegistryExt; pub use self::registry::{Registry, RegistryClass, NONE_REGISTRY}; mod relation; pub use self::relation::RelationExt; pub use self::relation::{Relation, RelationClass, NONE_RELATION}; mod relation_set; pub use self::relation_set::RelationSetExt; pub use self::relation_set::{RelationSet, RelationSetClass, NONE_RELATION_SET}; mod selection; pub use self::selection::SelectionExt; pub use self::selection::{Selection, NONE_SELECTION}; mod socket; pub use self::socket::AtkSocketExt; pub use self::socket::{Socket, SocketClass, NONE_SOCKET}; mod state_set; pub use self::state_set::StateSetExt; pub use self::state_set::{StateSet, StateSetClass, NONE_STATE_SET}; mod streamable_content; pub use self::streamable_content::StreamableContentExt; pub use self::streamable_content::{StreamableContent, NONE_STREAMABLE_CONTENT}; mod table; pub use self::table::TableExt; pub use self::table::{Table, NONE_TABLE}; mod table_cell; pub use self::table_cell::TableCellExt; pub use self::table_cell::{TableCell, NONE_TABLE_CELL}; mod text; pub use self::text::TextExt; pub use self::text::{Text, NONE_TEXT}; mod util; pub use self::util::{Util, UtilClass, NONE_UTIL}; mod value; pub use self::value::ValueExt; pub use self::value::{Value, NONE_VALUE}; mod window; pub use self::window::AtkWindowExt; pub use self::window::{Window, NONE_WINDOW}; mod range; pub use self::range::Range; mod rectangle; pub use self::rectangle::Rectangle; mod text_range; pub use self::text_range::TextRange; mod enums; pub use self::enums::CoordType; pub use self::enums::Layer; pub use self::enums::RelationType; pub use self::enums::Role; #[cfg(any(feature = "v2_30", feature = "dox"))] pub use self::enums::ScrollType; pub use self::enums::StateType; pub use self::enums::TextAttribute; pub use self::enums::TextBoundary; pub use self::enums::TextClipType; pub use self::enums::TextGranularity; pub use self::enums::ValueType; mod flags; pub use self::flags::HyperlinkStateFlags; mod alias; pub use self::alias::State; #[doc(hidden)] pub mod traits { pub use super::AtkActionExt; pub use super::AtkImageExt; pub use super::AtkMiscExt; pub use super::AtkObjectExt; pub use super::AtkPlugExt; pub use super::AtkSocketExt; pub use super::AtkWindowExt; pub use super::ComponentExt; pub use super::DocumentExt; pub use super::EditableTextExt; pub use super::GObjectAccessibleExt; pub use super::HyperlinkExt; pub use super::HyperlinkImplExt; pub use super::HypertextExt; pub use super::ObjectFactoryExt; pub use super::RegistryExt; pub use super::RelationExt; pub use super::RelationSetExt; pub use super::SelectionExt; pub use super::StateSetExt; pub use super::StreamableContentExt; pub use super::TableCellExt; pub use super::TableExt; pub use super::TextExt; pub use super::ValueExt; } atk-0.7.0/src/auto/no_op_object.rs010064400007650000024000000023331350341657000152660ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib; use glib::object::Cast; use glib::object::IsA; use glib::translate::*; use std::fmt; use Action; use Component; use Document; use EditableText; use Hypertext; use Image; use Object; use Selection; use Table; use TableCell; use Text; use Value; use Window; glib_wrapper! { pub struct NoOpObject(Object) @extends Object, @implements Action, Component, Document, EditableText, Hypertext, Image, Selection, Table, TableCell, Text, Value, Window; match fn { get_type => || atk_sys::atk_no_op_object_get_type(), } } impl NoOpObject { pub fn new>(obj: &P) -> NoOpObject { assert_initialized_main_thread!(); unsafe { Object::from_glib_full(atk_sys::atk_no_op_object_new(obj.as_ref().to_glib_none().0)) .unsafe_cast() } } } pub const NONE_NO_OP_OBJECT: Option<&NoOpObject> = None; impl fmt::Display for NoOpObject { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "NoOpObject") } } atk-0.7.0/src/auto/no_op_object_factory.rs010064400007650000024000000020361350341657000170150ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::translate::*; use std::fmt; use ObjectFactory; glib_wrapper! { pub struct NoOpObjectFactory(Object) @extends ObjectFactory; match fn { get_type => || atk_sys::atk_no_op_object_factory_get_type(), } } impl NoOpObjectFactory { pub fn new() -> NoOpObjectFactory { assert_initialized_main_thread!(); unsafe { ObjectFactory::from_glib_full(atk_sys::atk_no_op_object_factory_new()).unsafe_cast() } } } impl Default for NoOpObjectFactory { fn default() -> Self { Self::new() } } pub const NONE_NO_OP_OBJECT_FACTORY: Option<&NoOpObjectFactory> = None; impl fmt::Display for NoOpObjectFactory { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "NoOpObjectFactory") } } atk-0.7.0/src/auto/object.rs010064400007650000024000001222231350341657000140750ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::GString; use glib::StaticType; use glib::Value; use glib_sys; use gobject_sys; use libc; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; use Layer; use RelationSet; use RelationType; use Role; use State; use StateSet; glib_wrapper! { pub struct Object(Object); match fn { get_type => || atk_sys::atk_object_get_type(), } } pub const NONE_OBJECT: Option<&Object> = None; pub trait AtkObjectExt: 'static { fn add_relationship>(&self, relationship: RelationType, target: &P) -> bool; //fn connect_property_change_handler(&self, handler: /*Unimplemented*/Fn(&Object, /*Ignored*/PropertyValues)) -> u32; //fn get_attributes(&self) -> /*Ignored*/Option; fn get_description(&self) -> Option; fn get_index_in_parent(&self) -> i32; fn get_layer(&self) -> Layer; fn get_mdi_zorder(&self) -> i32; fn get_n_accessible_children(&self) -> i32; fn get_name(&self) -> Option; fn get_object_locale(&self) -> Option; fn get_parent(&self) -> Option; fn get_role(&self) -> Role; //fn initialize(&self, data: /*Unimplemented*/Option); fn notify_state_change(&self, state: State, value: bool); fn peek_parent(&self) -> Option; fn ref_accessible_child(&self, i: i32) -> Option; fn ref_relation_set(&self) -> Option; fn ref_state_set(&self) -> Option; fn remove_property_change_handler(&self, handler_id: u32); fn remove_relationship>(&self, relationship: RelationType, target: &P) -> bool; fn set_description(&self, description: &str); fn set_name(&self, name: &str); fn set_parent>(&self, parent: &P); fn set_role(&self, role: Role); fn get_property_accessible_component_layer(&self) -> i32; fn get_property_accessible_component_mdi_zorder(&self) -> i32; fn get_property_accessible_description(&self) -> Option; fn set_property_accessible_description(&self, accessible_description: Option<&str>); fn get_property_accessible_hypertext_nlinks(&self) -> i32; fn get_property_accessible_name(&self) -> Option; fn set_property_accessible_name(&self, accessible_name: Option<&str>); fn get_property_accessible_parent(&self) -> Option; fn set_property_accessible_parent(&self, accessible_parent: Option<&Object>); fn get_property_accessible_role(&self) -> Role; fn set_property_accessible_role(&self, accessible_role: Role); fn get_property_accessible_table_caption(&self) -> Option; fn set_property_accessible_table_caption(&self, accessible_table_caption: Option<&str>); fn get_property_accessible_table_caption_object(&self) -> Option; fn set_property_accessible_table_caption_object( &self, accessible_table_caption_object: Option<&Object>, ); fn get_property_accessible_table_column_description(&self) -> Option; fn set_property_accessible_table_column_description( &self, accessible_table_column_description: Option<&str>, ); fn get_property_accessible_table_column_header(&self) -> Option; fn set_property_accessible_table_column_header( &self, accessible_table_column_header: Option<&Object>, ); fn get_property_accessible_table_row_description(&self) -> Option; fn set_property_accessible_table_row_description( &self, accessible_table_row_description: Option<&str>, ); fn get_property_accessible_table_row_header(&self) -> Option; fn set_property_accessible_table_row_header( &self, accessible_table_row_header: Option<&Object>, ); fn get_property_accessible_table_summary(&self) -> Option; fn set_property_accessible_table_summary(&self, accessible_table_summary: Option<&Object>); fn get_property_accessible_value(&self) -> f64; fn set_property_accessible_value(&self, accessible_value: f64); fn connect_active_descendant_changed( &self, f: F, ) -> SignalHandlerId; fn connect_children_changed( &self, f: F, ) -> SignalHandlerId; //fn connect_property_change(&self, f: F) -> SignalHandlerId; fn connect_state_change(&self, f: F) -> SignalHandlerId; fn connect_visible_data_changed(&self, f: F) -> SignalHandlerId; fn connect_property_accessible_component_layer_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_component_mdi_zorder_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_description_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_hypertext_nlinks_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_name_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_parent_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_role_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_table_caption_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_table_caption_object_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_table_column_description_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_table_column_header_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_table_row_description_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_table_row_header_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_table_summary_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_accessible_value_notify( &self, f: F, ) -> SignalHandlerId; } impl> AtkObjectExt for O { fn add_relationship>(&self, relationship: RelationType, target: &P) -> bool { unsafe { from_glib(atk_sys::atk_object_add_relationship( self.as_ref().to_glib_none().0, relationship.to_glib(), target.as_ref().to_glib_none().0, )) } } //fn connect_property_change_handler(&self, handler: /*Unimplemented*/Fn(&Object, /*Ignored*/PropertyValues)) -> u32 { // unsafe { TODO: call atk_sys:atk_object_connect_property_change_handler() } //} //fn get_attributes(&self) -> /*Ignored*/Option { // unsafe { TODO: call atk_sys:atk_object_get_attributes() } //} fn get_description(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_object_get_description( self.as_ref().to_glib_none().0, )) } } fn get_index_in_parent(&self) -> i32 { unsafe { atk_sys::atk_object_get_index_in_parent(self.as_ref().to_glib_none().0) } } fn get_layer(&self) -> Layer { unsafe { from_glib(atk_sys::atk_object_get_layer( self.as_ref().to_glib_none().0, )) } } fn get_mdi_zorder(&self) -> i32 { unsafe { atk_sys::atk_object_get_mdi_zorder(self.as_ref().to_glib_none().0) } } fn get_n_accessible_children(&self) -> i32 { unsafe { atk_sys::atk_object_get_n_accessible_children(self.as_ref().to_glib_none().0) } } fn get_name(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_object_get_name(self.as_ref().to_glib_none().0)) } } fn get_object_locale(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_object_get_object_locale( self.as_ref().to_glib_none().0, )) } } fn get_parent(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_object_get_parent( self.as_ref().to_glib_none().0, )) } } fn get_role(&self) -> Role { unsafe { from_glib(atk_sys::atk_object_get_role(self.as_ref().to_glib_none().0)) } } //fn initialize(&self, data: /*Unimplemented*/Option) { // unsafe { TODO: call atk_sys:atk_object_initialize() } //} fn notify_state_change(&self, state: State, value: bool) { unsafe { atk_sys::atk_object_notify_state_change( self.as_ref().to_glib_none().0, state, value.to_glib(), ); } } fn peek_parent(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_object_peek_parent( self.as_ref().to_glib_none().0, )) } } fn ref_accessible_child(&self, i: i32) -> Option { unsafe { from_glib_full(atk_sys::atk_object_ref_accessible_child( self.as_ref().to_glib_none().0, i, )) } } fn ref_relation_set(&self) -> Option { unsafe { from_glib_full(atk_sys::atk_object_ref_relation_set( self.as_ref().to_glib_none().0, )) } } fn ref_state_set(&self) -> Option { unsafe { from_glib_full(atk_sys::atk_object_ref_state_set( self.as_ref().to_glib_none().0, )) } } fn remove_property_change_handler(&self, handler_id: u32) { unsafe { atk_sys::atk_object_remove_property_change_handler( self.as_ref().to_glib_none().0, handler_id, ); } } fn remove_relationship>(&self, relationship: RelationType, target: &P) -> bool { unsafe { from_glib(atk_sys::atk_object_remove_relationship( self.as_ref().to_glib_none().0, relationship.to_glib(), target.as_ref().to_glib_none().0, )) } } fn set_description(&self, description: &str) { unsafe { atk_sys::atk_object_set_description( self.as_ref().to_glib_none().0, description.to_glib_none().0, ); } } fn set_name(&self, name: &str) { unsafe { atk_sys::atk_object_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0); } } fn set_parent>(&self, parent: &P) { unsafe { atk_sys::atk_object_set_parent( self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0, ); } } fn set_role(&self, role: Role) { unsafe { atk_sys::atk_object_set_role(self.as_ref().to_glib_none().0, role.to_glib()); } } fn get_property_accessible_component_layer(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-component-layer\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get().unwrap() } } fn get_property_accessible_component_mdi_zorder(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-component-mdi-zorder\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get().unwrap() } } fn get_property_accessible_description(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-description\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_description(&self, accessible_description: Option<&str>) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-description\0".as_ptr() as *const _, Value::from(accessible_description).to_glib_none().0, ); } } fn get_property_accessible_hypertext_nlinks(&self) -> i32 { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-hypertext-nlinks\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get().unwrap() } } fn get_property_accessible_name(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-name\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_name(&self, accessible_name: Option<&str>) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-name\0".as_ptr() as *const _, Value::from(accessible_name).to_glib_none().0, ); } } fn get_property_accessible_parent(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-parent\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_parent(&self, accessible_parent: Option<&Object>) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-parent\0".as_ptr() as *const _, Value::from(accessible_parent).to_glib_none().0, ); } } fn get_property_accessible_role(&self) -> Role { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-role\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get().unwrap() } } fn set_property_accessible_role(&self, accessible_role: Role) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-role\0".as_ptr() as *const _, Value::from(&accessible_role).to_glib_none().0, ); } } fn get_property_accessible_table_caption(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-caption\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_table_caption(&self, accessible_table_caption: Option<&str>) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-caption\0".as_ptr() as *const _, Value::from(accessible_table_caption).to_glib_none().0, ); } } fn get_property_accessible_table_caption_object(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-caption-object\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_table_caption_object( &self, accessible_table_caption_object: Option<&Object>, ) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-caption-object\0".as_ptr() as *const _, Value::from(accessible_table_caption_object) .to_glib_none() .0, ); } } fn get_property_accessible_table_column_description(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-column-description\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_table_column_description( &self, accessible_table_column_description: Option<&str>, ) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-column-description\0".as_ptr() as *const _, Value::from(accessible_table_column_description) .to_glib_none() .0, ); } } fn get_property_accessible_table_column_header(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-column-header\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_table_column_header( &self, accessible_table_column_header: Option<&Object>, ) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-column-header\0".as_ptr() as *const _, Value::from(accessible_table_column_header).to_glib_none().0, ); } } fn get_property_accessible_table_row_description(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-row-description\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_table_row_description( &self, accessible_table_row_description: Option<&str>, ) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-row-description\0".as_ptr() as *const _, Value::from(accessible_table_row_description) .to_glib_none() .0, ); } } fn get_property_accessible_table_row_header(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-row-header\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_table_row_header( &self, accessible_table_row_header: Option<&Object>, ) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-row-header\0".as_ptr() as *const _, Value::from(accessible_table_row_header).to_glib_none().0, ); } } fn get_property_accessible_table_summary(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-summary\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get() } } fn set_property_accessible_table_summary(&self, accessible_table_summary: Option<&Object>) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-table-summary\0".as_ptr() as *const _, Value::from(accessible_table_summary).to_glib_none().0, ); } } fn get_property_accessible_value(&self) -> f64 { unsafe { let mut value = Value::from_type(::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-value\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value.get().unwrap() } } fn set_property_accessible_value(&self, accessible_value: f64) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"accessible-value\0".as_ptr() as *const _, Value::from(&accessible_value).to_glib_none().0, ); } } fn connect_active_descendant_changed( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn active_descendant_changed_trampoline( this: *mut atk_sys::AtkObject, arg1: *mut atk_sys::AtkObject, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f( &Object::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(arg1), ) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"active-descendant-changed\0".as_ptr() as *const _, Some(transmute( active_descendant_changed_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_children_changed( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn children_changed_trampoline( this: *mut atk_sys::AtkObject, arg1: libc::c_uint, arg2: *mut atk_sys::AtkObject, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f( &Object::from_glib_borrow(this).unsafe_cast(), arg1, &from_glib_borrow(arg2), ) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"children-changed\0".as_ptr() as *const _, Some(transmute(children_changed_trampoline:: as usize)), Box_::into_raw(f), ) } } //fn connect_property_change(&self, f: F) -> SignalHandlerId { // Ignored arg1: Atk.PropertyValues //} fn connect_state_change(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn state_change_trampoline( this: *mut atk_sys::AtkObject, arg1: *mut libc::c_char, arg2: glib_sys::gboolean, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f( &Object::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(arg1), from_glib(arg2), ) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"state-change\0".as_ptr() as *const _, Some(transmute(state_change_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_visible_data_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn visible_data_changed_trampoline( this: *mut atk_sys::AtkObject, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"visible-data-changed\0".as_ptr() as *const _, Some(transmute( visible_data_changed_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_component_layer_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_component_layer_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-component-layer\0".as_ptr() as *const _, Some(transmute( notify_accessible_component_layer_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_component_mdi_zorder_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_component_mdi_zorder_trampoline< P, F: Fn(&P) + 'static, >( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-component-mdi-zorder\0".as_ptr() as *const _, Some(transmute( notify_accessible_component_mdi_zorder_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_description_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_description_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-description\0".as_ptr() as *const _, Some(transmute( notify_accessible_description_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_hypertext_nlinks_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_hypertext_nlinks_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-hypertext-nlinks\0".as_ptr() as *const _, Some(transmute( notify_accessible_hypertext_nlinks_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_name_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_name_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-name\0".as_ptr() as *const _, Some(transmute( notify_accessible_name_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_parent_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_parent_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-parent\0".as_ptr() as *const _, Some(transmute( notify_accessible_parent_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_role_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_role_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-role\0".as_ptr() as *const _, Some(transmute( notify_accessible_role_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_table_caption_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_table_caption_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-caption\0".as_ptr() as *const _, Some(transmute( notify_accessible_table_caption_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_table_caption_object_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_table_caption_object_trampoline< P, F: Fn(&P) + 'static, >( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-caption-object\0".as_ptr() as *const _, Some(transmute( notify_accessible_table_caption_object_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_table_column_description_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_table_column_description_trampoline< P, F: Fn(&P) + 'static, >( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-column-description\0".as_ptr() as *const _, Some(transmute( notify_accessible_table_column_description_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_table_column_header_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_table_column_header_trampoline< P, F: Fn(&P) + 'static, >( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-column-header\0".as_ptr() as *const _, Some(transmute( notify_accessible_table_column_header_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_table_row_description_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_table_row_description_trampoline< P, F: Fn(&P) + 'static, >( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-row-description\0".as_ptr() as *const _, Some(transmute( notify_accessible_table_row_description_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_table_row_header_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_table_row_header_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-row-header\0".as_ptr() as *const _, Some(transmute( notify_accessible_table_row_header_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_table_summary_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_table_summary_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-summary\0".as_ptr() as *const _, Some(transmute( notify_accessible_table_summary_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_accessible_value_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_accessible_value_trampoline( this: *mut atk_sys::AtkObject, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Object::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::accessible-value\0".as_ptr() as *const _, Some(transmute( notify_accessible_value_trampoline:: as usize, )), Box_::into_raw(f), ) } } } impl fmt::Display for Object { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Object") } } atk-0.7.0/src/auto/object_factory.rs010064400007650000024000000030701350341657000156220ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib; use glib::object::IsA; use glib::translate::*; use std::fmt; use Object; glib_wrapper! { pub struct ObjectFactory(Object); match fn { get_type => || atk_sys::atk_object_factory_get_type(), } } pub const NONE_OBJECT_FACTORY: Option<&ObjectFactory> = None; pub trait ObjectFactoryExt: 'static { fn create_accessible>(&self, obj: &P) -> Option; fn get_accessible_type(&self) -> glib::types::Type; fn invalidate(&self); } impl> ObjectFactoryExt for O { fn create_accessible>(&self, obj: &P) -> Option { unsafe { from_glib_full(atk_sys::atk_object_factory_create_accessible( self.as_ref().to_glib_none().0, obj.as_ref().to_glib_none().0, )) } } fn get_accessible_type(&self) -> glib::types::Type { unsafe { from_glib(atk_sys::atk_object_factory_get_accessible_type( self.as_ref().to_glib_none().0, )) } } fn invalidate(&self) { unsafe { atk_sys::atk_object_factory_invalidate(self.as_ref().to_glib_none().0); } } } impl fmt::Display for ObjectFactory { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "ObjectFactory") } } atk-0.7.0/src/auto/plug.rs010064400007650000024000000022241350341657000135740ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::translate::*; use glib::GString; use std::fmt; use Component; use Object; glib_wrapper! { pub struct Plug(Object) @extends Object, @implements Component; match fn { get_type => || atk_sys::atk_plug_get_type(), } } impl Plug { pub fn new() -> Plug { assert_initialized_main_thread!(); unsafe { Object::from_glib_full(atk_sys::atk_plug_new()).unsafe_cast() } } } impl Default for Plug { fn default() -> Self { Self::new() } } pub const NONE_PLUG: Option<&Plug> = None; pub trait AtkPlugExt: 'static { fn get_id(&self) -> Option; } impl> AtkPlugExt for O { fn get_id(&self) -> Option { unsafe { from_glib_full(atk_sys::atk_plug_get_id(self.as_ref().to_glib_none().0)) } } } impl fmt::Display for Plug { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Plug") } } atk-0.7.0/src/auto/range.rs010064400007650000024000000024751350341657000137310ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::translate::*; use glib::GString; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Range(Boxed); match fn { copy => |ptr| atk_sys::atk_range_copy(mut_override(ptr)), free => |ptr| atk_sys::atk_range_free(ptr), get_type => || atk_sys::atk_range_get_type(), } } impl Range { pub fn new(lower_limit: f64, upper_limit: f64, description: &str) -> Range { assert_initialized_main_thread!(); unsafe { from_glib_full(atk_sys::atk_range_new( lower_limit, upper_limit, description.to_glib_none().0, )) } } pub fn get_description(&mut self) -> Option { unsafe { from_glib_none(atk_sys::atk_range_get_description( self.to_glib_none_mut().0, )) } } pub fn get_lower_limit(&mut self) -> f64 { unsafe { atk_sys::atk_range_get_lower_limit(self.to_glib_none_mut().0) } } pub fn get_upper_limit(&mut self) -> f64 { unsafe { atk_sys::atk_range_get_upper_limit(self.to_glib_none_mut().0) } } } atk-0.7.0/src/auto/rectangle.rs010064400007650000024000000011421350341657000145670ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use gobject_sys; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Rectangle(Boxed); match fn { copy => |ptr| gobject_sys::g_boxed_copy(atk_sys::atk_rectangle_get_type(), ptr as *mut _) as *mut atk_sys::AtkRectangle, free => |ptr| gobject_sys::g_boxed_free(atk_sys::atk_rectangle_get_type(), ptr as *mut _), get_type => || atk_sys::atk_rectangle_get_type(), } } atk-0.7.0/src/auto/registry.rs010064400007650000024000000034171350341657000145020ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib; use glib::object::IsA; use glib::translate::*; use std::fmt; use ObjectFactory; glib_wrapper! { pub struct Registry(Object); match fn { get_type => || atk_sys::atk_registry_get_type(), } } pub const NONE_REGISTRY: Option<&Registry> = None; pub trait RegistryExt: 'static { fn get_factory(&self, type_: glib::types::Type) -> Option; fn get_factory_type(&self, type_: glib::types::Type) -> glib::types::Type; fn set_factory_type(&self, type_: glib::types::Type, factory_type: glib::types::Type); } impl> RegistryExt for O { fn get_factory(&self, type_: glib::types::Type) -> Option { unsafe { from_glib_none(atk_sys::atk_registry_get_factory( self.as_ref().to_glib_none().0, type_.to_glib(), )) } } fn get_factory_type(&self, type_: glib::types::Type) -> glib::types::Type { unsafe { from_glib(atk_sys::atk_registry_get_factory_type( self.as_ref().to_glib_none().0, type_.to_glib(), )) } } fn set_factory_type(&self, type_: glib::types::Type, factory_type: glib::types::Type) { unsafe { atk_sys::atk_registry_set_factory_type( self.as_ref().to_glib_none().0, type_.to_glib(), factory_type.to_glib(), ); } } } impl fmt::Display for Registry { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Registry") } } atk-0.7.0/src/auto/relation.rs010064400007650000024000000121711350341657000144440ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::Value; use glib_sys; use gobject_sys; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; use Object; use RelationType; glib_wrapper! { pub struct Relation(Object); match fn { get_type => || atk_sys::atk_relation_get_type(), } } impl Relation { pub fn new(targets: &[Object], relationship: RelationType) -> Relation { assert_initialized_main_thread!(); let n_targets = targets.len() as i32; unsafe { from_glib_full(atk_sys::atk_relation_new( targets.to_glib_none().0, n_targets, relationship.to_glib(), )) } } } pub const NONE_RELATION: Option<&Relation> = None; pub trait RelationExt: 'static { fn add_target>(&self, target: &P); fn get_relation_type(&self) -> RelationType; //fn get_target(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 }; fn remove_target>(&self, target: &P) -> bool; fn set_property_relation_type(&self, relation_type: RelationType); fn set_property_target(&self, target: Option<&glib::ValueArray>); fn connect_property_relation_type_notify( &self, f: F, ) -> SignalHandlerId; fn connect_property_target_notify(&self, f: F) -> SignalHandlerId; } impl> RelationExt for O { fn add_target>(&self, target: &P) { unsafe { atk_sys::atk_relation_add_target( self.as_ref().to_glib_none().0, target.as_ref().to_glib_none().0, ); } } fn get_relation_type(&self) -> RelationType { unsafe { from_glib(atk_sys::atk_relation_get_relation_type( self.as_ref().to_glib_none().0, )) } } //fn get_target(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 } { // unsafe { TODO: call atk_sys:atk_relation_get_target() } //} fn remove_target>(&self, target: &P) -> bool { unsafe { from_glib(atk_sys::atk_relation_remove_target( self.as_ref().to_glib_none().0, target.as_ref().to_glib_none().0, )) } } fn set_property_relation_type(&self, relation_type: RelationType) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"relation-type\0".as_ptr() as *const _, Value::from(&relation_type).to_glib_none().0, ); } } fn set_property_target(&self, target: Option<&glib::ValueArray>) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"target\0".as_ptr() as *const _, Value::from(target).to_glib_none().0, ); } } fn connect_property_relation_type_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_relation_type_trampoline( this: *mut atk_sys::AtkRelation, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Relation::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::relation-type\0".as_ptr() as *const _, Some(transmute( notify_relation_type_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_property_target_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_target_trampoline( this: *mut atk_sys::AtkRelation, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Relation::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::target\0".as_ptr() as *const _, Some(transmute(notify_target_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Relation { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Relation") } } atk-0.7.0/src/auto/relation_set.rs010064400007650000024000000071171350341657000153230ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use std::fmt; use Object; use Relation; use RelationType; glib_wrapper! { pub struct RelationSet(Object); match fn { get_type => || atk_sys::atk_relation_set_get_type(), } } impl RelationSet { pub fn new() -> RelationSet { assert_initialized_main_thread!(); unsafe { from_glib_full(atk_sys::atk_relation_set_new()) } } } impl Default for RelationSet { fn default() -> Self { Self::new() } } pub const NONE_RELATION_SET: Option<&RelationSet> = None; pub trait RelationSetExt: 'static { fn add>(&self, relation: &P); fn add_relation_by_type>(&self, relationship: RelationType, target: &P); fn contains(&self, relationship: RelationType) -> bool; fn contains_target>(&self, relationship: RelationType, target: &P) -> bool; fn get_n_relations(&self) -> i32; fn get_relation(&self, i: i32) -> Option; fn get_relation_by_type(&self, relationship: RelationType) -> Option; fn remove>(&self, relation: &P); } impl> RelationSetExt for O { fn add>(&self, relation: &P) { unsafe { atk_sys::atk_relation_set_add( self.as_ref().to_glib_none().0, relation.as_ref().to_glib_none().0, ); } } fn add_relation_by_type>(&self, relationship: RelationType, target: &P) { unsafe { atk_sys::atk_relation_set_add_relation_by_type( self.as_ref().to_glib_none().0, relationship.to_glib(), target.as_ref().to_glib_none().0, ); } } fn contains(&self, relationship: RelationType) -> bool { unsafe { from_glib(atk_sys::atk_relation_set_contains( self.as_ref().to_glib_none().0, relationship.to_glib(), )) } } fn contains_target>(&self, relationship: RelationType, target: &P) -> bool { unsafe { from_glib(atk_sys::atk_relation_set_contains_target( self.as_ref().to_glib_none().0, relationship.to_glib(), target.as_ref().to_glib_none().0, )) } } fn get_n_relations(&self) -> i32 { unsafe { atk_sys::atk_relation_set_get_n_relations(self.as_ref().to_glib_none().0) } } fn get_relation(&self, i: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_relation_set_get_relation( self.as_ref().to_glib_none().0, i, )) } } fn get_relation_by_type(&self, relationship: RelationType) -> Option { unsafe { from_glib_none(atk_sys::atk_relation_set_get_relation_by_type( self.as_ref().to_glib_none().0, relationship.to_glib(), )) } } fn remove>(&self, relation: &P) { unsafe { atk_sys::atk_relation_set_remove( self.as_ref().to_glib_none().0, relation.as_ref().to_glib_none().0, ); } } } impl fmt::Display for RelationSet { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "RelationSet") } } atk-0.7.0/src/auto/selection.rs010064400007650000024000000066111350341657000146160ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib_sys; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; use Object; glib_wrapper! { pub struct Selection(Interface); match fn { get_type => || atk_sys::atk_selection_get_type(), } } pub const NONE_SELECTION: Option<&Selection> = None; pub trait SelectionExt: 'static { fn add_selection(&self, i: i32) -> bool; fn clear_selection(&self) -> bool; fn get_selection_count(&self) -> i32; fn is_child_selected(&self, i: i32) -> bool; fn ref_selection(&self, i: i32) -> Option; fn remove_selection(&self, i: i32) -> bool; fn select_all_selection(&self) -> bool; fn connect_selection_changed(&self, f: F) -> SignalHandlerId; } impl> SelectionExt for O { fn add_selection(&self, i: i32) -> bool { unsafe { from_glib(atk_sys::atk_selection_add_selection( self.as_ref().to_glib_none().0, i, )) } } fn clear_selection(&self) -> bool { unsafe { from_glib(atk_sys::atk_selection_clear_selection( self.as_ref().to_glib_none().0, )) } } fn get_selection_count(&self) -> i32 { unsafe { atk_sys::atk_selection_get_selection_count(self.as_ref().to_glib_none().0) } } fn is_child_selected(&self, i: i32) -> bool { unsafe { from_glib(atk_sys::atk_selection_is_child_selected( self.as_ref().to_glib_none().0, i, )) } } fn ref_selection(&self, i: i32) -> Option { unsafe { from_glib_full(atk_sys::atk_selection_ref_selection( self.as_ref().to_glib_none().0, i, )) } } fn remove_selection(&self, i: i32) -> bool { unsafe { from_glib(atk_sys::atk_selection_remove_selection( self.as_ref().to_glib_none().0, i, )) } } fn select_all_selection(&self) -> bool { unsafe { from_glib(atk_sys::atk_selection_select_all_selection( self.as_ref().to_glib_none().0, )) } } fn connect_selection_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn selection_changed_trampoline( this: *mut atk_sys::AtkSelection, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Selection::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"selection-changed\0".as_ptr() as *const _, Some(transmute(selection_changed_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Selection { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Selection") } } atk-0.7.0/src/auto/socket.rs010064400007650000024000000026271350341657000141240ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::translate::*; use std::fmt; use Component; use Object; glib_wrapper! { pub struct Socket(Object) @extends Object, @implements Component; match fn { get_type => || atk_sys::atk_socket_get_type(), } } impl Socket { pub fn new() -> Socket { assert_initialized_main_thread!(); unsafe { Object::from_glib_full(atk_sys::atk_socket_new()).unsafe_cast() } } } impl Default for Socket { fn default() -> Self { Self::new() } } pub const NONE_SOCKET: Option<&Socket> = None; pub trait AtkSocketExt: 'static { fn embed(&self, plug_id: &str); fn is_occupied(&self) -> bool; } impl> AtkSocketExt for O { fn embed(&self, plug_id: &str) { unsafe { atk_sys::atk_socket_embed(self.as_ref().to_glib_none().0, plug_id.to_glib_none().0); } } fn is_occupied(&self) -> bool { unsafe { from_glib(atk_sys::atk_socket_is_occupied( self.as_ref().to_glib_none().0, )) } } } impl fmt::Display for Socket { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Socket") } } atk-0.7.0/src/auto/state_set.rs010064400007650000024000000074431350341657000146300ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use std::fmt; use StateType; glib_wrapper! { pub struct StateSet(Object); match fn { get_type => || atk_sys::atk_state_set_get_type(), } } impl StateSet { pub fn new() -> StateSet { assert_initialized_main_thread!(); unsafe { from_glib_full(atk_sys::atk_state_set_new()) } } } impl Default for StateSet { fn default() -> Self { Self::new() } } pub const NONE_STATE_SET: Option<&StateSet> = None; pub trait StateSetExt: 'static { fn add_state(&self, type_: StateType) -> bool; //fn add_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 68 }); fn and_sets>(&self, compare_set: &P) -> Option; fn clear_states(&self); fn contains_state(&self, type_: StateType) -> bool; //fn contains_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 68 }) -> bool; fn is_empty(&self) -> bool; fn or_sets>(&self, compare_set: &P) -> Option; fn remove_state(&self, type_: StateType) -> bool; fn xor_sets>(&self, compare_set: &P) -> Option; } impl> StateSetExt for O { fn add_state(&self, type_: StateType) -> bool { unsafe { from_glib(atk_sys::atk_state_set_add_state( self.as_ref().to_glib_none().0, type_.to_glib(), )) } } //fn add_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 68 }) { // unsafe { TODO: call atk_sys:atk_state_set_add_states() } //} fn and_sets>(&self, compare_set: &P) -> Option { unsafe { from_glib_full(atk_sys::atk_state_set_and_sets( self.as_ref().to_glib_none().0, compare_set.as_ref().to_glib_none().0, )) } } fn clear_states(&self) { unsafe { atk_sys::atk_state_set_clear_states(self.as_ref().to_glib_none().0); } } fn contains_state(&self, type_: StateType) -> bool { unsafe { from_glib(atk_sys::atk_state_set_contains_state( self.as_ref().to_glib_none().0, type_.to_glib(), )) } } //fn contains_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 68 }) -> bool { // unsafe { TODO: call atk_sys:atk_state_set_contains_states() } //} fn is_empty(&self) -> bool { unsafe { from_glib(atk_sys::atk_state_set_is_empty( self.as_ref().to_glib_none().0, )) } } fn or_sets>(&self, compare_set: &P) -> Option { unsafe { from_glib_full(atk_sys::atk_state_set_or_sets( self.as_ref().to_glib_none().0, compare_set.as_ref().to_glib_none().0, )) } } fn remove_state(&self, type_: StateType) -> bool { unsafe { from_glib(atk_sys::atk_state_set_remove_state( self.as_ref().to_glib_none().0, type_.to_glib(), )) } } fn xor_sets>(&self, compare_set: &P) -> Option { unsafe { from_glib_full(atk_sys::atk_state_set_xor_sets( self.as_ref().to_glib_none().0, compare_set.as_ref().to_glib_none().0, )) } } } impl fmt::Display for StateSet { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "StateSet") } } atk-0.7.0/src/auto/streamable_content.rs010064400007650000024000000034271350341657000165040ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use glib::GString; use std::fmt; glib_wrapper! { pub struct StreamableContent(Interface); match fn { get_type => || atk_sys::atk_streamable_content_get_type(), } } pub const NONE_STREAMABLE_CONTENT: Option<&StreamableContent> = None; pub trait StreamableContentExt: 'static { fn get_mime_type(&self, i: i32) -> Option; fn get_n_mime_types(&self) -> i32; //fn get_stream(&self, mime_type: &str) -> /*Ignored*/Option; fn get_uri(&self, mime_type: &str) -> Option; } impl> StreamableContentExt for O { fn get_mime_type(&self, i: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_streamable_content_get_mime_type( self.as_ref().to_glib_none().0, i, )) } } fn get_n_mime_types(&self) -> i32 { unsafe { atk_sys::atk_streamable_content_get_n_mime_types(self.as_ref().to_glib_none().0) } } //fn get_stream(&self, mime_type: &str) -> /*Ignored*/Option { // unsafe { TODO: call atk_sys:atk_streamable_content_get_stream() } //} fn get_uri(&self, mime_type: &str) -> Option { unsafe { from_glib_none(atk_sys::atk_streamable_content_get_uri( self.as_ref().to_glib_none().0, mime_type.to_glib_none().0, )) } } } impl fmt::Display for StreamableContent { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "StreamableContent") } } atk-0.7.0/src/auto/table.rs010064400007650000024000000345161350341657000137250ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::GString; use glib_sys; use libc; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; use Object; glib_wrapper! { pub struct Table(Interface); match fn { get_type => || atk_sys::atk_table_get_type(), } } pub const NONE_TABLE: Option<&Table> = None; pub trait TableExt: 'static { fn add_column_selection(&self, column: i32) -> bool; fn add_row_selection(&self, row: i32) -> bool; fn get_caption(&self) -> Option; fn get_column_at_index(&self, index_: i32) -> i32; fn get_column_description(&self, column: i32) -> Option; fn get_column_extent_at(&self, row: i32, column: i32) -> i32; fn get_column_header(&self, column: i32) -> Option; fn get_index_at(&self, row: i32, column: i32) -> i32; fn get_n_columns(&self) -> i32; fn get_n_rows(&self) -> i32; fn get_row_at_index(&self, index_: i32) -> i32; fn get_row_description(&self, row: i32) -> Option; fn get_row_extent_at(&self, row: i32, column: i32) -> i32; fn get_row_header(&self, row: i32) -> Option; fn get_summary(&self) -> Option; fn is_column_selected(&self, column: i32) -> bool; fn is_row_selected(&self, row: i32) -> bool; fn is_selected(&self, row: i32, column: i32) -> bool; fn ref_at(&self, row: i32, column: i32) -> Option; fn remove_column_selection(&self, column: i32) -> bool; fn remove_row_selection(&self, row: i32) -> bool; fn set_caption>(&self, caption: &P); fn set_column_description(&self, column: i32, description: &str); fn set_column_header>(&self, column: i32, header: &P); fn set_row_description(&self, row: i32, description: &str); fn set_row_header>(&self, row: i32, header: &P); fn set_summary>(&self, accessible: &P); fn connect_column_deleted(&self, f: F) -> SignalHandlerId; fn connect_column_inserted(&self, f: F) -> SignalHandlerId; fn connect_column_reordered(&self, f: F) -> SignalHandlerId; fn connect_model_changed(&self, f: F) -> SignalHandlerId; fn connect_row_deleted(&self, f: F) -> SignalHandlerId; fn connect_row_inserted(&self, f: F) -> SignalHandlerId; fn connect_row_reordered(&self, f: F) -> SignalHandlerId; } impl> TableExt for O { fn add_column_selection(&self, column: i32) -> bool { unsafe { from_glib(atk_sys::atk_table_add_column_selection( self.as_ref().to_glib_none().0, column, )) } } fn add_row_selection(&self, row: i32) -> bool { unsafe { from_glib(atk_sys::atk_table_add_row_selection( self.as_ref().to_glib_none().0, row, )) } } fn get_caption(&self) -> Option { unsafe { from_glib_none(atk_sys::atk_table_get_caption( self.as_ref().to_glib_none().0, )) } } fn get_column_at_index(&self, index_: i32) -> i32 { unsafe { atk_sys::atk_table_get_column_at_index(self.as_ref().to_glib_none().0, index_) } } fn get_column_description(&self, column: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_table_get_column_description( self.as_ref().to_glib_none().0, column, )) } } fn get_column_extent_at(&self, row: i32, column: i32) -> i32 { unsafe { atk_sys::atk_table_get_column_extent_at(self.as_ref().to_glib_none().0, row, column) } } fn get_column_header(&self, column: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_table_get_column_header( self.as_ref().to_glib_none().0, column, )) } } fn get_index_at(&self, row: i32, column: i32) -> i32 { unsafe { atk_sys::atk_table_get_index_at(self.as_ref().to_glib_none().0, row, column) } } fn get_n_columns(&self) -> i32 { unsafe { atk_sys::atk_table_get_n_columns(self.as_ref().to_glib_none().0) } } fn get_n_rows(&self) -> i32 { unsafe { atk_sys::atk_table_get_n_rows(self.as_ref().to_glib_none().0) } } fn get_row_at_index(&self, index_: i32) -> i32 { unsafe { atk_sys::atk_table_get_row_at_index(self.as_ref().to_glib_none().0, index_) } } fn get_row_description(&self, row: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_table_get_row_description( self.as_ref().to_glib_none().0, row, )) } } fn get_row_extent_at(&self, row: i32, column: i32) -> i32 { unsafe { atk_sys::atk_table_get_row_extent_at(self.as_ref().to_glib_none().0, row, column) } } fn get_row_header(&self, row: i32) -> Option { unsafe { from_glib_none(atk_sys::atk_table_get_row_header( self.as_ref().to_glib_none().0, row, )) } } fn get_summary(&self) -> Option { unsafe { from_glib_full(atk_sys::atk_table_get_summary( self.as_ref().to_glib_none().0, )) } } fn is_column_selected(&self, column: i32) -> bool { unsafe { from_glib(atk_sys::atk_table_is_column_selected( self.as_ref().to_glib_none().0, column, )) } } fn is_row_selected(&self, row: i32) -> bool { unsafe { from_glib(atk_sys::atk_table_is_row_selected( self.as_ref().to_glib_none().0, row, )) } } fn is_selected(&self, row: i32, column: i32) -> bool { unsafe { from_glib(atk_sys::atk_table_is_selected( self.as_ref().to_glib_none().0, row, column, )) } } fn ref_at(&self, row: i32, column: i32) -> Option { unsafe { from_glib_full(atk_sys::atk_table_ref_at( self.as_ref().to_glib_none().0, row, column, )) } } fn remove_column_selection(&self, column: i32) -> bool { unsafe { from_glib(atk_sys::atk_table_remove_column_selection( self.as_ref().to_glib_none().0, column, )) } } fn remove_row_selection(&self, row: i32) -> bool { unsafe { from_glib(atk_sys::atk_table_remove_row_selection( self.as_ref().to_glib_none().0, row, )) } } fn set_caption>(&self, caption: &P) { unsafe { atk_sys::atk_table_set_caption( self.as_ref().to_glib_none().0, caption.as_ref().to_glib_none().0, ); } } fn set_column_description(&self, column: i32, description: &str) { unsafe { atk_sys::atk_table_set_column_description( self.as_ref().to_glib_none().0, column, description.to_glib_none().0, ); } } fn set_column_header>(&self, column: i32, header: &P) { unsafe { atk_sys::atk_table_set_column_header( self.as_ref().to_glib_none().0, column, header.as_ref().to_glib_none().0, ); } } fn set_row_description(&self, row: i32, description: &str) { unsafe { atk_sys::atk_table_set_row_description( self.as_ref().to_glib_none().0, row, description.to_glib_none().0, ); } } fn set_row_header>(&self, row: i32, header: &P) { unsafe { atk_sys::atk_table_set_row_header( self.as_ref().to_glib_none().0, row, header.as_ref().to_glib_none().0, ); } } fn set_summary>(&self, accessible: &P) { unsafe { atk_sys::atk_table_set_summary( self.as_ref().to_glib_none().0, accessible.as_ref().to_glib_none().0, ); } } fn connect_column_deleted(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn column_deleted_trampoline( this: *mut atk_sys::AtkTable, arg1: libc::c_int, arg2: libc::c_int, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Table::from_glib_borrow(this).unsafe_cast(), arg1, arg2) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"column-deleted\0".as_ptr() as *const _, Some(transmute(column_deleted_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_column_inserted(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn column_inserted_trampoline( this: *mut atk_sys::AtkTable, arg1: libc::c_int, arg2: libc::c_int, f: glib_sys::gpointer, ) where P: IsA
, { let f: &F = &*(f as *const F); f(&Table::from_glib_borrow(this).unsafe_cast(), arg1, arg2) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"column-inserted\0".as_ptr() as *const _, Some(transmute(column_inserted_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_column_reordered(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn column_reordered_trampoline( this: *mut atk_sys::AtkTable, f: glib_sys::gpointer, ) where P: IsA
, { let f: &F = &*(f as *const F); f(&Table::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"column-reordered\0".as_ptr() as *const _, Some(transmute(column_reordered_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_model_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn model_changed_trampoline( this: *mut atk_sys::AtkTable, f: glib_sys::gpointer, ) where P: IsA
, { let f: &F = &*(f as *const F); f(&Table::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"model-changed\0".as_ptr() as *const _, Some(transmute(model_changed_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_row_deleted(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn row_deleted_trampoline( this: *mut atk_sys::AtkTable, arg1: libc::c_int, arg2: libc::c_int, f: glib_sys::gpointer, ) where P: IsA
, { let f: &F = &*(f as *const F); f(&Table::from_glib_borrow(this).unsafe_cast(), arg1, arg2) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"row-deleted\0".as_ptr() as *const _, Some(transmute(row_deleted_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_row_inserted(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn row_inserted_trampoline( this: *mut atk_sys::AtkTable, arg1: libc::c_int, arg2: libc::c_int, f: glib_sys::gpointer, ) where P: IsA
, { let f: &F = &*(f as *const F); f(&Table::from_glib_borrow(this).unsafe_cast(), arg1, arg2) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"row-inserted\0".as_ptr() as *const _, Some(transmute(row_inserted_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_row_reordered(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn row_reordered_trampoline( this: *mut atk_sys::AtkTable, f: glib_sys::gpointer, ) where P: IsA
, { let f: &F = &*(f as *const F); f(&Table::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"row-reordered\0".as_ptr() as *const _, Some(transmute(row_reordered_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Table { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Table") } } atk-0.7.0/src/auto/table_cell.rs010064400007650000024000000062471350341657000147240ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::IsA; use glib::translate::*; use std::fmt; use std::mem; use Object; glib_wrapper! { pub struct TableCell(Interface) @requires Object; match fn { get_type => || atk_sys::atk_table_cell_get_type(), } } pub const NONE_TABLE_CELL: Option<&TableCell> = None; pub trait TableCellExt: 'static { //fn get_column_header_cells(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 }; fn get_column_span(&self) -> i32; fn get_position(&self) -> Option<(i32, i32)>; fn get_row_column_span(&self) -> Option<(i32, i32, i32, i32)>; //fn get_row_header_cells(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 }; fn get_row_span(&self) -> i32; fn get_table(&self) -> Option; } impl> TableCellExt for O { //fn get_column_header_cells(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 } { // unsafe { TODO: call atk_sys:atk_table_cell_get_column_header_cells() } //} fn get_column_span(&self) -> i32 { unsafe { atk_sys::atk_table_cell_get_column_span(self.as_ref().to_glib_none().0) } } fn get_position(&self) -> Option<(i32, i32)> { unsafe { let mut row = mem::uninitialized(); let mut column = mem::uninitialized(); let ret = from_glib(atk_sys::atk_table_cell_get_position( self.as_ref().to_glib_none().0, &mut row, &mut column, )); if ret { Some((row, column)) } else { None } } } fn get_row_column_span(&self) -> Option<(i32, i32, i32, i32)> { unsafe { let mut row = mem::uninitialized(); let mut column = mem::uninitialized(); let mut row_span = mem::uninitialized(); let mut column_span = mem::uninitialized(); let ret = from_glib(atk_sys::atk_table_cell_get_row_column_span( self.as_ref().to_glib_none().0, &mut row, &mut column, &mut row_span, &mut column_span, )); if ret { Some((row, column, row_span, column_span)) } else { None } } } //fn get_row_header_cells(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 } { // unsafe { TODO: call atk_sys:atk_table_cell_get_row_header_cells() } //} fn get_row_span(&self) -> i32 { unsafe { atk_sys::atk_table_cell_get_row_span(self.as_ref().to_glib_none().0) } } fn get_table(&self) -> Option { unsafe { from_glib_full(atk_sys::atk_table_cell_get_table( self.as_ref().to_glib_none().0, )) } } } impl fmt::Display for TableCell { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "TableCell") } } atk-0.7.0/src/auto/text.rs010064400007650000024000000320271350341657000136150ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::GString; use glib_sys; use libc; use std::boxed::Box as Box_; use std::fmt; use std::mem; use std::mem::transmute; use CoordType; use TextBoundary; use TextClipType; use TextGranularity; use TextRange; use TextRectangle; glib_wrapper! { pub struct Text(Interface); match fn { get_type => || atk_sys::atk_text_get_type(), } } pub const NONE_TEXT: Option<&Text> = None; pub trait TextExt: 'static { fn add_selection(&self, start_offset: i32, end_offset: i32) -> bool; fn get_bounded_ranges( &self, rect: &mut TextRectangle, coord_type: CoordType, x_clip_type: TextClipType, y_clip_type: TextClipType, ) -> Vec; fn get_caret_offset(&self) -> i32; fn get_character_at_offset(&self, offset: i32) -> char; fn get_character_count(&self) -> i32; fn get_character_extents(&self, offset: i32, coords: CoordType) -> (i32, i32, i32, i32); //fn get_default_attributes(&self) -> /*Ignored*/Option; fn get_n_selections(&self) -> i32; fn get_offset_at_point(&self, x: i32, y: i32, coords: CoordType) -> i32; fn get_range_extents( &self, start_offset: i32, end_offset: i32, coord_type: CoordType, ) -> TextRectangle; //fn get_run_attributes(&self, offset: i32) -> (/*Ignored*/AttributeSet, i32, i32); fn get_selection(&self, selection_num: i32) -> (GString, i32, i32); fn get_string_at_offset( &self, offset: i32, granularity: TextGranularity, ) -> (Option, i32, i32); fn get_text(&self, start_offset: i32, end_offset: i32) -> Option; fn get_text_at_offset(&self, offset: i32, boundary_type: TextBoundary) -> (GString, i32, i32); fn remove_selection(&self, selection_num: i32) -> bool; fn set_caret_offset(&self, offset: i32) -> bool; fn set_selection(&self, selection_num: i32, start_offset: i32, end_offset: i32) -> bool; fn connect_text_attributes_changed(&self, f: F) -> SignalHandlerId; fn connect_text_caret_moved(&self, f: F) -> SignalHandlerId; fn connect_text_insert(&self, f: F) -> SignalHandlerId; fn connect_text_remove(&self, f: F) -> SignalHandlerId; fn connect_text_selection_changed(&self, f: F) -> SignalHandlerId; } impl> TextExt for O { fn add_selection(&self, start_offset: i32, end_offset: i32) -> bool { unsafe { from_glib(atk_sys::atk_text_add_selection( self.as_ref().to_glib_none().0, start_offset, end_offset, )) } } fn get_bounded_ranges( &self, rect: &mut TextRectangle, coord_type: CoordType, x_clip_type: TextClipType, y_clip_type: TextClipType, ) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(atk_sys::atk_text_get_bounded_ranges( self.as_ref().to_glib_none().0, rect.to_glib_none_mut().0, coord_type.to_glib(), x_clip_type.to_glib(), y_clip_type.to_glib(), )) } } fn get_caret_offset(&self) -> i32 { unsafe { atk_sys::atk_text_get_caret_offset(self.as_ref().to_glib_none().0) } } fn get_character_at_offset(&self, offset: i32) -> char { unsafe { from_glib(atk_sys::atk_text_get_character_at_offset( self.as_ref().to_glib_none().0, offset, )) } } fn get_character_count(&self) -> i32 { unsafe { atk_sys::atk_text_get_character_count(self.as_ref().to_glib_none().0) } } fn get_character_extents(&self, offset: i32, coords: CoordType) -> (i32, i32, i32, i32) { unsafe { let mut x = mem::uninitialized(); let mut y = mem::uninitialized(); let mut width = mem::uninitialized(); let mut height = mem::uninitialized(); atk_sys::atk_text_get_character_extents( self.as_ref().to_glib_none().0, offset, &mut x, &mut y, &mut width, &mut height, coords.to_glib(), ); (x, y, width, height) } } //fn get_default_attributes(&self) -> /*Ignored*/Option { // unsafe { TODO: call atk_sys:atk_text_get_default_attributes() } //} fn get_n_selections(&self) -> i32 { unsafe { atk_sys::atk_text_get_n_selections(self.as_ref().to_glib_none().0) } } fn get_offset_at_point(&self, x: i32, y: i32, coords: CoordType) -> i32 { unsafe { atk_sys::atk_text_get_offset_at_point( self.as_ref().to_glib_none().0, x, y, coords.to_glib(), ) } } fn get_range_extents( &self, start_offset: i32, end_offset: i32, coord_type: CoordType, ) -> TextRectangle { unsafe { let mut rect = TextRectangle::uninitialized(); atk_sys::atk_text_get_range_extents( self.as_ref().to_glib_none().0, start_offset, end_offset, coord_type.to_glib(), rect.to_glib_none_mut().0, ); rect } } //fn get_run_attributes(&self, offset: i32) -> (/*Ignored*/AttributeSet, i32, i32) { // unsafe { TODO: call atk_sys:atk_text_get_run_attributes() } //} fn get_selection(&self, selection_num: i32) -> (GString, i32, i32) { unsafe { let mut start_offset = mem::uninitialized(); let mut end_offset = mem::uninitialized(); let ret = from_glib_full(atk_sys::atk_text_get_selection( self.as_ref().to_glib_none().0, selection_num, &mut start_offset, &mut end_offset, )); (ret, start_offset, end_offset) } } fn get_string_at_offset( &self, offset: i32, granularity: TextGranularity, ) -> (Option, i32, i32) { unsafe { let mut start_offset = mem::uninitialized(); let mut end_offset = mem::uninitialized(); let ret = from_glib_full(atk_sys::atk_text_get_string_at_offset( self.as_ref().to_glib_none().0, offset, granularity.to_glib(), &mut start_offset, &mut end_offset, )); (ret, start_offset, end_offset) } } fn get_text(&self, start_offset: i32, end_offset: i32) -> Option { unsafe { from_glib_full(atk_sys::atk_text_get_text( self.as_ref().to_glib_none().0, start_offset, end_offset, )) } } fn get_text_at_offset(&self, offset: i32, boundary_type: TextBoundary) -> (GString, i32, i32) { unsafe { let mut start_offset = mem::uninitialized(); let mut end_offset = mem::uninitialized(); let ret = from_glib_full(atk_sys::atk_text_get_text_at_offset( self.as_ref().to_glib_none().0, offset, boundary_type.to_glib(), &mut start_offset, &mut end_offset, )); (ret, start_offset, end_offset) } } fn remove_selection(&self, selection_num: i32) -> bool { unsafe { from_glib(atk_sys::atk_text_remove_selection( self.as_ref().to_glib_none().0, selection_num, )) } } fn set_caret_offset(&self, offset: i32) -> bool { unsafe { from_glib(atk_sys::atk_text_set_caret_offset( self.as_ref().to_glib_none().0, offset, )) } } fn set_selection(&self, selection_num: i32, start_offset: i32, end_offset: i32) -> bool { unsafe { from_glib(atk_sys::atk_text_set_selection( self.as_ref().to_glib_none().0, selection_num, start_offset, end_offset, )) } } fn connect_text_attributes_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn text_attributes_changed_trampoline( this: *mut atk_sys::AtkText, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Text::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"text-attributes-changed\0".as_ptr() as *const _, Some(transmute( text_attributes_changed_trampoline:: as usize, )), Box_::into_raw(f), ) } } fn connect_text_caret_moved(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn text_caret_moved_trampoline( this: *mut atk_sys::AtkText, arg1: libc::c_int, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Text::from_glib_borrow(this).unsafe_cast(), arg1) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"text-caret-moved\0".as_ptr() as *const _, Some(transmute(text_caret_moved_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_text_insert(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn text_insert_trampoline( this: *mut atk_sys::AtkText, arg1: libc::c_int, arg2: libc::c_int, arg3: *mut libc::c_char, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f( &Text::from_glib_borrow(this).unsafe_cast(), arg1, arg2, &GString::from_glib_borrow(arg3), ) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"text-insert\0".as_ptr() as *const _, Some(transmute(text_insert_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_text_remove(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn text_remove_trampoline( this: *mut atk_sys::AtkText, arg1: libc::c_int, arg2: libc::c_int, arg3: *mut libc::c_char, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f( &Text::from_glib_borrow(this).unsafe_cast(), arg1, arg2, &GString::from_glib_borrow(arg3), ) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"text-remove\0".as_ptr() as *const _, Some(transmute(text_remove_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_text_selection_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn text_selection_changed_trampoline( this: *mut atk_sys::AtkText, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Text::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"text-selection-changed\0".as_ptr() as *const _, Some(transmute( text_selection_changed_trampoline:: as usize, )), Box_::into_raw(f), ) } } } impl fmt::Display for Text { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Text") } } atk-0.7.0/src/auto/text_range.rs010064400007650000024000000011451350341657000147660ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use gobject_sys; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct TextRange(Boxed); match fn { copy => |ptr| gobject_sys::g_boxed_copy(atk_sys::atk_text_range_get_type(), ptr as *mut _) as *mut atk_sys::AtkTextRange, free => |ptr| gobject_sys::g_boxed_free(atk_sys::atk_text_range_get_type(), ptr as *mut _), get_type => || atk_sys::atk_text_range_get_type(), } } atk-0.7.0/src/auto/util.rs010064400007650000024000000010411350341657000135760ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::translate::*; use std::fmt; glib_wrapper! { pub struct Util(Object); match fn { get_type => || atk_sys::atk_util_get_type(), } } impl Util {} pub const NONE_UTIL: Option<&Util> = None; impl fmt::Display for Util { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Util") } } atk-0.7.0/src/auto/value.rs010064400007650000024000000115121350341657000137410ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::GString; use glib_sys; use libc; use std::boxed::Box as Box_; use std::fmt; use std::mem; use std::mem::transmute; use std::ptr; use Range; glib_wrapper! { pub struct Value(Interface); match fn { get_type => || atk_sys::atk_value_get_type(), } } pub const NONE_VALUE: Option<&Value> = None; pub trait ValueExt: 'static { fn get_current_value(&self) -> glib::Value; fn get_increment(&self) -> f64; fn get_maximum_value(&self) -> glib::Value; fn get_minimum_increment(&self) -> glib::Value; fn get_minimum_value(&self) -> glib::Value; fn get_range(&self) -> Option; fn get_sub_ranges(&self) -> Vec; fn get_value_and_text(&self) -> (f64, GString); fn set_current_value(&self, value: &glib::Value) -> bool; fn set_value(&self, new_value: f64); fn connect_value_changed(&self, f: F) -> SignalHandlerId; } impl> ValueExt for O { fn get_current_value(&self) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); atk_sys::atk_value_get_current_value( self.as_ref().to_glib_none().0, value.to_glib_none_mut().0, ); value } } fn get_increment(&self) -> f64 { unsafe { atk_sys::atk_value_get_increment(self.as_ref().to_glib_none().0) } } fn get_maximum_value(&self) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); atk_sys::atk_value_get_maximum_value( self.as_ref().to_glib_none().0, value.to_glib_none_mut().0, ); value } } fn get_minimum_increment(&self) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); atk_sys::atk_value_get_minimum_increment( self.as_ref().to_glib_none().0, value.to_glib_none_mut().0, ); value } } fn get_minimum_value(&self) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); atk_sys::atk_value_get_minimum_value( self.as_ref().to_glib_none().0, value.to_glib_none_mut().0, ); value } } fn get_range(&self) -> Option { unsafe { from_glib_full(atk_sys::atk_value_get_range(self.as_ref().to_glib_none().0)) } } fn get_sub_ranges(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(atk_sys::atk_value_get_sub_ranges( self.as_ref().to_glib_none().0, )) } } fn get_value_and_text(&self) -> (f64, GString) { unsafe { let mut value = mem::uninitialized(); let mut text = ptr::null_mut(); atk_sys::atk_value_get_value_and_text( self.as_ref().to_glib_none().0, &mut value, &mut text, ); (value, from_glib_full(text)) } } fn set_current_value(&self, value: &glib::Value) -> bool { unsafe { from_glib(atk_sys::atk_value_set_current_value( self.as_ref().to_glib_none().0, value.to_glib_none().0, )) } } fn set_value(&self, new_value: f64) { unsafe { atk_sys::atk_value_set_value(self.as_ref().to_glib_none().0, new_value); } } fn connect_value_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn value_changed_trampoline( this: *mut atk_sys::AtkValue, value: libc::c_double, text: *mut libc::c_char, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f( &Value::from_glib_borrow(this).unsafe_cast(), value, &GString::from_glib_borrow(text), ) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"value-changed\0".as_ptr() as *const _, Some(transmute(value_changed_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Value { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Value") } } atk-0.7.0/src/auto/versions.txt010064400007650000024000000001721350341657000146700ustar0000000000000000Generated by gir (https://github.com/gtk-rs/gir @ 1dbb0ee) from gir-files (https://github.com/gtk-rs/gir-files @ 617a344) atk-0.7.0/src/auto/window.rs010064400007650000024000000174561350341657000141510ustar0000000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use atk_sys; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib_sys; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; use Object; glib_wrapper! { pub struct Window(Interface) @requires Object; match fn { get_type => || atk_sys::atk_window_get_type(), } } pub const NONE_WINDOW: Option<&Window> = None; pub trait AtkWindowExt: 'static { fn connect_activate(&self, f: F) -> SignalHandlerId; fn connect_create(&self, f: F) -> SignalHandlerId; fn connect_deactivate(&self, f: F) -> SignalHandlerId; fn connect_destroy(&self, f: F) -> SignalHandlerId; fn connect_maximize(&self, f: F) -> SignalHandlerId; fn connect_minimize(&self, f: F) -> SignalHandlerId; fn connect_move(&self, f: F) -> SignalHandlerId; fn connect_resize(&self, f: F) -> SignalHandlerId; fn connect_restore(&self, f: F) -> SignalHandlerId; } impl> AtkWindowExt for O { fn connect_activate(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn activate_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"activate\0".as_ptr() as *const _, Some(transmute(activate_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_create(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn create_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"create\0".as_ptr() as *const _, Some(transmute(create_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_deactivate(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn deactivate_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"deactivate\0".as_ptr() as *const _, Some(transmute(deactivate_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_destroy(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn destroy_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"destroy\0".as_ptr() as *const _, Some(transmute(destroy_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_maximize(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn maximize_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"maximize\0".as_ptr() as *const _, Some(transmute(maximize_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_minimize(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn minimize_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"minimize\0".as_ptr() as *const _, Some(transmute(minimize_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_move(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn move_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"move\0".as_ptr() as *const _, Some(transmute(move_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_resize(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn resize_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"resize\0".as_ptr() as *const _, Some(transmute(resize_trampoline:: as usize)), Box_::into_raw(f), ) } } fn connect_restore(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn restore_trampoline( this: *mut atk_sys::AtkWindow, f: glib_sys::gpointer, ) where P: IsA, { let f: &F = &*(f as *const F); f(&Window::from_glib_borrow(this).unsafe_cast()) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"restore\0".as_ptr() as *const _, Some(transmute(restore_trampoline:: as usize)), Box_::into_raw(f), ) } } } impl fmt::Display for Window { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Window") } } atk-0.7.0/src/editable_text.rs010064400007650000024000000015151350341657000144740ustar0000000000000000// Copyright 2013-2018, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or use atk_sys; use glib::object::IsA; use glib::translate::*; use EditableText; pub trait EditableTextExtManual: 'static { fn insert_text(&self, string: &str, position: i32) -> i32; } impl> EditableTextExtManual for O { fn insert_text(&self, string: &str, mut position: i32) -> i32 { let length = string.len() as i32; unsafe { atk_sys::atk_editable_text_insert_text( self.as_ref().to_glib_none().0, string.to_glib_none().0, length, &mut position, ); } position } } atk-0.7.0/src/lib.rs010064400007650000024000000030531350341657000124240ustar0000000000000000// Copyright 2013-2018, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or //! # ATK bindings //! //! This library contains safe Rust bindings for [ATK](https://developer.gnome.org/atk/). It's //! a part of [Gtk-rs](http://gtk-rs.org/). #![cfg_attr(feature = "cargo-clippy", allow(let_unit_value))] #![cfg_attr(feature = "cargo-clippy", allow(new_without_default))] #![cfg_attr(feature = "cargo-clippy", allow(type_complexity))] #![cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] #![cfg_attr(feature = "cargo-clippy", allow(trivially_copy_pass_by_ref))] #![cfg_attr(feature = "cargo-clippy", allow(derive_hash_xor_eq))] #![allow(deprecated)] extern crate libc; #[macro_use] extern crate bitflags; extern crate atk_sys; extern crate glib_sys; extern crate gobject_sys; #[macro_use] extern crate glib; #[macro_use] mod rt; #[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))] #[cfg_attr(feature = "cargo-clippy", allow(match_same_arms))] #[cfg_attr(feature = "cargo-clippy", allow(let_and_return))] #[cfg_attr(feature = "cargo-clippy", allow(many_single_char_names))] #[cfg_attr(feature = "cargo-clippy", allow(wrong_self_convention))] mod auto; pub use auto::*; pub mod prelude; pub use prelude::*; pub use attribute::Attribute; pub use attribute_set::AttributeSet; pub use text_rectangle::TextRectangle; mod attribute; mod attribute_set; mod editable_text; mod table; mod text_rectangle; atk-0.7.0/src/prelude.rs010064400007650000024000000005561350341527500133240ustar0000000000000000// Copyright 2015, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or //! Traits intended for blanket imports. pub use auto::traits::*; pub use editable_text::EditableTextExtManual; pub use table::TableExtManual; atk-0.7.0/src/rt.rs010064400007650000024000000005571350341657000123110ustar0000000000000000// Copyright 2013-2015, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or /// No-op. macro_rules! assert_initialized_main_thread { () => {}; } /// No-op. macro_rules! skip_assert_initialized { () => {}; } atk-0.7.0/src/table.rs010064400007650000024000000025001350341657000127410ustar0000000000000000// Copyright 2013-2018, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or use atk_sys; use glib::object::IsA; use glib::translate::*; use Table; pub trait TableExtManual: 'static { fn get_selected_columns(&self) -> Vec; fn get_selected_rows(&self) -> Vec; } impl> TableExtManual for O { fn get_selected_columns(&self) -> Vec { unsafe { let mut selected = ::std::ptr::null_mut(); let nb = atk_sys::atk_table_get_selected_columns( self.as_ref().to_glib_none().0, &mut selected, ); if nb <= 0 { Vec::new() } else { Vec::from_raw_parts(selected, nb as usize, nb as usize) } } } fn get_selected_rows(&self) -> Vec { unsafe { let mut selected = ::std::ptr::null_mut(); let nb = atk_sys::atk_table_get_selected_rows(self.as_ref().to_glib_none().0, &mut selected); if nb <= 0 { Vec::new() } else { Vec::from_raw_parts(selected, nb as usize, nb as usize) } } } } atk-0.7.0/src/text_rectangle.rs010064400007650000024000000032721350341657000146710ustar0000000000000000// Copyright 2013-2018, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or use atk_sys; use glib::translate::*; use std::fmt; #[derive(Debug)] pub struct TextRectangle { pub x: i32, pub y: i32, pub width: i32, pub height: i32, } impl TextRectangle { pub fn uninitialized() -> Self { TextRectangle { x: 0, y: 0, width: 0, height: 0, } } #[doc(hidden)] #[inline] pub fn to_glib_none_mut(&mut self) -> (*mut atk_sys::AtkTextRectangle, i32) { (self as *mut TextRectangle as usize as *mut _, 0) } } impl fmt::Display for TextRectangle { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("TextRectangle") .field("x", &self.x) .field("y", &self.y) .field("width", &self.width) .field("height", &self.height) .finish() } } #[doc(hidden)] impl FromGlib for TextRectangle { fn from_glib(value: atk_sys::AtkTextRectangle) -> Self { skip_assert_initialized!(); TextRectangle { x: value.x, y: value.y, width: value.width, height: value.height, } } } #[doc(hidden)] impl ToGlib for TextRectangle { type GlibType = atk_sys::AtkTextRectangle; fn to_glib(&self) -> atk_sys::AtkTextRectangle { atk_sys::AtkTextRectangle { x: self.x, y: self.y, width: self.width, height: self.height, } } } atk-0.7.0/.cargo_vcs_info.json0000644000000001120000000000000116500ustar00{ "git": { "sha1": "42ac35e81c83c7492c17447ce3cbf3b85036bbae" } }