Skip to content

Commit b9a04fc

Browse files
committed
gir: Update and regenerate with impl Trait instead of named types
gtk-rs/gir#1153
1 parent eed0e28 commit b9a04fc

File tree

187 files changed

+1558
-1640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+1558
-1640
lines changed

atk/src/auto/gobject_accessible.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ glib::wrapper! {
1818

1919
impl GObjectAccessible {
2020
#[doc(alias = "atk_gobject_accessible_for_object")]
21-
pub fn for_object<P: IsA<glib::Object>>(obj: &P) -> Option<Object> {
21+
pub fn for_object(obj: &impl IsA<glib::Object>) -> Option<Object> {
2222
assert_initialized_main_thread!();
2323
unsafe {
2424
from_glib_none(ffi::atk_gobject_accessible_for_object(

atk/src/auto/no_op_object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ glib::wrapper! {
3131

3232
impl NoOpObject {
3333
#[doc(alias = "atk_no_op_object_new")]
34-
pub fn new<P: IsA<glib::Object>>(obj: &P) -> NoOpObject {
34+
pub fn new(obj: &impl IsA<glib::Object>) -> NoOpObject {
3535
assert_initialized_main_thread!();
3636
unsafe {
3737
Object::from_glib_full(ffi::atk_no_op_object_new(obj.as_ref().to_glib_none().0))

atk/src/auto/object.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub const NONE_OBJECT: Option<&Object> = None;
3232

3333
pub trait AtkObjectExt: 'static {
3434
#[doc(alias = "atk_object_add_relationship")]
35-
fn add_relationship<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool;
35+
fn add_relationship(&self, relationship: RelationType, target: &impl IsA<Object>) -> bool;
3636

3737
#[cfg(any(feature = "v2_34", feature = "dox"))]
3838
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_34")))]
@@ -99,7 +99,7 @@ pub trait AtkObjectExt: 'static {
9999
fn ref_state_set(&self) -> Option<StateSet>;
100100

101101
#[doc(alias = "atk_object_remove_relationship")]
102-
fn remove_relationship<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool;
102+
fn remove_relationship(&self, relationship: RelationType, target: &impl IsA<Object>) -> bool;
103103

104104
#[cfg(any(feature = "v2_34", feature = "dox"))]
105105
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_34")))]
@@ -113,7 +113,7 @@ pub trait AtkObjectExt: 'static {
113113
fn set_name(&self, name: &str);
114114

115115
#[doc(alias = "atk_object_set_parent")]
116-
fn set_parent<P: IsA<Object>>(&self, parent: &P);
116+
fn set_parent(&self, parent: &impl IsA<Object>);
117117

118118
#[doc(alias = "atk_object_set_role")]
119119
fn set_role(&self, role: Role);
@@ -318,7 +318,7 @@ pub trait AtkObjectExt: 'static {
318318
}
319319

320320
impl<O: IsA<Object>> AtkObjectExt for O {
321-
fn add_relationship<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool {
321+
fn add_relationship(&self, relationship: RelationType, target: &impl IsA<Object>) -> bool {
322322
unsafe {
323323
from_glib(ffi::atk_object_add_relationship(
324324
self.as_ref().to_glib_none().0,
@@ -429,7 +429,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
429429
}
430430
}
431431

432-
fn remove_relationship<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool {
432+
fn remove_relationship(&self, relationship: RelationType, target: &impl IsA<Object>) -> bool {
433433
unsafe {
434434
from_glib(ffi::atk_object_remove_relationship(
435435
self.as_ref().to_glib_none().0,
@@ -465,7 +465,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
465465
}
466466
}
467467

468-
fn set_parent<P: IsA<Object>>(&self, parent: &P) {
468+
fn set_parent(&self, parent: &impl IsA<Object>) {
469469
unsafe {
470470
ffi::atk_object_set_parent(
471471
self.as_ref().to_glib_none().0,

atk/src/auto/object_factory.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub const NONE_OBJECT_FACTORY: Option<&ObjectFactory> = None;
2020

2121
pub trait ObjectFactoryExt: 'static {
2222
#[doc(alias = "atk_object_factory_create_accessible")]
23-
fn create_accessible<P: IsA<glib::Object>>(&self, obj: &P) -> Option<Object>;
23+
fn create_accessible(&self, obj: &impl IsA<glib::Object>) -> Option<Object>;
2424

2525
#[doc(alias = "atk_object_factory_get_accessible_type")]
2626
#[doc(alias = "get_accessible_type")]
@@ -31,7 +31,7 @@ pub trait ObjectFactoryExt: 'static {
3131
}
3232

3333
impl<O: IsA<ObjectFactory>> ObjectFactoryExt for O {
34-
fn create_accessible<P: IsA<glib::Object>>(&self, obj: &P) -> Option<Object> {
34+
fn create_accessible(&self, obj: &impl IsA<glib::Object>) -> Option<Object> {
3535
unsafe {
3636
from_glib_full(ffi::atk_object_factory_create_accessible(
3737
self.as_ref().to_glib_none().0,

atk/src/auto/relation.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub const NONE_RELATION: Option<&Relation> = None;
4242

4343
pub trait RelationExt: 'static {
4444
#[doc(alias = "atk_relation_add_target")]
45-
fn add_target<P: IsA<Object>>(&self, target: &P);
45+
fn add_target(&self, target: &impl IsA<Object>);
4646

4747
#[doc(alias = "atk_relation_get_relation_type")]
4848
#[doc(alias = "get_relation_type")]
@@ -53,7 +53,7 @@ pub trait RelationExt: 'static {
5353
fn target(&self) -> Vec<Object>;
5454

5555
#[doc(alias = "atk_relation_remove_target")]
56-
fn remove_target<P: IsA<Object>>(&self, target: &P) -> bool;
56+
fn remove_target(&self, target: &impl IsA<Object>) -> bool;
5757

5858
#[doc(alias = "relation-type")]
5959
fn set_relation_type(&self, relation_type: RelationType);
@@ -68,7 +68,7 @@ pub trait RelationExt: 'static {
6868
}
6969

7070
impl<O: IsA<Relation>> RelationExt for O {
71-
fn add_target<P: IsA<Object>>(&self, target: &P) {
71+
fn add_target(&self, target: &impl IsA<Object>) {
7272
unsafe {
7373
ffi::atk_relation_add_target(
7474
self.as_ref().to_glib_none().0,
@@ -93,7 +93,7 @@ impl<O: IsA<Relation>> RelationExt for O {
9393
}
9494
}
9595

96-
fn remove_target<P: IsA<Object>>(&self, target: &P) -> bool {
96+
fn remove_target(&self, target: &impl IsA<Object>) -> bool {
9797
unsafe {
9898
from_glib(ffi::atk_relation_remove_target(
9999
self.as_ref().to_glib_none().0,

atk/src/auto/relation_set.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ pub const NONE_RELATION_SET: Option<&RelationSet> = None;
3636

3737
pub trait RelationSetExt: 'static {
3838
#[doc(alias = "atk_relation_set_add")]
39-
fn add<P: IsA<Relation>>(&self, relation: &P);
39+
fn add(&self, relation: &impl IsA<Relation>);
4040

4141
#[doc(alias = "atk_relation_set_add_relation_by_type")]
42-
fn add_relation_by_type<P: IsA<Object>>(&self, relationship: RelationType, target: &P);
42+
fn add_relation_by_type(&self, relationship: RelationType, target: &impl IsA<Object>);
4343

4444
#[doc(alias = "atk_relation_set_contains")]
4545
fn contains(&self, relationship: RelationType) -> bool;
4646

4747
#[doc(alias = "atk_relation_set_contains_target")]
48-
fn contains_target<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool;
48+
fn contains_target(&self, relationship: RelationType, target: &impl IsA<Object>) -> bool;
4949

5050
#[doc(alias = "atk_relation_set_get_n_relations")]
5151
#[doc(alias = "get_n_relations")]
@@ -60,11 +60,11 @@ pub trait RelationSetExt: 'static {
6060
fn relation_by_type(&self, relationship: RelationType) -> Option<Relation>;
6161

6262
#[doc(alias = "atk_relation_set_remove")]
63-
fn remove<P: IsA<Relation>>(&self, relation: &P);
63+
fn remove(&self, relation: &impl IsA<Relation>);
6464
}
6565

6666
impl<O: IsA<RelationSet>> RelationSetExt for O {
67-
fn add<P: IsA<Relation>>(&self, relation: &P) {
67+
fn add(&self, relation: &impl IsA<Relation>) {
6868
unsafe {
6969
ffi::atk_relation_set_add(
7070
self.as_ref().to_glib_none().0,
@@ -73,7 +73,7 @@ impl<O: IsA<RelationSet>> RelationSetExt for O {
7373
}
7474
}
7575

76-
fn add_relation_by_type<P: IsA<Object>>(&self, relationship: RelationType, target: &P) {
76+
fn add_relation_by_type(&self, relationship: RelationType, target: &impl IsA<Object>) {
7777
unsafe {
7878
ffi::atk_relation_set_add_relation_by_type(
7979
self.as_ref().to_glib_none().0,
@@ -92,7 +92,7 @@ impl<O: IsA<RelationSet>> RelationSetExt for O {
9292
}
9393
}
9494

95-
fn contains_target<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool {
95+
fn contains_target(&self, relationship: RelationType, target: &impl IsA<Object>) -> bool {
9696
unsafe {
9797
from_glib(ffi::atk_relation_set_contains_target(
9898
self.as_ref().to_glib_none().0,
@@ -124,7 +124,7 @@ impl<O: IsA<RelationSet>> RelationSetExt for O {
124124
}
125125
}
126126

127-
fn remove<P: IsA<Relation>>(&self, relation: &P) {
127+
fn remove(&self, relation: &impl IsA<Relation>) {
128128
unsafe {
129129
ffi::atk_relation_set_remove(
130130
self.as_ref().to_glib_none().0,

atk/src/auto/state_set.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub trait StateSetExt: 'static {
4040
//fn add_states(&self, types: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 68 });
4141

4242
#[doc(alias = "atk_state_set_and_sets")]
43-
fn and_sets<P: IsA<StateSet>>(&self, compare_set: &P) -> Option<StateSet>;
43+
fn and_sets(&self, compare_set: &impl IsA<StateSet>) -> Option<StateSet>;
4444

4545
#[doc(alias = "atk_state_set_clear_states")]
4646
fn clear_states(&self);
@@ -55,13 +55,13 @@ pub trait StateSetExt: 'static {
5555
fn is_empty(&self) -> bool;
5656

5757
#[doc(alias = "atk_state_set_or_sets")]
58-
fn or_sets<P: IsA<StateSet>>(&self, compare_set: &P) -> Option<StateSet>;
58+
fn or_sets(&self, compare_set: &impl IsA<StateSet>) -> Option<StateSet>;
5959

6060
#[doc(alias = "atk_state_set_remove_state")]
6161
fn remove_state(&self, type_: StateType) -> bool;
6262

6363
#[doc(alias = "atk_state_set_xor_sets")]
64-
fn xor_sets<P: IsA<StateSet>>(&self, compare_set: &P) -> Option<StateSet>;
64+
fn xor_sets(&self, compare_set: &impl IsA<StateSet>) -> Option<StateSet>;
6565
}
6666

6767
impl<O: IsA<StateSet>> StateSetExt for O {
@@ -78,7 +78,7 @@ impl<O: IsA<StateSet>> StateSetExt for O {
7878
// unsafe { TODO: call ffi:atk_state_set_add_states() }
7979
//}
8080

81-
fn and_sets<P: IsA<StateSet>>(&self, compare_set: &P) -> Option<StateSet> {
81+
fn and_sets(&self, compare_set: &impl IsA<StateSet>) -> Option<StateSet> {
8282
unsafe {
8383
from_glib_full(ffi::atk_state_set_and_sets(
8484
self.as_ref().to_glib_none().0,
@@ -110,7 +110,7 @@ impl<O: IsA<StateSet>> StateSetExt for O {
110110
unsafe { from_glib(ffi::atk_state_set_is_empty(self.as_ref().to_glib_none().0)) }
111111
}
112112

113-
fn or_sets<P: IsA<StateSet>>(&self, compare_set: &P) -> Option<StateSet> {
113+
fn or_sets(&self, compare_set: &impl IsA<StateSet>) -> Option<StateSet> {
114114
unsafe {
115115
from_glib_full(ffi::atk_state_set_or_sets(
116116
self.as_ref().to_glib_none().0,
@@ -128,7 +128,7 @@ impl<O: IsA<StateSet>> StateSetExt for O {
128128
}
129129
}
130130

131-
fn xor_sets<P: IsA<StateSet>>(&self, compare_set: &P) -> Option<StateSet> {
131+
fn xor_sets(&self, compare_set: &impl IsA<StateSet>) -> Option<StateSet> {
132132
unsafe {
133133
from_glib_full(ffi::atk_state_set_xor_sets(
134134
self.as_ref().to_glib_none().0,

atk/src/auto/table.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,22 @@ pub trait TableExt: 'static {
101101
fn remove_row_selection(&self, row: i32) -> bool;
102102

103103
#[doc(alias = "atk_table_set_caption")]
104-
fn set_caption<P: IsA<Object>>(&self, caption: &P);
104+
fn set_caption(&self, caption: &impl IsA<Object>);
105105

106106
#[doc(alias = "atk_table_set_column_description")]
107107
fn set_column_description(&self, column: i32, description: &str);
108108

109109
#[doc(alias = "atk_table_set_column_header")]
110-
fn set_column_header<P: IsA<Object>>(&self, column: i32, header: &P);
110+
fn set_column_header(&self, column: i32, header: &impl IsA<Object>);
111111

112112
#[doc(alias = "atk_table_set_row_description")]
113113
fn set_row_description(&self, row: i32, description: &str);
114114

115115
#[doc(alias = "atk_table_set_row_header")]
116-
fn set_row_header<P: IsA<Object>>(&self, row: i32, header: &P);
116+
fn set_row_header(&self, row: i32, header: &impl IsA<Object>);
117117

118118
#[doc(alias = "atk_table_set_summary")]
119-
fn set_summary<P: IsA<Object>>(&self, accessible: &P);
119+
fn set_summary(&self, accessible: &impl IsA<Object>);
120120

121121
#[doc(alias = "column-deleted")]
122122
fn connect_column_deleted<F: Fn(&Self, i32, i32) + 'static>(&self, f: F) -> SignalHandlerId;
@@ -287,7 +287,7 @@ impl<O: IsA<Table>> TableExt for O {
287287
}
288288
}
289289

290-
fn set_caption<P: IsA<Object>>(&self, caption: &P) {
290+
fn set_caption(&self, caption: &impl IsA<Object>) {
291291
unsafe {
292292
ffi::atk_table_set_caption(
293293
self.as_ref().to_glib_none().0,
@@ -306,7 +306,7 @@ impl<O: IsA<Table>> TableExt for O {
306306
}
307307
}
308308

309-
fn set_column_header<P: IsA<Object>>(&self, column: i32, header: &P) {
309+
fn set_column_header(&self, column: i32, header: &impl IsA<Object>) {
310310
unsafe {
311311
ffi::atk_table_set_column_header(
312312
self.as_ref().to_glib_none().0,
@@ -326,7 +326,7 @@ impl<O: IsA<Table>> TableExt for O {
326326
}
327327
}
328328

329-
fn set_row_header<P: IsA<Object>>(&self, row: i32, header: &P) {
329+
fn set_row_header(&self, row: i32, header: &impl IsA<Object>) {
330330
unsafe {
331331
ffi::atk_table_set_row_header(
332332
self.as_ref().to_glib_none().0,
@@ -336,7 +336,7 @@ impl<O: IsA<Table>> TableExt for O {
336336
}
337337
}
338338

339-
fn set_summary<P: IsA<Object>>(&self, accessible: &P) {
339+
fn set_summary(&self, accessible: &impl IsA<Object>) {
340340
unsafe {
341341
ffi::atk_table_set_summary(
342342
self.as_ref().to_glib_none().0,

atk/src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 943dcdf)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)

atk/sys/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 1bef39f)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 943dcdf)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)

0 commit comments

Comments
 (0)