Skip to content

Commit

Permalink
Regenerate with latest gir-files
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed May 31, 2024
1 parent 430a03b commit 7cb8fae
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 29 deletions.
2 changes: 1 addition & 1 deletion gdk4-wayland/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gdk4-wayland/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gdk4-win32/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gdk4-win32/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gdk4-x11/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gdk4-x11/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gdk4/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gdk4/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gsk4/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
2 changes: 1 addition & 1 deletion gsk4/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
29 changes: 29 additions & 0 deletions gtk4/src/auto/css_section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,35 @@ impl CssSection {
}
}

#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "gtk_css_section_new_with_bytes")]
#[doc(alias = "new_with_bytes")]
pub fn with_bytes(
file: Option<&impl IsA<gio::File>>,
bytes: Option<&glib::Bytes>,
start: &CssLocation,
end: &CssLocation,
) -> CssSection {
assert_initialized_main_thread!();
unsafe {
from_glib_full(ffi::gtk_css_section_new_with_bytes(
file.map(|p| p.as_ref()).to_glib_none().0,
bytes.to_glib_none().0,
start.to_glib_none().0,
end.to_glib_none().0,
))
}
}

#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "gtk_css_section_get_bytes")]
#[doc(alias = "get_bytes")]
pub fn bytes(&self) -> Option<glib::Bytes> {
unsafe { from_glib_none(ffi::gtk_css_section_get_bytes(self.to_glib_none().0)) }
}

#[doc(alias = "gtk_css_section_get_end_location")]
#[doc(alias = "get_end_location")]
pub fn end_location(&self) -> CssLocation {
Expand Down
8 changes: 8 additions & 0 deletions gtk4/src/auto/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,10 @@ pub enum AccessibleProperty {
ValueNow,
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT")]
ValueText,
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "GTK_ACCESSIBLE_PROPERTY_HELP_TEXT")]
HelpText,
#[doc(hidden)]
__Unknown(i32),
}
Expand Down Expand Up @@ -529,6 +533,8 @@ impl IntoGlib for AccessibleProperty {
Self::ValueMin => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MIN,
Self::ValueNow => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_NOW,
Self::ValueText => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT,
#[cfg(feature = "v4_16")]
Self::HelpText => ffi::GTK_ACCESSIBLE_PROPERTY_HELP_TEXT,
Self::__Unknown(value) => value,
}
}
Expand Down Expand Up @@ -559,6 +565,8 @@ impl FromGlib<ffi::GtkAccessibleProperty> for AccessibleProperty {
ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MIN => Self::ValueMin,
ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_NOW => Self::ValueNow,
ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT => Self::ValueText,
#[cfg(feature = "v4_16")]
ffi::GTK_ACCESSIBLE_PROPERTY_HELP_TEXT => Self::HelpText,
value => Self::__Unknown(value),
}
}
Expand Down
4 changes: 4 additions & 0 deletions gtk4/src/auto/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ bitflags! {
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
#[doc(alias = "GTK_DEBUG_INVERT_TEXT_DIR")]
const INVERT_TEXT_DIR = ffi::GTK_DEBUG_INVERT_TEXT_DIR as _;
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "GTK_DEBUG_CSS")]
const CSS = ffi::GTK_DEBUG_CSS as _;
}
}

Expand Down
25 changes: 10 additions & 15 deletions gtk4/src/auto/print_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ impl PrintDialog {

#[doc(alias = "gtk_print_dialog_get_page_setup")]
#[doc(alias = "get_page_setup")]
pub fn page_setup(&self) -> PageSetup {
pub fn page_setup(&self) -> Option<PageSetup> {
unsafe { from_glib_none(ffi::gtk_print_dialog_get_page_setup(self.to_glib_none().0)) }
}

#[doc(alias = "gtk_print_dialog_get_print_settings")]
#[doc(alias = "get_print_settings")]
pub fn print_settings(&self) -> PrintSettings {
pub fn print_settings(&self) -> Option<PrintSettings> {
unsafe {
from_glib_none(ffi::gtk_print_dialog_get_print_settings(
self.to_glib_none().0,
Expand All @@ -73,7 +73,7 @@ impl PrintDialog {
}

#[doc(alias = "gtk_print_dialog_print")]
pub fn print<P: FnOnce(Result<Option<gio::OutputStream>, glib::Error>) + 'static>(
pub fn print<P: FnOnce(Result<gio::OutputStream, glib::Error>) + 'static>(
&self,
parent: Option<&impl IsA<Window>>,
setup: Option<&PrintSetup>,
Expand All @@ -93,7 +93,7 @@ impl PrintDialog {
let user_data: Box_<glib::thread_guard::ThreadGuard<P>> =
Box_::new(glib::thread_guard::ThreadGuard::new(callback));
unsafe extern "C" fn print_trampoline<
P: FnOnce(Result<Option<gio::OutputStream>, glib::Error>) + 'static,
P: FnOnce(Result<gio::OutputStream, glib::Error>) + 'static,
>(
_source_object: *mut glib::gobject_ffi::GObject,
res: *mut gio::ffi::GAsyncResult,
Expand Down Expand Up @@ -128,12 +128,8 @@ impl PrintDialog {
&self,
parent: Option<&(impl IsA<Window> + Clone + 'static)>,
setup: Option<&PrintSetup>,
) -> Pin<
Box_<
dyn std::future::Future<Output = Result<Option<gio::OutputStream>, glib::Error>>
+ 'static,
>,
> {
) -> Pin<Box_<dyn std::future::Future<Output = Result<gio::OutputStream, glib::Error>> + 'static>>
{
let parent = parent.map(ToOwned::to_owned);
let setup = setup.map(ToOwned::to_owned);
Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| {
Expand Down Expand Up @@ -268,7 +264,7 @@ impl PrintDialog {
}

#[doc(alias = "gtk_print_dialog_setup")]
pub fn setup<P: FnOnce(Result<Option<PrintSetup>, glib::Error>) + 'static>(
pub fn setup<P: FnOnce(Result<PrintSetup, glib::Error>) + 'static>(
&self,
parent: Option<&impl IsA<Window>>,
cancellable: Option<&impl IsA<gio::Cancellable>>,
Expand All @@ -287,7 +283,7 @@ impl PrintDialog {
let user_data: Box_<glib::thread_guard::ThreadGuard<P>> =
Box_::new(glib::thread_guard::ThreadGuard::new(callback));
unsafe extern "C" fn setup_trampoline<
P: FnOnce(Result<Option<PrintSetup>, glib::Error>) + 'static,
P: FnOnce(Result<PrintSetup, glib::Error>) + 'static,
>(
_source_object: *mut glib::gobject_ffi::GObject,
res: *mut gio::ffi::GAsyncResult,
Expand Down Expand Up @@ -320,9 +316,8 @@ impl PrintDialog {
pub fn setup_future(
&self,
parent: Option<&(impl IsA<Window> + Clone + 'static)>,
) -> Pin<
Box_<dyn std::future::Future<Output = Result<Option<PrintSetup>, glib::Error>> + 'static>,
> {
) -> Pin<Box_<dyn std::future::Future<Output = Result<PrintSetup, glib::Error>> + 'static>>
{
let parent = parent.map(ToOwned::to_owned);
Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| {
obj.setup(
Expand Down
4 changes: 2 additions & 2 deletions gtk4/src/auto/print_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ glib::wrapper! {
impl PrintSetup {
#[doc(alias = "gtk_print_setup_get_page_setup")]
#[doc(alias = "get_page_setup")]
pub fn page_setup(&self) -> Option<PageSetup> {
pub fn page_setup(&self) -> PageSetup {
unsafe { from_glib_none(ffi::gtk_print_setup_get_page_setup(self.to_glib_none().0)) }
}

#[doc(alias = "gtk_print_setup_get_print_settings")]
#[doc(alias = "get_print_settings")]
pub fn print_settings(&self) -> Option<PrintSettings> {
pub fn print_settings(&self) -> PrintSettings {
unsafe {
from_glib_none(ffi::gtk_print_setup_get_print_settings(
self.to_glib_none().0,
Expand Down
2 changes: 1 addition & 1 deletion gtk4/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)
17 changes: 17 additions & 0 deletions gtk4/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ pub const GTK_ACCESSIBLE_PROPERTY_VALUE_MAX: GtkAccessibleProperty = 15;
pub const GTK_ACCESSIBLE_PROPERTY_VALUE_MIN: GtkAccessibleProperty = 16;
pub const GTK_ACCESSIBLE_PROPERTY_VALUE_NOW: GtkAccessibleProperty = 17;
pub const GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT: GtkAccessibleProperty = 18;
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
pub const GTK_ACCESSIBLE_PROPERTY_HELP_TEXT: GtkAccessibleProperty = 19;

pub type GtkAccessibleRelation = c_int;
pub const GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT: GtkAccessibleRelation = 0;
Expand Down Expand Up @@ -1041,6 +1044,9 @@ pub const GTK_DEBUG_ICONFALLBACK: GtkDebugFlags = 262144;
#[cfg(feature = "v4_8")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
pub const GTK_DEBUG_INVERT_TEXT_DIR: GtkDebugFlags = 524288;
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
pub const GTK_DEBUG_CSS: GtkDebugFlags = 1048576;

pub type GtkDialogFlags = c_uint;
pub const GTK_DIALOG_MODAL: GtkDialogFlags = 1;
Expand Down Expand Up @@ -10308,6 +10314,17 @@ extern "C" {
start: *const GtkCssLocation,
end: *const GtkCssLocation,
) -> *mut GtkCssSection;
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
pub fn gtk_css_section_new_with_bytes(
file: *mut gio::GFile,
bytes: *mut glib::GBytes,
start: *const GtkCssLocation,
end: *const GtkCssLocation,
) -> *mut GtkCssSection;
#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
pub fn gtk_css_section_get_bytes(section: *const GtkCssSection) -> *mut glib::GBytes;
pub fn gtk_css_section_get_end_location(section: *const GtkCssSection)
-> *const GtkCssLocation;
pub fn gtk_css_section_get_file(section: *const GtkCssSection) -> *mut gio::GFile;
Expand Down
2 changes: 2 additions & 0 deletions gtk4/sys/tests/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2635,6 +2635,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(gint) GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE", "0"),
("(gint) GTK_ACCESSIBLE_PROPERTY_DESCRIPTION", "1"),
("(gint) GTK_ACCESSIBLE_PROPERTY_HAS_POPUP", "2"),
("(gint) GTK_ACCESSIBLE_PROPERTY_HELP_TEXT", "19"),
("(gint) GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS", "3"),
("(gint) GTK_ACCESSIBLE_PROPERTY_LABEL", "4"),
("(gint) GTK_ACCESSIBLE_PROPERTY_LEVEL", "5"),
Expand Down Expand Up @@ -2905,6 +2906,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(guint) GTK_DEBUG_BUILDER", "128"),
("(guint) GTK_DEBUG_BUILDER_OBJECTS", "65536"),
("(guint) GTK_DEBUG_CONSTRAINTS", "32768"),
("(guint) GTK_DEBUG_CSS", "1048576"),
("(guint) GTK_DEBUG_GEOMETRY", "16"),
("(guint) GTK_DEBUG_ICONFALLBACK", "262144"),
("(guint) GTK_DEBUG_ICONTHEME", "32"),
Expand Down
2 changes: 2 additions & 0 deletions gtk4/sys/tests/constant.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ int main() {
PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE);
PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_DESCRIPTION);
PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_HAS_POPUP);
PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_HELP_TEXT);
PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS);
PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_LABEL);
PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_LEVEL);
Expand Down Expand Up @@ -341,6 +342,7 @@ int main() {
PRINT_CONSTANT((guint) GTK_DEBUG_BUILDER);
PRINT_CONSTANT((guint) GTK_DEBUG_BUILDER_OBJECTS);
PRINT_CONSTANT((guint) GTK_DEBUG_CONSTRAINTS);
PRINT_CONSTANT((guint) GTK_DEBUG_CSS);
PRINT_CONSTANT((guint) GTK_DEBUG_GEOMETRY);
PRINT_CONSTANT((guint) GTK_DEBUG_ICONFALLBACK);
PRINT_CONSTANT((guint) GTK_DEBUG_ICONTHEME);
Expand Down
2 changes: 1 addition & 1 deletion gtk4/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 @ 839b834456d2)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)

0 comments on commit 7cb8fae

Please sign in to comment.