libphosh-sys-0.0.6/.cargo_vcs_info.json0000644000000001520000000000100134610ustar { "git": { "sha1": "9d0df197f1f0cce5435b38af14cff9b6f1f37b60" }, "path_in_vcs": "libphosh/sys" }libphosh-sys-0.0.6/Cargo.lock0000644000000313700000000000100114420ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "atk-sys" version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "bitflags" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cairo-sys-rs" version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ "libc", "system-deps", ] [[package]] name = "cfg-expr" version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys", ] [[package]] name = "fastrand" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "gdk-pixbuf-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "gdk-sys" version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", "gio-sys", "glib-sys", "gobject-sys", "libc", "pango-sys", "pkg-config", "system-deps", ] [[package]] name = "gio-sys" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", "winapi", ] [[package]] name = "glib-sys" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", "system-deps", ] [[package]] name = "gobject-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "gtk-sys" version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" dependencies = [ "atk-sys", "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", "gio-sys", "glib-sys", "gobject-sys", "libc", "pango-sys", "system-deps", ] [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "libc" version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libhandy-sys" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d814ea1e409715aef1dd9885994cb6801f52129ba2898bfe74591b9547b998ad" dependencies = [ "gdk-pixbuf-sys", "gdk-sys", "gio-sys", "glib-sys", "gobject-sys", "gtk-sys", "libc", "pango-sys", "pkg-config", "system-deps", ] [[package]] name = "libphosh-sys" version = "0.0.6" dependencies = [ "gdk-pixbuf-sys", "gdk-sys", "gio-sys", "glib-sys", "gobject-sys", "gtk-sys", "libc", "libhandy-sys", "pango-sys", "shell-words", "system-deps", "tempfile", ] [[package]] name = "linux-raw-sys" version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "memchr" version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "pango-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "pkg-config" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "proc-macro2" version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] [[package]] name = "rustix" version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys", ] [[package]] name = "serde" version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_spanned" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] [[package]] name = "shell-words" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "syn" version = "2.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ "cfg-expr", "heck", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tempfile" version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", "rustix", "windows-sys", ] [[package]] name = "toml" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", "toml_datetime", "toml_edit", ] [[package]] name = "toml_datetime" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow", ] [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version-compare" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] name = "windows_i686_gnullvm" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] libphosh-sys-0.0.6/Cargo.toml0000644000000033720000000000100114660ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" name = "libphosh-sys" version = "0.0.6" authors = ["Guido Günther "] build = "build.rs" autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "FFI bindings for libphosh" readme = false keywords = [ "phosh", "gnome", ] categories = [ "api-bindings", "gui", ] license = "MIT" [package.metadata.docs.rs] all-features = true rustc-args = [ "--cfg", "docsrs", ] rustdoc-args = [ "--cfg", "docsrs", "--generate-link-to-definition", ] [package.metadata.system-deps.libphosh_0_45] name = "libphosh-0.45" version = "0.45" [lib] name = "phosh_sys" path = "src/lib.rs" [[test]] name = "abi" path = "tests/abi.rs" [dependencies.gdk-pixbuf-sys] version = "0.18" [dependencies.gdk-sys] version = "0.18" [dependencies.gio-sys] version = "0.18" [dependencies.glib-sys] version = "0.18" [dependencies.gobject-sys] version = "0.18" [dependencies.gtk-sys] version = "0.18" features = ["v3_24"] [dependencies.handy_sys] version = "0.11" package = "libhandy-sys" [dependencies.libc] version = "0.2" [dependencies.pango-sys] version = "0.18" [dev-dependencies.shell-words] version = "1.0.0" [dev-dependencies.tempfile] version = "3" [build-dependencies.system-deps] version = "6" [features] libphosh-sys-0.0.6/Cargo.toml.orig000064400000000000000000000020271046102023000151430ustar 00000000000000[package] name = "libphosh-sys" version = "0.0.6" edition = "2021" build = "build.rs" authors = ["Guido Günther "] categories = ["api-bindings", "gui"] keywords = ["phosh", "gnome"] description = "FFI bindings for libphosh" license = "MIT" [package.metadata.system-deps.libphosh_0_45] name = "libphosh-0.45" version = "0.45" [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] all-features = true [lib] name = "phosh_sys" [dependencies] libc = "0.2" [dependencies.gdk-pixbuf-sys] version = "0.18" [dependencies.gdk-sys] version = "0.18" [dependencies.gio-sys] version = "0.18" [dependencies.glib-sys] version = "0.18" [dependencies.gobject-sys] version = "0.18" [dependencies.gtk-sys] version = "0.18" features = ["v3_24"] [dependencies.pango-sys] version = "0.18" [dependencies.handy_sys] package = "libhandy-sys" version = "0.11" [build-dependencies] system-deps = "6" [dev-dependencies] shell-words = "1.0.0" tempfile = "3" [features] libphosh-sys-0.0.6/Gir.toml000064400000000000000000000015211046102023000136700ustar 00000000000000[options] work_mode = "sys" library = "Phosh" version = "0" girs_directories = ["../../gir-files", "../../"] min_cfg_version = "1" external_libraries = [ "GLib", "GObject", "Gio", "Gtk", "Gdk", "GdkPixbuf", "Pango", "Handy", ] ignore = [ "Phosh.DBusScreenshot", "Phosh.DBusScreenshotIface", "Phosh.DBusScreenshotProxy", "Phosh.DBusScreenshotSkeleton", "Phosh.QuickSettings", ] [[object]] name = "Phosh.WallClock" status = "generate" [[object.function]] # We don't want to bother with libgnome-desktop name = "string_for_datetime" ignore = true [[object]] name = "Phosh.LayerSurface" status = "generate" # Ignore functions that return Wayland types for the moment [[object.function]] name = "get_wl_surface" ignore = true [[object.function]] name = "get_layer_surface" ignore = true libphosh-sys-0.0.6/LICENSE000064400000000000000000000020651046102023000132630ustar 00000000000000MIT License Copyright (c) 2024 The Phosh 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. libphosh-sys-0.0.6/build.rs000064400000000000000000000006761046102023000137310ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a) // from ../.. (@ eb5ea3018a51+) // from ../../gir-files (@ 6cd7b656acd6) // DO NOT EDIT #[cfg(not(docsrs))] use std::process; #[cfg(docsrs)] fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(docsrs))] fn main() { if let Err(s) = system_deps::Config::new().probe() { println!("cargo:warning={s}"); process::exit(1); } } libphosh-sys-0.0.6/src/lib.rs000064400000000000000000001025371046102023000141660ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a) // from ../.. (@ eb5ea3018a51+) // from ../../gir-files (@ 6cd7b656acd6) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal, clippy::upper_case_acronyms)] #![cfg_attr(docsrs, feature(doc_cfg))] use glib_sys as glib; use gobject_sys as gobject; use gio_sys as gio; use gtk_sys as gtk; use gdk_sys as gdk; use gdk_pixbuf_sys as gdk_pixbuf; use pango_sys as pango; use handy_sys as handy; #[allow(unused_imports)] use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, c_short, c_ushort, c_long, c_ulong, c_void, size_t, ssize_t, time_t, off_t, intptr_t, uintptr_t, FILE}; #[cfg(unix)] #[allow(unused_imports)] use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; // Enums pub type PhoshLockscreenPage = c_int; pub const PHOSH_LOCKSCREEN_PAGE_INFO: PhoshLockscreenPage = 0; pub const PHOSH_LOCKSCREEN_PAGE_EXTRA: PhoshLockscreenPage = 1; pub const PHOSH_LOCKSCREEN_PAGE_UNLOCK: PhoshLockscreenPage = 2; // Records #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshDBusScreenshotProxyClass { pub parent_class: gio::GDBusProxyClass, } impl ::std::fmt::Debug for PhoshDBusScreenshotProxyClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshDBusScreenshotProxyClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } } #[repr(C)] pub struct _PhoshDBusScreenshotProxyPrivate { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } pub type PhoshDBusScreenshotProxyPrivate = _PhoshDBusScreenshotProxyPrivate; #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshDBusScreenshotSkeletonClass { pub parent_class: gio::GDBusInterfaceSkeletonClass, } impl ::std::fmt::Debug for PhoshDBusScreenshotSkeletonClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshDBusScreenshotSkeletonClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } } #[repr(C)] pub struct _PhoshDBusScreenshotSkeletonPrivate { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } pub type PhoshDBusScreenshotSkeletonPrivate = _PhoshDBusScreenshotSkeletonPrivate; #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshLayerSurfaceClass { pub parent_class: gtk::GtkWindowClass, pub configured: Option, pub _phosh_reserved1: Option, pub _phosh_reserved2: Option, pub _phosh_reserved3: Option, pub _phosh_reserved4: Option, pub _phosh_reserved5: Option, pub _phosh_reserved6: Option, pub _phosh_reserved7: Option, pub _phosh_reserved8: Option, pub _phosh_reserved9: Option, } impl ::std::fmt::Debug for PhoshLayerSurfaceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshLayerSurfaceClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("configured", &self.configured) .field("_phosh_reserved1", &self._phosh_reserved1) .field("_phosh_reserved2", &self._phosh_reserved2) .field("_phosh_reserved3", &self._phosh_reserved3) .field("_phosh_reserved4", &self._phosh_reserved4) .field("_phosh_reserved5", &self._phosh_reserved5) .field("_phosh_reserved6", &self._phosh_reserved6) .field("_phosh_reserved7", &self._phosh_reserved7) .field("_phosh_reserved8", &self._phosh_reserved8) .field("_phosh_reserved9", &self._phosh_reserved9) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshLockscreenClass { pub parent_class: PhoshLayerSurfaceClass, pub unlock_submit: Option, pub _phosh_reserved1: Option, pub _phosh_reserved2: Option, pub _phosh_reserved3: Option, pub _phosh_reserved4: Option, pub _phosh_reserved5: Option, pub _phosh_reserved6: Option, pub _phosh_reserved7: Option, pub _phosh_reserved8: Option, pub _phosh_reserved9: Option, } impl ::std::fmt::Debug for PhoshLockscreenClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshLockscreenClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("unlock_submit", &self.unlock_submit) .field("_phosh_reserved1", &self._phosh_reserved1) .field("_phosh_reserved2", &self._phosh_reserved2) .field("_phosh_reserved3", &self._phosh_reserved3) .field("_phosh_reserved4", &self._phosh_reserved4) .field("_phosh_reserved5", &self._phosh_reserved5) .field("_phosh_reserved6", &self._phosh_reserved6) .field("_phosh_reserved7", &self._phosh_reserved7) .field("_phosh_reserved8", &self._phosh_reserved8) .field("_phosh_reserved9", &self._phosh_reserved9) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshLockscreenManagerClass { pub parent_class: gobject::GObjectClass, } impl ::std::fmt::Debug for PhoshLockscreenManagerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshLockscreenManagerClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshQuickSettingClass { pub parent_class: gtk::GtkBoxClass, pub _phosh_reserved0: Option, pub _phosh_reserved1: Option, pub _phosh_reserved2: Option, pub _phosh_reserved3: Option, pub _phosh_reserved4: Option, pub _phosh_reserved5: Option, pub _phosh_reserved6: Option, pub _phosh_reserved7: Option, pub _phosh_reserved8: Option, pub _phosh_reserved9: Option, } impl ::std::fmt::Debug for PhoshQuickSettingClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshQuickSettingClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_phosh_reserved0", &self._phosh_reserved0) .field("_phosh_reserved1", &self._phosh_reserved1) .field("_phosh_reserved2", &self._phosh_reserved2) .field("_phosh_reserved3", &self._phosh_reserved3) .field("_phosh_reserved4", &self._phosh_reserved4) .field("_phosh_reserved5", &self._phosh_reserved5) .field("_phosh_reserved6", &self._phosh_reserved6) .field("_phosh_reserved7", &self._phosh_reserved7) .field("_phosh_reserved8", &self._phosh_reserved8) .field("_phosh_reserved9", &self._phosh_reserved9) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshScreenshotManagerClass { pub parent_class: PhoshDBusScreenshotSkeletonClass, } impl ::std::fmt::Debug for PhoshScreenshotManagerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshScreenshotManagerClass @ {self:p}")) .field("parent_class", &self.parent_class) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshShellClass { pub parent_class: gobject::GObjectClass, pub get_lockscreen_type: Option GType>, pub _phosh_reserved1: Option, pub _phosh_reserved2: Option, pub _phosh_reserved3: Option, pub _phosh_reserved4: Option, pub _phosh_reserved5: Option, pub _phosh_reserved6: Option, pub _phosh_reserved7: Option, pub _phosh_reserved8: Option, pub _phosh_reserved9: Option, } impl ::std::fmt::Debug for PhoshShellClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshShellClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_lockscreen_type", &self.get_lockscreen_type) .field("_phosh_reserved1", &self._phosh_reserved1) .field("_phosh_reserved2", &self._phosh_reserved2) .field("_phosh_reserved3", &self._phosh_reserved3) .field("_phosh_reserved4", &self._phosh_reserved4) .field("_phosh_reserved5", &self._phosh_reserved5) .field("_phosh_reserved6", &self._phosh_reserved6) .field("_phosh_reserved7", &self._phosh_reserved7) .field("_phosh_reserved8", &self._phosh_reserved8) .field("_phosh_reserved9", &self._phosh_reserved9) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshStatusIconClass { pub parent_class: gtk::GtkBinClass, pub idle_init: Option, pub _phosh_reserved1: Option, pub _phosh_reserved2: Option, pub _phosh_reserved3: Option, pub _phosh_reserved4: Option, pub _phosh_reserved5: Option, pub _phosh_reserved6: Option, pub _phosh_reserved7: Option, pub _phosh_reserved8: Option, pub _phosh_reserved9: Option, } impl ::std::fmt::Debug for PhoshStatusIconClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshStatusIconClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("idle_init", &self.idle_init) .field("_phosh_reserved1", &self._phosh_reserved1) .field("_phosh_reserved2", &self._phosh_reserved2) .field("_phosh_reserved3", &self._phosh_reserved3) .field("_phosh_reserved4", &self._phosh_reserved4) .field("_phosh_reserved5", &self._phosh_reserved5) .field("_phosh_reserved6", &self._phosh_reserved6) .field("_phosh_reserved7", &self._phosh_reserved7) .field("_phosh_reserved8", &self._phosh_reserved8) .field("_phosh_reserved9", &self._phosh_reserved9) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshStatusPageClass { pub parent_class: gtk::GtkBinClass, pub _phosh_reserved0: Option, pub _phosh_reserved1: Option, pub _phosh_reserved2: Option, pub _phosh_reserved3: Option, pub _phosh_reserved4: Option, pub _phosh_reserved5: Option, pub _phosh_reserved6: Option, pub _phosh_reserved7: Option, pub _phosh_reserved8: Option, pub _phosh_reserved9: Option, } impl ::std::fmt::Debug for PhoshStatusPageClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshStatusPageClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("_phosh_reserved0", &self._phosh_reserved0) .field("_phosh_reserved1", &self._phosh_reserved1) .field("_phosh_reserved2", &self._phosh_reserved2) .field("_phosh_reserved3", &self._phosh_reserved3) .field("_phosh_reserved4", &self._phosh_reserved4) .field("_phosh_reserved5", &self._phosh_reserved5) .field("_phosh_reserved6", &self._phosh_reserved6) .field("_phosh_reserved7", &self._phosh_reserved7) .field("_phosh_reserved8", &self._phosh_reserved8) .field("_phosh_reserved9", &self._phosh_reserved9) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshWallClockClass { pub parent_class: gobject::GObjectClass, pub get_clock: Option *const c_char>, pub get_time_t: Option i64>, pub _phosh_reserved2: Option, pub _phosh_reserved3: Option, pub _phosh_reserved4: Option, pub _phosh_reserved5: Option, pub _phosh_reserved6: Option, pub _phosh_reserved7: Option, pub _phosh_reserved8: Option, pub _phosh_reserved9: Option, } impl ::std::fmt::Debug for PhoshWallClockClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshWallClockClass @ {self:p}")) .field("parent_class", &self.parent_class) .field("get_clock", &self.get_clock) .field("get_time_t", &self.get_time_t) .field("_phosh_reserved2", &self._phosh_reserved2) .field("_phosh_reserved3", &self._phosh_reserved3) .field("_phosh_reserved4", &self._phosh_reserved4) .field("_phosh_reserved5", &self._phosh_reserved5) .field("_phosh_reserved6", &self._phosh_reserved6) .field("_phosh_reserved7", &self._phosh_reserved7) .field("_phosh_reserved8", &self._phosh_reserved8) .field("_phosh_reserved9", &self._phosh_reserved9) .finish() } } // Classes #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshLayerSurface { pub parent_instance: gtk::GtkWindow, } impl ::std::fmt::Debug for PhoshLayerSurface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshLayerSurface @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshLockscreen { pub parent_instance: PhoshLayerSurface, } impl ::std::fmt::Debug for PhoshLockscreen { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshLockscreen @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } } #[repr(C)] pub struct PhoshLockscreenManager { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } impl ::std::fmt::Debug for PhoshLockscreenManager { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshLockscreenManager @ {self:p}")) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshQuickSetting { pub parent_instance: gtk::GtkBox, } impl ::std::fmt::Debug for PhoshQuickSetting { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshQuickSetting @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } } #[repr(C)] pub struct PhoshScreenshotManager { _data: [u8; 0], _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, } impl ::std::fmt::Debug for PhoshScreenshotManager { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshScreenshotManager @ {self:p}")) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshShell { pub parent_instance: gobject::GObject, } impl ::std::fmt::Debug for PhoshShell { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshShell @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshStatusIcon { pub parent_instance: gtk::GtkBin, } impl ::std::fmt::Debug for PhoshStatusIcon { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshStatusIcon @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshStatusPage { pub parent_instance: gtk::GtkBin, } impl ::std::fmt::Debug for PhoshStatusPage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshStatusPage @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } } #[derive(Copy, Clone)] #[repr(C)] pub struct PhoshWallClock { pub parent_instance: gobject::GObject, } impl ::std::fmt::Debug for PhoshWallClock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("PhoshWallClock @ {self:p}")) .field("parent_instance", &self.parent_instance) .finish() } } // Interfaces #[link(name = "phosh-0.45")] extern "C" { //========================================================================= // PhoshLockscreenPage //========================================================================= pub fn phosh_lockscreen_page_get_type() -> GType; //========================================================================= // PhoshDBusScreenshotProxy //========================================================================= pub fn phosh_dbus_screenshot_proxy_get_type() -> GType; //pub fn phosh_dbus_screenshot_proxy_new_finish(res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> /*Ignored*/*mut PhoshDBusScreenshotProxy; //pub fn phosh_dbus_screenshot_proxy_new_for_bus_finish(res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> /*Ignored*/*mut PhoshDBusScreenshotProxy; //pub fn phosh_dbus_screenshot_proxy_new_for_bus_sync(bus_type: gio::GBusType, flags: gio::GDBusProxyFlags, name: *const c_char, object_path: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> /*Ignored*/*mut PhoshDBusScreenshotProxy; //pub fn phosh_dbus_screenshot_proxy_new_sync(connection: *mut gio::GDBusConnection, flags: gio::GDBusProxyFlags, name: *const c_char, object_path: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> /*Ignored*/*mut PhoshDBusScreenshotProxy; pub fn phosh_dbus_screenshot_proxy_new(connection: *mut gio::GDBusConnection, flags: gio::GDBusProxyFlags, name: *const c_char, object_path: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); pub fn phosh_dbus_screenshot_proxy_new_for_bus(bus_type: gio::GBusType, flags: gio::GDBusProxyFlags, name: *const c_char, object_path: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); //========================================================================= // PhoshDBusScreenshotSkeleton //========================================================================= pub fn phosh_dbus_screenshot_skeleton_get_type() -> GType; //pub fn phosh_dbus_screenshot_skeleton_new() -> /*Ignored*/*mut PhoshDBusScreenshotSkeleton; //========================================================================= // PhoshLayerSurface //========================================================================= pub fn phosh_layer_surface_get_type() -> GType; //========================================================================= // PhoshLockscreen //========================================================================= pub fn phosh_lockscreen_get_type() -> GType; pub fn phosh_lockscreen_add_extra_page(self_: *mut PhoshLockscreen, widget: *mut gtk::GtkWidget); pub fn phosh_lockscreen_clear_pin_entry(self_: *mut PhoshLockscreen); pub fn phosh_lockscreen_get_page(self_: *mut PhoshLockscreen) -> PhoshLockscreenPage; pub fn phosh_lockscreen_get_pin_entry(self_: *mut PhoshLockscreen) -> *const c_char; pub fn phosh_lockscreen_set_default_page(self_: *mut PhoshLockscreen, page: PhoshLockscreenPage); pub fn phosh_lockscreen_set_page(self_: *mut PhoshLockscreen, page: PhoshLockscreenPage); pub fn phosh_lockscreen_set_unlock_status(self_: *mut PhoshLockscreen, status: *const c_char); pub fn phosh_lockscreen_shake_pin_entry(self_: *mut PhoshLockscreen); //========================================================================= // PhoshLockscreenManager //========================================================================= pub fn phosh_lockscreen_manager_get_type() -> GType; pub fn phosh_lockscreen_manager_get_active_time(self_: *mut PhoshLockscreenManager) -> i64; pub fn phosh_lockscreen_manager_get_locked(self_: *mut PhoshLockscreenManager) -> gboolean; pub fn phosh_lockscreen_manager_get_lockscreen(self_: *mut PhoshLockscreenManager) -> *mut PhoshLockscreen; pub fn phosh_lockscreen_manager_get_page(self_: *mut PhoshLockscreenManager) -> PhoshLockscreenPage; pub fn phosh_lockscreen_manager_set_locked(self_: *mut PhoshLockscreenManager, state: gboolean); pub fn phosh_lockscreen_manager_set_page(self_: *mut PhoshLockscreenManager, page: PhoshLockscreenPage) -> gboolean; //========================================================================= // PhoshQuickSetting //========================================================================= pub fn phosh_quick_setting_get_type() -> GType; pub fn phosh_quick_setting_new(status_page: *mut PhoshStatusPage) -> *mut gtk::GtkWidget; pub fn phosh_quick_setting_get_active(self_: *mut PhoshQuickSetting) -> gboolean; pub fn phosh_quick_setting_get_can_show_status(self_: *mut PhoshQuickSetting) -> gboolean; pub fn phosh_quick_setting_get_long_press_action_name(self_: *mut PhoshQuickSetting) -> *const c_char; pub fn phosh_quick_setting_get_long_press_action_target(self_: *mut PhoshQuickSetting) -> *const c_char; pub fn phosh_quick_setting_get_showing_status(self_: *mut PhoshQuickSetting) -> gboolean; pub fn phosh_quick_setting_get_status_page(self_: *mut PhoshQuickSetting) -> *mut PhoshStatusPage; pub fn phosh_quick_setting_set_active(self_: *mut PhoshQuickSetting, active: gboolean); pub fn phosh_quick_setting_set_can_show_status(self_: *mut PhoshQuickSetting, can_show_status: gboolean); pub fn phosh_quick_setting_set_long_press_action_name(self_: *mut PhoshQuickSetting, action_name: *const c_char); pub fn phosh_quick_setting_set_long_press_action_target(self_: *mut PhoshQuickSetting, action_target: *const c_char); pub fn phosh_quick_setting_set_showing_status(self_: *mut PhoshQuickSetting, showing_status: gboolean); pub fn phosh_quick_setting_set_status_page(self_: *mut PhoshQuickSetting, status_page: *mut PhoshStatusPage); //========================================================================= // PhoshScreenshotManager //========================================================================= pub fn phosh_screenshot_manager_get_type() -> GType; pub fn phosh_screenshot_manager_new() -> *mut PhoshScreenshotManager; pub fn phosh_screenshot_manager_take_screenshot(self_: *mut PhoshScreenshotManager, area: *const gdk::GdkRectangle, filename: *const c_char, copy_to_clipboard: gboolean, include_cursor: gboolean) -> gboolean; //========================================================================= // PhoshShell //========================================================================= pub fn phosh_shell_get_type() -> GType; pub fn phosh_shell_new() -> *mut PhoshShell; pub fn phosh_shell_get_default() -> *mut PhoshShell; pub fn phosh_shell_fade_out(self_: *mut PhoshShell, timeout: c_uint); pub fn phosh_shell_get_locked(self_: *mut PhoshShell) -> gboolean; pub fn phosh_shell_get_lockscreen_manager(self_: *mut PhoshShell) -> *mut PhoshLockscreenManager; pub fn phosh_shell_get_lockscreen_type(self_: *mut PhoshShell) -> GType; pub fn phosh_shell_get_screenshot_manager(self_: *mut PhoshShell) -> *mut PhoshScreenshotManager; pub fn phosh_shell_get_usable_area(self_: *mut PhoshShell, x: *mut c_int, y: *mut c_int, width: *mut c_int, height: *mut c_int); pub fn phosh_shell_set_default(self_: *mut PhoshShell); //========================================================================= // PhoshStatusIcon //========================================================================= pub fn phosh_status_icon_get_type() -> GType; pub fn phosh_status_icon_new() -> *mut gtk::GtkWidget; pub fn phosh_status_icon_get_extra_widget(self_: *mut PhoshStatusIcon) -> *mut gtk::GtkWidget; pub fn phosh_status_icon_get_icon_name(self_: *mut PhoshStatusIcon) -> *mut c_char; pub fn phosh_status_icon_get_icon_size(self_: *mut PhoshStatusIcon) -> gtk::GtkIconSize; pub fn phosh_status_icon_get_info(self_: *mut PhoshStatusIcon) -> *mut c_char; pub fn phosh_status_icon_get_show_always(self_: *mut PhoshStatusIcon) -> gboolean; pub fn phosh_status_icon_set_extra_widget(self_: *mut PhoshStatusIcon, widget: *mut gtk::GtkWidget); pub fn phosh_status_icon_set_icon_name(self_: *mut PhoshStatusIcon, icon_name: *const c_char); pub fn phosh_status_icon_set_icon_size(self_: *mut PhoshStatusIcon, size: gtk::GtkIconSize); pub fn phosh_status_icon_set_info(self_: *mut PhoshStatusIcon, info: *const c_char); pub fn phosh_status_icon_set_show_always(self_: *mut PhoshStatusIcon, show_always: gboolean); //========================================================================= // PhoshStatusPage //========================================================================= pub fn phosh_status_page_get_type() -> GType; pub fn phosh_status_page_new() -> *mut PhoshStatusPage; pub fn phosh_status_page_get_footer(self_: *mut PhoshStatusPage) -> *mut gtk::GtkWidget; pub fn phosh_status_page_get_header(self_: *mut PhoshStatusPage) -> *mut gtk::GtkWidget; pub fn phosh_status_page_get_title(self_: *mut PhoshStatusPage) -> *const c_char; pub fn phosh_status_page_set_footer(self_: *mut PhoshStatusPage, footer: *mut gtk::GtkWidget); pub fn phosh_status_page_set_header(self_: *mut PhoshStatusPage, header: *mut gtk::GtkWidget); pub fn phosh_status_page_set_title(self_: *mut PhoshStatusPage, title: *const c_char); //========================================================================= // PhoshWallClock //========================================================================= pub fn phosh_wall_clock_get_type() -> GType; pub fn phosh_wall_clock_new() -> *mut PhoshWallClock; pub fn phosh_wall_clock_get_default() -> *mut PhoshWallClock; pub fn phosh_wall_clock_get_clock(self_: *mut PhoshWallClock, time_only: gboolean) -> *const c_char; pub fn phosh_wall_clock_local_date(self_: *mut PhoshWallClock) -> *mut c_char; pub fn phosh_wall_clock_set_default(self_: *mut PhoshWallClock); //========================================================================= // PhoshDBusScreenshot //========================================================================= pub fn phosh_dbus_screenshot_get_type() -> GType; pub fn phosh_dbus_screenshot_interface_info() -> *mut gio::GDBusInterfaceInfo; pub fn phosh_dbus_screenshot_override_properties(klass: *mut gobject::GObjectClass, property_id_begin: c_uint) -> c_uint; //pub fn phosh_dbus_screenshot_call_flash_area(proxy: /*Ignored*/*mut PhoshDBusScreenshot, arg_x: c_int, arg_y: c_int, arg_width: c_int, arg_height: c_int, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); //pub fn phosh_dbus_screenshot_call_flash_area_finish(proxy: /*Ignored*/*mut PhoshDBusScreenshot, res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_flash_area_sync(proxy: /*Ignored*/*mut PhoshDBusScreenshot, arg_x: c_int, arg_y: c_int, arg_width: c_int, arg_height: c_int, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_pick_color(proxy: /*Ignored*/*mut PhoshDBusScreenshot, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); //pub fn phosh_dbus_screenshot_call_pick_color_finish(proxy: /*Ignored*/*mut PhoshDBusScreenshot, out_result: *mut *mut glib::GVariant, res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_pick_color_sync(proxy: /*Ignored*/*mut PhoshDBusScreenshot, out_result: *mut *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_screenshot(proxy: /*Ignored*/*mut PhoshDBusScreenshot, arg_include_cursor: gboolean, arg_flash: gboolean, arg_filename: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); //pub fn phosh_dbus_screenshot_call_screenshot_area(proxy: /*Ignored*/*mut PhoshDBusScreenshot, arg_x: c_int, arg_y: c_int, arg_width: c_int, arg_height: c_int, arg_flash: gboolean, arg_filename: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); //pub fn phosh_dbus_screenshot_call_screenshot_area_finish(proxy: /*Ignored*/*mut PhoshDBusScreenshot, out_success: *mut gboolean, out_filename_used: *mut *mut c_char, res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_screenshot_area_sync(proxy: /*Ignored*/*mut PhoshDBusScreenshot, arg_x: c_int, arg_y: c_int, arg_width: c_int, arg_height: c_int, arg_flash: gboolean, arg_filename: *const c_char, out_success: *mut gboolean, out_filename_used: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_screenshot_finish(proxy: /*Ignored*/*mut PhoshDBusScreenshot, out_success: *mut gboolean, out_filename_used: *mut *mut c_char, res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_screenshot_sync(proxy: /*Ignored*/*mut PhoshDBusScreenshot, arg_include_cursor: gboolean, arg_flash: gboolean, arg_filename: *const c_char, out_success: *mut gboolean, out_filename_used: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_screenshot_window(proxy: /*Ignored*/*mut PhoshDBusScreenshot, arg_include_frame: gboolean, arg_include_cursor: gboolean, arg_flash: gboolean, arg_filename: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); //pub fn phosh_dbus_screenshot_call_screenshot_window_finish(proxy: /*Ignored*/*mut PhoshDBusScreenshot, out_success: *mut gboolean, out_filename_used: *mut *mut c_char, res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_screenshot_window_sync(proxy: /*Ignored*/*mut PhoshDBusScreenshot, arg_include_frame: gboolean, arg_include_cursor: gboolean, arg_flash: gboolean, arg_filename: *const c_char, out_success: *mut gboolean, out_filename_used: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_select_area(proxy: /*Ignored*/*mut PhoshDBusScreenshot, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); //pub fn phosh_dbus_screenshot_call_select_area_finish(proxy: /*Ignored*/*mut PhoshDBusScreenshot, out_x: *mut c_int, out_y: *mut c_int, out_width: *mut c_int, out_height: *mut c_int, res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_call_select_area_sync(proxy: /*Ignored*/*mut PhoshDBusScreenshot, out_x: *mut c_int, out_y: *mut c_int, out_width: *mut c_int, out_height: *mut c_int, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; //pub fn phosh_dbus_screenshot_complete_flash_area(object: /*Ignored*/*mut PhoshDBusScreenshot, invocation: *mut gio::GDBusMethodInvocation); //pub fn phosh_dbus_screenshot_complete_pick_color(object: /*Ignored*/*mut PhoshDBusScreenshot, invocation: *mut gio::GDBusMethodInvocation, result: *mut glib::GVariant); //pub fn phosh_dbus_screenshot_complete_screenshot(object: /*Ignored*/*mut PhoshDBusScreenshot, invocation: *mut gio::GDBusMethodInvocation, success: gboolean, filename_used: *const c_char); //pub fn phosh_dbus_screenshot_complete_screenshot_area(object: /*Ignored*/*mut PhoshDBusScreenshot, invocation: *mut gio::GDBusMethodInvocation, success: gboolean, filename_used: *const c_char); //pub fn phosh_dbus_screenshot_complete_screenshot_window(object: /*Ignored*/*mut PhoshDBusScreenshot, invocation: *mut gio::GDBusMethodInvocation, success: gboolean, filename_used: *const c_char); //pub fn phosh_dbus_screenshot_complete_select_area(object: /*Ignored*/*mut PhoshDBusScreenshot, invocation: *mut gio::GDBusMethodInvocation, x: c_int, y: c_int, width: c_int, height: c_int); } libphosh-sys-0.0.6/tests/abi.rs000064400000000000000000000212361046102023000145220ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a) // from ../.. (@ eb5ea3018a51+) // from ../../gir-files (@ 6cd7b656acd6) // DO NOT EDIT #![cfg(unix)] use phosh_sys::*; use std::mem::{align_of, size_of}; use std::env; use std::error::Error; use std::ffi::OsString; use std::path::Path; use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; static PACKAGES: &[&str] = &["libphosh-0.45"]; #[derive(Clone, Debug)] struct Compiler { pub args: Vec, } impl Compiler { pub fn new() -> Result> { let mut args = get_var("CC", "cc")?; args.push("-Wno-deprecated-declarations".to_owned()); // For _Generic args.push("-std=c11".to_owned()); // For %z support in printf when using MinGW. args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); args.extend(get_var("CFLAGS", "")?); args.extend(get_var("CPPFLAGS", "")?); args.extend(pkg_config_cflags(PACKAGES)?); Ok(Self { args }) } pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { let mut cmd = self.to_command(); cmd.arg(src); cmd.arg("-o"); cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { return Err(format!("compilation command {cmd:?} failed, {status}").into()); } Ok(()) } fn to_command(&self) -> Command { let mut cmd = Command::new(&self.args[0]); cmd.args(&self.args[1..]); cmd } } fn get_var(name: &str, default: &str) -> Result, Box> { match env::var(name) { Ok(value) => Ok(shell_words::split(&value)?), Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), Err(err) => Err(format!("{name} {err}").into()), } } fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { if packages.is_empty() { return Ok(Vec::new()); } let pkg_config = env::var_os("PKG_CONFIG") .unwrap_or_else(|| OsString::from("pkg-config")); let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, alignment: usize, } #[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] struct Results { /// Number of successfully completed tests. passed: usize, /// Total number of failed tests (including those that failed to compile). failed: usize, } impl Results { fn record_passed(&mut self) { self.passed += 1; } fn record_failed(&mut self) { self.failed += 1; } fn summary(&self) -> String { format!("{} passed; {} failed", self.passed, self.failed) } fn expect_total_success(&self) { if self.failed == 0 { println!("OK: {}", self.summary()); } else { panic!("FAILED: {}", self.summary()); }; } } #[test] fn cross_validate_constants_with_c() { let mut c_constants: Vec<(String, String)> = Vec::new(); for l in get_c_output("constant").unwrap().lines() { let (name, value) = l.split_once(';').expect("Missing ';' separator"); c_constants.push((name.to_owned(), value.to_owned())); } let mut results = Results::default(); for ((rust_name, rust_value), (c_name, c_value)) in RUST_CONSTANTS.iter().zip(c_constants.iter()) { if rust_name != c_name { results.record_failed(); eprintln!("Name mismatch:\nRust: {rust_name:?}\nC: {c_name:?}"); continue; } if rust_value != c_value { results.record_failed(); eprintln!( "Constant value mismatch for {rust_name}\nRust: {rust_value:?}\nC: {c_value:?}", ); continue; } results.record_passed(); } results.expect_total_success(); } #[test] fn cross_validate_layout_with_c() { let mut c_layouts = Vec::new(); for l in get_c_output("layout").unwrap().lines() { let (name, value) = l.split_once(';').expect("Missing first ';' separator"); let (size, alignment) = value.split_once(';').expect("Missing second ';' separator"); let size = size.parse().expect("Failed to parse size"); let alignment = alignment.parse().expect("Failed to parse alignment"); c_layouts.push((name.to_owned(), Layout { size, alignment })); } let mut results = Results::default(); for ((rust_name, rust_layout), (c_name, c_layout)) in RUST_LAYOUTS.iter().zip(c_layouts.iter()) { if rust_name != c_name { results.record_failed(); eprintln!("Name mismatch:\nRust: {rust_name:?}\nC: {c_name:?}"); continue; } if rust_layout != c_layout { results.record_failed(); eprintln!( "Layout mismatch for {rust_name}\nRust: {rust_layout:?}\nC: {c_layout:?}", ); continue; } results.record_passed(); } results.expect_total_success(); } fn get_c_output(name: &str) -> Result> { let tmpdir = Builder::new().prefix("abi").tempdir()?; let exe = tmpdir.path().join(name); let c_file = Path::new("tests").join(name).with_extension("c"); let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; let mut cmd = Command::new(exe); cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ ("PhoshDBusScreenshotProxyClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshDBusScreenshotSkeletonClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshLayerSurface", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshLayerSurfaceClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshLockscreen", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshLockscreenClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshLockscreenManagerClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshLockscreenPage", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshQuickSetting", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshQuickSettingClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshScreenshotManagerClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshShell", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshShellClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshStatusIcon", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshStatusIconClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshStatusPage", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshStatusPageClass", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshWallClock", Layout {size: size_of::(), alignment: align_of::()}), ("PhoshWallClockClass", Layout {size: size_of::(), alignment: align_of::()}), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) PHOSH_LOCKSCREEN_PAGE_EXTRA", "1"), ("(gint) PHOSH_LOCKSCREEN_PAGE_INFO", "0"), ("(gint) PHOSH_LOCKSCREEN_PAGE_UNLOCK", "2"), ]; libphosh-sys-0.0.6/tests/constant.c000064400000000000000000000022651046102023000154170ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a) // from ../.. (@ eb5ea3018a51+) // from ../../gir-files (@ 6cd7b656acd6) // DO NOT EDIT #include "manual.h" #include #define PRINT_CONSTANT(CONSTANT_NAME) \ printf("%s;", #CONSTANT_NAME); \ printf(_Generic((CONSTANT_NAME), \ char *: "%s", \ const char *: "%s", \ char: "%c", \ signed char: "%hhd", \ unsigned char: "%hhu", \ short int: "%hd", \ unsigned short int: "%hu", \ int: "%d", \ unsigned int: "%u", \ long: "%ld", \ unsigned long: "%lu", \ long long: "%lld", \ unsigned long long: "%llu", \ float: "%f", \ double: "%f", \ long double: "%ld"), \ CONSTANT_NAME); \ printf("\n"); int main() { PRINT_CONSTANT((gint) PHOSH_LOCKSCREEN_PAGE_EXTRA); PRINT_CONSTANT((gint) PHOSH_LOCKSCREEN_PAGE_INFO); PRINT_CONSTANT((gint) PHOSH_LOCKSCREEN_PAGE_UNLOCK); return 0; } libphosh-sys-0.0.6/tests/layout.c000064400000000000000000000045131046102023000151010ustar 00000000000000// Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a) // from ../.. (@ eb5ea3018a51+) // from ../../gir-files (@ 6cd7b656acd6) // DO NOT EDIT #include "manual.h" #include #include int main() { printf("%s;%zu;%zu\n", "PhoshDBusScreenshotProxyClass", sizeof(PhoshDBusScreenshotProxyClass), alignof(PhoshDBusScreenshotProxyClass)); printf("%s;%zu;%zu\n", "PhoshDBusScreenshotSkeletonClass", sizeof(PhoshDBusScreenshotSkeletonClass), alignof(PhoshDBusScreenshotSkeletonClass)); printf("%s;%zu;%zu\n", "PhoshLayerSurface", sizeof(PhoshLayerSurface), alignof(PhoshLayerSurface)); printf("%s;%zu;%zu\n", "PhoshLayerSurfaceClass", sizeof(PhoshLayerSurfaceClass), alignof(PhoshLayerSurfaceClass)); printf("%s;%zu;%zu\n", "PhoshLockscreen", sizeof(PhoshLockscreen), alignof(PhoshLockscreen)); printf("%s;%zu;%zu\n", "PhoshLockscreenClass", sizeof(PhoshLockscreenClass), alignof(PhoshLockscreenClass)); printf("%s;%zu;%zu\n", "PhoshLockscreenManagerClass", sizeof(PhoshLockscreenManagerClass), alignof(PhoshLockscreenManagerClass)); printf("%s;%zu;%zu\n", "PhoshLockscreenPage", sizeof(PhoshLockscreenPage), alignof(PhoshLockscreenPage)); printf("%s;%zu;%zu\n", "PhoshQuickSetting", sizeof(PhoshQuickSetting), alignof(PhoshQuickSetting)); printf("%s;%zu;%zu\n", "PhoshQuickSettingClass", sizeof(PhoshQuickSettingClass), alignof(PhoshQuickSettingClass)); printf("%s;%zu;%zu\n", "PhoshScreenshotManagerClass", sizeof(PhoshScreenshotManagerClass), alignof(PhoshScreenshotManagerClass)); printf("%s;%zu;%zu\n", "PhoshShell", sizeof(PhoshShell), alignof(PhoshShell)); printf("%s;%zu;%zu\n", "PhoshShellClass", sizeof(PhoshShellClass), alignof(PhoshShellClass)); printf("%s;%zu;%zu\n", "PhoshStatusIcon", sizeof(PhoshStatusIcon), alignof(PhoshStatusIcon)); printf("%s;%zu;%zu\n", "PhoshStatusIconClass", sizeof(PhoshStatusIconClass), alignof(PhoshStatusIconClass)); printf("%s;%zu;%zu\n", "PhoshStatusPage", sizeof(PhoshStatusPage), alignof(PhoshStatusPage)); printf("%s;%zu;%zu\n", "PhoshStatusPageClass", sizeof(PhoshStatusPageClass), alignof(PhoshStatusPageClass)); printf("%s;%zu;%zu\n", "PhoshWallClock", sizeof(PhoshWallClock), alignof(PhoshWallClock)); printf("%s;%zu;%zu\n", "PhoshWallClockClass", sizeof(PhoshWallClockClass), alignof(PhoshWallClockClass)); return 0; } libphosh-sys-0.0.6/tests/manual.h000064400000000000000000000002021046102023000150350ustar 00000000000000// Feel free to edit this file, it won't be regenerated by gir generator unless removed. #include #include