Skip to content

Commit 038b6f4

Browse files
Regenerate with latest gir
1 parent ec33a38 commit 038b6f4

File tree

175 files changed

+21601
-34680
lines changed

Some content is hidden

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

175 files changed

+21601
-34680
lines changed

gdk4-wayland/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 @ d7bdac6deb40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 2d5d67805483)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 040da0b3a013)

gdk4-wayland/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 @ d7bdac6deb40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 2d5d67805483)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 040da0b3a013)

gdk4-win32/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 @ d7bdac6deb40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 2d5d67805483)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 040da0b3a013)

gdk4-win32/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 @ d7bdac6deb40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 2d5d67805483)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 040da0b3a013)

gdk4-x11/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 @ d7bdac6deb40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 2d5d67805483)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 040da0b3a013)

gdk4-x11/src/auto/x11_device_manager_xi2.rs

Lines changed: 26 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl X11DeviceManagerXI2 {
2020
///
2121
/// This method returns an instance of [`X11DeviceManagerXI2Builder`](crate::builders::X11DeviceManagerXI2Builder) which can be used to create [`X11DeviceManagerXI2`] objects.
2222
pub fn builder() -> X11DeviceManagerXI2Builder {
23-
X11DeviceManagerXI2Builder::default()
23+
X11DeviceManagerXI2Builder::new()
2424
}
2525

2626
pub fn display(&self) -> Option<gdk::Display> {
@@ -40,64 +40,51 @@ impl X11DeviceManagerXI2 {
4040
}
4141
}
4242

43-
#[derive(Clone, Default)]
4443
// rustdoc-stripper-ignore-next
4544
/// A [builder-pattern] type to construct [`X11DeviceManagerXI2`] objects.
4645
///
4746
/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
4847
#[must_use = "The builder must be built to be used"]
4948
pub struct X11DeviceManagerXI2Builder {
50-
display: Option<gdk::Display>,
51-
major: Option<i32>,
52-
minor: Option<i32>,
53-
opcode: Option<i32>,
49+
builder: glib::object::ObjectBuilder<'static, X11DeviceManagerXI2>,
5450
}
5551

5652
impl X11DeviceManagerXI2Builder {
57-
// rustdoc-stripper-ignore-next
58-
/// Create a new [`X11DeviceManagerXI2Builder`].
59-
pub fn new() -> Self {
60-
Self::default()
53+
fn new() -> Self {
54+
Self {
55+
builder: glib::object::Object::builder(),
56+
}
6157
}
6258

63-
// rustdoc-stripper-ignore-next
64-
/// Build the [`X11DeviceManagerXI2`].
65-
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
66-
pub fn build(self) -> X11DeviceManagerXI2 {
67-
let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
68-
if let Some(ref display) = self.display {
69-
properties.push(("display", display));
70-
}
71-
if let Some(ref major) = self.major {
72-
properties.push(("major", major));
73-
}
74-
if let Some(ref minor) = self.minor {
75-
properties.push(("minor", minor));
59+
pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
60+
Self {
61+
builder: self.builder.property("display", display.clone().upcast()),
7662
}
77-
if let Some(ref opcode) = self.opcode {
78-
properties.push(("opcode", opcode));
79-
}
80-
glib::Object::new::<X11DeviceManagerXI2>(&properties)
8163
}
8264

83-
pub fn display(mut self, display: &impl IsA<gdk::Display>) -> Self {
84-
self.display = Some(display.clone().upcast());
85-
self
65+
pub fn major(self, major: i32) -> Self {
66+
Self {
67+
builder: self.builder.property("major", major),
68+
}
8669
}
8770

88-
pub fn major(mut self, major: i32) -> Self {
89-
self.major = Some(major);
90-
self
71+
pub fn minor(self, minor: i32) -> Self {
72+
Self {
73+
builder: self.builder.property("minor", minor),
74+
}
9175
}
9276

93-
pub fn minor(mut self, minor: i32) -> Self {
94-
self.minor = Some(minor);
95-
self
77+
pub fn opcode(self, opcode: i32) -> Self {
78+
Self {
79+
builder: self.builder.property("opcode", opcode),
80+
}
9681
}
9782

98-
pub fn opcode(mut self, opcode: i32) -> Self {
99-
self.opcode = Some(opcode);
100-
self
83+
// rustdoc-stripper-ignore-next
84+
/// Build the [`X11DeviceManagerXI2`].
85+
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
86+
pub fn build(self) -> X11DeviceManagerXI2 {
87+
self.builder.build()
10188
}
10289
}
10390

gdk4-x11/src/auto/x11_device_xi2.rs

Lines changed: 46 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl X11DeviceXI2 {
2020
///
2121
/// This method returns an instance of [`X11DeviceXI2Builder`](crate::builders::X11DeviceXI2Builder) which can be used to create [`X11DeviceXI2`] objects.
2222
pub fn builder() -> X11DeviceXI2Builder {
23-
X11DeviceXI2Builder::default()
23+
X11DeviceXI2Builder::new()
2424
}
2525

2626
#[doc(alias = "device-id")]
@@ -29,109 +29,81 @@ impl X11DeviceXI2 {
2929
}
3030
}
3131

32-
#[derive(Clone, Default)]
3332
// rustdoc-stripper-ignore-next
3433
/// A [builder-pattern] type to construct [`X11DeviceXI2`] objects.
3534
///
3635
/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
3736
#[must_use = "The builder must be built to be used"]
3837
pub struct X11DeviceXI2Builder {
39-
device_id: Option<i32>,
40-
display: Option<gdk::Display>,
41-
has_cursor: Option<bool>,
42-
name: Option<String>,
43-
num_touches: Option<u32>,
44-
product_id: Option<String>,
45-
seat: Option<gdk::Seat>,
46-
source: Option<gdk::InputSource>,
47-
vendor_id: Option<String>,
38+
builder: glib::object::ObjectBuilder<'static, X11DeviceXI2>,
4839
}
4940

5041
impl X11DeviceXI2Builder {
51-
// rustdoc-stripper-ignore-next
52-
/// Create a new [`X11DeviceXI2Builder`].
53-
pub fn new() -> Self {
54-
Self::default()
42+
fn new() -> Self {
43+
Self {
44+
builder: glib::object::Object::builder(),
45+
}
5546
}
5647

57-
// rustdoc-stripper-ignore-next
58-
/// Build the [`X11DeviceXI2`].
59-
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
60-
pub fn build(self) -> X11DeviceXI2 {
61-
let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
62-
if let Some(ref device_id) = self.device_id {
63-
properties.push(("device-id", device_id));
64-
}
65-
if let Some(ref display) = self.display {
66-
properties.push(("display", display));
67-
}
68-
if let Some(ref has_cursor) = self.has_cursor {
69-
properties.push(("has-cursor", has_cursor));
70-
}
71-
if let Some(ref name) = self.name {
72-
properties.push(("name", name));
73-
}
74-
if let Some(ref num_touches) = self.num_touches {
75-
properties.push(("num-touches", num_touches));
76-
}
77-
if let Some(ref product_id) = self.product_id {
78-
properties.push(("product-id", product_id));
79-
}
80-
if let Some(ref seat) = self.seat {
81-
properties.push(("seat", seat));
82-
}
83-
if let Some(ref source) = self.source {
84-
properties.push(("source", source));
48+
pub fn device_id(self, device_id: i32) -> Self {
49+
Self {
50+
builder: self.builder.property("device-id", device_id),
8551
}
86-
if let Some(ref vendor_id) = self.vendor_id {
87-
properties.push(("vendor-id", vendor_id));
88-
}
89-
glib::Object::new::<X11DeviceXI2>(&properties)
9052
}
9153

92-
pub fn device_id(mut self, device_id: i32) -> Self {
93-
self.device_id = Some(device_id);
94-
self
54+
pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
55+
Self {
56+
builder: self.builder.property("display", display.clone().upcast()),
57+
}
9558
}
9659

97-
pub fn display(mut self, display: &impl IsA<gdk::Display>) -> Self {
98-
self.display = Some(display.clone().upcast());
99-
self
60+
pub fn has_cursor(self, has_cursor: bool) -> Self {
61+
Self {
62+
builder: self.builder.property("has-cursor", has_cursor),
63+
}
10064
}
10165

102-
pub fn has_cursor(mut self, has_cursor: bool) -> Self {
103-
self.has_cursor = Some(has_cursor);
104-
self
66+
pub fn name(self, name: impl Into<glib::GString>) -> Self {
67+
Self {
68+
builder: self.builder.property("name", name.into()),
69+
}
10570
}
10671

107-
pub fn name(mut self, name: &str) -> Self {
108-
self.name = Some(name.to_string());
109-
self
72+
pub fn num_touches(self, num_touches: u32) -> Self {
73+
Self {
74+
builder: self.builder.property("num-touches", num_touches),
75+
}
11076
}
11177

112-
pub fn num_touches(mut self, num_touches: u32) -> Self {
113-
self.num_touches = Some(num_touches);
114-
self
78+
pub fn product_id(self, product_id: impl Into<glib::GString>) -> Self {
79+
Self {
80+
builder: self.builder.property("product-id", product_id.into()),
81+
}
11582
}
11683

117-
pub fn product_id(mut self, product_id: &str) -> Self {
118-
self.product_id = Some(product_id.to_string());
119-
self
84+
pub fn seat(self, seat: &gdk::Seat) -> Self {
85+
Self {
86+
builder: self.builder.property("seat", seat.clone()),
87+
}
12088
}
12189

122-
pub fn seat(mut self, seat: &gdk::Seat) -> Self {
123-
self.seat = Some(seat.clone());
124-
self
90+
pub fn source(self, source: gdk::InputSource) -> Self {
91+
Self {
92+
builder: self.builder.property("source", source),
93+
}
12594
}
12695

127-
pub fn source(mut self, source: gdk::InputSource) -> Self {
128-
self.source = Some(source);
129-
self
96+
pub fn vendor_id(self, vendor_id: impl Into<glib::GString>) -> Self {
97+
Self {
98+
builder: self.builder.property("vendor-id", vendor_id.into()),
99+
}
130100
}
131101

132-
pub fn vendor_id(mut self, vendor_id: &str) -> Self {
133-
self.vendor_id = Some(vendor_id.to_string());
134-
self
102+
// rustdoc-stripper-ignore-next
103+
/// Build the [`X11DeviceXI2`].
104+
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
105+
pub fn build(self) -> X11DeviceXI2 {
106+
self.builder.build()
135107
}
136108
}
137109

gdk4-x11/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 @ d7bdac6deb40)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 2d5d67805483)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 040da0b3a013)

gdk4/src/auto/cursor.rs

Lines changed: 30 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Cursor {
5252
///
5353
/// This method returns an instance of [`CursorBuilder`](crate::builders::CursorBuilder) which can be used to create [`Cursor`] objects.
5454
pub fn builder() -> CursorBuilder {
55-
CursorBuilder::default()
55+
CursorBuilder::new()
5656
}
5757

5858
#[doc(alias = "gdk_cursor_get_fallback")]
@@ -87,73 +87,57 @@ impl Cursor {
8787
}
8888
}
8989

90-
#[derive(Clone, Default)]
9190
// rustdoc-stripper-ignore-next
9291
/// A [builder-pattern] type to construct [`Cursor`] objects.
9392
///
9493
/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
9594
#[must_use = "The builder must be built to be used"]
9695
pub struct CursorBuilder {
97-
fallback: Option<Cursor>,
98-
hotspot_x: Option<i32>,
99-
hotspot_y: Option<i32>,
100-
name: Option<String>,
101-
texture: Option<Texture>,
96+
builder: glib::object::ObjectBuilder<'static, Cursor>,
10297
}
10398

10499
impl CursorBuilder {
105-
// rustdoc-stripper-ignore-next
106-
/// Create a new [`CursorBuilder`].
107-
pub fn new() -> Self {
108-
Self::default()
100+
fn new() -> Self {
101+
Self {
102+
builder: glib::object::Object::builder(),
103+
}
109104
}
110105

111-
// rustdoc-stripper-ignore-next
112-
/// Build the [`Cursor`].
113-
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
114-
pub fn build(self) -> Cursor {
115-
let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
116-
if let Some(ref fallback) = self.fallback {
117-
properties.push(("fallback", fallback));
118-
}
119-
if let Some(ref hotspot_x) = self.hotspot_x {
120-
properties.push(("hotspot-x", hotspot_x));
121-
}
122-
if let Some(ref hotspot_y) = self.hotspot_y {
123-
properties.push(("hotspot-y", hotspot_y));
124-
}
125-
if let Some(ref name) = self.name {
126-
properties.push(("name", name));
106+
pub fn fallback(self, fallback: &Cursor) -> Self {
107+
Self {
108+
builder: self.builder.property("fallback", fallback.clone()),
127109
}
128-
if let Some(ref texture) = self.texture {
129-
properties.push(("texture", texture));
130-
}
131-
glib::Object::new::<Cursor>(&properties)
132110
}
133111

134-
pub fn fallback(mut self, fallback: &Cursor) -> Self {
135-
self.fallback = Some(fallback.clone());
136-
self
112+
pub fn hotspot_x(self, hotspot_x: i32) -> Self {
113+
Self {
114+
builder: self.builder.property("hotspot-x", hotspot_x),
115+
}
137116
}
138117

139-
pub fn hotspot_x(mut self, hotspot_x: i32) -> Self {
140-
self.hotspot_x = Some(hotspot_x);
141-
self
118+
pub fn hotspot_y(self, hotspot_y: i32) -> Self {
119+
Self {
120+
builder: self.builder.property("hotspot-y", hotspot_y),
121+
}
142122
}
143123

144-
pub fn hotspot_y(mut self, hotspot_y: i32) -> Self {
145-
self.hotspot_y = Some(hotspot_y);
146-
self
124+
pub fn name(self, name: impl Into<glib::GString>) -> Self {
125+
Self {
126+
builder: self.builder.property("name", name.into()),
127+
}
147128
}
148129

149-
pub fn name(mut self, name: &str) -> Self {
150-
self.name = Some(name.to_string());
151-
self
130+
pub fn texture(self, texture: &impl IsA<Texture>) -> Self {
131+
Self {
132+
builder: self.builder.property("texture", texture.clone().upcast()),
133+
}
152134
}
153135

154-
pub fn texture(mut self, texture: &impl IsA<Texture>) -> Self {
155-
self.texture = Some(texture.clone().upcast());
156-
self
136+
// rustdoc-stripper-ignore-next
137+
/// Build the [`Cursor`].
138+
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
139+
pub fn build(self) -> Cursor {
140+
self.builder.build()
157141
}
158142
}
159143

0 commit comments

Comments
 (0)