Skip to content

Commit

Permalink
regenerate: more Into<Option<_>> in arg position
Browse files Browse the repository at this point in the history
  • Loading branch information
fengalin committed Dec 2, 2024
1 parent 9edb905 commit 073dc8b
Show file tree
Hide file tree
Showing 223 changed files with 2,620 additions and 1,762 deletions.
2 changes: 1 addition & 1 deletion gdk4-macos/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 03ab3b39fbaf)
Generated by gir (https://github.com/gtk-rs/gir @ a0bb2ab2c2e6)
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)
2 changes: 1 addition & 1 deletion gdk4-macos/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 03ab3b39fbaf)
Generated by gir (https://github.com/gtk-rs/gir @ a0bb2ab2c2e6)
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)
2 changes: 1 addition & 1 deletion gdk4-wayland/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 03ab3b39fbaf)
Generated by gir (https://github.com/gtk-rs/gir @ a0bb2ab2c2e6)
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)
2 changes: 1 addition & 1 deletion gdk4-wayland/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 03ab3b39fbaf)
Generated by gir (https://github.com/gtk-rs/gir @ a0bb2ab2c2e6)
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)
2 changes: 1 addition & 1 deletion gdk4-win32/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 03ab3b39fbaf)
Generated by gir (https://github.com/gtk-rs/gir @ a0bb2ab2c2e6)
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)
4 changes: 2 additions & 2 deletions gdk4-win32/src/auto/win32_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ impl Win32Display {
}

#[doc(alias = "gdk_win32_display_set_cursor_theme")]
pub fn set_cursor_theme(&self, name: Option<&str>, size: i32) {
pub fn set_cursor_theme<'a>(&self, name: impl Into<Option<&'a str>>, size: i32) {
unsafe {
ffi::gdk_win32_display_set_cursor_theme(
self.to_glib_none().0,
name.to_glib_none().0,
name.into().to_glib_none().0,
size,
);
}
Expand Down
2 changes: 1 addition & 1 deletion gdk4-win32/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 03ab3b39fbaf)
Generated by gir (https://github.com/gtk-rs/gir @ a0bb2ab2c2e6)
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)
4 changes: 2 additions & 2 deletions gdk4-x11/src/auto/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ pub fn x11_get_server_time(surface: &X11Surface) -> u32 {
}

#[doc(alias = "gdk_x11_set_sm_client_id")]
pub fn x11_set_sm_client_id(sm_client_id: Option<&str>) {
pub fn x11_set_sm_client_id<'a>(sm_client_id: impl Into<Option<&'a str>>) {
assert_initialized_main_thread!();
unsafe {
ffi::gdk_x11_set_sm_client_id(sm_client_id.to_glib_none().0);
ffi::gdk_x11_set_sm_client_id(sm_client_id.into().to_glib_none().0);
}
}
2 changes: 1 addition & 1 deletion gdk4-x11/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 03ab3b39fbaf)
Generated by gir (https://github.com/gtk-rs/gir @ a0bb2ab2c2e6)
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)
2 changes: 1 addition & 1 deletion gdk4-x11/src/auto/x11_device_manager_xi2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl X11DeviceManagerXI2Builder {

pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
Self {
builder: self.builder.property("display", display.clone().upcast()),
builder: self.builder.property("display", display.as_ref().clone()),
}
}

Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/src/auto/x11_device_xi2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl X11DeviceXI2Builder {

pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
Self {
builder: self.builder.property("display", display.clone().upcast()),
builder: self.builder.property("display", display.as_ref().clone()),
}
}

Expand Down
12 changes: 8 additions & 4 deletions gdk4-x11/src/auto/x11_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ impl X11Display {
#[cfg_attr(feature = "v4_16", deprecated = "Since 4.16")]
#[allow(deprecated)]
#[doc(alias = "gdk_x11_display_set_cursor_theme")]
pub fn set_cursor_theme(&self, theme: Option<&str>, size: i32) {
pub fn set_cursor_theme<'a>(&self, theme: impl Into<Option<&'a str>>, size: i32) {
unsafe {
ffi::gdk_x11_display_set_cursor_theme(
self.to_glib_none().0,
theme.to_glib_none().0,
theme.into().to_glib_none().0,
size,
);
}
Expand Down Expand Up @@ -222,8 +222,12 @@ impl X11Display {
}

#[doc(alias = "gdk_x11_display_open")]
pub fn open(display_name: Option<&str>) -> Option<gdk::Display> {
pub fn open<'a>(display_name: impl Into<Option<&'a str>>) -> Option<gdk::Display> {
assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gdk_x11_display_open(display_name.to_glib_none().0)) }
unsafe {
from_glib_full(ffi::gdk_x11_display_open(
display_name.into().to_glib_none().0,
))
}
}
}
4 changes: 2 additions & 2 deletions gdk4-x11/src/auto/x11_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ impl X11Surface {
}

#[doc(alias = "gdk_x11_surface_set_utf8_property")]
pub fn set_utf8_property(&self, name: &str, value: Option<&str>) {
pub fn set_utf8_property<'a>(&self, name: &str, value: impl Into<Option<&'a str>>) {
unsafe {
ffi::gdk_x11_surface_set_utf8_property(
self.to_glib_none().0,
name.to_glib_none().0,
value.to_glib_none().0,
value.into().to_glib_none().0,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 03ab3b39fbaf)
Generated by gir (https://github.com/gtk-rs/gir @ a0bb2ab2c2e6)
from gir-files (https://github.com/gtk-rs/gir-files @ c05f5cc23cb7)
8 changes: 4 additions & 4 deletions gdk4/src/auto/app_launch_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ pub trait GdkAppLaunchContextExt: IsA<AppLaunchContext> + 'static {
}

#[doc(alias = "gdk_app_launch_context_set_icon")]
fn set_icon(&self, icon: Option<&impl IsA<gio::Icon>>) {
fn set_icon<'a, P: IsA<gio::Icon>>(&self, icon: impl Into<Option<&'a P>>) {
unsafe {
ffi::gdk_app_launch_context_set_icon(
self.as_ref().to_glib_none().0,
icon.map(|p| p.as_ref()).to_glib_none().0,
icon.into().as_ref().map(|p| p.as_ref()).to_glib_none().0,
);
}
}

#[doc(alias = "gdk_app_launch_context_set_icon_name")]
fn set_icon_name(&self, icon_name: Option<&str>) {
fn set_icon_name<'a>(&self, icon_name: impl Into<Option<&'a str>>) {
unsafe {
ffi::gdk_app_launch_context_set_icon_name(
self.as_ref().to_glib_none().0,
icon_name.to_glib_none().0,
icon_name.into().to_glib_none().0,
);
}
}
Expand Down
Loading

0 comments on commit 073dc8b

Please sign in to comment.