Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gdk4-macos/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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions gdk4-macos/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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions gdk4/src/auto/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,9 @@ bitflags! {
#[doc(alias = "GdkPaintableFlags")]
pub struct PaintableFlags: u32 {
#[doc(alias = "GDK_PAINTABLE_STATIC_SIZE")]
const SIZE = ffi::GDK_PAINTABLE_STATIC_SIZE as _;
const STATIC_SIZE = ffi::GDK_PAINTABLE_STATIC_SIZE as _;
#[doc(alias = "GDK_PAINTABLE_STATIC_CONTENTS")]
const CONTENTS = ffi::GDK_PAINTABLE_STATIC_CONTENTS as _;
const STATIC_CONTENTS = ffi::GDK_PAINTABLE_STATIC_CONTENTS as _;
Comment on lines 630 to +633
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to manually implement this and mark the previous values as deprecated, or just not backport this change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think either is OK. Deprecation would be more friendly to users as it simplifies the update next time.

}
}

Expand Down
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
2 changes: 1 addition & 1 deletion gir
2 changes: 1 addition & 1 deletion gir-files
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
93 changes: 89 additions & 4 deletions gtk4/src/auto/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,21 @@ impl ApplicationBuilder {
}
}

#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
#[cfg_attr(feature = "v4_22", deprecated = "Since 4.22")]
pub fn register_session(self, register_session: bool) -> Self {
Self {
builder: self.builder.property("register-session", register_session),
}
}

#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
pub fn support_save(self, support_save: bool) -> Self {
Self {
builder: self.builder.property("support-save", support_save),
}
}

pub fn application_id(self, application_id: impl Into<glib::GString>) -> Self {
Self {
builder: self
Expand Down Expand Up @@ -122,6 +130,15 @@ pub trait GtkApplicationExt: IsA<Application> + 'static {
}
}

#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
#[doc(alias = "gtk_application_forget")]
fn forget(&self) {
unsafe {
ffi::gtk_application_forget(self.as_ref().to_glib_none().0);
}
}

#[doc(alias = "gtk_application_get_accels_for_action")]
#[doc(alias = "get_accels_for_action")]
fn accels_for_action(&self, detailed_action_name: &str) -> Vec<glib::GString> {
Expand Down Expand Up @@ -233,6 +250,15 @@ pub trait GtkApplicationExt: IsA<Application> + 'static {
}
}

#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
#[doc(alias = "gtk_application_save")]
fn save(&self) {
unsafe {
ffi::gtk_application_save(self.as_ref().to_glib_none().0);
}
}

#[doc(alias = "gtk_application_set_accels_for_action")]
fn set_accels_for_action(&self, detailed_action_name: &str, accels: &[&str]) {
unsafe {
Expand Down Expand Up @@ -262,13 +288,13 @@ pub trait GtkApplicationExt: IsA<Application> + 'static {
}
}

#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
#[cfg_attr(feature = "v4_22", deprecated = "Since 4.22")]
#[doc(alias = "register-session")]
fn is_register_session(&self) -> bool {
ObjectExt::property(self.as_ref(), "register-session")
}

#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
#[cfg_attr(feature = "v4_22", deprecated = "Since 4.22")]
#[doc(alias = "register-session")]
fn set_register_session(&self, register_session: bool) {
ObjectExt::set_property(self.as_ref(), "register-session", register_session)
Expand All @@ -279,6 +305,20 @@ pub trait GtkApplicationExt: IsA<Application> + 'static {
ObjectExt::property(self.as_ref(), "screensaver-active")
}

#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
#[doc(alias = "support-save")]
fn supports_save(&self) -> bool {
ObjectExt::property(self.as_ref(), "support-save")
}

#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
#[doc(alias = "support-save")]
fn set_support_save(&self, support_save: bool) {
ObjectExt::set_property(self.as_ref(), "support-save", support_save)
}

#[doc(alias = "query-end")]
fn connect_query_end<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn query_end_trampoline<P: IsA<Application>, F: Fn(&P) + 'static>(
Expand All @@ -301,6 +341,23 @@ pub trait GtkApplicationExt: IsA<Application> + 'static {
}
}

//#[doc(alias = "restore-state")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This signal lacks a Since annotation

//fn connect_restore_state<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Ignored object: Gtk.RestoreReason
//}

//#[cfg(feature = "v4_22")]
//#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
//#[doc(alias = "restore-window")]
//fn connect_restore_window<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Ignored reason: Gtk.RestoreReason
//}

//#[doc(alias = "save-state")]
//fn connect_save_state<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Ignored object: GLib.VariantDict
//}

#[doc(alias = "window-added")]
fn connect_window_added<F: Fn(&Self, &Window) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn window_added_trampoline<
Expand Down Expand Up @@ -408,7 +465,7 @@ pub trait GtkApplicationExt: IsA<Application> + 'static {
}
}

#[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")]
#[cfg_attr(feature = "v4_22", deprecated = "Since 4.22")]
#[doc(alias = "register-session")]
fn connect_register_session_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_register_session_trampoline<
Expand Down Expand Up @@ -460,6 +517,34 @@ pub trait GtkApplicationExt: IsA<Application> + 'static {
)
}
}

#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
#[doc(alias = "support-save")]
fn connect_support_save_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_support_save_trampoline<
P: IsA<Application>,
F: Fn(&P) + 'static,
>(
this: *mut ffi::GtkApplication,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(Application::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
c"notify::support-save".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_support_save_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
}

impl<O: IsA<Application>> GtkApplicationExt for O {}
5 changes: 5 additions & 0 deletions gtk4/src/auto/application_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,11 @@ pub trait ApplicationWindowExt: IsA<ApplicationWindow> + 'static {
}
}

//#[doc(alias = "save-state")]
//fn connect_save_state<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Ignored object: GLib.VariantDict
//}

#[doc(alias = "show-menubar")]
fn connect_show_menubar_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_show_menubar_trampoline<
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/auto/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl Builder {
&mut error,
);
if error.is_null() {
Ok(from_glib_full(ret))
Ok(from_glib_none(ret))
} else {
Err(from_glib_full(error))
}
Expand Down
36 changes: 18 additions & 18 deletions gtk4/src/auto/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3296,17 +3296,17 @@ impl From<ConstraintStrength> for glib::Value {
#[doc(alias = "GtkConstraintVflParserError")]
pub enum ConstraintVflParserError {
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL")]
Symbol,
InvalidSymbol,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, another one

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE")]
Attribute,
InvalidAttribute,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW")]
View,
InvalidView,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC")]
Metric,
InvalidMetric,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY")]
Priority,
InvalidPriority,
#[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION")]
Relation,
InvalidRelation,
#[doc(hidden)]
__Unknown(i32),
}
Expand All @@ -3318,12 +3318,12 @@ impl IntoGlib for ConstraintVflParserError {
#[inline]
fn into_glib(self) -> ffi::GtkConstraintVflParserError {
match self {
Self::Symbol => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL,
Self::Attribute => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE,
Self::View => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW,
Self::Metric => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC,
Self::Priority => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY,
Self::Relation => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION,
Self::InvalidSymbol => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL,
Self::InvalidAttribute => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE,
Self::InvalidView => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW,
Self::InvalidMetric => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC,
Self::InvalidPriority => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY,
Self::InvalidRelation => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION,
Self::__Unknown(value) => value,
}
}
Expand All @@ -3336,12 +3336,12 @@ impl FromGlib<ffi::GtkConstraintVflParserError> for ConstraintVflParserError {
skip_assert_initialized!();

match value {
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL => Self::Symbol,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE => Self::Attribute,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW => Self::View,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC => Self::Metric,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY => Self::Priority,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION => Self::Relation,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL => Self::InvalidSymbol,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE => Self::InvalidAttribute,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW => Self::InvalidView,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC => Self::InvalidMetric,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY => Self::InvalidPriority,
ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION => Self::InvalidRelation,
value => Self::__Unknown(value),
}
}
Expand Down
2 changes: 2 additions & 0 deletions gtk4/src/auto/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ bitflags! {
#[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
#[doc(alias = "GTK_DEBUG_BUILDER")]
const BUILDER = ffi::GTK_DEBUG_BUILDER as _;
#[doc(alias = "GTK_DEBUG_SESSION")]
const SESSION = ffi::GTK_DEBUG_SESSION as _;
}
}

Expand Down
4 changes: 2 additions & 2 deletions 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 @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
Generated by gir (https://github.com/gtk-rs/gir @ c9947f8f47b6)
from gir-files (https://github.com/gtk-rs/gir-files @ 0885719c0947)
Loading