Skip to content

Commit 8e7fb3c

Browse files
committed
regenerate: more Into<Option<_>> in arg position
1 parent 547edb0 commit 8e7fb3c

File tree

247 files changed

+5445
-3537
lines changed

Some content is hidden

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

247 files changed

+5445
-3537
lines changed

gdk4-macos/src/auto/versions.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ ae29aefbe96a)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 24f0d6639caa)
22
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)

gdk4-macos/sys/versions.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ ae29aefbe96a)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 24f0d6639caa)
22
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)

gdk4-wayland/src/auto/versions.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ ae29aefbe96a)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 24f0d6639caa)
22
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)

gdk4-wayland/sys/versions.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ ae29aefbe96a)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 24f0d6639caa)
22
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)

gdk4-win32/src/auto/versions.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ ae29aefbe96a)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 24f0d6639caa)
22
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)

gdk4-win32/src/auto/win32_display.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ impl Win32Display {
2727
}
2828

2929
#[doc(alias = "gdk_win32_display_set_cursor_theme")]
30-
pub fn set_cursor_theme(&self, name: Option<&str>, size: i32) {
30+
pub fn set_cursor_theme<'a>(&self, name: impl Into<Option<&'a str>>, size: i32) {
3131
unsafe {
3232
ffi::gdk_win32_display_set_cursor_theme(
3333
self.to_glib_none().0,
34-
name.to_glib_none().0,
34+
name.into().to_glib_none().0,
3535
size,
3636
);
3737
}

gdk4-win32/sys/versions.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ ae29aefbe96a)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 24f0d6639caa)
22
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)

gdk4-x11/src/auto/functions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ pub fn x11_get_server_time(surface: &X11Surface) -> u32 {
3232
}
3333

3434
#[doc(alias = "gdk_x11_set_sm_client_id")]
35-
pub fn x11_set_sm_client_id(sm_client_id: Option<&str>) {
35+
pub fn x11_set_sm_client_id<'a>(sm_client_id: impl Into<Option<&'a str>>) {
3636
assert_initialized_main_thread!();
3737
unsafe {
38-
ffi::gdk_x11_set_sm_client_id(sm_client_id.to_glib_none().0);
38+
ffi::gdk_x11_set_sm_client_id(sm_client_id.into().to_glib_none().0);
3939
}
4040
}

gdk4-x11/src/auto/versions.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ ae29aefbe96a)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 24f0d6639caa)
22
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)

gdk4-x11/src/auto/x11_device_manager_xi2.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ impl X11DeviceManagerXI2Builder {
5656
}
5757
}
5858

59-
pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
59+
pub fn display<'a, P: IsA<gdk::Display>>(self, display: impl Into<Option<&'a P>>) -> Self {
6060
Self {
61-
builder: self.builder.property("display", display.clone().upcast()),
61+
builder: self
62+
.builder
63+
.property("display", display.into().as_ref().map(|p| p.as_ref())),
6264
}
6365
}
6466

gdk4-x11/src/auto/x11_device_xi2.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ impl X11DeviceXI2Builder {
5151
}
5252
}
5353

54-
pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
54+
pub fn display<'a, P: IsA<gdk::Display>>(self, display: impl Into<Option<&'a P>>) -> Self {
5555
Self {
56-
builder: self.builder.property("display", display.clone().upcast()),
56+
builder: self
57+
.builder
58+
.property("display", display.into().as_ref().map(|p| p.as_ref())),
5759
}
5860
}
5961

@@ -63,7 +65,7 @@ impl X11DeviceXI2Builder {
6365
}
6466
}
6567

66-
pub fn name(self, name: impl Into<glib::GString>) -> Self {
68+
pub fn name<'a>(self, name: impl Into<Option<&'a str>>) -> Self {
6769
Self {
6870
builder: self.builder.property("name", name.into()),
6971
}
@@ -75,15 +77,15 @@ impl X11DeviceXI2Builder {
7577
}
7678
}
7779

78-
pub fn product_id(self, product_id: impl Into<glib::GString>) -> Self {
80+
pub fn product_id<'a>(self, product_id: impl Into<Option<&'a str>>) -> Self {
7981
Self {
8082
builder: self.builder.property("product-id", product_id.into()),
8183
}
8284
}
8385

84-
pub fn seat(self, seat: &gdk::Seat) -> Self {
86+
pub fn seat<'a>(self, seat: impl Into<Option<&'a gdk::Seat>>) -> Self {
8587
Self {
86-
builder: self.builder.property("seat", seat.clone()),
88+
builder: self.builder.property("seat", seat.into()),
8789
}
8890
}
8991

@@ -93,7 +95,7 @@ impl X11DeviceXI2Builder {
9395
}
9496
}
9597

96-
pub fn vendor_id(self, vendor_id: impl Into<glib::GString>) -> Self {
98+
pub fn vendor_id<'a>(self, vendor_id: impl Into<Option<&'a str>>) -> Self {
9799
Self {
98100
builder: self.builder.property("vendor-id", vendor_id.into()),
99101
}

gdk4-x11/src/auto/x11_display.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ impl X11Display {
134134
#[cfg_attr(feature = "v4_16", deprecated = "Since 4.16")]
135135
#[allow(deprecated)]
136136
#[doc(alias = "gdk_x11_display_set_cursor_theme")]
137-
pub fn set_cursor_theme(&self, theme: Option<&str>, size: i32) {
137+
pub fn set_cursor_theme<'a>(&self, theme: impl Into<Option<&'a str>>, size: i32) {
138138
unsafe {
139139
ffi::gdk_x11_display_set_cursor_theme(
140140
self.to_glib_none().0,
141-
theme.to_glib_none().0,
141+
theme.into().to_glib_none().0,
142142
size,
143143
);
144144
}
@@ -222,8 +222,12 @@ impl X11Display {
222222
}
223223

224224
#[doc(alias = "gdk_x11_display_open")]
225-
pub fn open(display_name: Option<&str>) -> Option<gdk::Display> {
225+
pub fn open<'a>(display_name: impl Into<Option<&'a str>>) -> Option<gdk::Display> {
226226
assert_initialized_main_thread!();
227-
unsafe { from_glib_full(ffi::gdk_x11_display_open(display_name.to_glib_none().0)) }
227+
unsafe {
228+
from_glib_full(ffi::gdk_x11_display_open(
229+
display_name.into().to_glib_none().0,
230+
))
231+
}
228232
}
229233
}

gdk4-x11/src/auto/x11_surface.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ impl X11Surface {
100100
}
101101

102102
#[doc(alias = "gdk_x11_surface_set_utf8_property")]
103-
pub fn set_utf8_property(&self, name: &str, value: Option<&str>) {
103+
pub fn set_utf8_property<'a>(&self, name: &str, value: impl Into<Option<&'a str>>) {
104104
unsafe {
105105
ffi::gdk_x11_surface_set_utf8_property(
106106
self.to_glib_none().0,
107107
name.to_glib_none().0,
108-
value.to_glib_none().0,
108+
value.into().to_glib_none().0,
109109
);
110110
}
111111
}

gdk4-x11/sys/versions.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ ae29aefbe96a)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 24f0d6639caa)
22
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)

gdk4/src/auto/app_launch_context.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ pub trait GdkAppLaunchContextExt: IsA<AppLaunchContext> + 'static {
3737
}
3838

3939
#[doc(alias = "gdk_app_launch_context_set_icon")]
40-
fn set_icon(&self, icon: Option<&impl IsA<gio::Icon>>) {
40+
fn set_icon<'a, P: IsA<gio::Icon>>(&self, icon: impl Into<Option<&'a P>>) {
4141
unsafe {
4242
ffi::gdk_app_launch_context_set_icon(
4343
self.as_ref().to_glib_none().0,
44-
icon.map(|p| p.as_ref()).to_glib_none().0,
44+
icon.into().as_ref().map(|p| p.as_ref()).to_glib_none().0,
4545
);
4646
}
4747
}
4848

4949
#[doc(alias = "gdk_app_launch_context_set_icon_name")]
50-
fn set_icon_name(&self, icon_name: Option<&str>) {
50+
fn set_icon_name<'a>(&self, icon_name: impl Into<Option<&'a str>>) {
5151
unsafe {
5252
ffi::gdk_app_launch_context_set_icon_name(
5353
self.as_ref().to_glib_none().0,
54-
icon_name.to_glib_none().0,
54+
icon_name.into().to_glib_none().0,
5555
);
5656
}
5757
}

0 commit comments

Comments
 (0)