diff --git a/atk/src/auto/object.rs b/atk/src/auto/object.rs index 39a7c8ca81e..62867a821ce 100644 --- a/atk/src/auto/object.rs +++ b/atk/src/auto/object.rs @@ -507,6 +507,39 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { } } + #[cfg(feature = "v2_50")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_50")))] + #[doc(alias = "notification")] + fn connect_notification(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notification_trampoline< + P: IsA, + F: Fn(&P, &str, i32) + 'static, + >( + this: *mut ffi::AtkObject, + arg1: *mut libc::c_char, + arg2: libc::c_int, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f( + Object::from_glib_borrow(this).unsafe_cast_ref(), + &glib::GString::from_glib_borrow(arg1), + arg2, + ) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notification\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notification_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + //#[doc(alias = "property-change")] //fn connect_property_change(&self, detail: Option<&str>, f: F) -> SignalHandlerId { // Ignored arg1: Atk.PropertyValues diff --git a/atk/src/auto/state_set.rs b/atk/src/auto/state_set.rs index b62748d6719..c995da37ef2 100644 --- a/atk/src/auto/state_set.rs +++ b/atk/src/auto/state_set.rs @@ -48,7 +48,7 @@ pub trait StateSetExt: IsA + sealed::Sealed + 'static { } //#[doc(alias = "atk_state_set_add_states")] - //fn add_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 68 }) { + //fn add_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 69 }) { // unsafe { TODO: call ffi:atk_state_set_add_states() } //} @@ -81,7 +81,7 @@ pub trait StateSetExt: IsA + sealed::Sealed + 'static { } //#[doc(alias = "atk_state_set_contains_states")] - //fn contains_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 68 }) -> bool { + //fn contains_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 69 }) -> bool { // unsafe { TODO: call ffi:atk_state_set_contains_states() } //} diff --git a/atk/src/auto/versions.txt b/atk/src/auto/versions.txt index dd6ac754e17..17a2d3ead99 100644 --- a/atk/src/auto/versions.txt +++ b/atk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) +from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) diff --git a/atk/sys/Cargo.toml b/atk/sys/Cargo.toml index bba9bc1c2e1..b9f3b7306c0 100644 --- a/atk/sys/Cargo.toml +++ b/atk/sys/Cargo.toml @@ -22,6 +22,7 @@ v2_32 = ["v2_30"] v2_34 = ["v2_32"] v2_38 = ["v2_34"] v2_46 = ["v2_38"] +v2_50 = ["v2_46"] [lib] name = "atk_sys" @@ -43,6 +44,7 @@ rust-version = "1.70" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] features = [] +rustc-args = ["--cfg", "docsrs"] [package.metadata.system-deps.atk] name = "atk" @@ -62,3 +64,6 @@ version = "2.38" [package.metadata.system-deps.atk.v2_46] version = "2.46" + +[package.metadata.system-deps.atk.v2_50] +version = "2.50" diff --git a/atk/sys/src/lib.rs b/atk/sys/src/lib.rs index 07effca623d..7bcf252ae4a 100644 --- a/atk/sys/src/lib.rs +++ b/atk/sys/src/lib.rs @@ -45,6 +45,11 @@ pub const ATK_LAYER_POPUP: AtkLayer = 5; pub const ATK_LAYER_OVERLAY: AtkLayer = 6; pub const ATK_LAYER_WINDOW: AtkLayer = 7; +pub type AtkLive = c_int; +pub const ATK_LIVE_NONE: AtkLive = 0; +pub const ATK_LIVE_POLITE: AtkLive = 1; +pub const ATK_LIVE_ASSERTIVE: AtkLive = 2; + pub type AtkRelationType = c_int; pub const ATK_RELATION_NULL: AtkRelationType = 0; pub const ATK_RELATION_CONTROLLED_BY: AtkRelationType = 1; @@ -1819,6 +1824,11 @@ extern "C" { //========================================================================= pub fn atk_layer_get_type() -> GType; + //========================================================================= + // AtkLive + //========================================================================= + pub fn atk_live_get_type() -> GType; + //========================================================================= // AtkRelationType //========================================================================= diff --git a/atk/sys/tests/abi.rs b/atk/sys/tests/abi.rs index 9032f3cd84f..a25b9251d17 100644 --- a/atk/sys/tests/abi.rs +++ b/atk/sys/tests/abi.rs @@ -323,6 +323,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "AtkLive", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "AtkMisc", Layout { @@ -653,6 +660,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) ATK_LAYER_POPUP", "5"), ("(gint) ATK_LAYER_WIDGET", "3"), ("(gint) ATK_LAYER_WINDOW", "7"), + ("(gint) ATK_LIVE_ASSERTIVE", "2"), + ("(gint) ATK_LIVE_NONE", "0"), + ("(gint) ATK_LIVE_POLITE", "1"), ("(gint) ATK_RELATION_CONTROLLED_BY", "1"), ("(gint) ATK_RELATION_CONTROLLER_FOR", "2"), ("(gint) ATK_RELATION_DESCRIBED_BY", "14"), diff --git a/atk/sys/tests/constant.c b/atk/sys/tests/constant.c index 9e3f92f2d1c..aa108865365 100644 --- a/atk/sys/tests/constant.c +++ b/atk/sys/tests/constant.c @@ -40,6 +40,9 @@ int main() { PRINT_CONSTANT((gint) ATK_LAYER_POPUP); PRINT_CONSTANT((gint) ATK_LAYER_WIDGET); PRINT_CONSTANT((gint) ATK_LAYER_WINDOW); + PRINT_CONSTANT((gint) ATK_LIVE_ASSERTIVE); + PRINT_CONSTANT((gint) ATK_LIVE_NONE); + PRINT_CONSTANT((gint) ATK_LIVE_POLITE); PRINT_CONSTANT((gint) ATK_RELATION_CONTROLLED_BY); PRINT_CONSTANT((gint) ATK_RELATION_CONTROLLER_FOR); PRINT_CONSTANT((gint) ATK_RELATION_DESCRIBED_BY); diff --git a/atk/sys/tests/layout.c b/atk/sys/tests/layout.c index 49d85c8d69e..675fd4e2318 100644 --- a/atk/sys/tests/layout.c +++ b/atk/sys/tests/layout.c @@ -25,6 +25,7 @@ int main() { printf("%s;%zu;%zu\n", "AtkKeyEventStruct", sizeof(AtkKeyEventStruct), alignof(AtkKeyEventStruct)); printf("%s;%zu;%zu\n", "AtkKeyEventType", sizeof(AtkKeyEventType), alignof(AtkKeyEventType)); printf("%s;%zu;%zu\n", "AtkLayer", sizeof(AtkLayer), alignof(AtkLayer)); + printf("%s;%zu;%zu\n", "AtkLive", sizeof(AtkLive), alignof(AtkLive)); printf("%s;%zu;%zu\n", "AtkMisc", sizeof(AtkMisc), alignof(AtkMisc)); printf("%s;%zu;%zu\n", "AtkMiscClass", sizeof(AtkMiscClass), alignof(AtkMiscClass)); printf("%s;%zu;%zu\n", "AtkNoOpObject", sizeof(AtkNoOpObject), alignof(AtkNoOpObject)); diff --git a/atk/sys/versions.txt b/atk/sys/versions.txt index dd6ac754e17..17a2d3ead99 100644 --- a/atk/sys/versions.txt +++ b/atk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) +from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) diff --git a/gdk/src/auto/versions.txt b/gdk/src/auto/versions.txt index dd6ac754e17..17a2d3ead99 100644 --- a/gdk/src/auto/versions.txt +++ b/gdk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) +from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) diff --git a/gdk/sys/Cargo.toml b/gdk/sys/Cargo.toml index dc077c46c2f..51396b005e3 100644 --- a/gdk/sys/Cargo.toml +++ b/gdk/sys/Cargo.toml @@ -56,6 +56,7 @@ rust-version = "1.70" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] features = [] +rustc-args = ["--cfg", "docsrs"] [package.metadata.system-deps.gdk_3_0] name = "gdk-3.0" diff --git a/gdk/sys/versions.txt b/gdk/sys/versions.txt index dd6ac754e17..17a2d3ead99 100644 --- a/gdk/sys/versions.txt +++ b/gdk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) +from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) diff --git a/gdkx11/src/auto/versions.txt b/gdkx11/src/auto/versions.txt index dd6ac754e17..17a2d3ead99 100644 --- a/gdkx11/src/auto/versions.txt +++ b/gdkx11/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) +from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) diff --git a/gdkx11/sys/Cargo.toml b/gdkx11/sys/Cargo.toml index ba743a40302..3c24341e2d6 100644 --- a/gdkx11/sys/Cargo.toml +++ b/gdkx11/sys/Cargo.toml @@ -14,6 +14,7 @@ rust-version = "1.70" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] features = [] +rustc-args = ["--cfg", "docsrs"] [package.metadata.system-deps.gdk_x11_3_0] name = "gdk-x11-3.0" diff --git a/gdkx11/sys/versions.txt b/gdkx11/sys/versions.txt index dd6ac754e17..17a2d3ead99 100644 --- a/gdkx11/sys/versions.txt +++ b/gdkx11/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) +from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) diff --git a/gtk/src/auto/versions.txt b/gtk/src/auto/versions.txt index dd6ac754e17..17a2d3ead99 100644 --- a/gtk/src/auto/versions.txt +++ b/gtk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) +from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) diff --git a/gtk/sys/Cargo.toml b/gtk/sys/Cargo.toml index 023e4e8d84e..4975396c121 100644 --- a/gtk/sys/Cargo.toml +++ b/gtk/sys/Cargo.toml @@ -15,6 +15,7 @@ rust-version = "1.70" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] features = [] +rustc-args = ["--cfg", "docsrs"] [package.metadata.system-deps."gtk+_3_0"] name = "gtk+-3.0" diff --git a/gtk/sys/versions.txt b/gtk/sys/versions.txt index dd6ac754e17..17a2d3ead99 100644 --- a/gtk/sys/versions.txt +++ b/gtk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666) +Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) +from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58)