Skip to content

Commit

Permalink
Merge pull request #1572 from sdroege/update-gir-files
Browse files Browse the repository at this point in the history
Update gir files
  • Loading branch information
sdroege authored Nov 12, 2024
2 parents 9d3290a + 6a3ecd7 commit c9f969c
Show file tree
Hide file tree
Showing 28 changed files with 539 additions and 225 deletions.
4 changes: 2 additions & 2 deletions gdk-pixbuf/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ e5ad53c3ad05)
from gir-files (https://github.com/gtk-rs/gir-files @ f7af0e711383)
Generated by gir (https://github.com/gtk-rs/gir @ 25fc925cd3da)
from gir-files (https://github.com/gtk-rs/gir-files @ 3e07ae5a14c7)
4 changes: 2 additions & 2 deletions gdk-pixbuf/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ e5ad53c3ad05)
from gir-files (https://github.com/gtk-rs/gir-files @ f7af0e711383)
Generated by gir (https://github.com/gtk-rs/gir @ 25fc925cd3da)
from gir-files (https://github.com/gtk-rs/gir-files @ 3e07ae5a14c7)
26 changes: 26 additions & 0 deletions gio/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,32 @@ concurrency = "send+sync"
cfg_condition = "unix"
[[object.derive]]
name = "Debug"
[[object.function]]
pattern = "compare|get_device_path|get_fs_type|get_mount_path|guess_can_eject|guess_name|guess_icon|guess_should_display|guess_symbolic_icon|is_readonly|is_system_internal"
version = "2.0"
[[object.function.parameter]]
pattern = ".+"
const = true
[[object.function]]
name = "get_options"
version = "2.58"
[[object.function.parameter]]
pattern = ".+"
const = true
[[object.function]]
name = "get_root_path"
version = "2.60"
[[object.function.parameter]]
pattern = ".+"
const = true
[[object.function]]
name = "at"
version = "2.0"
rename = "for_mount_path"
[[object.function]]
name = "for"
version = "2.0"
rename = "for_file_path"

[[object]]
name = "Gio.UnixMountPoint"
Expand Down
187 changes: 184 additions & 3 deletions gio/src/auto/unix_mount_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,199 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::ffi;
use crate::{ffi, Icon};
use glib::translate::*;

glib::wrapper! {
#[derive(Debug)]
pub struct UnixMountEntry(Boxed<ffi::GUnixMountEntry>);

match fn {
copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::g_unix_mount_entry_get_type(), ptr as *mut _) as *mut ffi::GUnixMountEntry,
free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::g_unix_mount_entry_get_type(), ptr as *mut _),
copy => |ptr| ffi::g_unix_mount_entry_copy(mut_override(ptr)),
free => |ptr| ffi::g_unix_mount_entry_free(ptr),
type_ => || ffi::g_unix_mount_entry_get_type(),
}
}

impl UnixMountEntry {
#[doc(alias = "g_unix_mount_entry_compare")]
fn compare(&self, mount2: &UnixMountEntry) -> i32 {
unsafe {
ffi::g_unix_mount_entry_compare(
mut_override(self.to_glib_none().0),
mut_override(mount2.to_glib_none().0),
)
}
}

#[doc(alias = "g_unix_mount_entry_get_device_path")]
#[doc(alias = "get_device_path")]
pub fn device_path(&self) -> std::path::PathBuf {
unsafe {
from_glib_none(ffi::g_unix_mount_entry_get_device_path(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_get_fs_type")]
#[doc(alias = "get_fs_type")]
pub fn fs_type(&self) -> glib::GString {
unsafe {
from_glib_none(ffi::g_unix_mount_entry_get_fs_type(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_get_mount_path")]
#[doc(alias = "get_mount_path")]
pub fn mount_path(&self) -> std::path::PathBuf {
unsafe {
from_glib_none(ffi::g_unix_mount_entry_get_mount_path(mut_override(
self.to_glib_none().0,
)))
}
}

#[cfg(feature = "v2_58")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))]
#[doc(alias = "g_unix_mount_entry_get_options")]
#[doc(alias = "get_options")]
pub fn options(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::g_unix_mount_entry_get_options(mut_override(
self.to_glib_none().0,
)))
}
}

#[cfg(feature = "v2_60")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))]
#[doc(alias = "g_unix_mount_entry_get_root_path")]
#[doc(alias = "get_root_path")]
pub fn root_path(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::g_unix_mount_entry_get_root_path(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_guess_can_eject")]
pub fn guess_can_eject(&self) -> bool {
unsafe {
from_glib(ffi::g_unix_mount_entry_guess_can_eject(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_guess_icon")]
pub fn guess_icon(&self) -> Icon {
unsafe {
from_glib_full(ffi::g_unix_mount_entry_guess_icon(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_guess_name")]
pub fn guess_name(&self) -> glib::GString {
unsafe {
from_glib_full(ffi::g_unix_mount_entry_guess_name(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_guess_should_display")]
pub fn guess_should_display(&self) -> bool {
unsafe {
from_glib(ffi::g_unix_mount_entry_guess_should_display(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_guess_symbolic_icon")]
pub fn guess_symbolic_icon(&self) -> Icon {
unsafe {
from_glib_full(ffi::g_unix_mount_entry_guess_symbolic_icon(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_is_readonly")]
pub fn is_readonly(&self) -> bool {
unsafe {
from_glib(ffi::g_unix_mount_entry_is_readonly(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_is_system_internal")]
pub fn is_system_internal(&self) -> bool {
unsafe {
from_glib(ffi::g_unix_mount_entry_is_system_internal(mut_override(
self.to_glib_none().0,
)))
}
}

#[doc(alias = "g_unix_mount_entry_at")]
#[doc(alias = "at")]
pub fn for_mount_path(
mount_path: impl AsRef<std::path::Path>,
) -> (Option<UnixMountEntry>, u64) {
unsafe {
let mut time_read = std::mem::MaybeUninit::uninit();
let ret = from_glib_full(ffi::g_unix_mount_entry_at(
mount_path.as_ref().to_glib_none().0,
time_read.as_mut_ptr(),
));
(ret, time_read.assume_init())
}
}

#[doc(alias = "g_unix_mount_entry_for")]
#[doc(alias = "for")]
pub fn for_file_path(file_path: impl AsRef<std::path::Path>) -> (Option<UnixMountEntry>, u64) {
unsafe {
let mut time_read = std::mem::MaybeUninit::uninit();
let ret = from_glib_full(ffi::g_unix_mount_entry_for(
file_path.as_ref().to_glib_none().0,
time_read.as_mut_ptr(),
));
(ret, time_read.assume_init())
}
}
}

impl PartialEq for UnixMountEntry {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.compare(other) == 0
}
}

impl Eq for UnixMountEntry {}

impl PartialOrd for UnixMountEntry {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.cmp(other))
}
}

impl Ord for UnixMountEntry {
#[inline]
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
self.compare(other).cmp(&0)
}
}

unsafe impl Send for UnixMountEntry {}
unsafe impl Sync for UnixMountEntry {}
4 changes: 2 additions & 2 deletions gio/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ e5ad53c3ad05)
from gir-files (https://github.com/gtk-rs/gir-files @ f7af0e711383)
Generated by gir (https://github.com/gtk-rs/gir @ 25fc925cd3da)
from gir-files (https://github.com/gtk-rs/gir-files @ 3e07ae5a14c7)
Loading

0 comments on commit c9f969c

Please sign in to comment.