-
-
Notifications
You must be signed in to change notification settings - Fork 194
Automated PR: Changes from updating gir/gir-files #2155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
+1 −1 | .github/workflows/auto-update.yml | |
+2 −2 | Gdk-4.0.gir | |
+2 −2 | GdkPixbuf-2.0.gir | |
+487 −17 | Gtk-4.0.gir | |
+3 −3 | HarfBuzz-0.0.gir |
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) |
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) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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> { | ||
|
@@ -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 { | ||
|
@@ -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) | ||
|
@@ -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>( | ||
|
@@ -301,6 +341,23 @@ pub trait GtkApplicationExt: IsA<Application> + 'static { | |
} | ||
} | ||
|
||
//#[doc(alias = "restore-state")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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< | ||
|
@@ -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< | ||
|
@@ -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 {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, another one There was a problem hiding this comment. Choose a reason for hiding this commentThe 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), | ||
} | ||
|
@@ -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, | ||
} | ||
} | ||
|
@@ -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), | ||
} | ||
} | ||
|
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.