diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml index a8d0e5e11778..7b1c8e2b9592 100644 --- a/.github/workflows/windows-msvc.yml +++ b/.github/workflows/windows-msvc.yml @@ -33,9 +33,9 @@ jobs: id: cache with: path: c:/gnome - key: ${{ runner.os }}-gtk4-14.1 + key: ${{ runner.os }}-gtk4-14.2 restore-keys: | - ${{ runner.os }}-gtk4-14.1 + ${{ runner.os }}-gtk4-14.2 - name: Set up the PATH environment run: | diff --git a/Cargo.toml b/Cargo.toml index 37bcd39959ec..eb1ab5e41866 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" default-members = [ "examples", diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gdk4-wayland/src/auto/versions.txt +++ b/gdk4-wayland/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gdk4-wayland/src/auto/wayland_device.rs b/gdk4-wayland/src/auto/wayland_device.rs index 36d2d69a6f88..f3669d7ef57c 100644 --- a/gdk4-wayland/src/auto/wayland_device.rs +++ b/gdk4-wayland/src/auto/wayland_device.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkWaylandDevice")] @@ -21,9 +20,3 @@ impl WaylandDevice { unsafe { from_glib_none(ffi::gdk_wayland_device_get_node_path(self.to_glib_none().0)) } } } - -impl fmt::Display for WaylandDevice { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("WaylandDevice") - } -} diff --git a/gdk4-wayland/src/auto/wayland_display.rs b/gdk4-wayland/src/auto/wayland_display.rs index fc7fc6335250..b5a4b830822c 100644 --- a/gdk4-wayland/src/auto/wayland_display.rs +++ b/gdk4-wayland/src/auto/wayland_display.rs @@ -4,7 +4,6 @@ #![allow(deprecated)] use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkWaylandDisplay")] @@ -61,9 +60,3 @@ impl WaylandDisplay { } } } - -impl fmt::Display for WaylandDisplay { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("WaylandDisplay") - } -} diff --git a/gdk4-wayland/src/auto/wayland_gl_context.rs b/gdk4-wayland/src/auto/wayland_gl_context.rs index 855be99bef26..9e59ccb1e38c 100644 --- a/gdk4-wayland/src/auto/wayland_gl_context.rs +++ b/gdk4-wayland/src/auto/wayland_gl_context.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkWaylandGLContext")] pub struct WaylandGLContext(Object) @extends gdk::GLContext, gdk::DrawContext; @@ -14,9 +12,3 @@ glib::wrapper! { } impl WaylandGLContext {} - -impl fmt::Display for WaylandGLContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("WaylandGLContext") - } -} diff --git a/gdk4-wayland/src/auto/wayland_monitor.rs b/gdk4-wayland/src/auto/wayland_monitor.rs index 7f6e62f5b01a..02170fee1ba4 100644 --- a/gdk4-wayland/src/auto/wayland_monitor.rs +++ b/gdk4-wayland/src/auto/wayland_monitor.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkWaylandMonitor")] pub struct WaylandMonitor(Object) @extends gdk::Monitor; @@ -14,9 +12,3 @@ glib::wrapper! { } impl WaylandMonitor {} - -impl fmt::Display for WaylandMonitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("WaylandMonitor") - } -} diff --git a/gdk4-wayland/src/auto/wayland_popup.rs b/gdk4-wayland/src/auto/wayland_popup.rs index b4a8701af8cd..6606cbbd82e8 100644 --- a/gdk4-wayland/src/auto/wayland_popup.rs +++ b/gdk4-wayland/src/auto/wayland_popup.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use crate::WaylandSurface; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkWaylandPopup")] @@ -15,9 +14,3 @@ glib::wrapper! { } impl WaylandPopup {} - -impl fmt::Display for WaylandPopup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("WaylandPopup") - } -} diff --git a/gdk4-wayland/src/auto/wayland_seat.rs b/gdk4-wayland/src/auto/wayland_seat.rs index 67c81f881d68..581f4298a5cf 100644 --- a/gdk4-wayland/src/auto/wayland_seat.rs +++ b/gdk4-wayland/src/auto/wayland_seat.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkWaylandSeat")] pub struct WaylandSeat(Object) @extends gdk::Seat; @@ -14,9 +12,3 @@ glib::wrapper! { } impl WaylandSeat {} - -impl fmt::Display for WaylandSeat { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("WaylandSeat") - } -} diff --git a/gdk4-wayland/src/auto/wayland_surface.rs b/gdk4-wayland/src/auto/wayland_surface.rs index 3bfa85b4c32a..b7736cae9ef3 100644 --- a/gdk4-wayland/src/auto/wayland_surface.rs +++ b/gdk4-wayland/src/auto/wayland_surface.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkWaylandSurface")] pub struct WaylandSurface(Object) @extends gdk::Surface; @@ -16,9 +14,3 @@ glib::wrapper! { impl WaylandSurface { pub const NONE: Option<&'static WaylandSurface> = None; } - -impl fmt::Display for WaylandSurface { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("WaylandSurface") - } -} diff --git a/gdk4-wayland/src/auto/wayland_toplevel.rs b/gdk4-wayland/src/auto/wayland_toplevel.rs index e0ebfe327bd8..fa18fa50b50f 100644 --- a/gdk4-wayland/src/auto/wayland_toplevel.rs +++ b/gdk4-wayland/src/auto/wayland_toplevel.rs @@ -5,7 +5,7 @@ use crate::WaylandSurface; use glib::translate::*; -use std::{boxed::Box as Box_, fmt}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkWaylandToplevel")] @@ -89,9 +89,3 @@ impl WaylandToplevel { } } } - -impl fmt::Display for WaylandToplevel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("WaylandToplevel") - } -} diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gdk4-wayland/sys/versions.txt +++ b/gdk4-wayland/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gdk4-win32/src/auto/enums.rs b/gdk4-win32/src/auto/enums.rs index 3c3dbfad37f2..8eec62d54e18 100644 --- a/gdk4-win32/src/auto/enums.rs +++ b/gdk4-win32/src/auto/enums.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -17,20 +16,6 @@ pub enum Win32MessageFilterReturn { __Unknown(i32), } -impl fmt::Display for Win32MessageFilterReturn { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Win32MessageFilterReturn::{}", - match *self { - Self::Continue => "Continue", - Self::Remove => "Remove", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Win32MessageFilterReturn { type GlibType = ffi::GdkWin32MessageFilterReturn; diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gdk4-win32/src/auto/versions.txt +++ b/gdk4-win32/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gdk4-win32/src/auto/win32_display.rs b/gdk4-win32/src/auto/win32_display.rs index 8d7d16466cf0..59ea54a1c6a0 100644 --- a/gdk4-win32/src/auto/win32_display.rs +++ b/gdk4-win32/src/auto/win32_display.rs @@ -4,7 +4,6 @@ use crate::Win32HCursor; use glib::{prelude::*, translate::*}; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GdkWin32Display")] @@ -54,8 +53,8 @@ impl Win32Display { pub fn wgl_version(display: &impl IsA) -> Option<(i32, i32)> { assert_initialized_main_thread!(); unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_win32_display_get_wgl_version( display.as_ref().to_glib_none().0, major.as_mut_ptr(), @@ -69,9 +68,3 @@ impl Win32Display { } } } - -impl fmt::Display for Win32Display { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32Display") - } -} diff --git a/gdk4-win32/src/auto/win32_display_manager.rs b/gdk4-win32/src/auto/win32_display_manager.rs index 8ea46fa41da4..b5d03ed73c19 100644 --- a/gdk4-win32/src/auto/win32_display_manager.rs +++ b/gdk4-win32/src/auto/win32_display_manager.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkWin32DisplayManager")] pub struct Win32DisplayManager(Object) @extends gdk::DisplayManager; @@ -14,9 +12,3 @@ glib::wrapper! { } impl Win32DisplayManager {} - -impl fmt::Display for Win32DisplayManager { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32DisplayManager") - } -} diff --git a/gdk4-win32/src/auto/win32_drag.rs b/gdk4-win32/src/auto/win32_drag.rs index 0dada192f5cf..ed592f0526b7 100644 --- a/gdk4-win32/src/auto/win32_drag.rs +++ b/gdk4-win32/src/auto/win32_drag.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkWin32Drag")] pub struct Win32Drag(Object) @extends gdk::Drag; @@ -14,9 +12,3 @@ glib::wrapper! { } impl Win32Drag {} - -impl fmt::Display for Win32Drag { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32Drag") - } -} diff --git a/gdk4-win32/src/auto/win32_gl_context.rs b/gdk4-win32/src/auto/win32_gl_context.rs index 126b3ea39c45..a57e10e2fdfc 100644 --- a/gdk4-win32/src/auto/win32_gl_context.rs +++ b/gdk4-win32/src/auto/win32_gl_context.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkWin32GLContext")] pub struct Win32GLContext(Object) @extends gdk::GLContext, gdk::DrawContext; @@ -14,9 +12,3 @@ glib::wrapper! { } impl Win32GLContext {} - -impl fmt::Display for Win32GLContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32GLContext") - } -} diff --git a/gdk4-win32/src/auto/win32_hcursor.rs b/gdk4-win32/src/auto/win32_hcursor.rs index 3f1f838308f7..ac2b4783080c 100644 --- a/gdk4-win32/src/auto/win32_hcursor.rs +++ b/gdk4-win32/src/auto/win32_hcursor.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkWin32HCursor")] @@ -23,9 +22,3 @@ impl Win32HCursor { ObjectExt::property(self, "display") } } - -impl fmt::Display for Win32HCursor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32HCursor") - } -} diff --git a/gdk4-win32/src/auto/win32_monitor.rs b/gdk4-win32/src/auto/win32_monitor.rs index 4acf0e374319..b6f3b5b7c5ba 100644 --- a/gdk4-win32/src/auto/win32_monitor.rs +++ b/gdk4-win32/src/auto/win32_monitor.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkWin32Monitor")] @@ -29,9 +28,3 @@ impl Win32Monitor { } } } - -impl fmt::Display for Win32Monitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32Monitor") - } -} diff --git a/gdk4-win32/src/auto/win32_screen.rs b/gdk4-win32/src/auto/win32_screen.rs index a01744c676f0..7a5d4c71a543 100644 --- a/gdk4-win32/src/auto/win32_screen.rs +++ b/gdk4-win32/src/auto/win32_screen.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkWin32Screen")] pub struct Win32Screen(Object); @@ -14,9 +12,3 @@ glib::wrapper! { } impl Win32Screen {} - -impl fmt::Display for Win32Screen { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32Screen") - } -} diff --git a/gdk4-win32/src/auto/win32_surface.rs b/gdk4-win32/src/auto/win32_surface.rs index 7fc68f1dab9c..9d5cb38c554d 100644 --- a/gdk4-win32/src/auto/win32_surface.rs +++ b/gdk4-win32/src/auto/win32_surface.rs @@ -4,7 +4,6 @@ #![allow(deprecated)] use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkWin32Surface")] @@ -35,9 +34,3 @@ impl Win32Surface { } } } - -impl fmt::Display for Win32Surface { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Win32Surface") - } -} diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gdk4-win32/sys/versions.txt +++ b/gdk4-win32/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gdk4-x11/src/auto/enums.rs b/gdk4-x11/src/auto/enums.rs index 4bbf82aba6e3..fd25f430a107 100644 --- a/gdk4-x11/src/auto/enums.rs +++ b/gdk4-x11/src/auto/enums.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -19,21 +18,6 @@ pub enum X11DeviceType { __Unknown(i32), } -impl fmt::Display for X11DeviceType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "X11DeviceType::{}", - match *self { - Self::Logical => "Logical", - Self::Physical => "Physical", - Self::Floating => "Floating", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for X11DeviceType { type GlibType = ffi::GdkX11DeviceType; diff --git a/gdk4-x11/src/auto/mod.rs b/gdk4-x11/src/auto/mod.rs index 8cfbc07358f4..94974c07974f 100644 --- a/gdk4-x11/src/auto/mod.rs +++ b/gdk4-x11/src/auto/mod.rs @@ -32,10 +32,9 @@ pub use self::x11_surface::X11Surface; mod enums; pub use self::enums::X11DeviceType; -pub mod functions; +pub(crate) mod functions; -#[doc(hidden)] -pub mod builders { +pub(crate) mod builders { pub use super::x11_device_manager_xi2::X11DeviceManagerXI2Builder; pub use super::x11_device_xi2::X11DeviceXI2Builder; } diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gdk4-x11/src/auto/versions.txt +++ b/gdk4-x11/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gdk4-x11/src/auto/x11_app_launch_context.rs b/gdk4-x11/src/auto/x11_app_launch_context.rs index 7976049dd4ab..cd805ab45d12 100644 --- a/gdk4-x11/src/auto/x11_app_launch_context.rs +++ b/gdk4-x11/src/auto/x11_app_launch_context.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkX11AppLaunchContext")] pub struct X11AppLaunchContext(Object) @extends gdk::AppLaunchContext, gio::AppLaunchContext; @@ -14,9 +12,3 @@ glib::wrapper! { } impl X11AppLaunchContext {} - -impl fmt::Display for X11AppLaunchContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11AppLaunchContext") - } -} diff --git a/gdk4-x11/src/auto/x11_device_manager_xi2.rs b/gdk4-x11/src/auto/x11_device_manager_xi2.rs index c1a222fd82ba..90da8fe9d4bc 100644 --- a/gdk4-x11/src/auto/x11_device_manager_xi2.rs +++ b/gdk4-x11/src/auto/x11_device_manager_xi2.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkX11DeviceManagerXI2")] @@ -87,9 +86,3 @@ impl X11DeviceManagerXI2Builder { self.builder.build() } } - -impl fmt::Display for X11DeviceManagerXI2 { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11DeviceManagerXI2") - } -} diff --git a/gdk4-x11/src/auto/x11_device_xi2.rs b/gdk4-x11/src/auto/x11_device_xi2.rs index b8456a906d85..b13c3c9bbe63 100644 --- a/gdk4-x11/src/auto/x11_device_xi2.rs +++ b/gdk4-x11/src/auto/x11_device_xi2.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkX11DeviceXI2")] @@ -106,9 +105,3 @@ impl X11DeviceXI2Builder { self.builder.build() } } - -impl fmt::Display for X11DeviceXI2 { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11DeviceXI2") - } -} diff --git a/gdk4-x11/src/auto/x11_display.rs b/gdk4-x11/src/auto/x11_display.rs index 06b877faaf33..ee9b22004bcb 100644 --- a/gdk4-x11/src/auto/x11_display.rs +++ b/gdk4-x11/src/auto/x11_display.rs @@ -5,7 +5,6 @@ use crate::X11Screen; use glib::translate::*; -use std::{fmt, mem, ptr}; glib::wrapper! { #[doc(alias = "GdkX11Display")] @@ -57,8 +56,8 @@ impl X11Display { #[doc(alias = "get_egl_version")] pub fn egl_version(&self) -> Option<(i32, i32)> { unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_x11_display_get_egl_version( self.to_glib_none().0, major.as_mut_ptr(), @@ -76,8 +75,8 @@ impl X11Display { #[doc(alias = "get_glx_version")] pub fn glx_version(&self) -> Option<(i32, i32)> { unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_x11_display_get_glx_version( self.to_glib_none().0, major.as_mut_ptr(), @@ -165,10 +164,10 @@ impl X11Display { #[doc(alias = "gdk_x11_display_string_to_compound_text")] pub fn string_to_compound_text(&self, str: &str) -> (i32, glib::GString, i32, Vec) { unsafe { - let mut encoding = ptr::null(); - let mut format = mem::MaybeUninit::uninit(); - let mut ctext = ptr::null_mut(); - let mut length = mem::MaybeUninit::uninit(); + let mut encoding = std::ptr::null(); + let mut format = std::mem::MaybeUninit::uninit(); + let mut ctext = std::ptr::null_mut(); + let mut length = std::mem::MaybeUninit::uninit(); let ret = ffi::gdk_x11_display_string_to_compound_text( self.to_glib_none().0, str.to_glib_none().0, @@ -196,10 +195,10 @@ impl X11Display { #[doc(alias = "gdk_x11_display_utf8_to_compound_text")] pub fn utf8_to_compound_text(&self, str: &str) -> Option<(glib::GString, i32, Vec)> { unsafe { - let mut encoding = ptr::null(); - let mut format = mem::MaybeUninit::uninit(); - let mut ctext = ptr::null_mut(); - let mut length = mem::MaybeUninit::uninit(); + let mut encoding = std::ptr::null(); + let mut format = std::mem::MaybeUninit::uninit(); + let mut ctext = std::ptr::null_mut(); + let mut length = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_x11_display_utf8_to_compound_text( self.to_glib_none().0, str.to_glib_none().0, @@ -226,9 +225,3 @@ impl X11Display { unsafe { from_glib_full(ffi::gdk_x11_display_open(display_name.to_glib_none().0)) } } } - -impl fmt::Display for X11Display { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Display") - } -} diff --git a/gdk4-x11/src/auto/x11_drag.rs b/gdk4-x11/src/auto/x11_drag.rs index d302c4932f55..95b4eca6f4fe 100644 --- a/gdk4-x11/src/auto/x11_drag.rs +++ b/gdk4-x11/src/auto/x11_drag.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkX11Drag")] pub struct X11Drag(Object) @extends gdk::Drag; @@ -14,9 +12,3 @@ glib::wrapper! { } impl X11Drag {} - -impl fmt::Display for X11Drag { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Drag") - } -} diff --git a/gdk4-x11/src/auto/x11_monitor.rs b/gdk4-x11/src/auto/x11_monitor.rs index bba4e100aa36..667eb60220eb 100644 --- a/gdk4-x11/src/auto/x11_monitor.rs +++ b/gdk4-x11/src/auto/x11_monitor.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkX11Monitor")] @@ -25,9 +24,3 @@ impl X11Monitor { } } } - -impl fmt::Display for X11Monitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Monitor") - } -} diff --git a/gdk4-x11/src/auto/x11_screen.rs b/gdk4-x11/src/auto/x11_screen.rs index 7060297a21d0..d4fc59007dd9 100644 --- a/gdk4-x11/src/auto/x11_screen.rs +++ b/gdk4-x11/src/auto/x11_screen.rs @@ -7,7 +7,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkX11Screen")] @@ -71,7 +71,7 @@ impl X11Screen { connect_raw( self.as_ptr() as *mut _, b"window-manager-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( window_manager_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -79,9 +79,3 @@ impl X11Screen { } } } - -impl fmt::Display for X11Screen { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Screen") - } -} diff --git a/gdk4-x11/src/auto/x11_surface.rs b/gdk4-x11/src/auto/x11_surface.rs index 6ad89e40cbca..6c9dfbd496c0 100644 --- a/gdk4-x11/src/auto/x11_surface.rs +++ b/gdk4-x11/src/auto/x11_surface.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkX11Surface")] @@ -110,9 +109,3 @@ impl X11Surface { } } } - -impl fmt::Display for X11Surface { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Surface") - } -} diff --git a/gdk4-x11/src/auto/x11gl_context.rs b/gdk4-x11/src/auto/x11gl_context.rs index 1a6bfe2d6246..d6eaf87600bf 100644 --- a/gdk4-x11/src/auto/x11gl_context.rs +++ b/gdk4-x11/src/auto/x11gl_context.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkX11GLContext")] pub struct X11GLContext(Object) @extends gdk::GLContext, gdk::DrawContext; @@ -14,9 +12,3 @@ glib::wrapper! { } impl X11GLContext {} - -impl fmt::Display for X11GLContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11GLContext") - } -} diff --git a/gdk4-x11/src/functions.rs b/gdk4-x11/src/functions.rs index fc4c5a6a2815..385cdc1a4c40 100644 --- a/gdk4-x11/src/functions.rs +++ b/gdk4-x11/src/functions.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +pub use crate::auto::functions::*; use crate::X11Display; use glib::{translate::*, IntoGStr}; diff --git a/gdk4-x11/src/lib.rs b/gdk4-x11/src/lib.rs index 5ef68a54d799..a22d33e18ca1 100644 --- a/gdk4-x11/src/lib.rs +++ b/gdk4-x11/src/lib.rs @@ -30,7 +30,6 @@ mod x11_monitor; mod x11_screen; mod x11_surface; -pub use auto::functions::*; pub use auto::*; pub use functions::*; diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gdk4-x11/sys/versions.txt +++ b/gdk4-x11/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gdk4/src/auto/app_launch_context.rs b/gdk4/src/auto/app_launch_context.rs index 505effd3b46a..c1e77483fc02 100644 --- a/gdk4/src/auto/app_launch_context.rs +++ b/gdk4/src/auto/app_launch_context.rs @@ -4,7 +4,6 @@ use crate::Display; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkAppLaunchContext")] @@ -71,9 +70,3 @@ pub trait GdkAppLaunchContextExt: IsA + sealed::Sealed + 'stat } impl> GdkAppLaunchContextExt for O {} - -impl fmt::Display for AppLaunchContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppLaunchContext") - } -} diff --git a/gdk4/src/auto/button_event.rs b/gdk4/src/auto/button_event.rs index 43945a771768..c9772b6803f3 100644 --- a/gdk4/src/auto/button_event.rs +++ b/gdk4/src/auto/button_event.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkButtonEvent")] @@ -28,9 +27,3 @@ impl ButtonEvent { unsafe { ffi::gdk_button_event_get_button(self.to_glib_none().0) } } } - -impl fmt::Display for ButtonEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ButtonEvent") - } -} diff --git a/gdk4/src/auto/cairo_context.rs b/gdk4/src/auto/cairo_context.rs index 9476f4cb3b20..8b1ac33c55c6 100644 --- a/gdk4/src/auto/cairo_context.rs +++ b/gdk4/src/auto/cairo_context.rs @@ -4,7 +4,6 @@ use crate::DrawContext; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkCairoContext")] @@ -21,9 +20,3 @@ impl CairoContext { unsafe { from_glib_full(ffi::gdk_cairo_context_cairo_create(self.to_glib_none().0)) } } } - -impl fmt::Display for CairoContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("CairoContext") - } -} diff --git a/gdk4/src/auto/clipboard.rs b/gdk4/src/auto/clipboard.rs index 3a12bd44354b..1f86cb649229 100644 --- a/gdk4/src/auto/clipboard.rs +++ b/gdk4/src/auto/clipboard.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GdkClipboard")] @@ -68,7 +68,7 @@ impl Clipboard { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_clipboard_read_text_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -131,7 +131,7 @@ impl Clipboard { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_clipboard_read_texture_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -193,7 +193,7 @@ impl Clipboard { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_clipboard_read_value_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -291,7 +291,7 @@ impl Clipboard { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::gdk_clipboard_store_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) @@ -340,7 +340,7 @@ impl Clipboard { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -363,7 +363,7 @@ impl Clipboard { connect_raw( self.as_ptr() as *mut _, b"notify::content\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_content_trampoline:: as *const (), )), Box_::into_raw(f), @@ -386,7 +386,7 @@ impl Clipboard { connect_raw( self.as_ptr() as *mut _, b"notify::formats\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_formats_trampoline:: as *const (), )), Box_::into_raw(f), @@ -409,7 +409,7 @@ impl Clipboard { connect_raw( self.as_ptr() as *mut _, b"notify::local\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_local_trampoline:: as *const (), )), Box_::into_raw(f), @@ -417,9 +417,3 @@ impl Clipboard { } } } - -impl fmt::Display for Clipboard { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Clipboard") - } -} diff --git a/gdk4/src/auto/content_deserializer.rs b/gdk4/src/auto/content_deserializer.rs index 8b2f389af1ba..788c0df945a1 100644 --- a/gdk4/src/auto/content_deserializer.rs +++ b/gdk4/src/auto/content_deserializer.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkContentDeserializer")] @@ -72,9 +71,3 @@ impl ContentDeserializer { } } } - -impl fmt::Display for ContentDeserializer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ContentDeserializer") - } -} diff --git a/gdk4/src/auto/content_formats.rs b/gdk4/src/auto/content_formats.rs index 37e351f15af7..92e7d9788371 100644 --- a/gdk4/src/auto/content_formats.rs +++ b/gdk4/src/auto/content_formats.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -61,7 +60,7 @@ impl ContentFormats { #[doc(alias = "get_mime_types")] pub fn mime_types(&self) -> Vec { unsafe { - let mut n_mime_types = mem::MaybeUninit::uninit(); + let mut n_mime_types = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_none_num( ffi::gdk_content_formats_get_mime_types( self.to_glib_none().0, @@ -176,9 +175,9 @@ impl ContentFormats { } } -impl fmt::Display for ContentFormats { +impl std::fmt::Display for ContentFormats { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } diff --git a/gdk4/src/auto/content_provider.rs b/gdk4/src/auto/content_provider.rs index 572eb4a136e0..8053b0ffbed9 100644 --- a/gdk4/src/auto/content_provider.rs +++ b/gdk4/src/auto/content_provider.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GdkContentProvider")] @@ -119,7 +119,7 @@ pub trait ContentProviderExt: IsA + sealed::Sealed + 'static { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let _ = ffi::gdk_content_provider_write_mime_type_finish( _source_object as *mut _, res, @@ -187,7 +187,7 @@ pub trait ContentProviderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"content-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( content_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -213,7 +213,7 @@ pub trait ContentProviderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::formats\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_formats_trampoline:: as *const (), )), Box_::into_raw(f), @@ -239,7 +239,7 @@ pub trait ContentProviderExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::storable-formats\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_storable_formats_trampoline:: as *const (), )), Box_::into_raw(f), @@ -249,9 +249,3 @@ pub trait ContentProviderExt: IsA + sealed::Sealed + 'static { } impl> ContentProviderExt for O {} - -impl fmt::Display for ContentProvider { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ContentProvider") - } -} diff --git a/gdk4/src/auto/content_serializer.rs b/gdk4/src/auto/content_serializer.rs index 24cf22614cc4..0d69a86ca5d5 100644 --- a/gdk4/src/auto/content_serializer.rs +++ b/gdk4/src/auto/content_serializer.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkContentSerializer")] @@ -64,9 +63,3 @@ impl ContentSerializer { } } } - -impl fmt::Display for ContentSerializer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ContentSerializer") - } -} diff --git a/gdk4/src/auto/crossing_event.rs b/gdk4/src/auto/crossing_event.rs index a66acbc7860c..74e20c569e7c 100644 --- a/gdk4/src/auto/crossing_event.rs +++ b/gdk4/src/auto/crossing_event.rs @@ -4,7 +4,6 @@ use crate::{CrossingMode, NotifyType}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkCrossingEvent")] @@ -41,9 +40,3 @@ impl CrossingEvent { unsafe { from_glib(ffi::gdk_crossing_event_get_mode(self.to_glib_none().0)) } } } - -impl fmt::Display for CrossingEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("CrossingEvent") - } -} diff --git a/gdk4/src/auto/cursor.rs b/gdk4/src/auto/cursor.rs index a31b878d112a..72ae9db76bbb 100644 --- a/gdk4/src/auto/cursor.rs +++ b/gdk4/src/auto/cursor.rs @@ -4,7 +4,6 @@ use crate::Texture; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkCursor")] @@ -140,9 +139,3 @@ impl CursorBuilder { self.builder.build() } } - -impl fmt::Display for Cursor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Cursor") - } -} diff --git a/gdk4/src/auto/delete_event.rs b/gdk4/src/auto/delete_event.rs index f818dab8c7d0..0ce292e13ea8 100644 --- a/gdk4/src/auto/delete_event.rs +++ b/gdk4/src/auto/delete_event.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkDeleteEvent")] @@ -22,9 +21,3 @@ impl glib::StaticType for DeleteEvent { } impl DeleteEvent {} - -impl fmt::Display for DeleteEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DeleteEvent") - } -} diff --git a/gdk4/src/auto/device.rs b/gdk4/src/auto/device.rs index 89887e9c6ec1..477e249405fa 100644 --- a/gdk4/src/auto/device.rs +++ b/gdk4/src/auto/device.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkDevice")] @@ -23,9 +23,9 @@ impl Device { pub const NONE: Option<&'static Device> = None; } -impl fmt::Display for Device { +impl std::fmt::Display for Device { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&DeviceExt::name(self)) } } @@ -150,8 +150,8 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_surface_at_position")] fn surface_at_position(&self) -> (Option, f64, f64) { unsafe { - let mut win_x = mem::MaybeUninit::uninit(); - let mut win_y = mem::MaybeUninit::uninit(); + let mut win_x = std::mem::MaybeUninit::uninit(); + let mut win_y = std::mem::MaybeUninit::uninit(); let ret = from_glib_none(ffi::gdk_device_get_surface_at_position( self.as_ref().to_glib_none().0, win_x.as_mut_ptr(), @@ -211,7 +211,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -240,7 +240,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"tool-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( tool_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -266,7 +266,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::caps-lock-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_caps_lock_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -289,7 +289,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::direction\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_direction_trampoline:: as *const (), )), Box_::into_raw(f), @@ -315,7 +315,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::has-bidi-layouts\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_has_bidi_layouts_trampoline:: as *const (), )), Box_::into_raw(f), @@ -341,7 +341,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::modifier-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_modifier_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -364,7 +364,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::n-axes\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_n_axes_trampoline:: as *const (), )), Box_::into_raw(f), @@ -390,7 +390,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::num-lock-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_num_lock_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -416,7 +416,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::scroll-lock-state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_scroll_lock_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -439,7 +439,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::seat\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_seat_trampoline:: as *const (), )), Box_::into_raw(f), @@ -462,7 +462,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::tool\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_tool_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gdk4/src/auto/device_pad.rs b/gdk4/src/auto/device_pad.rs index eb1f5b249554..3f80e4b2f674 100644 --- a/gdk4/src/auto/device_pad.rs +++ b/gdk4/src/auto/device_pad.rs @@ -4,7 +4,6 @@ use crate::{Device, DevicePadFeature}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkDevicePad")] @@ -59,9 +58,3 @@ pub trait DevicePadExt: IsA + sealed::Sealed + 'static { } impl> DevicePadExt for O {} - -impl fmt::Display for DevicePad { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DevicePad") - } -} diff --git a/gdk4/src/auto/device_tool.rs b/gdk4/src/auto/device_tool.rs index 5415302ad407..05e86d012085 100644 --- a/gdk4/src/auto/device_tool.rs +++ b/gdk4/src/auto/device_tool.rs @@ -4,7 +4,6 @@ use crate::{AxisFlags, DeviceToolType}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkDeviceTool")] @@ -40,9 +39,3 @@ impl DeviceTool { unsafe { from_glib(ffi::gdk_device_tool_get_tool_type(self.to_glib_none().0)) } } } - -impl fmt::Display for DeviceTool { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DeviceTool") - } -} diff --git a/gdk4/src/auto/display.rs b/gdk4/src/auto/display.rs index 2615a582bdd0..80fd3c5318ef 100644 --- a/gdk4/src/auto/display.rs +++ b/gdk4/src/auto/display.rs @@ -12,10 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v4_4")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))] -use std::ptr; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkDisplay")] @@ -44,9 +41,9 @@ impl Display { } } -impl fmt::Display for Display { +impl std::fmt::Display for Display { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&DisplayExt::name(self)) } } @@ -76,7 +73,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gdk_display_create_gl_context")] fn create_gl_context(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_display_create_gl_context(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { @@ -228,7 +225,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gdk_display_prepare_gl")] fn prepare_gl(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gdk_display_prepare_gl(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -290,7 +287,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"closed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( closed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -312,7 +309,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"opened\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( opened_trampoline:: as *const (), )), Box_::into_raw(f), @@ -338,7 +335,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"seat-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( seat_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -367,7 +364,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"seat-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( seat_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -396,7 +393,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"setting-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( setting_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -419,7 +416,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::composited\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_composited_trampoline:: as *const (), )), Box_::into_raw(f), @@ -445,7 +442,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::input-shapes\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_input_shapes_trampoline:: as *const (), )), Box_::into_raw(f), @@ -468,7 +465,7 @@ pub trait DisplayExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::rgba\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_rgba_trampoline:: as *const (), )), Box_::into_raw(f), diff --git a/gdk4/src/auto/display_manager.rs b/gdk4/src/auto/display_manager.rs index 242bb593ee04..fe243742b42c 100644 --- a/gdk4/src/auto/display_manager.rs +++ b/gdk4/src/auto/display_manager.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkDisplayManager")] @@ -85,7 +85,7 @@ impl DisplayManager { connect_raw( self.as_ptr() as *mut _, b"display-opened\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( display_opened_trampoline:: as *const (), )), Box_::into_raw(f), @@ -108,7 +108,7 @@ impl DisplayManager { connect_raw( self.as_ptr() as *mut _, b"notify::default-display\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_default_display_trampoline:: as *const (), )), Box_::into_raw(f), @@ -116,9 +116,3 @@ impl DisplayManager { } } } - -impl fmt::Display for DisplayManager { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DisplayManager") - } -} diff --git a/gdk4/src/auto/dnd_event.rs b/gdk4/src/auto/dnd_event.rs index 7be53ab2dcc4..d216814a28d8 100644 --- a/gdk4/src/auto/dnd_event.rs +++ b/gdk4/src/auto/dnd_event.rs @@ -4,7 +4,6 @@ use crate::Drop; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkDNDEvent")] @@ -29,9 +28,3 @@ impl DNDEvent { unsafe { from_glib_none(ffi::gdk_dnd_event_get_drop(self.to_glib_none().0)) } } } - -impl fmt::Display for DNDEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DNDEvent") - } -} diff --git a/gdk4/src/auto/drag.rs b/gdk4/src/auto/drag.rs index 94834d70624f..827a819bb11f 100644 --- a/gdk4/src/auto/drag.rs +++ b/gdk4/src/auto/drag.rs @@ -10,7 +10,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkDrag")] @@ -153,7 +153,7 @@ pub trait DragExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"cancel\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( cancel_trampoline:: as *const (), )), Box_::into_raw(f), @@ -175,7 +175,7 @@ pub trait DragExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"dnd-finished\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( dnd_finished_trampoline:: as *const (), )), Box_::into_raw(f), @@ -197,7 +197,7 @@ pub trait DragExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"drop-performed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( drop_performed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -220,7 +220,7 @@ pub trait DragExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::actions\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_actions_trampoline:: as *const (), )), Box_::into_raw(f), @@ -243,7 +243,7 @@ pub trait DragExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::display\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_display_trampoline:: as *const (), )), Box_::into_raw(f), @@ -269,7 +269,7 @@ pub trait DragExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::selected-action\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_selected_action_trampoline:: as *const (), )), Box_::into_raw(f), @@ -279,9 +279,3 @@ pub trait DragExt: IsA + sealed::Sealed + 'static { } impl> DragExt for O {} - -impl fmt::Display for Drag { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Drag") - } -} diff --git a/gdk4/src/auto/drag_surface.rs b/gdk4/src/auto/drag_surface.rs index 8a48945c8b8d..f3103bf6ebc3 100644 --- a/gdk4/src/auto/drag_surface.rs +++ b/gdk4/src/auto/drag_surface.rs @@ -4,7 +4,6 @@ use crate::Surface; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkDragSurface")] @@ -38,9 +37,3 @@ pub trait DragSurfaceExt: IsA + sealed::Sealed + 'static { } impl> DragSurfaceExt for O {} - -impl fmt::Display for DragSurface { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DragSurface") - } -} diff --git a/gdk4/src/auto/draw_context.rs b/gdk4/src/auto/draw_context.rs index 4d5809e09190..f61eb7e33004 100644 --- a/gdk4/src/auto/draw_context.rs +++ b/gdk4/src/auto/draw_context.rs @@ -4,7 +4,6 @@ use crate::{Display, Surface}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkDrawContext")] @@ -73,9 +72,3 @@ pub trait DrawContextExt: IsA + sealed::Sealed + 'static { } impl> DrawContextExt for O {} - -impl fmt::Display for DrawContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DrawContext") - } -} diff --git a/gdk4/src/auto/drop.rs b/gdk4/src/auto/drop.rs index 55cb3b86f8e0..6de7081383ac 100644 --- a/gdk4/src/auto/drop.rs +++ b/gdk4/src/auto/drop.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GdkDrop")] @@ -90,7 +90,7 @@ impl Drop { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_drop_read_value_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_none(ret)) @@ -154,7 +154,7 @@ impl Drop { connect_raw( self.as_ptr() as *mut _, b"notify::display\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_display_trampoline:: as *const (), )), Box_::into_raw(f), @@ -162,9 +162,3 @@ impl Drop { } } } - -impl fmt::Display for Drop { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Drop") - } -} diff --git a/gdk4/src/auto/enums.rs b/gdk4/src/auto/enums.rs index 0f171e3c7a45..a3a902cdc52c 100644 --- a/gdk4/src/auto/enums.rs +++ b/gdk4/src/auto/enums.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -37,30 +36,6 @@ pub enum AxisUse { __Unknown(i32), } -impl fmt::Display for AxisUse { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "AxisUse::{}", - match *self { - Self::Ignore => "Ignore", - Self::X => "X", - Self::Y => "Y", - Self::DeltaX => "DeltaX", - Self::DeltaY => "DeltaY", - Self::Pressure => "Pressure", - Self::Xtilt => "Xtilt", - Self::Ytilt => "Ytilt", - Self::Wheel => "Wheel", - Self::Distance => "Distance", - Self::Rotation => "Rotation", - Self::Slider => "Slider", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for AxisUse { type GlibType = ffi::GdkAxisUse; @@ -111,6 +86,7 @@ impl FromGlib for AxisUse { impl StaticType for AxisUse { #[inline] + #[doc(alias = "gdk_axis_use_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_axis_use_get_type()) } } @@ -122,7 +98,7 @@ impl glib::HasParamSpec for AxisUse { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -190,27 +166,6 @@ pub enum CrossingMode { __Unknown(i32), } -impl fmt::Display for CrossingMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "CrossingMode::{}", - match *self { - Self::Normal => "Normal", - Self::Grab => "Grab", - Self::Ungrab => "Ungrab", - Self::GtkGrab => "GtkGrab", - Self::GtkUngrab => "GtkUngrab", - Self::StateChanged => "StateChanged", - Self::TouchBegin => "TouchBegin", - Self::TouchEnd => "TouchEnd", - Self::DeviceSwitch => "DeviceSwitch", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for CrossingMode { type GlibType = ffi::GdkCrossingMode; @@ -255,6 +210,7 @@ impl FromGlib for CrossingMode { impl StaticType for CrossingMode { #[inline] + #[doc(alias = "gdk_crossing_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_crossing_mode_get_type()) } } @@ -266,7 +222,7 @@ impl glib::HasParamSpec for CrossingMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -322,21 +278,6 @@ pub enum DevicePadFeature { __Unknown(i32), } -impl fmt::Display for DevicePadFeature { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DevicePadFeature::{}", - match *self { - Self::Button => "Button", - Self::Ring => "Ring", - Self::Strip => "Strip", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DevicePadFeature { type GlibType = ffi::GdkDevicePadFeature; @@ -369,6 +310,7 @@ impl FromGlib for DevicePadFeature { impl StaticType for DevicePadFeature { #[inline] + #[doc(alias = "gdk_device_pad_feature_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_device_pad_feature_get_type()) } } @@ -380,7 +322,7 @@ impl glib::HasParamSpec for DevicePadFeature { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -446,26 +388,6 @@ pub enum DeviceToolType { __Unknown(i32), } -impl fmt::Display for DeviceToolType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DeviceToolType::{}", - match *self { - Self::Unknown => "Unknown", - Self::Pen => "Pen", - Self::Eraser => "Eraser", - Self::Brush => "Brush", - Self::Pencil => "Pencil", - Self::Airbrush => "Airbrush", - Self::Mouse => "Mouse", - Self::Lens => "Lens", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DeviceToolType { type GlibType = ffi::GdkDeviceToolType; @@ -508,6 +430,7 @@ impl FromGlib for DeviceToolType { impl StaticType for DeviceToolType { #[inline] + #[doc(alias = "gdk_device_tool_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_device_tool_type_get_type()) } } @@ -519,7 +442,7 @@ impl glib::HasParamSpec for DeviceToolType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -575,21 +498,6 @@ pub enum DragCancelReason { __Unknown(i32), } -impl fmt::Display for DragCancelReason { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DragCancelReason::{}", - match *self { - Self::NoTarget => "NoTarget", - Self::UserCancelled => "UserCancelled", - Self::Error => "Error", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DragCancelReason { type GlibType = ffi::GdkDragCancelReason; @@ -622,6 +530,7 @@ impl FromGlib for DragCancelReason { impl StaticType for DragCancelReason { #[inline] + #[doc(alias = "gdk_drag_cancel_reason_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_drag_cancel_reason_get_type()) } } @@ -633,7 +542,7 @@ impl glib::HasParamSpec for DragCancelReason { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -743,48 +652,6 @@ pub enum EventType { __Unknown(i32), } -impl fmt::Display for EventType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "EventType::{}", - match *self { - Self::Delete => "Delete", - Self::MotionNotify => "MotionNotify", - Self::ButtonPress => "ButtonPress", - Self::ButtonRelease => "ButtonRelease", - Self::KeyPress => "KeyPress", - Self::KeyRelease => "KeyRelease", - Self::EnterNotify => "EnterNotify", - Self::LeaveNotify => "LeaveNotify", - Self::FocusChange => "FocusChange", - Self::ProximityIn => "ProximityIn", - Self::ProximityOut => "ProximityOut", - Self::DragEnter => "DragEnter", - Self::DragLeave => "DragLeave", - Self::DragMotion => "DragMotion", - Self::DropStart => "DropStart", - Self::Scroll => "Scroll", - Self::GrabBroken => "GrabBroken", - Self::TouchBegin => "TouchBegin", - Self::TouchUpdate => "TouchUpdate", - Self::TouchEnd => "TouchEnd", - Self::TouchCancel => "TouchCancel", - Self::TouchpadSwipe => "TouchpadSwipe", - Self::TouchpadPinch => "TouchpadPinch", - Self::PadButtonPress => "PadButtonPress", - Self::PadButtonRelease => "PadButtonRelease", - Self::PadRing => "PadRing", - Self::PadStrip => "PadStrip", - Self::PadGroupMode => "PadGroupMode", - #[cfg(feature = "v4_8")] - Self::TouchpadHold => "TouchpadHold", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for EventType { type GlibType = ffi::GdkEventType; @@ -869,6 +736,7 @@ impl FromGlib for EventType { impl StaticType for EventType { #[inline] + #[doc(alias = "gdk_event_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_event_type_get_type()) } } @@ -880,7 +748,7 @@ impl glib::HasParamSpec for EventType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -934,20 +802,6 @@ pub enum FullscreenMode { __Unknown(i32), } -impl fmt::Display for FullscreenMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FullscreenMode::{}", - match *self { - Self::CurrentMonitor => "CurrentMonitor", - Self::AllMonitors => "AllMonitors", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FullscreenMode { type GlibType = ffi::GdkFullscreenMode; @@ -978,6 +832,7 @@ impl FromGlib for FullscreenMode { impl StaticType for FullscreenMode { #[inline] + #[doc(alias = "gdk_fullscreen_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_fullscreen_mode_get_type()) } } @@ -989,7 +844,7 @@ impl glib::HasParamSpec for FullscreenMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1049,23 +904,6 @@ pub enum GLError { __Unknown(i32), } -impl fmt::Display for GLError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "GLError::{}", - match *self { - Self::NotAvailable => "NotAvailable", - Self::UnsupportedFormat => "UnsupportedFormat", - Self::UnsupportedProfile => "UnsupportedProfile", - Self::CompilationFailed => "CompilationFailed", - Self::LinkFailed => "LinkFailed", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for GLError { type GlibType = ffi::GdkGLError; @@ -1125,6 +963,7 @@ impl glib::error::ErrorDomain for GLError { impl StaticType for GLError { #[inline] + #[doc(alias = "gdk_gl_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_gl_error_get_type()) } } @@ -1136,7 +975,7 @@ impl glib::HasParamSpec for GLError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1206,28 +1045,6 @@ pub enum Gravity { __Unknown(i32), } -impl fmt::Display for Gravity { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Gravity::{}", - match *self { - Self::NorthWest => "NorthWest", - Self::North => "North", - Self::NorthEast => "NorthEast", - Self::West => "West", - Self::Center => "Center", - Self::East => "East", - Self::SouthWest => "SouthWest", - Self::South => "South", - Self::SouthEast => "SouthEast", - Self::Static => "Static", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Gravity { type GlibType = ffi::GdkGravity; @@ -1274,6 +1091,7 @@ impl FromGlib for Gravity { impl StaticType for Gravity { #[inline] + #[doc(alias = "gdk_gravity_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_gravity_get_type()) } } @@ -1285,7 +1103,7 @@ impl glib::HasParamSpec for Gravity { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1349,25 +1167,6 @@ pub enum InputSource { __Unknown(i32), } -impl fmt::Display for InputSource { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "InputSource::{}", - match *self { - Self::Mouse => "Mouse", - Self::Pen => "Pen", - Self::Keyboard => "Keyboard", - Self::Touchscreen => "Touchscreen", - Self::Touchpad => "Touchpad", - Self::Trackpoint => "Trackpoint", - Self::TabletPad => "TabletPad", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for InputSource { type GlibType = ffi::GdkInputSource; @@ -1408,6 +1207,7 @@ impl FromGlib for InputSource { impl StaticType for InputSource { #[inline] + #[doc(alias = "gdk_input_source_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_input_source_get_type()) } } @@ -1419,7 +1219,7 @@ impl glib::HasParamSpec for InputSource { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1475,21 +1275,6 @@ pub enum KeyMatch { __Unknown(i32), } -impl fmt::Display for KeyMatch { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "KeyMatch::{}", - match *self { - Self::None => "None", - Self::Partial => "Partial", - Self::Exact => "Exact", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for KeyMatch { type GlibType = ffi::GdkKeyMatch; @@ -1522,6 +1307,7 @@ impl FromGlib for KeyMatch { impl StaticType for KeyMatch { #[inline] + #[doc(alias = "gdk_key_match_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_key_match_get_type()) } } @@ -1533,7 +1319,7 @@ impl glib::HasParamSpec for KeyMatch { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1677,65 +1463,6 @@ pub enum MemoryFormat { __Unknown(i32), } -impl fmt::Display for MemoryFormat { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "MemoryFormat::{}", - match *self { - Self::B8g8r8a8Premultiplied => "B8g8r8a8Premultiplied", - Self::A8r8g8b8Premultiplied => "A8r8g8b8Premultiplied", - Self::R8g8b8a8Premultiplied => "R8g8b8a8Premultiplied", - Self::B8g8r8a8 => "B8g8r8a8", - Self::A8r8g8b8 => "A8r8g8b8", - Self::R8g8b8a8 => "R8g8b8a8", - Self::A8b8g8r8 => "A8b8g8r8", - Self::R8g8b8 => "R8g8b8", - Self::B8g8r8 => "B8g8r8", - #[cfg(feature = "v4_6")] - Self::R16g16b16 => "R16g16b16", - #[cfg(feature = "v4_6")] - Self::R16g16b16a16Premultiplied => "R16g16b16a16Premultiplied", - #[cfg(feature = "v4_6")] - Self::R16g16b16a16 => "R16g16b16a16", - #[cfg(feature = "v4_6")] - Self::R16g16b16Float => "R16g16b16Float", - #[cfg(feature = "v4_6")] - Self::R16g16b16a16FloatPremultiplied => "R16g16b16a16FloatPremultiplied", - #[cfg(feature = "v4_6")] - Self::R16g16b16a16Float => "R16g16b16a16Float", - #[cfg(feature = "v4_6")] - Self::R32g32b32Float => "R32g32b32Float", - #[cfg(feature = "v4_6")] - Self::R32g32b32a32FloatPremultiplied => "R32g32b32a32FloatPremultiplied", - #[cfg(feature = "v4_6")] - Self::R32g32b32a32Float => "R32g32b32a32Float", - #[cfg(feature = "v4_12")] - Self::G8a8Premultiplied => "G8a8Premultiplied", - #[cfg(feature = "v4_12")] - Self::G8a8 => "G8a8", - #[cfg(feature = "v4_12")] - Self::G8 => "G8", - #[cfg(feature = "v4_12")] - Self::G16a16Premultiplied => "G16a16Premultiplied", - #[cfg(feature = "v4_12")] - Self::G16a16 => "G16a16", - #[cfg(feature = "v4_12")] - Self::G16 => "G16", - #[cfg(feature = "v4_12")] - Self::A8 => "A8", - #[cfg(feature = "v4_12")] - Self::A16 => "A16", - #[cfg(feature = "v4_12")] - Self::A16Float => "A16Float", - #[cfg(feature = "v4_12")] - Self::A32Float => "A32Float", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for MemoryFormat { type GlibType = ffi::GdkMemoryFormat; @@ -1862,6 +1589,7 @@ impl FromGlib for MemoryFormat { impl StaticType for MemoryFormat { #[inline] + #[doc(alias = "gdk_memory_format_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_memory_format_get_type()) } } @@ -1873,7 +1601,7 @@ impl glib::HasParamSpec for MemoryFormat { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1935,24 +1663,6 @@ pub enum NotifyType { __Unknown(i32), } -impl fmt::Display for NotifyType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "NotifyType::{}", - match *self { - Self::Ancestor => "Ancestor", - Self::Virtual => "Virtual", - Self::Inferior => "Inferior", - Self::Nonlinear => "Nonlinear", - Self::NonlinearVirtual => "NonlinearVirtual", - Self::Unknown => "Unknown", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for NotifyType { type GlibType = ffi::GdkNotifyType; @@ -1991,6 +1701,7 @@ impl FromGlib for NotifyType { impl StaticType for NotifyType { #[inline] + #[doc(alias = "gdk_notify_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_notify_type_get_type()) } } @@ -2002,7 +1713,7 @@ impl glib::HasParamSpec for NotifyType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2062,23 +1773,6 @@ pub enum ScrollDirection { __Unknown(i32), } -impl fmt::Display for ScrollDirection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ScrollDirection::{}", - match *self { - Self::Up => "Up", - Self::Down => "Down", - Self::Left => "Left", - Self::Right => "Right", - Self::Smooth => "Smooth", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ScrollDirection { type GlibType = ffi::GdkScrollDirection; @@ -2115,6 +1809,7 @@ impl FromGlib for ScrollDirection { impl StaticType for ScrollDirection { #[inline] + #[doc(alias = "gdk_scroll_direction_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_scroll_direction_get_type()) } } @@ -2126,7 +1821,7 @@ impl glib::HasParamSpec for ScrollDirection { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2182,22 +1877,6 @@ pub enum ScrollUnit { __Unknown(i32), } -#[cfg(feature = "v4_8")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] -impl fmt::Display for ScrollUnit { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ScrollUnit::{}", - match *self { - Self::Wheel => "Wheel", - Self::Surface => "Surface", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] #[doc(hidden)] @@ -2234,6 +1913,7 @@ impl FromGlib for ScrollUnit { #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] impl StaticType for ScrollUnit { #[inline] + #[doc(alias = "gdk_scroll_unit_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_scroll_unit_get_type()) } } @@ -2247,7 +1927,7 @@ impl glib::HasParamSpec for ScrollUnit { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2317,24 +1997,6 @@ pub enum SubpixelLayout { __Unknown(i32), } -impl fmt::Display for SubpixelLayout { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SubpixelLayout::{}", - match *self { - Self::Unknown => "Unknown", - Self::None => "None", - Self::HorizontalRgb => "HorizontalRgb", - Self::HorizontalBgr => "HorizontalBgr", - Self::VerticalRgb => "VerticalRgb", - Self::VerticalBgr => "VerticalBgr", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SubpixelLayout { type GlibType = ffi::GdkSubpixelLayout; @@ -2373,6 +2035,7 @@ impl FromGlib for SubpixelLayout { impl StaticType for SubpixelLayout { #[inline] + #[doc(alias = "gdk_subpixel_layout_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_subpixel_layout_get_type()) } } @@ -2384,7 +2047,7 @@ impl glib::HasParamSpec for SubpixelLayout { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2450,26 +2113,6 @@ pub enum SurfaceEdge { __Unknown(i32), } -impl fmt::Display for SurfaceEdge { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SurfaceEdge::{}", - match *self { - Self::NorthWest => "NorthWest", - Self::North => "North", - Self::NorthEast => "NorthEast", - Self::West => "West", - Self::East => "East", - Self::SouthWest => "SouthWest", - Self::South => "South", - Self::SouthEast => "SouthEast", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SurfaceEdge { type GlibType = ffi::GdkSurfaceEdge; @@ -2512,6 +2155,7 @@ impl FromGlib for SurfaceEdge { impl StaticType for SurfaceEdge { #[inline] + #[doc(alias = "gdk_surface_edge_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_surface_edge_get_type()) } } @@ -2523,7 +2167,7 @@ impl glib::HasParamSpec for SurfaceEdge { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2583,24 +2227,6 @@ pub enum TextureError { __Unknown(i32), } -#[cfg(feature = "v4_6")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))] -impl fmt::Display for TextureError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TextureError::{}", - match *self { - Self::TooLarge => "TooLarge", - Self::CorruptImage => "CorruptImage", - Self::UnsupportedContent => "UnsupportedContent", - Self::UnsupportedFormat => "UnsupportedFormat", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_6")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))] #[doc(hidden)] @@ -2666,6 +2292,7 @@ impl glib::error::ErrorDomain for TextureError { #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))] impl StaticType for TextureError { #[inline] + #[doc(alias = "gdk_texture_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_texture_error_get_type()) } } @@ -2679,7 +2306,7 @@ impl glib::HasParamSpec for TextureError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2745,23 +2372,6 @@ pub enum TitlebarGesture { __Unknown(i32), } -#[cfg(feature = "v4_4")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))] -impl fmt::Display for TitlebarGesture { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TitlebarGesture::{}", - match *self { - Self::DoubleClick => "DoubleClick", - Self::RightClick => "RightClick", - Self::MiddleClick => "MiddleClick", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_4")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))] #[doc(hidden)] @@ -2800,6 +2410,7 @@ impl FromGlib for TitlebarGesture { #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))] impl StaticType for TitlebarGesture { #[inline] + #[doc(alias = "gdk_titlebar_gesture_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_titlebar_gesture_get_type()) } } @@ -2813,7 +2424,7 @@ impl glib::HasParamSpec for TitlebarGesture { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2879,22 +2490,6 @@ pub enum TouchpadGesturePhase { __Unknown(i32), } -impl fmt::Display for TouchpadGesturePhase { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TouchpadGesturePhase::{}", - match *self { - Self::Begin => "Begin", - Self::Update => "Update", - Self::End => "End", - Self::Cancel => "Cancel", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TouchpadGesturePhase { type GlibType = ffi::GdkTouchpadGesturePhase; @@ -2929,6 +2524,7 @@ impl FromGlib for TouchpadGesturePhase { impl StaticType for TouchpadGesturePhase { #[inline] + #[doc(alias = "gdk_touchpad_gesture_phase_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_touchpad_gesture_phase_get_type()) } } @@ -2940,7 +2536,7 @@ impl glib::HasParamSpec for TouchpadGesturePhase { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -2994,20 +2590,6 @@ pub enum VulkanError { __Unknown(i32), } -impl fmt::Display for VulkanError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "VulkanError::{}", - match *self { - Self::Unsupported => "Unsupported", - Self::NotAvailable => "NotAvailable", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for VulkanError { type GlibType = ffi::GdkVulkanError; @@ -3061,6 +2643,7 @@ impl glib::error::ErrorDomain for VulkanError { impl StaticType for VulkanError { #[inline] + #[doc(alias = "gdk_vulkan_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_vulkan_error_get_type()) } } @@ -3072,7 +2655,7 @@ impl glib::HasParamSpec for VulkanError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gdk4/src/auto/event.rs b/gdk4/src/auto/event.rs index faf17386e971..8901b4c1f667 100644 --- a/gdk4/src/auto/event.rs +++ b/gdk4/src/auto/event.rs @@ -7,7 +7,6 @@ use crate::{ TimeCoord, }; use glib::translate::*; -use std::{fmt, mem, ptr}; glib::wrapper! { #[doc(alias = "GdkEvent")] @@ -32,8 +31,8 @@ impl Event { #[doc(alias = "get_axes")] pub fn axes(&self) -> Option> { unsafe { - let mut axes = ptr::null_mut(); - let mut n_axes = mem::MaybeUninit::uninit(); + let mut axes = std::ptr::null_mut(); + let mut n_axes = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_event_get_axes( self.as_ref().to_glib_none().0, &mut axes, @@ -54,7 +53,7 @@ impl Event { #[doc(alias = "get_axis")] pub fn axis(&self, axis_use: AxisUse) -> Option { unsafe { - let mut value = mem::MaybeUninit::uninit(); + let mut value = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_event_get_axis( self.as_ref().to_glib_none().0, axis_use.into_glib(), @@ -114,7 +113,7 @@ impl Event { #[doc(alias = "get_history")] pub fn history(&self) -> Vec { unsafe { - let mut out_n_coords = mem::MaybeUninit::uninit(); + let mut out_n_coords = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_container_num( ffi::gdk_event_get_history( self.as_ref().to_glib_none().0, @@ -150,8 +149,8 @@ impl Event { #[doc(alias = "get_position")] pub fn position(&self) -> Option<(f64, f64)> { unsafe { - let mut x = mem::MaybeUninit::uninit(); - let mut y = mem::MaybeUninit::uninit(); + let mut x = std::mem::MaybeUninit::uninit(); + let mut y = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_event_get_position( self.as_ref().to_glib_none().0, x.as_mut_ptr(), @@ -192,9 +191,3 @@ impl Event { } } } - -impl fmt::Display for Event { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Event") - } -} diff --git a/gdk4/src/auto/flags.rs b/gdk4/src/auto/flags.rs index 40cbc075d68c..fd95e8eb7313 100644 --- a/gdk4/src/auto/flags.rs +++ b/gdk4/src/auto/flags.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*}; -use std::fmt; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] @@ -30,12 +29,6 @@ bitflags! { } } -impl fmt::Display for AnchorHints { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for AnchorHints { type GlibType = ffi::GdkAnchorHints; @@ -57,6 +50,7 @@ impl FromGlib for AnchorHints { impl StaticType for AnchorHints { #[inline] + #[doc(alias = "gdk_anchor_hints_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_anchor_hints_get_type()) } } @@ -68,7 +62,7 @@ impl glib::HasParamSpec for AnchorHints { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -139,12 +133,6 @@ bitflags! { } } -impl fmt::Display for AxisFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for AxisFlags { type GlibType = ffi::GdkAxisFlags; @@ -166,6 +154,7 @@ impl FromGlib for AxisFlags { impl StaticType for AxisFlags { #[inline] + #[doc(alias = "gdk_axis_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_axis_flags_get_type()) } } @@ -177,7 +166,7 @@ impl glib::HasParamSpec for AxisFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -242,12 +231,6 @@ impl DragAction { } } -impl fmt::Display for DragAction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for DragAction { type GlibType = ffi::GdkDragAction; @@ -269,6 +252,7 @@ impl FromGlib for DragAction { impl StaticType for DragAction { #[inline] + #[doc(alias = "gdk_drag_action_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_drag_action_get_type()) } } @@ -280,7 +264,7 @@ impl glib::HasParamSpec for DragAction { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -345,12 +329,6 @@ bitflags! { } } -impl fmt::Display for FrameClockPhase { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FrameClockPhase { type GlibType = ffi::GdkFrameClockPhase; @@ -372,6 +350,7 @@ impl FromGlib for FrameClockPhase { impl StaticType for FrameClockPhase { #[inline] + #[doc(alias = "gdk_frame_clock_phase_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_frame_clock_phase_get_type()) } } @@ -383,7 +362,7 @@ impl glib::HasParamSpec for FrameClockPhase { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -438,14 +417,6 @@ bitflags! { } } -#[cfg(feature = "v4_6")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))] -impl fmt::Display for GLAPI { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[cfg(feature = "v4_6")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))] #[doc(hidden)] @@ -473,6 +444,7 @@ impl FromGlib for GLAPI { #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))] impl StaticType for GLAPI { #[inline] + #[doc(alias = "gdk_gl_api_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_gl_api_get_type()) } } @@ -486,7 +458,7 @@ impl glib::HasParamSpec for GLAPI { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -567,12 +539,6 @@ bitflags! { } } -impl fmt::Display for ModifierType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for ModifierType { type GlibType = ffi::GdkModifierType; @@ -594,6 +560,7 @@ impl FromGlib for ModifierType { impl StaticType for ModifierType { #[inline] + #[doc(alias = "gdk_modifier_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_modifier_type_get_type()) } } @@ -605,7 +572,7 @@ impl glib::HasParamSpec for ModifierType { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -658,12 +625,6 @@ bitflags! { } } -impl fmt::Display for PaintableFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for PaintableFlags { type GlibType = ffi::GdkPaintableFlags; @@ -685,6 +646,7 @@ impl FromGlib for PaintableFlags { impl StaticType for PaintableFlags { #[inline] + #[doc(alias = "gdk_paintable_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_paintable_flags_get_type()) } } @@ -696,7 +658,7 @@ impl glib::HasParamSpec for PaintableFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -761,12 +723,6 @@ bitflags! { } } -impl fmt::Display for SeatCapabilities { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for SeatCapabilities { type GlibType = ffi::GdkSeatCapabilities; @@ -788,6 +744,7 @@ impl FromGlib for SeatCapabilities { impl StaticType for SeatCapabilities { #[inline] + #[doc(alias = "gdk_seat_capabilities_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_seat_capabilities_get_type()) } } @@ -799,7 +756,7 @@ impl glib::HasParamSpec for SeatCapabilities { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -884,12 +841,6 @@ bitflags! { } } -impl fmt::Display for ToplevelState { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for ToplevelState { type GlibType = ffi::GdkToplevelState; @@ -911,6 +862,7 @@ impl FromGlib for ToplevelState { impl StaticType for ToplevelState { #[inline] + #[doc(alias = "gdk_toplevel_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_toplevel_state_get_type()) } } @@ -922,7 +874,7 @@ impl glib::HasParamSpec for ToplevelState { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gdk4/src/auto/focus_event.rs b/gdk4/src/auto/focus_event.rs index 40ba282e4893..eee5f4747cad 100644 --- a/gdk4/src/auto/focus_event.rs +++ b/gdk4/src/auto/focus_event.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkFocusEvent")] @@ -28,9 +27,3 @@ impl FocusEvent { unsafe { from_glib(ffi::gdk_focus_event_get_in(self.to_glib_none().0)) } } } - -impl fmt::Display for FocusEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FocusEvent") - } -} diff --git a/gdk4/src/auto/frame_clock.rs b/gdk4/src/auto/frame_clock.rs index e8c830b0c1d0..7dfef3801203 100644 --- a/gdk4/src/auto/frame_clock.rs +++ b/gdk4/src/auto/frame_clock.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkFrameClock")] @@ -72,8 +72,8 @@ impl FrameClock { #[doc(alias = "get_refresh_info")] pub fn refresh_info(&self, base_time: i64) -> (i64, i64) { unsafe { - let mut refresh_interval_return = mem::MaybeUninit::uninit(); - let mut presentation_time_return = mem::MaybeUninit::uninit(); + let mut refresh_interval_return = std::mem::MaybeUninit::uninit(); + let mut presentation_time_return = std::mem::MaybeUninit::uninit(); ffi::gdk_frame_clock_get_refresh_info( self.to_glib_none().0, base_time, @@ -119,7 +119,7 @@ impl FrameClock { connect_raw( self.as_ptr() as *mut _, b"after-paint\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( after_paint_trampoline:: as *const (), )), Box_::into_raw(f), @@ -141,7 +141,7 @@ impl FrameClock { connect_raw( self.as_ptr() as *mut _, b"before-paint\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( before_paint_trampoline:: as *const (), )), Box_::into_raw(f), @@ -163,7 +163,7 @@ impl FrameClock { connect_raw( self.as_ptr() as *mut _, b"flush-events\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( flush_events_trampoline:: as *const (), )), Box_::into_raw(f), @@ -185,7 +185,7 @@ impl FrameClock { connect_raw( self.as_ptr() as *mut _, b"layout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( layout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -207,7 +207,7 @@ impl FrameClock { connect_raw( self.as_ptr() as *mut _, b"paint\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( paint_trampoline:: as *const (), )), Box_::into_raw(f), @@ -229,7 +229,7 @@ impl FrameClock { connect_raw( self.as_ptr() as *mut _, b"resume-events\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( resume_events_trampoline:: as *const (), )), Box_::into_raw(f), @@ -251,7 +251,7 @@ impl FrameClock { connect_raw( self.as_ptr() as *mut _, b"update\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( update_trampoline:: as *const (), )), Box_::into_raw(f), @@ -259,9 +259,3 @@ impl FrameClock { } } } - -impl fmt::Display for FrameClock { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FrameClock") - } -} diff --git a/gdk4/src/auto/gl_context.rs b/gdk4/src/auto/gl_context.rs index 59c9661e531d..208021f200fc 100644 --- a/gdk4/src/auto/gl_context.rs +++ b/gdk4/src/auto/gl_context.rs @@ -13,8 +13,7 @@ use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; #[cfg(feature = "v4_6")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))] -use std::{boxed::Box as Box_, mem::transmute}; -use std::{fmt, mem, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkGLContext")] @@ -104,8 +103,8 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_required_version")] fn required_version(&self) -> (i32, i32) { unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); ffi::gdk_gl_context_get_required_version( self.as_ref().to_glib_none().0, major.as_mut_ptr(), @@ -152,8 +151,8 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_version")] fn version(&self) -> (i32, i32) { unsafe { - let mut major = mem::MaybeUninit::uninit(); - let mut minor = mem::MaybeUninit::uninit(); + let mut major = std::mem::MaybeUninit::uninit(); + let mut minor = std::mem::MaybeUninit::uninit(); ffi::gdk_gl_context_get_version( self.as_ref().to_glib_none().0, major.as_mut_ptr(), @@ -194,7 +193,7 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gdk_gl_context_realize")] fn realize(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gdk_gl_context_realize(self.as_ref().to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -268,7 +267,7 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::allowed-apis\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_allowed_apis_trampoline:: as *const (), )), Box_::into_raw(f), @@ -293,7 +292,7 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::api\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_api_trampoline:: as *const (), )), Box_::into_raw(f), @@ -303,9 +302,3 @@ pub trait GLContextExt: IsA + sealed::Sealed + 'static { } impl> GLContextExt for O {} - -impl fmt::Display for GLContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GLContext") - } -} diff --git a/gdk4/src/auto/gl_texture.rs b/gdk4/src/auto/gl_texture.rs index f8b936576d61..080789862f44 100644 --- a/gdk4/src/auto/gl_texture.rs +++ b/gdk4/src/auto/gl_texture.rs @@ -5,7 +5,6 @@ use crate::{Paintable, Texture}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkGLTexture")] @@ -27,9 +26,3 @@ impl GLTexture { unsafe impl Send for GLTexture {} unsafe impl Sync for GLTexture {} - -impl fmt::Display for GLTexture { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GLTexture") - } -} diff --git a/gdk4/src/auto/gl_texture_builder.rs b/gdk4/src/auto/gl_texture_builder.rs index 9fa11d646749..d1518d69cb48 100644 --- a/gdk4/src/auto/gl_texture_builder.rs +++ b/gdk4/src/auto/gl_texture_builder.rs @@ -4,7 +4,6 @@ use crate::{GLContext, MemoryFormat, Texture}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkGLTextureBuilder")] @@ -101,9 +100,3 @@ impl Default for GLTextureBuilder { unsafe impl Send for GLTextureBuilder {} unsafe impl Sync for GLTextureBuilder {} - -impl fmt::Display for GLTextureBuilder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GLTextureBuilder") - } -} diff --git a/gdk4/src/auto/grab_broken_event.rs b/gdk4/src/auto/grab_broken_event.rs index 323123f6efa0..443dde798637 100644 --- a/gdk4/src/auto/grab_broken_event.rs +++ b/gdk4/src/auto/grab_broken_event.rs @@ -4,7 +4,6 @@ use crate::Surface; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkGrabBrokenEvent")] @@ -43,9 +42,3 @@ impl GrabBrokenEvent { } } } - -impl fmt::Display for GrabBrokenEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GrabBrokenEvent") - } -} diff --git a/gdk4/src/auto/key_event.rs b/gdk4/src/auto/key_event.rs index 388791947721..b8c88b528d53 100644 --- a/gdk4/src/auto/key_event.rs +++ b/gdk4/src/auto/key_event.rs @@ -4,7 +4,6 @@ use crate::ModifierType; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkKeyEvent")] @@ -56,9 +55,3 @@ impl KeyEvent { unsafe { from_glib(ffi::gdk_key_event_is_modifier(self.to_glib_none().0)) } } } - -impl fmt::Display for KeyEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("KeyEvent") - } -} diff --git a/gdk4/src/auto/memory_texture.rs b/gdk4/src/auto/memory_texture.rs index 2780ce10398c..9b80ca781e6d 100644 --- a/gdk4/src/auto/memory_texture.rs +++ b/gdk4/src/auto/memory_texture.rs @@ -4,7 +4,6 @@ use crate::{MemoryFormat, Paintable, Texture}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkMemoryTexture")] @@ -39,9 +38,3 @@ impl MemoryTexture { unsafe impl Send for MemoryTexture {} unsafe impl Sync for MemoryTexture {} - -impl fmt::Display for MemoryTexture { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MemoryTexture") - } -} diff --git a/gdk4/src/auto/mod.rs b/gdk4/src/auto/mod.rs index b0c0bf6409f1..d6eb8cd7a9b4 100644 --- a/gdk4/src/auto/mod.rs +++ b/gdk4/src/auto/mod.rs @@ -218,10 +218,9 @@ pub use self::flags::ToplevelState; #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))] pub use self::flags::GLAPI; -pub mod functions; +pub(crate) mod functions; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::app_launch_context::GdkAppLaunchContextExt; pub use super::content_provider::ContentProviderExt; pub use super::device::DeviceExt; @@ -239,7 +238,6 @@ pub mod traits { pub use super::texture::TextureExt; pub use super::toplevel::ToplevelExt; } -#[doc(hidden)] -pub mod builders { +pub(crate) mod builders { pub use super::cursor::CursorBuilder; } diff --git a/gdk4/src/auto/monitor.rs b/gdk4/src/auto/monitor.rs index 75c120871b20..de5f777a3ffa 100644 --- a/gdk4/src/auto/monitor.rs +++ b/gdk4/src/auto/monitor.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkMonitor")] @@ -139,7 +139,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"invalidate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( invalidate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -162,7 +162,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::connector\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_connector_trampoline:: as *const (), )), Box_::into_raw(f), @@ -187,7 +187,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::description\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_description_trampoline:: as *const (), )), Box_::into_raw(f), @@ -210,7 +210,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::geometry\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_geometry_trampoline:: as *const (), )), Box_::into_raw(f), @@ -233,7 +233,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::height-mm\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_height_mm_trampoline:: as *const (), )), Box_::into_raw(f), @@ -259,7 +259,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::manufacturer\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_manufacturer_trampoline:: as *const (), )), Box_::into_raw(f), @@ -282,7 +282,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::model\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_model_trampoline:: as *const (), )), Box_::into_raw(f), @@ -308,7 +308,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::refresh-rate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_refresh_rate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -334,7 +334,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::scale-factor\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_scale_factor_trampoline:: as *const (), )), Box_::into_raw(f), @@ -360,7 +360,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::subpixel-layout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_subpixel_layout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -383,7 +383,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::valid\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_valid_trampoline:: as *const (), )), Box_::into_raw(f), @@ -406,7 +406,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::width-mm\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_width_mm_trampoline:: as *const (), )), Box_::into_raw(f), @@ -416,9 +416,3 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { } impl> MonitorExt for O {} - -impl fmt::Display for Monitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Monitor") - } -} diff --git a/gdk4/src/auto/motion_event.rs b/gdk4/src/auto/motion_event.rs index 13a4bf75e9da..2ba274b36395 100644 --- a/gdk4/src/auto/motion_event.rs +++ b/gdk4/src/auto/motion_event.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkMotionEvent")] @@ -22,9 +21,3 @@ impl glib::StaticType for MotionEvent { } impl MotionEvent {} - -impl fmt::Display for MotionEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MotionEvent") - } -} diff --git a/gdk4/src/auto/pad_event.rs b/gdk4/src/auto/pad_event.rs index aaac649799d7..59e81855d4dc 100644 --- a/gdk4/src/auto/pad_event.rs +++ b/gdk4/src/auto/pad_event.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GdkPadEvent")] @@ -26,8 +25,8 @@ impl PadEvent { #[doc(alias = "get_axis_value")] pub fn axis_value(&self) -> (u32, f64) { unsafe { - let mut index = mem::MaybeUninit::uninit(); - let mut value = mem::MaybeUninit::uninit(); + let mut index = std::mem::MaybeUninit::uninit(); + let mut value = std::mem::MaybeUninit::uninit(); ffi::gdk_pad_event_get_axis_value( self.to_glib_none().0, index.as_mut_ptr(), @@ -47,8 +46,8 @@ impl PadEvent { #[doc(alias = "get_group_mode")] pub fn group_mode(&self) -> (u32, u32) { unsafe { - let mut group = mem::MaybeUninit::uninit(); - let mut mode = mem::MaybeUninit::uninit(); + let mut group = std::mem::MaybeUninit::uninit(); + let mut mode = std::mem::MaybeUninit::uninit(); ffi::gdk_pad_event_get_group_mode( self.to_glib_none().0, group.as_mut_ptr(), @@ -58,9 +57,3 @@ impl PadEvent { } } } - -impl fmt::Display for PadEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("PadEvent") - } -} diff --git a/gdk4/src/auto/paintable.rs b/gdk4/src/auto/paintable.rs index 7a60635dcb44..31bb15e0564f 100644 --- a/gdk4/src/auto/paintable.rs +++ b/gdk4/src/auto/paintable.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkPaintable")] @@ -49,8 +49,8 @@ pub trait PaintableExt: IsA + sealed::Sealed + 'static { default_height: f64, ) -> (f64, f64) { unsafe { - let mut concrete_width = mem::MaybeUninit::uninit(); - let mut concrete_height = mem::MaybeUninit::uninit(); + let mut concrete_width = std::mem::MaybeUninit::uninit(); + let mut concrete_height = std::mem::MaybeUninit::uninit(); ffi::gdk_paintable_compute_concrete_size( self.as_ref().to_glib_none().0, specified_width, @@ -142,7 +142,7 @@ pub trait PaintableExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"invalidate-contents\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( invalidate_contents_trampoline:: as *const (), )), Box_::into_raw(f), @@ -164,7 +164,7 @@ pub trait PaintableExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"invalidate-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( invalidate_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -174,9 +174,3 @@ pub trait PaintableExt: IsA + sealed::Sealed + 'static { } impl> PaintableExt for O {} - -impl fmt::Display for Paintable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Paintable") - } -} diff --git a/gdk4/src/auto/popup.rs b/gdk4/src/auto/popup.rs index a9ddc58cd65f..81494ae94283 100644 --- a/gdk4/src/auto/popup.rs +++ b/gdk4/src/auto/popup.rs @@ -4,7 +4,6 @@ use crate::{Gravity, PopupLayout, Surface}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkPopup")] @@ -83,9 +82,3 @@ pub trait PopupExt: IsA + sealed::Sealed + 'static { } impl> PopupExt for O {} - -impl fmt::Display for Popup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Popup") - } -} diff --git a/gdk4/src/auto/popup_layout.rs b/gdk4/src/auto/popup_layout.rs index e8f7b739128f..2e5f50404f0b 100644 --- a/gdk4/src/auto/popup_layout.rs +++ b/gdk4/src/auto/popup_layout.rs @@ -4,9 +4,6 @@ use crate::{AnchorHints, Gravity, Rectangle}; use glib::translate::*; -#[cfg(feature = "v4_2")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_2")))] -use std::mem; glib::wrapper! { #[derive(Debug, PartialOrd, Ord, Hash)] @@ -80,10 +77,10 @@ impl PopupLayout { #[doc(alias = "get_shadow_width")] pub fn shadow_width(&self) -> (i32, i32, i32, i32) { unsafe { - let mut left = mem::MaybeUninit::uninit(); - let mut right = mem::MaybeUninit::uninit(); - let mut top = mem::MaybeUninit::uninit(); - let mut bottom = mem::MaybeUninit::uninit(); + let mut left = std::mem::MaybeUninit::uninit(); + let mut right = std::mem::MaybeUninit::uninit(); + let mut top = std::mem::MaybeUninit::uninit(); + let mut bottom = std::mem::MaybeUninit::uninit(); ffi::gdk_popup_layout_get_shadow_width( self.to_glib_none().0, left.as_mut_ptr(), diff --git a/gdk4/src/auto/proximity_event.rs b/gdk4/src/auto/proximity_event.rs index e7d04458016a..766c6754e088 100644 --- a/gdk4/src/auto/proximity_event.rs +++ b/gdk4/src/auto/proximity_event.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkProximityEvent")] @@ -22,9 +21,3 @@ impl glib::StaticType for ProximityEvent { } impl ProximityEvent {} - -impl fmt::Display for ProximityEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ProximityEvent") - } -} diff --git a/gdk4/src/auto/rgba.rs b/gdk4/src/auto/rgba.rs index f40aed7122e4..bb4ac49447ce 100644 --- a/gdk4/src/auto/rgba.rs +++ b/gdk4/src/auto/rgba.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::{fmt, hash}; glib::wrapper! { pub struct RGBA(BoxedInline); @@ -61,19 +60,19 @@ impl PartialEq for RGBA { impl Eq for RGBA {} -impl fmt::Display for RGBA { +impl std::fmt::Display for RGBA { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } -impl hash::Hash for RGBA { +impl std::hash::Hash for RGBA { #[inline] fn hash(&self, state: &mut H) where - H: hash::Hasher, + H: std::hash::Hasher, { - hash::Hash::hash(&self.hash(), state) + std::hash::Hash::hash(&self.hash(), state) } } diff --git a/gdk4/src/auto/scroll_event.rs b/gdk4/src/auto/scroll_event.rs index 696947dbce99..38191ce5cf02 100644 --- a/gdk4/src/auto/scroll_event.rs +++ b/gdk4/src/auto/scroll_event.rs @@ -7,7 +7,6 @@ use crate::ScrollDirection; #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] use crate::ScrollUnit; use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GdkScrollEvent")] @@ -30,8 +29,8 @@ impl ScrollEvent { #[doc(alias = "get_deltas")] pub fn deltas(&self) -> (f64, f64) { unsafe { - let mut delta_x = mem::MaybeUninit::uninit(); - let mut delta_y = mem::MaybeUninit::uninit(); + let mut delta_x = std::mem::MaybeUninit::uninit(); + let mut delta_y = std::mem::MaybeUninit::uninit(); ffi::gdk_scroll_event_get_deltas( self.to_glib_none().0, delta_x.as_mut_ptr(), @@ -60,9 +59,3 @@ impl ScrollEvent { unsafe { from_glib(ffi::gdk_scroll_event_is_stop(self.to_glib_none().0)) } } } - -impl fmt::Display for ScrollEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ScrollEvent") - } -} diff --git a/gdk4/src/auto/seat.rs b/gdk4/src/auto/seat.rs index c51732df1986..06e4b1c2b081 100644 --- a/gdk4/src/auto/seat.rs +++ b/gdk4/src/auto/seat.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkSeat")] @@ -96,7 +96,7 @@ pub trait SeatExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"device-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( device_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -125,7 +125,7 @@ pub trait SeatExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"device-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( device_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -154,7 +154,7 @@ pub trait SeatExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"tool-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( tool_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -183,7 +183,7 @@ pub trait SeatExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"tool-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( tool_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -193,9 +193,3 @@ pub trait SeatExt: IsA + sealed::Sealed + 'static { } impl> SeatExt for O {} - -impl fmt::Display for Seat { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Seat") - } -} diff --git a/gdk4/src/auto/snapshot.rs b/gdk4/src/auto/snapshot.rs index 3846feeb267a..1579a656cc94 100644 --- a/gdk4/src/auto/snapshot.rs +++ b/gdk4/src/auto/snapshot.rs @@ -2,8 +2,6 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use std::fmt; - glib::wrapper! { #[doc(alias = "GdkSnapshot")] pub struct Snapshot(Object); @@ -16,9 +14,3 @@ glib::wrapper! { impl Snapshot { pub const NONE: Option<&'static Snapshot> = None; } - -impl fmt::Display for Snapshot { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Snapshot") - } -} diff --git a/gdk4/src/auto/surface.rs b/gdk4/src/auto/surface.rs index f1d7fc7ddcde..a5a8d3c746a6 100644 --- a/gdk4/src/auto/surface.rs +++ b/gdk4/src/auto/surface.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkSurface")] @@ -73,7 +73,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gdk_surface_create_gl_context")] fn create_gl_context(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_surface_create_gl_context(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { @@ -87,7 +87,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gdk_surface_create_vulkan_context")] fn create_vulkan_context(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_surface_create_vulkan_context(self.as_ref().to_glib_none().0, &mut error); if error.is_null() { @@ -126,9 +126,9 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_device_position")] fn device_position(&self, device: &impl IsA) -> Option<(f64, f64, ModifierType)> { unsafe { - let mut x = mem::MaybeUninit::uninit(); - let mut y = mem::MaybeUninit::uninit(); - let mut mask = mem::MaybeUninit::uninit(); + let mut x = std::mem::MaybeUninit::uninit(); + let mut y = std::mem::MaybeUninit::uninit(); + let mut mask = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_surface_get_device_position( self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0, @@ -285,7 +285,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"enter-monitor\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( enter_monitor_trampoline:: as *const (), )), Box_::into_raw(f), @@ -315,7 +315,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"event\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( event_trampoline:: as *const (), )), Box_::into_raw(f), @@ -343,7 +343,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"layout\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( layout_trampoline:: as *const (), )), Box_::into_raw(f), @@ -372,7 +372,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"leave-monitor\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( leave_monitor_trampoline:: as *const (), )), Box_::into_raw(f), @@ -405,7 +405,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"render\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( render_trampoline:: as *const (), )), Box_::into_raw(f), @@ -428,7 +428,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::cursor\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_cursor_trampoline:: as *const (), )), Box_::into_raw(f), @@ -451,7 +451,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::height\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_height_trampoline:: as *const (), )), Box_::into_raw(f), @@ -474,7 +474,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::mapped\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_mapped_trampoline:: as *const (), )), Box_::into_raw(f), @@ -499,7 +499,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::scale\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_scale_trampoline:: as *const (), )), Box_::into_raw(f), @@ -525,7 +525,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::scale-factor\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_scale_factor_trampoline:: as *const (), )), Box_::into_raw(f), @@ -548,7 +548,7 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::width\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_width_trampoline:: as *const (), )), Box_::into_raw(f), @@ -558,9 +558,3 @@ pub trait SurfaceExt: IsA + sealed::Sealed + 'static { } impl> SurfaceExt for O {} - -impl fmt::Display for Surface { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Surface") - } -} diff --git a/gdk4/src/auto/texture.rs b/gdk4/src/auto/texture.rs index cc8bda1c06bb..7668dcecbfda 100644 --- a/gdk4/src/auto/texture.rs +++ b/gdk4/src/auto/texture.rs @@ -7,7 +7,6 @@ use crate::MemoryFormat; use crate::Paintable; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GdkTexture")] @@ -35,7 +34,7 @@ impl Texture { pub fn from_bytes(bytes: &glib::Bytes) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_texture_new_from_bytes(bytes.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -50,7 +49,7 @@ impl Texture { pub fn from_file(file: &impl IsA) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_texture_new_from_file(file.as_ref().to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -67,7 +66,7 @@ impl Texture { pub fn from_filename(path: impl AsRef) -> Result { assert_initialized_main_thread!(); unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_texture_new_from_filename(path.as_ref().to_glib_none().0, &mut error); if error.is_null() { @@ -177,9 +176,3 @@ pub trait TextureExt: IsA + sealed::Sealed + 'static { } impl> TextureExt for O {} - -impl fmt::Display for Texture { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Texture") - } -} diff --git a/gdk4/src/auto/texture_downloader.rs b/gdk4/src/auto/texture_downloader.rs index ead7e8395543..45a759c040ac 100644 --- a/gdk4/src/auto/texture_downloader.rs +++ b/gdk4/src/auto/texture_downloader.rs @@ -4,7 +4,6 @@ use crate::{MemoryFormat, Texture}; use glib::{prelude::*, translate::*}; -use std::mem; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -31,7 +30,7 @@ impl TextureDownloader { #[doc(alias = "gdk_texture_downloader_download_bytes")] pub fn download_bytes(&self) -> (glib::Bytes, usize) { unsafe { - let mut out_stride = mem::MaybeUninit::uninit(); + let mut out_stride = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::gdk_texture_downloader_download_bytes( self.to_glib_none().0, out_stride.as_mut_ptr(), diff --git a/gdk4/src/auto/toplevel.rs b/gdk4/src/auto/toplevel.rs index c0374123da3a..6c6c835299e3 100644 --- a/gdk4/src/auto/toplevel.rs +++ b/gdk4/src/auto/toplevel.rs @@ -13,7 +13,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkToplevel")] @@ -268,7 +268,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::decorated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_decorated_trampoline:: as *const (), )), Box_::into_raw(f), @@ -291,7 +291,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::deletable\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_deletable_trampoline:: as *const (), )), Box_::into_raw(f), @@ -317,7 +317,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::fullscreen-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_fullscreen_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -340,7 +340,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::icon-list\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_icon_list_trampoline:: as *const (), )), Box_::into_raw(f), @@ -363,7 +363,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::modal\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_modal_trampoline:: as *const (), )), Box_::into_raw(f), @@ -389,7 +389,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::shortcuts-inhibited\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_shortcuts_inhibited_trampoline:: as *const (), )), Box_::into_raw(f), @@ -412,7 +412,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::startup-id\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_startup_id_trampoline:: as *const (), )), Box_::into_raw(f), @@ -435,7 +435,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::state\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_state_trampoline:: as *const (), )), Box_::into_raw(f), @@ -458,7 +458,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::title\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_title_trampoline:: as *const (), )), Box_::into_raw(f), @@ -484,7 +484,7 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::transient-for\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_transient_for_trampoline:: as *const (), )), Box_::into_raw(f), @@ -494,9 +494,3 @@ pub trait ToplevelExt: IsA + sealed::Sealed + 'static { } impl> ToplevelExt for O {} - -impl fmt::Display for Toplevel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Toplevel") - } -} diff --git a/gdk4/src/auto/toplevel_layout.rs b/gdk4/src/auto/toplevel_layout.rs index 3b2420539063..cc37964bb847 100644 --- a/gdk4/src/auto/toplevel_layout.rs +++ b/gdk4/src/auto/toplevel_layout.rs @@ -4,7 +4,6 @@ use crate::Monitor; use glib::{prelude::*, translate::*}; -use std::mem; glib::wrapper! { #[derive(Debug, PartialOrd, Ord, Hash)] @@ -44,7 +43,7 @@ impl ToplevelLayout { #[doc(alias = "get_fullscreen")] pub fn fullscreen(&self) -> Option { unsafe { - let mut fullscreen = mem::MaybeUninit::uninit(); + let mut fullscreen = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_toplevel_layout_get_fullscreen( self.to_glib_none().0, fullscreen.as_mut_ptr(), @@ -71,7 +70,7 @@ impl ToplevelLayout { #[doc(alias = "get_maximized")] pub fn maximized(&self) -> Option { unsafe { - let mut maximized = mem::MaybeUninit::uninit(); + let mut maximized = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_toplevel_layout_get_maximized( self.to_glib_none().0, maximized.as_mut_ptr(), diff --git a/gdk4/src/auto/touch_event.rs b/gdk4/src/auto/touch_event.rs index 3e8819b72fba..ebfbd5a85e95 100644 --- a/gdk4/src/auto/touch_event.rs +++ b/gdk4/src/auto/touch_event.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkTouchEvent")] @@ -32,9 +31,3 @@ impl TouchEvent { } } } - -impl fmt::Display for TouchEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TouchEvent") - } -} diff --git a/gdk4/src/auto/touchpad_event.rs b/gdk4/src/auto/touchpad_event.rs index cf835b6ac490..60a3e47f84ee 100644 --- a/gdk4/src/auto/touchpad_event.rs +++ b/gdk4/src/auto/touchpad_event.rs @@ -4,7 +4,6 @@ use crate::TouchpadGesturePhase; use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GdkTouchpadEvent")] @@ -27,8 +26,8 @@ impl TouchpadEvent { #[doc(alias = "get_deltas")] pub fn deltas(&self) -> (f64, f64) { unsafe { - let mut dx = mem::MaybeUninit::uninit(); - let mut dy = mem::MaybeUninit::uninit(); + let mut dx = std::mem::MaybeUninit::uninit(); + let mut dy = std::mem::MaybeUninit::uninit(); ffi::gdk_touchpad_event_get_deltas( self.to_glib_none().0, dx.as_mut_ptr(), @@ -66,9 +65,3 @@ impl TouchpadEvent { unsafe { ffi::gdk_touchpad_event_get_pinch_scale(self.to_glib_none().0) } } } - -impl fmt::Display for TouchpadEvent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TouchpadEvent") - } -} diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gdk4/src/auto/versions.txt +++ b/gdk4/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gdk4/src/auto/vulkan_context.rs b/gdk4/src/auto/vulkan_context.rs index 9eba7f07babe..0e6bcab76364 100644 --- a/gdk4/src/auto/vulkan_context.rs +++ b/gdk4/src/auto/vulkan_context.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkVulkanContext")] @@ -34,7 +34,7 @@ impl VulkanContext { connect_raw( self.as_ptr() as *mut _, b"images-updated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( images_updated_trampoline:: as *const (), )), Box_::into_raw(f), @@ -42,9 +42,3 @@ impl VulkanContext { } } } - -impl fmt::Display for VulkanContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("VulkanContext") - } -} diff --git a/gdk4/src/functions.rs b/gdk4/src/functions.rs index 66954b4b39c0..51805fa9cae5 100644 --- a/gdk4/src/functions.rs +++ b/gdk4/src/functions.rs @@ -1,5 +1,6 @@ // Take a look at the license at the top of the repository in the LICENSE file. +pub use crate::auto::functions::*; use crate::{prelude::*, ContentDeserializer, ContentSerializer}; use glib::translate::*; use std::{future, pin::Pin, ptr}; diff --git a/gdk4/src/lib.rs b/gdk4/src/lib.rs index 7b8d22b9e382..173841f80454 100644 --- a/gdk4/src/lib.rs +++ b/gdk4/src/lib.rs @@ -106,7 +106,6 @@ mod toplevel_size; mod touch_event; mod touchpad_event; -pub use self::auto::functions::*; pub use auto::*; pub use functions::*; diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gir b/gir index dcaa0e340516..0f2c059e0939 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit dcaa0e340516fde8178f476e72694af9ade395b2 +Subproject commit 0f2c059e09395c57cee8820893b2ca1570d4d6ae diff --git a/gir-files b/gir-files index 58cd940295f0..615ef8fb32f2 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit 58cd940295f07ac8c517f3d7182fbea61097c0e5 +Subproject commit 615ef8fb32f2fd5b90e6e12682e60144749a6fed diff --git a/gsk4/Gir.toml b/gsk4/Gir.toml index d9ec678e9030..9c53ccd5921e 100644 --- a/gsk4/Gir.toml +++ b/gsk4/Gir.toml @@ -181,6 +181,11 @@ status = "generate" name = "add_cairo_path" manual = true # use as_ptr for cairo::Path +[[object]] +name = "Gsk.PathMeasure" +status = "generate" +version = "4.14" + [[object]] name = "Gsk.PathPoint" status = "generate" diff --git a/gsk4/src/auto/blend_node.rs b/gsk4/src/auto/blend_node.rs index d641e37cb53c..62ba43908db2 100644 --- a/gsk4/src/auto/blend_node.rs +++ b/gsk4/src/auto/blend_node.rs @@ -4,7 +4,6 @@ use crate::{BlendMode, RenderNode}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskBlendNode")] @@ -57,9 +56,3 @@ impl BlendNode { unsafe { from_glib_none(ffi::gsk_blend_node_get_top_child(self.to_glib_none().0)) } } } - -impl fmt::Display for BlendNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BlendNode") - } -} diff --git a/gsk4/src/auto/blur_node.rs b/gsk4/src/auto/blur_node.rs index 793e0c81cc8a..cae2db191fd1 100644 --- a/gsk4/src/auto/blur_node.rs +++ b/gsk4/src/auto/blur_node.rs @@ -4,7 +4,6 @@ use crate::RenderNode; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskBlurNode")] @@ -46,9 +45,3 @@ impl BlurNode { unsafe { ffi::gsk_blur_node_get_radius(self.to_glib_none().0) } } } - -impl fmt::Display for BlurNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BlurNode") - } -} diff --git a/gsk4/src/auto/border_node.rs b/gsk4/src/auto/border_node.rs index 8f89b2047971..35175285e2f0 100644 --- a/gsk4/src/auto/border_node.rs +++ b/gsk4/src/auto/border_node.rs @@ -4,7 +4,6 @@ use crate::RoundedRect; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskBorderNode")] @@ -29,9 +28,3 @@ impl BorderNode { unsafe { from_glib_none(ffi::gsk_border_node_get_outline(self.to_glib_none().0)) } } } - -impl fmt::Display for BorderNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BorderNode") - } -} diff --git a/gsk4/src/auto/broadway_renderer.rs b/gsk4/src/auto/broadway_renderer.rs index 1fe493b06bda..6fbcf1ee65e7 100644 --- a/gsk4/src/auto/broadway_renderer.rs +++ b/gsk4/src/auto/broadway_renderer.rs @@ -4,7 +4,6 @@ use crate::Renderer; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GskBroadwayRenderer")] @@ -28,9 +27,3 @@ impl Default for BroadwayRenderer { Self::new() } } - -impl fmt::Display for BroadwayRenderer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BroadwayRenderer") - } -} diff --git a/gsk4/src/auto/cairo_node.rs b/gsk4/src/auto/cairo_node.rs index 3d51c3d35f69..03622f438d73 100644 --- a/gsk4/src/auto/cairo_node.rs +++ b/gsk4/src/auto/cairo_node.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskCairoNode")] @@ -40,9 +39,3 @@ impl CairoNode { unsafe { from_glib_none(ffi::gsk_cairo_node_get_surface(self.to_glib_none().0)) } } } - -impl fmt::Display for CairoNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("CairoNode") - } -} diff --git a/gsk4/src/auto/cairo_renderer.rs b/gsk4/src/auto/cairo_renderer.rs index bd5bc62ff654..ed53efa815e1 100644 --- a/gsk4/src/auto/cairo_renderer.rs +++ b/gsk4/src/auto/cairo_renderer.rs @@ -4,7 +4,6 @@ use crate::Renderer; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GskCairoRenderer")] @@ -28,9 +27,3 @@ impl Default for CairoRenderer { Self::new() } } - -impl fmt::Display for CairoRenderer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("CairoRenderer") - } -} diff --git a/gsk4/src/auto/clip_node.rs b/gsk4/src/auto/clip_node.rs index ee7af65d02c0..58f8416666b1 100644 --- a/gsk4/src/auto/clip_node.rs +++ b/gsk4/src/auto/clip_node.rs @@ -4,7 +4,6 @@ use crate::RenderNode; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskClipNode")] @@ -46,9 +45,3 @@ impl ClipNode { unsafe { from_glib_none(ffi::gsk_clip_node_get_clip(self.to_glib_none().0)) } } } - -impl fmt::Display for ClipNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ClipNode") - } -} diff --git a/gsk4/src/auto/color_matrix_node.rs b/gsk4/src/auto/color_matrix_node.rs index 00ba5ee7fc8e..fca6fe1723e3 100644 --- a/gsk4/src/auto/color_matrix_node.rs +++ b/gsk4/src/auto/color_matrix_node.rs @@ -4,7 +4,6 @@ use crate::RenderNode; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskColorMatrixNode")] @@ -65,9 +64,3 @@ impl ColorMatrixNode { } } } - -impl fmt::Display for ColorMatrixNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ColorMatrixNode") - } -} diff --git a/gsk4/src/auto/color_node.rs b/gsk4/src/auto/color_node.rs index 88e2a9b841be..bac1617cd914 100644 --- a/gsk4/src/auto/color_node.rs +++ b/gsk4/src/auto/color_node.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskColorNode")] @@ -39,9 +38,3 @@ impl ColorNode { unsafe { from_glib_none(ffi::gsk_color_node_get_color(self.to_glib_none().0)) } } } - -impl fmt::Display for ColorNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ColorNode") - } -} diff --git a/gsk4/src/auto/conic_gradient_node.rs b/gsk4/src/auto/conic_gradient_node.rs index 84932c1c0040..9f9c3700f958 100644 --- a/gsk4/src/auto/conic_gradient_node.rs +++ b/gsk4/src/auto/conic_gradient_node.rs @@ -4,7 +4,6 @@ use crate::ColorStop; use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GskConicGradientNode")] @@ -65,7 +64,7 @@ impl ConicGradientNode { #[doc(alias = "get_color_stops")] pub fn color_stops(&self) -> Vec { unsafe { - let mut n_stops = mem::MaybeUninit::uninit(); + let mut n_stops = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_none_num( ffi::gsk_conic_gradient_node_get_color_stops( self.to_glib_none().0, @@ -89,9 +88,3 @@ impl ConicGradientNode { unsafe { ffi::gsk_conic_gradient_node_get_rotation(self.to_glib_none().0) } } } - -impl fmt::Display for ConicGradientNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ConicGradientNode") - } -} diff --git a/gsk4/src/auto/container_node.rs b/gsk4/src/auto/container_node.rs index a897f632d9a5..a42180b4caeb 100644 --- a/gsk4/src/auto/container_node.rs +++ b/gsk4/src/auto/container_node.rs @@ -4,7 +4,6 @@ use crate::RenderNode; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskContainerNode")] @@ -41,9 +40,3 @@ impl ContainerNode { unsafe { ffi::gsk_container_node_get_n_children(self.to_glib_none().0) } } } - -impl fmt::Display for ContainerNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ContainerNode") - } -} diff --git a/gsk4/src/auto/cross_fade_node.rs b/gsk4/src/auto/cross_fade_node.rs index 1a88acadc793..83335470ef10 100644 --- a/gsk4/src/auto/cross_fade_node.rs +++ b/gsk4/src/auto/cross_fade_node.rs @@ -4,7 +4,6 @@ use crate::RenderNode; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskCrossFadeNode")] @@ -65,9 +64,3 @@ impl CrossFadeNode { } } } - -impl fmt::Display for CrossFadeNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("CrossFadeNode") - } -} diff --git a/gsk4/src/auto/debug_node.rs b/gsk4/src/auto/debug_node.rs index 0b626348df02..7fdd45b75afa 100644 --- a/gsk4/src/auto/debug_node.rs +++ b/gsk4/src/auto/debug_node.rs @@ -4,7 +4,6 @@ use crate::RenderNode; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskDebugNode")] @@ -46,9 +45,3 @@ impl DebugNode { unsafe { from_glib_none(ffi::gsk_debug_node_get_message(self.to_glib_none().0)) } } } - -impl fmt::Display for DebugNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DebugNode") - } -} diff --git a/gsk4/src/auto/enums.rs b/gsk4/src/auto/enums.rs index 9ed664ec1152..a6b30590038e 100644 --- a/gsk4/src/auto/enums.rs +++ b/gsk4/src/auto/enums.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -45,34 +44,6 @@ pub enum BlendMode { __Unknown(i32), } -impl fmt::Display for BlendMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "BlendMode::{}", - match *self { - Self::Default => "Default", - Self::Multiply => "Multiply", - Self::Screen => "Screen", - Self::Overlay => "Overlay", - Self::Darken => "Darken", - Self::Lighten => "Lighten", - Self::ColorDodge => "ColorDodge", - Self::ColorBurn => "ColorBurn", - Self::HardLight => "HardLight", - Self::SoftLight => "SoftLight", - Self::Difference => "Difference", - Self::Exclusion => "Exclusion", - Self::Color => "Color", - Self::Hue => "Hue", - Self::Saturation => "Saturation", - Self::Luminosity => "Luminosity", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for BlendMode { type GlibType = ffi::GskBlendMode; @@ -129,6 +100,7 @@ impl FromGlib for BlendMode { impl StaticType for BlendMode { #[inline] + #[doc(alias = "gsk_blend_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_blend_mode_get_type()) } } @@ -140,7 +112,7 @@ impl glib::HasParamSpec for BlendMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -198,22 +170,6 @@ pub enum Corner { __Unknown(i32), } -impl fmt::Display for Corner { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Corner::{}", - match *self { - Self::TopLeft => "TopLeft", - Self::TopRight => "TopRight", - Self::BottomRight => "BottomRight", - Self::BottomLeft => "BottomLeft", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Corner { type GlibType = ffi::GskCorner; @@ -248,6 +204,7 @@ impl FromGlib for Corner { impl StaticType for Corner { #[inline] + #[doc(alias = "gsk_corner_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_corner_get_type()) } } @@ -259,7 +216,7 @@ impl glib::HasParamSpec for Corner { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -315,22 +272,6 @@ pub enum FillRule { __Unknown(i32), } -#[cfg(feature = "v4_14")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] -impl fmt::Display for FillRule { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FillRule::{}", - match *self { - Self::Winding => "Winding", - Self::EvenOdd => "EvenOdd", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] #[doc(hidden)] @@ -367,6 +308,7 @@ impl FromGlib for FillRule { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] impl StaticType for FillRule { #[inline] + #[doc(alias = "gsk_fill_rule_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_fill_rule_get_type()) } } @@ -380,7 +322,7 @@ impl glib::HasParamSpec for FillRule { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -454,26 +396,6 @@ pub enum GLUniformType { __Unknown(i32), } -impl fmt::Display for GLUniformType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "GLUniformType::{}", - match *self { - Self::None => "None", - Self::Float => "Float", - Self::Int => "Int", - Self::Uint => "Uint", - Self::Bool => "Bool", - Self::Vec2 => "Vec2", - Self::Vec3 => "Vec3", - Self::Vec4 => "Vec4", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for GLUniformType { type GlibType = ffi::GskGLUniformType; @@ -516,6 +438,7 @@ impl FromGlib for GLUniformType { impl StaticType for GLUniformType { #[inline] + #[doc(alias = "gsk_gl_uniform_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_gl_uniform_type_get_type()) } } @@ -527,7 +450,7 @@ impl glib::HasParamSpec for GLUniformType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -585,23 +508,6 @@ pub enum LineCap { __Unknown(i32), } -#[cfg(feature = "v4_14")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] -impl fmt::Display for LineCap { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "LineCap::{}", - match *self { - Self::Butt => "Butt", - Self::Round => "Round", - Self::Square => "Square", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] #[doc(hidden)] @@ -640,6 +546,7 @@ impl FromGlib for LineCap { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] impl StaticType for LineCap { #[inline] + #[doc(alias = "gsk_line_cap_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_line_cap_get_type()) } } @@ -653,7 +560,7 @@ impl glib::HasParamSpec for LineCap { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -719,23 +626,6 @@ pub enum LineJoin { __Unknown(i32), } -#[cfg(feature = "v4_14")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] -impl fmt::Display for LineJoin { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "LineJoin::{}", - match *self { - Self::Miter => "Miter", - Self::Round => "Round", - Self::Bevel => "Bevel", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] #[doc(hidden)] @@ -774,6 +664,7 @@ impl FromGlib for LineJoin { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] impl StaticType for LineJoin { #[inline] + #[doc(alias = "gsk_line_join_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_line_join_get_type()) } } @@ -787,7 +678,7 @@ impl glib::HasParamSpec for LineJoin { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -855,24 +746,6 @@ pub enum MaskMode { __Unknown(i32), } -#[cfg(feature = "v4_10")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] -impl fmt::Display for MaskMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "MaskMode::{}", - match *self { - Self::Alpha => "Alpha", - Self::InvertedAlpha => "InvertedAlpha", - Self::Luminance => "Luminance", - Self::InvertedLuminance => "InvertedLuminance", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] #[doc(hidden)] @@ -913,6 +786,7 @@ impl FromGlib for MaskMode { #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] impl StaticType for MaskMode { #[inline] + #[doc(alias = "gsk_mask_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_mask_mode_get_type()) } } @@ -926,7 +800,7 @@ impl glib::HasParamSpec for MaskMode { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -994,24 +868,6 @@ pub enum PathDirection { __Unknown(i32), } -#[cfg(feature = "v4_14")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] -impl fmt::Display for PathDirection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PathDirection::{}", - match *self { - Self::FromStart => "FromStart", - Self::ToStart => "ToStart", - Self::ToEnd => "ToEnd", - Self::FromEnd => "FromEnd", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] #[doc(hidden)] @@ -1052,6 +908,7 @@ impl FromGlib for PathDirection { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] impl StaticType for PathDirection { #[inline] + #[doc(alias = "gsk_path_direction_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_path_direction_get_type()) } } @@ -1065,7 +922,7 @@ impl glib::HasParamSpec for PathDirection { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1131,29 +988,12 @@ pub enum PathOperation { Quad, #[doc(alias = "GSK_PATH_CUBIC")] Cubic, + #[doc(alias = "GSK_PATH_CONIC")] + Conic, #[doc(hidden)] __Unknown(i32), } -#[cfg(feature = "v4_14")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] -impl fmt::Display for PathOperation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PathOperation::{}", - match *self { - Self::Move => "Move", - Self::Close => "Close", - Self::Line => "Line", - Self::Quad => "Quad", - Self::Cubic => "Cubic", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] #[doc(hidden)] @@ -1168,6 +1008,7 @@ impl IntoGlib for PathOperation { Self::Line => ffi::GSK_PATH_LINE, Self::Quad => ffi::GSK_PATH_QUAD, Self::Cubic => ffi::GSK_PATH_CUBIC, + Self::Conic => ffi::GSK_PATH_CONIC, Self::__Unknown(value) => value, } } @@ -1187,6 +1028,7 @@ impl FromGlib for PathOperation { ffi::GSK_PATH_LINE => Self::Line, ffi::GSK_PATH_QUAD => Self::Quad, ffi::GSK_PATH_CUBIC => Self::Cubic, + ffi::GSK_PATH_CONIC => Self::Conic, value => Self::__Unknown(value), } } @@ -1196,6 +1038,7 @@ impl FromGlib for PathOperation { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] impl StaticType for PathOperation { #[inline] + #[doc(alias = "gsk_path_operation_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_path_operation_get_type()) } } @@ -1209,7 +1052,7 @@ impl glib::HasParamSpec for PathOperation { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1331,50 +1174,6 @@ pub enum RenderNodeType { __Unknown(i32), } -impl fmt::Display for RenderNodeType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "RenderNodeType::{}", - match *self { - Self::NotARenderNode => "NotARenderNode", - Self::ContainerNode => "ContainerNode", - Self::CairoNode => "CairoNode", - Self::ColorNode => "ColorNode", - Self::LinearGradientNode => "LinearGradientNode", - Self::RepeatingLinearGradientNode => "RepeatingLinearGradientNode", - Self::RadialGradientNode => "RadialGradientNode", - Self::RepeatingRadialGradientNode => "RepeatingRadialGradientNode", - Self::ConicGradientNode => "ConicGradientNode", - Self::BorderNode => "BorderNode", - Self::TextureNode => "TextureNode", - Self::InsetShadowNode => "InsetShadowNode", - Self::OutsetShadowNode => "OutsetShadowNode", - Self::TransformNode => "TransformNode", - Self::OpacityNode => "OpacityNode", - Self::ColorMatrixNode => "ColorMatrixNode", - Self::RepeatNode => "RepeatNode", - Self::ClipNode => "ClipNode", - Self::RoundedClipNode => "RoundedClipNode", - Self::ShadowNode => "ShadowNode", - Self::BlendNode => "BlendNode", - Self::CrossFadeNode => "CrossFadeNode", - Self::TextNode => "TextNode", - Self::BlurNode => "BlurNode", - Self::DebugNode => "DebugNode", - Self::GlShaderNode => "GlShaderNode", - Self::TextureScaleNode => "TextureScaleNode", - Self::MaskNode => "MaskNode", - #[cfg(feature = "v4_14")] - Self::FillNode => "FillNode", - #[cfg(feature = "v4_14")] - Self::StrokeNode => "StrokeNode", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for RenderNodeType { type GlibType = ffi::GskRenderNodeType; @@ -1463,6 +1262,7 @@ impl FromGlib for RenderNodeType { impl StaticType for RenderNodeType { #[inline] + #[doc(alias = "gsk_render_node_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_render_node_type_get_type()) } } @@ -1474,7 +1274,7 @@ impl glib::HasParamSpec for RenderNodeType { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1530,21 +1330,6 @@ pub enum ScalingFilter { __Unknown(i32), } -impl fmt::Display for ScalingFilter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ScalingFilter::{}", - match *self { - Self::Linear => "Linear", - Self::Nearest => "Nearest", - Self::Trilinear => "Trilinear", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ScalingFilter { type GlibType = ffi::GskScalingFilter; @@ -1577,6 +1362,7 @@ impl FromGlib for ScalingFilter { impl StaticType for ScalingFilter { #[inline] + #[doc(alias = "gsk_scaling_filter_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_scaling_filter_get_type()) } } @@ -1588,7 +1374,7 @@ impl glib::HasParamSpec for ScalingFilter { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1644,21 +1430,6 @@ pub enum SerializationError { __Unknown(i32), } -impl fmt::Display for SerializationError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SerializationError::{}", - match *self { - Self::UnsupportedFormat => "UnsupportedFormat", - Self::UnsupportedVersion => "UnsupportedVersion", - Self::InvalidData => "InvalidData", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SerializationError { type GlibType = ffi::GskSerializationError; @@ -1714,6 +1485,7 @@ impl glib::error::ErrorDomain for SerializationError { impl StaticType for SerializationError { #[inline] + #[doc(alias = "gsk_serialization_error_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_serialization_error_get_type()) } } @@ -1725,7 +1497,7 @@ impl glib::HasParamSpec for SerializationError { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } @@ -1789,25 +1561,6 @@ pub enum TransformCategory { __Unknown(i32), } -impl fmt::Display for TransformCategory { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TransformCategory::{}", - match *self { - Self::Unknown => "Unknown", - Self::Any => "Any", - Self::_3d => "_3d", - Self::_2d => "_2d", - Self::_2dAffine => "_2dAffine", - Self::_2dTranslate => "_2dTranslate", - Self::Identity => "Identity", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TransformCategory { type GlibType = ffi::GskTransformCategory; @@ -1848,6 +1601,7 @@ impl FromGlib for TransformCategory { impl StaticType for TransformCategory { #[inline] + #[doc(alias = "gsk_transform_category_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_transform_category_get_type()) } } @@ -1859,7 +1613,7 @@ impl glib::HasParamSpec for TransformCategory { type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name, default_value| Self::ParamSpec::builder_with_default(name, default_value) + Self::ParamSpec::builder_with_default } } diff --git a/gsk4/src/auto/fill_node.rs b/gsk4/src/auto/fill_node.rs index 0578937bdd81..dec6b9c0eeb1 100644 --- a/gsk4/src/auto/fill_node.rs +++ b/gsk4/src/auto/fill_node.rs @@ -4,7 +4,6 @@ use crate::{FillRule, Path, RenderNode}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskFillNode")] @@ -53,9 +52,3 @@ impl FillNode { unsafe { from_glib_none(ffi::gsk_fill_node_get_path(self.to_glib_none().0)) } } } - -impl fmt::Display for FillNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FillNode") - } -} diff --git a/gsk4/src/auto/flags.rs b/gsk4/src/auto/flags.rs index 32069836e849..f81814ce65d3 100644 --- a/gsk4/src/auto/flags.rs +++ b/gsk4/src/auto/flags.rs @@ -5,9 +5,6 @@ #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] use glib::{bitflags::bitflags, prelude::*, translate::*}; -#[cfg(feature = "v4_14")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] -use std::fmt; #[cfg(feature = "v4_14")] bitflags! { @@ -21,14 +18,8 @@ bitflags! { const QUAD = ffi::GSK_PATH_FOREACH_ALLOW_QUAD as _; #[doc(alias = "GSK_PATH_FOREACH_ALLOW_CUBIC")] const CUBIC = ffi::GSK_PATH_FOREACH_ALLOW_CUBIC as _; - } -} - -#[cfg(feature = "v4_14")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] -impl fmt::Display for PathForeachFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) + #[doc(alias = "GSK_PATH_FOREACH_ALLOW_CONIC")] + const CONIC = ffi::GSK_PATH_FOREACH_ALLOW_CONIC as _; } } @@ -59,6 +50,7 @@ impl FromGlib for PathForeachFlags { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] impl StaticType for PathForeachFlags { #[inline] + #[doc(alias = "gsk_path_foreach_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gsk_path_foreach_flags_get_type()) } } @@ -72,7 +64,7 @@ impl glib::HasParamSpec for PathForeachFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gsk4/src/auto/gl_renderer.rs b/gsk4/src/auto/gl_renderer.rs index 158a18387117..b0bb5f53dd60 100644 --- a/gsk4/src/auto/gl_renderer.rs +++ b/gsk4/src/auto/gl_renderer.rs @@ -6,7 +6,6 @@ use crate::Renderer; #[cfg(feature = "v4_2")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_2")))] use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GskGLRenderer")] @@ -34,9 +33,3 @@ impl Default for GLRenderer { Self::new() } } - -impl fmt::Display for GLRenderer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GLRenderer") - } -} diff --git a/gsk4/src/auto/gl_shader.rs b/gsk4/src/auto/gl_shader.rs index 9c031c105bdf..d331f5b2bf34 100644 --- a/gsk4/src/auto/gl_shader.rs +++ b/gsk4/src/auto/gl_shader.rs @@ -4,7 +4,6 @@ use crate::{GLUniformType, Renderer}; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GskGLShader")] @@ -49,7 +48,7 @@ impl GLShader { #[doc(alias = "gsk_gl_shader_compile")] pub fn compile(&self, renderer: &impl IsA) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gsk_gl_shader_compile( self.to_glib_none().0, renderer.as_ref().to_glib_none().0, @@ -199,9 +198,3 @@ impl GLShaderBuilder { self.builder.build() } } - -impl fmt::Display for GLShader { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GLShader") - } -} diff --git a/gsk4/src/auto/gl_shader_node.rs b/gsk4/src/auto/gl_shader_node.rs index 5720408f0f4a..1ebd159a3625 100644 --- a/gsk4/src/auto/gl_shader_node.rs +++ b/gsk4/src/auto/gl_shader_node.rs @@ -4,7 +4,6 @@ use crate::{GLShader, RenderNode}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskGLShaderNode")] @@ -61,9 +60,3 @@ impl GLShaderNode { unsafe { from_glib_none(ffi::gsk_gl_shader_node_get_shader(self.to_glib_none().0)) } } } - -impl fmt::Display for GLShaderNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GLShaderNode") - } -} diff --git a/gsk4/src/auto/inset_shadow_node.rs b/gsk4/src/auto/inset_shadow_node.rs index 33e1e6b308fa..419071370cc4 100644 --- a/gsk4/src/auto/inset_shadow_node.rs +++ b/gsk4/src/auto/inset_shadow_node.rs @@ -4,7 +4,6 @@ use crate::RoundedRect; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskInsetShadowNode")] @@ -85,9 +84,3 @@ impl InsetShadowNode { unsafe { ffi::gsk_inset_shadow_node_get_spread(self.to_glib_none().0) } } } - -impl fmt::Display for InsetShadowNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("InsetShadowNode") - } -} diff --git a/gsk4/src/auto/linear_gradient_node.rs b/gsk4/src/auto/linear_gradient_node.rs index e440a05cba18..09c5a88fadac 100644 --- a/gsk4/src/auto/linear_gradient_node.rs +++ b/gsk4/src/auto/linear_gradient_node.rs @@ -4,7 +4,6 @@ use crate::ColorStop; use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GskLinearGradientNode")] @@ -47,7 +46,7 @@ impl LinearGradientNode { #[doc(alias = "get_color_stops")] pub fn color_stops(&self) -> Vec { unsafe { - let mut n_stops = mem::MaybeUninit::uninit(); + let mut n_stops = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_none_num( ffi::gsk_linear_gradient_node_get_color_stops( self.to_glib_none().0, @@ -81,9 +80,3 @@ impl LinearGradientNode { } } } - -impl fmt::Display for LinearGradientNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("LinearGradientNode") - } -} diff --git a/gsk4/src/auto/mask_node.rs b/gsk4/src/auto/mask_node.rs index e9f5ff595b19..b98f98c726b6 100644 --- a/gsk4/src/auto/mask_node.rs +++ b/gsk4/src/auto/mask_node.rs @@ -4,7 +4,6 @@ use crate::{MaskMode, RenderNode}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskMaskNode")] @@ -57,9 +56,3 @@ impl MaskNode { unsafe { from_glib_none(ffi::gsk_mask_node_get_source(self.to_glib_none().0)) } } } - -impl fmt::Display for MaskNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("MaskNode") - } -} diff --git a/gsk4/src/auto/mod.rs b/gsk4/src/auto/mod.rs index ecad39fd8c13..ceec153ab0c2 100644 --- a/gsk4/src/auto/mod.rs +++ b/gsk4/src/auto/mod.rs @@ -148,6 +148,13 @@ mod path_builder; #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub use self::path_builder::PathBuilder; +#[cfg(feature = "v4_14")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] +mod path_measure; +#[cfg(feature = "v4_14")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] +pub use self::path_measure::PathMeasure; + #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] mod path_point; @@ -200,11 +207,9 @@ mod flags; #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub use self::flags::PathForeachFlags; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::renderer::GskRendererExt; } -#[doc(hidden)] -pub mod builders { +pub(crate) mod builders { pub use super::gl_shader::GLShaderBuilder; } diff --git a/gsk4/src/auto/opacity_node.rs b/gsk4/src/auto/opacity_node.rs index a7da1909f58c..e2130b3c024a 100644 --- a/gsk4/src/auto/opacity_node.rs +++ b/gsk4/src/auto/opacity_node.rs @@ -4,7 +4,6 @@ use crate::RenderNode; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskOpacityNode")] @@ -46,9 +45,3 @@ impl OpacityNode { unsafe { ffi::gsk_opacity_node_get_opacity(self.to_glib_none().0) } } } - -impl fmt::Display for OpacityNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("OpacityNode") - } -} diff --git a/gsk4/src/auto/outset_shadow_node.rs b/gsk4/src/auto/outset_shadow_node.rs index c12b76611671..c19da799d05c 100644 --- a/gsk4/src/auto/outset_shadow_node.rs +++ b/gsk4/src/auto/outset_shadow_node.rs @@ -4,7 +4,6 @@ use crate::RoundedRect; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskOutsetShadowNode")] @@ -85,9 +84,3 @@ impl OutsetShadowNode { unsafe { ffi::gsk_outset_shadow_node_get_spread(self.to_glib_none().0) } } } - -impl fmt::Display for OutsetShadowNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("OutsetShadowNode") - } -} diff --git a/gsk4/src/auto/path.rs b/gsk4/src/auto/path.rs index 132d420df865..44a37e74a000 100644 --- a/gsk4/src/auto/path.rs +++ b/gsk4/src/auto/path.rs @@ -4,7 +4,6 @@ use crate::{FillRule, PathPoint, Stroke}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -150,9 +149,9 @@ impl Path { } } -impl fmt::Display for Path { +impl std::fmt::Display for Path { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } diff --git a/gsk4/src/auto/path_builder.rs b/gsk4/src/auto/path_builder.rs index e6ed97baee25..9946e6ae5e8a 100644 --- a/gsk4/src/auto/path_builder.rs +++ b/gsk4/src/auto/path_builder.rs @@ -81,6 +81,13 @@ impl PathBuilder { } } + #[doc(alias = "gsk_path_builder_arc_to")] + pub fn arc_to(&self, x1: f32, y1: f32, x2: f32, y2: f32) { + unsafe { + ffi::gsk_path_builder_arc_to(self.to_glib_none().0, x1, y1, x2, y2); + } + } + #[doc(alias = "gsk_path_builder_close")] pub fn close(&self) { unsafe { @@ -88,6 +95,13 @@ impl PathBuilder { } } + #[doc(alias = "gsk_path_builder_conic_to")] + pub fn conic_to(&self, x1: f32, y1: f32, x2: f32, y2: f32, weight: f32) { + unsafe { + ffi::gsk_path_builder_conic_to(self.to_glib_none().0, x1, y1, x2, y2, weight); + } + } + #[doc(alias = "gsk_path_builder_cubic_to")] pub fn cubic_to(&self, x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32) { unsafe { @@ -105,6 +119,13 @@ impl PathBuilder { } } + #[doc(alias = "gsk_path_builder_html_arc_to")] + pub fn html_arc_to(&self, x1: f32, y1: f32, x2: f32, y2: f32, radius: f32) { + unsafe { + ffi::gsk_path_builder_html_arc_to(self.to_glib_none().0, x1, y1, x2, y2, radius); + } + } + #[doc(alias = "gsk_path_builder_line_to")] pub fn line_to(&self, x: f32, y: f32) { unsafe { @@ -126,6 +147,20 @@ impl PathBuilder { } } + #[doc(alias = "gsk_path_builder_rel_arc_to")] + pub fn rel_arc_to(&self, x1: f32, y1: f32, x2: f32, y2: f32) { + unsafe { + ffi::gsk_path_builder_rel_arc_to(self.to_glib_none().0, x1, y1, x2, y2); + } + } + + #[doc(alias = "gsk_path_builder_rel_conic_to")] + pub fn rel_conic_to(&self, x1: f32, y1: f32, x2: f32, y2: f32, weight: f32) { + unsafe { + ffi::gsk_path_builder_rel_conic_to(self.to_glib_none().0, x1, y1, x2, y2, weight); + } + } + #[doc(alias = "gsk_path_builder_rel_cubic_to")] pub fn rel_cubic_to(&self, x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32) { unsafe { @@ -133,6 +168,13 @@ impl PathBuilder { } } + #[doc(alias = "gsk_path_builder_rel_html_arc_to")] + pub fn rel_html_arc_to(&self, x1: f32, y1: f32, x2: f32, y2: f32, radius: f32) { + unsafe { + ffi::gsk_path_builder_rel_html_arc_to(self.to_glib_none().0, x1, y1, x2, y2, radius); + } + } + #[doc(alias = "gsk_path_builder_rel_line_to")] pub fn rel_line_to(&self, x: f32, y: f32) { unsafe { @@ -154,6 +196,56 @@ impl PathBuilder { } } + #[doc(alias = "gsk_path_builder_rel_svg_arc_to")] + pub fn rel_svg_arc_to( + &self, + rx: f32, + ry: f32, + x_axis_rotation: f32, + large_arc: bool, + positive_sweep: bool, + x: f32, + y: f32, + ) { + unsafe { + ffi::gsk_path_builder_rel_svg_arc_to( + self.to_glib_none().0, + rx, + ry, + x_axis_rotation, + large_arc.into_glib(), + positive_sweep.into_glib(), + x, + y, + ); + } + } + + #[doc(alias = "gsk_path_builder_svg_arc_to")] + pub fn svg_arc_to( + &self, + rx: f32, + ry: f32, + x_axis_rotation: f32, + large_arc: bool, + positive_sweep: bool, + x: f32, + y: f32, + ) { + unsafe { + ffi::gsk_path_builder_svg_arc_to( + self.to_glib_none().0, + rx, + ry, + x_axis_rotation, + large_arc.into_glib(), + positive_sweep.into_glib(), + x, + y, + ); + } + } + #[doc(alias = "gsk_path_builder_to_path")] pub fn to_path(&self) -> Path { unsafe { from_glib_full(ffi::gsk_path_builder_to_path(self.to_glib_none().0)) } diff --git a/gsk4/src/auto/path_measure.rs b/gsk4/src/auto/path_measure.rs new file mode 100644 index 000000000000..0dd308328f23 --- /dev/null +++ b/gsk4/src/auto/path_measure.rs @@ -0,0 +1,73 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use crate::{Path, PathPoint}; +use glib::translate::*; + +glib::wrapper! { + #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct PathMeasure(Shared); + + match fn { + ref => |ptr| ffi::gsk_path_measure_ref(ptr), + unref => |ptr| ffi::gsk_path_measure_unref(ptr), + type_ => || ffi::gsk_path_measure_get_type(), + } +} + +impl PathMeasure { + #[doc(alias = "gsk_path_measure_new")] + pub fn new(path: &Path) -> PathMeasure { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gsk_path_measure_new(path.to_glib_none().0)) } + } + + #[doc(alias = "gsk_path_measure_new_with_tolerance")] + #[doc(alias = "new_with_tolerance")] + pub fn with_tolerance(path: &Path, tolerance: f32) -> PathMeasure { + assert_initialized_main_thread!(); + unsafe { + from_glib_full(ffi::gsk_path_measure_new_with_tolerance( + path.to_glib_none().0, + tolerance, + )) + } + } + + #[doc(alias = "gsk_path_measure_get_length")] + #[doc(alias = "get_length")] + pub fn length(&self) -> f32 { + unsafe { ffi::gsk_path_measure_get_length(self.to_glib_none().0) } + } + + #[doc(alias = "gsk_path_measure_get_path")] + #[doc(alias = "get_path")] + pub fn path(&self) -> Path { + unsafe { from_glib_none(ffi::gsk_path_measure_get_path(self.to_glib_none().0)) } + } + + #[doc(alias = "gsk_path_measure_get_point")] + #[doc(alias = "get_point")] + pub fn point(&self, distance: f32) -> Option { + unsafe { + let mut result = PathPoint::uninitialized(); + let ret = from_glib(ffi::gsk_path_measure_get_point( + self.to_glib_none().0, + distance, + result.to_glib_none_mut().0, + )); + if ret { + Some(result) + } else { + None + } + } + } + + #[doc(alias = "gsk_path_measure_get_tolerance")] + #[doc(alias = "get_tolerance")] + pub fn tolerance(&self) -> f32 { + unsafe { ffi::gsk_path_measure_get_tolerance(self.to_glib_none().0) } + } +} diff --git a/gsk4/src/auto/path_point.rs b/gsk4/src/auto/path_point.rs index 58ee8c95e432..ef440b9f6b81 100644 --- a/gsk4/src/auto/path_point.rs +++ b/gsk4/src/auto/path_point.rs @@ -2,9 +2,8 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use crate::{Path, PathDirection}; +use crate::{Path, PathDirection, PathMeasure}; use glib::translate::*; -use std::cmp; glib::wrapper! { pub struct PathPoint(BoxedInline); @@ -32,6 +31,12 @@ impl PathPoint { } } + #[doc(alias = "gsk_path_point_get_distance")] + #[doc(alias = "get_distance")] + pub fn distance(&self, measure: &PathMeasure) -> f32 { + unsafe { ffi::gsk_path_point_get_distance(self.to_glib_none().0, measure.to_glib_none().0) } + } + #[doc(alias = "gsk_path_point_get_position")] #[doc(alias = "get_position")] pub fn position(&self, path: &Path) -> graphene::Point { @@ -76,14 +81,14 @@ impl PathPoint { impl PartialOrd for PathPoint { #[inline] - fn partial_cmp(&self, other: &Self) -> Option { - self.compare(other).partial_cmp(&0) + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) } } impl Ord for PathPoint { #[inline] - fn cmp(&self, other: &Self) -> cmp::Ordering { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.compare(other).cmp(&0) } } diff --git a/gsk4/src/auto/radial_gradient_node.rs b/gsk4/src/auto/radial_gradient_node.rs index e420dd1904f0..ec593b0ae179 100644 --- a/gsk4/src/auto/radial_gradient_node.rs +++ b/gsk4/src/auto/radial_gradient_node.rs @@ -4,7 +4,6 @@ use crate::ColorStop; use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GskRadialGradientNode")] @@ -63,7 +62,7 @@ impl RadialGradientNode { #[doc(alias = "get_color_stops")] pub fn color_stops(&self) -> Vec { unsafe { - let mut n_stops = mem::MaybeUninit::uninit(); + let mut n_stops = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_none_num( ffi::gsk_radial_gradient_node_get_color_stops( self.to_glib_none().0, @@ -105,9 +104,3 @@ impl RadialGradientNode { unsafe { ffi::gsk_radial_gradient_node_get_vradius(self.to_glib_none().0) } } } - -impl fmt::Display for RadialGradientNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("RadialGradientNode") - } -} diff --git a/gsk4/src/auto/render_node.rs b/gsk4/src/auto/render_node.rs index 7ca6cd8563a6..3bf2bd5b4757 100644 --- a/gsk4/src/auto/render_node.rs +++ b/gsk4/src/auto/render_node.rs @@ -4,7 +4,6 @@ use crate::RenderNodeType; use glib::translate::*; -use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GskRenderNode")] @@ -70,7 +69,7 @@ impl RenderNode { #[doc(alias = "gsk_render_node_write_to_file")] pub fn write_to_file(&self, filename: impl AsRef) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gsk_render_node_write_to_file( self.as_ref().to_glib_none().0, filename.as_ref().to_glib_none().0, @@ -85,9 +84,3 @@ impl RenderNode { } } } - -impl fmt::Display for RenderNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("RenderNode") - } -} diff --git a/gsk4/src/auto/renderer.rs b/gsk4/src/auto/renderer.rs index 959f4827e95f..a31335e7d2e4 100644 --- a/gsk4/src/auto/renderer.rs +++ b/gsk4/src/auto/renderer.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GskRenderer")] @@ -58,7 +58,7 @@ pub trait GskRendererExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gsk_renderer_realize")] fn realize(&self, surface: Option<&gdk::Surface>) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gsk_renderer_realize( self.as_ref().to_glib_none().0, surface.to_glib_none().0, @@ -121,7 +121,7 @@ pub trait GskRendererExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::realized\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_realized_trampoline:: as *const (), )), Box_::into_raw(f), @@ -144,7 +144,7 @@ pub trait GskRendererExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::surface\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_surface_trampoline:: as *const (), )), Box_::into_raw(f), @@ -154,9 +154,3 @@ pub trait GskRendererExt: IsA + sealed::Sealed + 'static { } impl> GskRendererExt for O {} - -impl fmt::Display for Renderer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Renderer") - } -} diff --git a/gsk4/src/auto/repeat_node.rs b/gsk4/src/auto/repeat_node.rs index b64c34d6172a..ecaab9e20b08 100644 --- a/gsk4/src/auto/repeat_node.rs +++ b/gsk4/src/auto/repeat_node.rs @@ -4,7 +4,6 @@ use crate::RenderNode; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskRepeatNode")] @@ -51,9 +50,3 @@ impl RepeatNode { unsafe { from_glib_none(ffi::gsk_repeat_node_get_child_bounds(self.to_glib_none().0)) } } } - -impl fmt::Display for RepeatNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("RepeatNode") - } -} diff --git a/gsk4/src/auto/repeating_linear_gradient_node.rs b/gsk4/src/auto/repeating_linear_gradient_node.rs index f2bcd63e617e..f5a32da68139 100644 --- a/gsk4/src/auto/repeating_linear_gradient_node.rs +++ b/gsk4/src/auto/repeating_linear_gradient_node.rs @@ -4,7 +4,6 @@ use crate::ColorStop; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskRepeatingLinearGradientNode")] @@ -43,9 +42,3 @@ impl RepeatingLinearGradientNode { } } } - -impl fmt::Display for RepeatingLinearGradientNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("RepeatingLinearGradientNode") - } -} diff --git a/gsk4/src/auto/repeating_radial_gradient_node.rs b/gsk4/src/auto/repeating_radial_gradient_node.rs index 27dbf0955776..8800c8aca16f 100644 --- a/gsk4/src/auto/repeating_radial_gradient_node.rs +++ b/gsk4/src/auto/repeating_radial_gradient_node.rs @@ -4,7 +4,6 @@ use crate::ColorStop; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskRepeatingRadialGradientNode")] @@ -49,9 +48,3 @@ impl RepeatingRadialGradientNode { } } } - -impl fmt::Display for RepeatingRadialGradientNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("RepeatingRadialGradientNode") - } -} diff --git a/gsk4/src/auto/rounded_clip_node.rs b/gsk4/src/auto/rounded_clip_node.rs index 6150896f60d2..0b46781d8e55 100644 --- a/gsk4/src/auto/rounded_clip_node.rs +++ b/gsk4/src/auto/rounded_clip_node.rs @@ -4,7 +4,6 @@ use crate::{RenderNode, RoundedRect}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskRoundedClipNode")] @@ -46,9 +45,3 @@ impl RoundedClipNode { unsafe { from_glib_none(ffi::gsk_rounded_clip_node_get_clip(self.to_glib_none().0)) } } } - -impl fmt::Display for RoundedClipNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("RoundedClipNode") - } -} diff --git a/gsk4/src/auto/shadow_node.rs b/gsk4/src/auto/shadow_node.rs index 5b5274cd843c..4841044b8d7c 100644 --- a/gsk4/src/auto/shadow_node.rs +++ b/gsk4/src/auto/shadow_node.rs @@ -4,7 +4,6 @@ use crate::{RenderNode, Shadow}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskShadowNode")] @@ -48,9 +47,3 @@ impl ShadowNode { unsafe { ffi::gsk_shadow_node_get_n_shadows(self.to_glib_none().0) } } } - -impl fmt::Display for ShadowNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ShadowNode") - } -} diff --git a/gsk4/src/auto/stroke.rs b/gsk4/src/auto/stroke.rs index abf03713b4f2..8e560eda3fd0 100644 --- a/gsk4/src/auto/stroke.rs +++ b/gsk4/src/auto/stroke.rs @@ -4,7 +4,6 @@ use crate::{LineCap, LineJoin}; use glib::translate::*; -use std::mem; glib::wrapper! { #[derive(Debug, PartialOrd, Ord, Hash)] @@ -28,7 +27,7 @@ impl Stroke { #[doc(alias = "get_dash")] pub fn dash(&self) -> Vec { unsafe { - let mut n_dash = mem::MaybeUninit::uninit(); + let mut n_dash = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_none_num( ffi::gsk_stroke_get_dash(self.to_glib_none().0, n_dash.as_mut_ptr()), n_dash.assume_init() as _, diff --git a/gsk4/src/auto/stroke_node.rs b/gsk4/src/auto/stroke_node.rs index dd9745e78bae..7e69ee7b7700 100644 --- a/gsk4/src/auto/stroke_node.rs +++ b/gsk4/src/auto/stroke_node.rs @@ -4,7 +4,6 @@ use crate::{Path, RenderNode, Stroke}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskStrokeNode")] @@ -53,9 +52,3 @@ impl StrokeNode { unsafe { from_glib_none(ffi::gsk_stroke_node_get_stroke(self.to_glib_none().0)) } } } - -impl fmt::Display for StrokeNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("StrokeNode") - } -} diff --git a/gsk4/src/auto/text_node.rs b/gsk4/src/auto/text_node.rs index 5a36196848aa..b0cbe0fabcbc 100644 --- a/gsk4/src/auto/text_node.rs +++ b/gsk4/src/auto/text_node.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GskTextNode")] @@ -56,7 +55,7 @@ impl TextNode { #[doc(alias = "get_glyphs")] pub fn glyphs(&self) -> Vec { unsafe { - let mut n_glyphs = mem::MaybeUninit::uninit(); + let mut n_glyphs = std::mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_none_num( ffi::gsk_text_node_get_glyphs(self.to_glib_none().0, n_glyphs.as_mut_ptr()), n_glyphs.assume_init() as _, @@ -84,9 +83,3 @@ impl TextNode { unsafe { from_glib(ffi::gsk_text_node_has_color_glyphs(self.to_glib_none().0)) } } } - -impl fmt::Display for TextNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TextNode") - } -} diff --git a/gsk4/src/auto/texture_node.rs b/gsk4/src/auto/texture_node.rs index 2aaa170d8b18..0e9f0a186121 100644 --- a/gsk4/src/auto/texture_node.rs +++ b/gsk4/src/auto/texture_node.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GskTextureNode")] @@ -39,9 +38,3 @@ impl TextureNode { unsafe { from_glib_none(ffi::gsk_texture_node_get_texture(self.to_glib_none().0)) } } } - -impl fmt::Display for TextureNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TextureNode") - } -} diff --git a/gsk4/src/auto/texture_scale_node.rs b/gsk4/src/auto/texture_scale_node.rs index 83038046a4a0..0a63d57ce483 100644 --- a/gsk4/src/auto/texture_scale_node.rs +++ b/gsk4/src/auto/texture_scale_node.rs @@ -4,7 +4,6 @@ use crate::ScalingFilter; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GskTextureScaleNode")] @@ -59,9 +58,3 @@ impl TextureScaleNode { } } } - -impl fmt::Display for TextureScaleNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TextureScaleNode") - } -} diff --git a/gsk4/src/auto/transform.rs b/gsk4/src/auto/transform.rs index 3364f826ff7f..1c02b15a2dd2 100644 --- a/gsk4/src/auto/transform.rs +++ b/gsk4/src/auto/transform.rs @@ -4,7 +4,6 @@ use crate::TransformCategory; use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[derive(Debug, PartialOrd, Ord, Hash)] @@ -60,12 +59,12 @@ impl Transform { #[doc(alias = "gsk_transform_to_2d")] pub fn to_2d(&self) -> (f32, f32, f32, f32, f32, f32) { unsafe { - let mut out_xx = mem::MaybeUninit::uninit(); - let mut out_yx = mem::MaybeUninit::uninit(); - let mut out_xy = mem::MaybeUninit::uninit(); - let mut out_yy = mem::MaybeUninit::uninit(); - let mut out_dx = mem::MaybeUninit::uninit(); - let mut out_dy = mem::MaybeUninit::uninit(); + let mut out_xx = std::mem::MaybeUninit::uninit(); + let mut out_yx = std::mem::MaybeUninit::uninit(); + let mut out_xy = std::mem::MaybeUninit::uninit(); + let mut out_yy = std::mem::MaybeUninit::uninit(); + let mut out_dx = std::mem::MaybeUninit::uninit(); + let mut out_dy = std::mem::MaybeUninit::uninit(); ffi::gsk_transform_to_2d( self.to_glib_none().0, out_xx.as_mut_ptr(), @@ -91,13 +90,13 @@ impl Transform { #[doc(alias = "gsk_transform_to_2d_components")] pub fn to_2d_components(&self) -> (f32, f32, f32, f32, f32, f32, f32) { unsafe { - let mut out_skew_x = mem::MaybeUninit::uninit(); - let mut out_skew_y = mem::MaybeUninit::uninit(); - let mut out_scale_x = mem::MaybeUninit::uninit(); - let mut out_scale_y = mem::MaybeUninit::uninit(); - let mut out_angle = mem::MaybeUninit::uninit(); - let mut out_dx = mem::MaybeUninit::uninit(); - let mut out_dy = mem::MaybeUninit::uninit(); + let mut out_skew_x = std::mem::MaybeUninit::uninit(); + let mut out_skew_y = std::mem::MaybeUninit::uninit(); + let mut out_scale_x = std::mem::MaybeUninit::uninit(); + let mut out_scale_y = std::mem::MaybeUninit::uninit(); + let mut out_angle = std::mem::MaybeUninit::uninit(); + let mut out_dx = std::mem::MaybeUninit::uninit(); + let mut out_dy = std::mem::MaybeUninit::uninit(); ffi::gsk_transform_to_2d_components( self.to_glib_none().0, out_skew_x.as_mut_ptr(), @@ -123,10 +122,10 @@ impl Transform { #[doc(alias = "gsk_transform_to_affine")] pub fn to_affine(&self) -> (f32, f32, f32, f32) { unsafe { - let mut out_scale_x = mem::MaybeUninit::uninit(); - let mut out_scale_y = mem::MaybeUninit::uninit(); - let mut out_dx = mem::MaybeUninit::uninit(); - let mut out_dy = mem::MaybeUninit::uninit(); + let mut out_scale_x = std::mem::MaybeUninit::uninit(); + let mut out_scale_y = std::mem::MaybeUninit::uninit(); + let mut out_dx = std::mem::MaybeUninit::uninit(); + let mut out_dy = std::mem::MaybeUninit::uninit(); ffi::gsk_transform_to_affine( self.to_glib_none().0, out_scale_x.as_mut_ptr(), @@ -161,8 +160,8 @@ impl Transform { #[doc(alias = "gsk_transform_to_translate")] pub fn to_translate(&self) -> (f32, f32) { unsafe { - let mut out_dx = mem::MaybeUninit::uninit(); - let mut out_dy = mem::MaybeUninit::uninit(); + let mut out_dx = std::mem::MaybeUninit::uninit(); + let mut out_dy = std::mem::MaybeUninit::uninit(); ffi::gsk_transform_to_translate( self.to_glib_none().0, out_dx.as_mut_ptr(), @@ -214,9 +213,9 @@ impl PartialEq for Transform { impl Eq for Transform {} -impl fmt::Display for Transform { +impl std::fmt::Display for Transform { #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str(&self.to_str()) } } diff --git a/gsk4/src/auto/transform_node.rs b/gsk4/src/auto/transform_node.rs index fe7745868683..b7788d376577 100644 --- a/gsk4/src/auto/transform_node.rs +++ b/gsk4/src/auto/transform_node.rs @@ -4,7 +4,6 @@ use crate::{RenderNode, Transform}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GskTransformNode")] @@ -46,9 +45,3 @@ impl TransformNode { unsafe { from_glib_none(ffi::gsk_transform_node_get_transform(self.to_glib_none().0)) } } } - -impl fmt::Display for TransformNode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TransformNode") - } -} diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gsk4/src/auto/versions.txt +++ b/gsk4/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gsk4/src/auto/vulkan_renderer.rs b/gsk4/src/auto/vulkan_renderer.rs index dfde402d21b1..19317182d887 100644 --- a/gsk4/src/auto/vulkan_renderer.rs +++ b/gsk4/src/auto/vulkan_renderer.rs @@ -4,7 +4,6 @@ use crate::Renderer; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GskVulkanRenderer")] @@ -28,9 +27,3 @@ impl Default for VulkanRenderer { Self::new() } } - -impl fmt::Display for VulkanRenderer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("VulkanRenderer") - } -} diff --git a/gsk4/src/lib.rs b/gsk4/src/lib.rs index a713b53773a3..bf31d426f535 100644 --- a/gsk4/src/lib.rs +++ b/gsk4/src/lib.rs @@ -21,6 +21,7 @@ macro_rules! skip_assert_initialized { } #[allow(clippy::derived_hash_with_manual_eq)] +#[allow(clippy::too_many_arguments)] mod auto; pub mod builders; diff --git a/gsk4/src/path.rs b/gsk4/src/path.rs index 559f8de06dfc..a653b10bab1d 100644 --- a/gsk4/src/path.rs +++ b/gsk4/src/path.rs @@ -5,24 +5,25 @@ use glib::translate::*; impl Path { #[doc(alias = "gsk_path_foreach")] - pub fn foreach bool>( + pub fn foreach bool>( &self, flags: PathForeachFlags, func: P, ) -> bool { let func_data: P = func; unsafe extern "C" fn func_func< - P: FnMut(&PathOperation, &graphene::Point, usize) -> bool, + P: FnMut(&PathOperation, &graphene::Point, usize, f32) -> bool, >( op: ffi::GskPathOperation, pts: *const graphene::ffi::graphene_point_t, n_pts: libc::size_t, + weight: libc::c_float, user_data: glib::ffi::gpointer, ) -> glib::ffi::gboolean { let op = from_glib(op); let pts = from_glib_borrow(pts); let callback: *mut P = user_data as *const _ as usize as *mut P; - (*callback)(&op, &pts, n_pts).into_glib() + (*callback)(&op, &pts, n_pts, weight).into_glib() } let func = Some(func_func::

as _); let super_callback0: &P = &func_data; diff --git a/gsk4/src/path_point.rs b/gsk4/src/path_point.rs index 742e38f1cbb3..d27ea2ae56aa 100644 --- a/gsk4/src/path_point.rs +++ b/gsk4/src/path_point.rs @@ -1,17 +1,22 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use crate::{Path, PathPoint}; +use crate::{Path, PathDirection, PathPoint}; use glib::translate::*; impl PathPoint { #[doc(alias = "gsk_path_point_get_curvature")] #[doc(alias = "get_curvature")] - pub fn curvature(&self, path: &Path) -> (f32, Option) { + pub fn curvature( + &self, + path: &Path, + direction: PathDirection, + ) -> (f32, Option) { unsafe { let mut center = graphene::Point::uninitialized(); let ret = ffi::gsk_path_point_get_curvature( self.to_glib_none().0, path.to_glib_none().0, + direction.into_glib(), center.to_glib_none_mut().0, ); diff --git a/gsk4/src/transform.rs b/gsk4/src/transform.rs index 9cebaae67504..14b2f00c8bb2 100644 --- a/gsk4/src/transform.rs +++ b/gsk4/src/transform.rs @@ -42,7 +42,7 @@ impl Transform { unsafe { let res: Option = from_glib_full(ffi::gsk_transform_rotate(self.into_glib_ptr(), angle)); - res.unwrap_or_else(Self::new) + res.unwrap_or_default() } } @@ -55,7 +55,7 @@ impl Transform { angle, axis.to_glib_none().0, )); - res.unwrap_or_else(Self::new) + res.unwrap_or_default() } } @@ -68,7 +68,7 @@ impl Transform { factor_x, factor_y, )); - res.unwrap_or_else(Self::new) + res.unwrap_or_default() } } @@ -82,7 +82,7 @@ impl Transform { factor_y, factor_z, )); - res.unwrap_or_else(Self::new) + res.unwrap_or_default() } } @@ -97,7 +97,7 @@ impl Transform { skew_x, skew_y, )); - res.unwrap_or_else(Self::new) + res.unwrap_or_default() } } @@ -109,7 +109,7 @@ impl Transform { self.into_glib_ptr(), other.to_glib_none().0, )); - res.unwrap_or_else(Self::new) + res.unwrap_or_default() } } @@ -121,7 +121,7 @@ impl Transform { self.into_glib_ptr(), point.to_glib_none().0, )); - res.unwrap_or_else(Self::new) + res.unwrap_or_default() } } @@ -133,7 +133,7 @@ impl Transform { self.into_glib_ptr(), point.to_glib_none().0, )); - res.unwrap_or_else(Self::new) + res.unwrap_or_default() } } } diff --git a/gsk4/sys/Gir.toml b/gsk4/sys/Gir.toml index 16d9ea253aac..1296a9b1f42e 100644 --- a/gsk4/sys/Gir.toml +++ b/gsk4/sys/Gir.toml @@ -26,6 +26,10 @@ cfg_condition = "feature = \"broadway\"" pattern = "(new|get_type)" cfg_condition = "feature = \"broadway\"" +[[object]] +name = "Gsk.PathMeasure" +status = "generate" +version = "4.14" [[object]] name = "Gsk.VulkanRenderer" diff --git a/gsk4/sys/src/lib.rs b/gsk4/sys/src/lib.rs index 3c58ff189047..0e2766e18591 100644 --- a/gsk4/sys/src/lib.rs +++ b/gsk4/sys/src/lib.rs @@ -87,6 +87,7 @@ pub const GSK_PATH_CLOSE: GskPathOperation = 1; pub const GSK_PATH_LINE: GskPathOperation = 2; pub const GSK_PATH_QUAD: GskPathOperation = 3; pub const GSK_PATH_CUBIC: GskPathOperation = 4; +pub const GSK_PATH_CONIC: GskPathOperation = 5; pub type GskRenderNodeType = c_int; pub const GSK_NOT_A_RENDER_NODE: GskRenderNodeType = 0; @@ -144,6 +145,7 @@ pub type GskPathForeachFlags = c_uint; pub const GSK_PATH_FOREACH_ALLOW_ONLY_LINES: GskPathForeachFlags = 0; pub const GSK_PATH_FOREACH_ALLOW_QUAD: GskPathForeachFlags = 1; pub const GSK_PATH_FOREACH_ALLOW_CUBIC: GskPathForeachFlags = 2; +pub const GSK_PATH_FOREACH_ALLOW_CONIC: GskPathForeachFlags = 4; // Unions #[derive(Copy, Clone)] @@ -176,6 +178,7 @@ pub type GskPathForeachFunc = Option< GskPathOperation, *const graphene::graphene_point_t, size_t, + c_float, gpointer, ) -> gboolean, >; @@ -282,6 +285,19 @@ impl ::std::fmt::Debug for GskPathBuilder { } } +#[repr(C)] +pub struct GskPathMeasure { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GskPathMeasure { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GskPathMeasure @ {self:p}")) + .finish() + } +} + #[derive(Copy, Clone)] #[repr(C)] pub struct GskPathPoint { @@ -1078,9 +1094,28 @@ extern "C" { ); #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_builder_arc_to( + self_: *mut GskPathBuilder, + x1: c_float, + y1: c_float, + x2: c_float, + y2: c_float, + ); + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_builder_close(self_: *mut GskPathBuilder); #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_builder_conic_to( + self_: *mut GskPathBuilder, + x1: c_float, + y1: c_float, + x2: c_float, + y2: c_float, + weight: c_float, + ); + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_builder_cubic_to( self_: *mut GskPathBuilder, x1: c_float, @@ -1100,6 +1135,16 @@ extern "C" { ) -> *const graphene::graphene_point_t; #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_builder_html_arc_to( + self_: *mut GskPathBuilder, + x1: c_float, + y1: c_float, + x2: c_float, + y2: c_float, + radius: c_float, + ); + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_builder_line_to(self_: *mut GskPathBuilder, x: c_float, y: c_float); #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] @@ -1118,6 +1163,25 @@ extern "C" { pub fn gsk_path_builder_ref(self_: *mut GskPathBuilder) -> *mut GskPathBuilder; #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_builder_rel_arc_to( + self_: *mut GskPathBuilder, + x1: c_float, + y1: c_float, + x2: c_float, + y2: c_float, + ); + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_builder_rel_conic_to( + self_: *mut GskPathBuilder, + x1: c_float, + y1: c_float, + x2: c_float, + y2: c_float, + weight: c_float, + ); + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_builder_rel_cubic_to( self_: *mut GskPathBuilder, x1: c_float, @@ -1129,6 +1193,16 @@ extern "C" { ); #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_builder_rel_html_arc_to( + self_: *mut GskPathBuilder, + x1: c_float, + y1: c_float, + x2: c_float, + y2: c_float, + radius: c_float, + ); + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_builder_rel_line_to(self_: *mut GskPathBuilder, x: c_float, y: c_float); #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] @@ -1144,11 +1218,73 @@ extern "C" { ); #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_builder_rel_svg_arc_to( + self_: *mut GskPathBuilder, + rx: c_float, + ry: c_float, + x_axis_rotation: c_float, + large_arc: gboolean, + positive_sweep: gboolean, + x: c_float, + y: c_float, + ); + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_builder_svg_arc_to( + self_: *mut GskPathBuilder, + rx: c_float, + ry: c_float, + x_axis_rotation: c_float, + large_arc: gboolean, + positive_sweep: gboolean, + x: c_float, + y: c_float, + ); + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_builder_to_path(self_: *mut GskPathBuilder) -> *mut GskPath; #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_builder_unref(self_: *mut GskPathBuilder); + //========================================================================= + // GskPathMeasure + //========================================================================= + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_get_type() -> GType; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_new(path: *mut GskPath) -> *mut GskPathMeasure; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_new_with_tolerance( + path: *mut GskPath, + tolerance: c_float, + ) -> *mut GskPathMeasure; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_get_length(self_: *mut GskPathMeasure) -> c_float; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_get_path(self_: *mut GskPathMeasure) -> *mut GskPath; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_get_point( + self_: *mut GskPathMeasure, + distance: c_float, + result: *mut GskPathPoint, + ) -> gboolean; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_get_tolerance(self_: *mut GskPathMeasure) -> c_float; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_ref(self_: *mut GskPathMeasure) -> *mut GskPathMeasure; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_measure_unref(self_: *mut GskPathMeasure); + //========================================================================= // GskPathPoint //========================================================================= @@ -1178,10 +1314,17 @@ extern "C" { pub fn gsk_path_point_get_curvature( point: *const GskPathPoint, path: *mut GskPath, + direction: GskPathDirection, center: *mut graphene::graphene_point_t, ) -> c_float; #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] + pub fn gsk_path_point_get_distance( + point: *const GskPathPoint, + measure: *mut GskPathMeasure, + ) -> c_float; + #[cfg(feature = "v4_14")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_point_get_position( point: *const GskPathPoint, path: *mut GskPath, diff --git a/gsk4/sys/tests/abi.rs b/gsk4/sys/tests/abi.rs index 609619038c98..06344bd76171 100644 --- a/gsk4/sys/tests/abi.rs +++ b/gsk4/sys/tests/abi.rs @@ -404,7 +404,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GSK_OPACITY_NODE", "14"), ("(gint) GSK_OUTSET_SHADOW_NODE", "12"), ("(gint) GSK_PATH_CLOSE", "1"), + ("(gint) GSK_PATH_CONIC", "5"), ("(gint) GSK_PATH_CUBIC", "4"), + ("(guint) GSK_PATH_FOREACH_ALLOW_CONIC", "4"), ("(guint) GSK_PATH_FOREACH_ALLOW_CUBIC", "2"), ("(guint) GSK_PATH_FOREACH_ALLOW_ONLY_LINES", "0"), ("(guint) GSK_PATH_FOREACH_ALLOW_QUAD", "1"), diff --git a/gsk4/sys/tests/constant.c b/gsk4/sys/tests/constant.c index 9b4d8891f287..eed1ea3a90f9 100644 --- a/gsk4/sys/tests/constant.c +++ b/gsk4/sys/tests/constant.c @@ -88,7 +88,9 @@ int main() { PRINT_CONSTANT((gint) GSK_OPACITY_NODE); PRINT_CONSTANT((gint) GSK_OUTSET_SHADOW_NODE); PRINT_CONSTANT((gint) GSK_PATH_CLOSE); + PRINT_CONSTANT((gint) GSK_PATH_CONIC); PRINT_CONSTANT((gint) GSK_PATH_CUBIC); + PRINT_CONSTANT((guint) GSK_PATH_FOREACH_ALLOW_CONIC); PRINT_CONSTANT((guint) GSK_PATH_FOREACH_ALLOW_CUBIC); PRINT_CONSTANT((guint) GSK_PATH_FOREACH_ALLOW_ONLY_LINES); PRINT_CONSTANT((guint) GSK_PATH_FOREACH_ALLOW_QUAD); diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index d597df8c2a98..aae97dcfad02 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ dcaa0e340516) -from gir-files (https://github.com/gtk-rs/gir-files @ 58cd940295f0) +Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) +from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) diff --git a/gtk4/src/auto/about_dialog.rs b/gtk4/src/auto/about_dialog.rs index 843c4bf555e4..560b13f99ba7 100644 --- a/gtk4/src/auto/about_dialog.rs +++ b/gtk4/src/auto/about_dialog.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAboutDialog")] @@ -338,7 +338,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"activate-link\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( activate_link_trampoline:: as *const (), )), Box_::into_raw(f), @@ -361,7 +361,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::artists\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_artists_trampoline:: as *const (), )), Box_::into_raw(f), @@ -384,7 +384,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::authors\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_authors_trampoline:: as *const (), )), Box_::into_raw(f), @@ -407,7 +407,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::comments\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_comments_trampoline:: as *const (), )), Box_::into_raw(f), @@ -430,7 +430,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::copyright\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_copyright_trampoline:: as *const (), )), Box_::into_raw(f), @@ -453,7 +453,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::documenters\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_documenters_trampoline:: as *const (), )), Box_::into_raw(f), @@ -476,7 +476,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::license\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_license_trampoline:: as *const (), )), Box_::into_raw(f), @@ -499,7 +499,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::license-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_license_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -522,7 +522,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::logo\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_logo_trampoline:: as *const (), )), Box_::into_raw(f), @@ -545,7 +545,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::logo-icon-name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_logo_icon_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -568,7 +568,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::program-name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_program_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -594,7 +594,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::system-information\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_system_information_trampoline:: as *const (), )), Box_::into_raw(f), @@ -620,7 +620,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::translator-credits\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_translator_credits_trampoline:: as *const (), )), Box_::into_raw(f), @@ -643,7 +643,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::version\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_version_trampoline:: as *const (), )), Box_::into_raw(f), @@ -666,7 +666,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::website\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_website_trampoline:: as *const (), )), Box_::into_raw(f), @@ -689,7 +689,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::website-label\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_website_label_trampoline:: as *const (), )), Box_::into_raw(f), @@ -712,7 +712,7 @@ impl AboutDialog { connect_raw( self.as_ptr() as *mut _, b"notify::wrap-license\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_wrap_license_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1192,9 +1192,3 @@ impl AboutDialogBuilder { self.builder.build() } } - -impl fmt::Display for AboutDialog { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AboutDialog") - } -} diff --git a/gtk4/src/auto/accessible.rs b/gtk4/src/auto/accessible.rs index 1dce5b71a7cd..95070acb1bdd 100644 --- a/gtk4/src/auto/accessible.rs +++ b/gtk4/src/auto/accessible.rs @@ -11,10 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -#[cfg(feature = "v4_10")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] -use std::mem; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAccessible")] @@ -76,10 +73,10 @@ pub trait AccessibleExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_bounds")] fn bounds(&self) -> Option<(i32, i32, i32, i32)> { unsafe { - let mut x = mem::MaybeUninit::uninit(); - let mut y = mem::MaybeUninit::uninit(); - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut x = std::mem::MaybeUninit::uninit(); + let mut y = std::mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gtk_accessible_get_bounds( self.as_ref().to_glib_none().0, x.as_mut_ptr(), @@ -218,7 +215,7 @@ pub trait AccessibleExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-role\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_role_trampoline:: as *const (), )), Box_::into_raw(f), @@ -228,9 +225,3 @@ pub trait AccessibleExt: IsA + sealed::Sealed + 'static { } impl> AccessibleExt for O {} - -impl fmt::Display for Accessible { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Accessible") - } -} diff --git a/gtk4/src/auto/accessible_range.rs b/gtk4/src/auto/accessible_range.rs index 90de941f8e9e..c648348e759a 100644 --- a/gtk4/src/auto/accessible_range.rs +++ b/gtk4/src/auto/accessible_range.rs @@ -4,7 +4,6 @@ use crate::Accessible; use glib::prelude::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkAccessibleRange")] @@ -27,9 +26,3 @@ mod sealed { pub trait AccessibleRangeExt: IsA + sealed::Sealed + 'static {} impl> AccessibleRangeExt for O {} - -impl fmt::Display for AccessibleRange { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AccessibleRange") - } -} diff --git a/gtk4/src/auto/action_bar.rs b/gtk4/src/auto/action_bar.rs index e1fd18b0e7b9..45b52776903b 100644 --- a/gtk4/src/auto/action_bar.rs +++ b/gtk4/src/auto/action_bar.rs @@ -10,7 +10,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkActionBar")] @@ -101,7 +101,7 @@ impl ActionBar { connect_raw( self.as_ptr() as *mut _, b"notify::revealed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_revealed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -329,9 +329,3 @@ impl ActionBarBuilder { self.builder.build() } } - -impl fmt::Display for ActionBar { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ActionBar") - } -} diff --git a/gtk4/src/auto/actionable.rs b/gtk4/src/auto/actionable.rs index a0630a59ba1a..8c092a5e27d4 100644 --- a/gtk4/src/auto/actionable.rs +++ b/gtk4/src/auto/actionable.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkActionable")] @@ -97,7 +97,7 @@ pub trait ActionableExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::action-name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_action_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -123,7 +123,7 @@ pub trait ActionableExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::action-target\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_action_target_trampoline:: as *const (), )), Box_::into_raw(f), @@ -133,9 +133,3 @@ pub trait ActionableExt: IsA + sealed::Sealed + 'static { } impl> ActionableExt for O {} - -impl fmt::Display for Actionable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Actionable") - } -} diff --git a/gtk4/src/auto/activate_action.rs b/gtk4/src/auto/activate_action.rs index feb2f74f6611..6fc08820a2ba 100644 --- a/gtk4/src/auto/activate_action.rs +++ b/gtk4/src/auto/activate_action.rs @@ -4,7 +4,6 @@ use crate::ShortcutAction; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkActivateAction")] @@ -22,9 +21,3 @@ impl ActivateAction { unsafe { from_glib_none(ffi::gtk_activate_action_get()) } } } - -impl fmt::Display for ActivateAction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ActivateAction") - } -} diff --git a/gtk4/src/auto/adjustment.rs b/gtk4/src/auto/adjustment.rs index 78f0f3fd4c91..814e16bd4ce0 100644 --- a/gtk4/src/auto/adjustment.rs +++ b/gtk4/src/auto/adjustment.rs @@ -7,7 +7,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAdjustment")] @@ -252,7 +252,7 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -274,7 +274,7 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"value-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( value_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -297,7 +297,7 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::lower\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_lower_trampoline:: as *const (), )), Box_::into_raw(f), @@ -323,7 +323,7 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::page-increment\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_page_increment_trampoline:: as *const (), )), Box_::into_raw(f), @@ -349,7 +349,7 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::page-size\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_page_size_trampoline:: as *const (), )), Box_::into_raw(f), @@ -375,7 +375,7 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::step-increment\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_step_increment_trampoline:: as *const (), )), Box_::into_raw(f), @@ -398,7 +398,7 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::upper\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_upper_trampoline:: as *const (), )), Box_::into_raw(f), @@ -421,7 +421,7 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::value\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_value_trampoline:: as *const (), )), Box_::into_raw(f), @@ -431,9 +431,3 @@ pub trait AdjustmentExt: IsA + sealed::Sealed + 'static { } impl> AdjustmentExt for O {} - -impl fmt::Display for Adjustment { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Adjustment") - } -} diff --git a/gtk4/src/auto/alert_dialog.rs b/gtk4/src/auto/alert_dialog.rs index b98b127669fc..ef1663ca2106 100644 --- a/gtk4/src/auto/alert_dialog.rs +++ b/gtk4/src/auto/alert_dialog.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, pin::Pin, ptr}; +use std::{boxed::Box as Box_, pin::Pin}; glib::wrapper! { #[doc(alias = "GtkAlertDialog")] @@ -57,7 +57,7 @@ impl AlertDialog { res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gtk_alert_dialog_choose_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { @@ -207,7 +207,7 @@ impl AlertDialog { connect_raw( self.as_ptr() as *mut _, b"notify::buttons\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_buttons_trampoline:: as *const (), )), Box_::into_raw(f), @@ -232,7 +232,7 @@ impl AlertDialog { connect_raw( self.as_ptr() as *mut _, b"notify::cancel-button\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_cancel_button_trampoline:: as *const (), )), Box_::into_raw(f), @@ -257,7 +257,7 @@ impl AlertDialog { connect_raw( self.as_ptr() as *mut _, b"notify::default-button\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_default_button_trampoline:: as *const (), )), Box_::into_raw(f), @@ -282,7 +282,7 @@ impl AlertDialog { connect_raw( self.as_ptr() as *mut _, b"notify::detail\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_detail_trampoline:: as *const (), )), Box_::into_raw(f), @@ -307,7 +307,7 @@ impl AlertDialog { connect_raw( self.as_ptr() as *mut _, b"notify::message\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_message_trampoline:: as *const (), )), Box_::into_raw(f), @@ -332,7 +332,7 @@ impl AlertDialog { connect_raw( self.as_ptr() as *mut _, b"notify::modal\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_modal_trampoline:: as *const (), )), Box_::into_raw(f), @@ -420,9 +420,3 @@ impl AlertDialogBuilder { self.builder.build() } } - -impl fmt::Display for AlertDialog { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AlertDialog") - } -} diff --git a/gtk4/src/auto/alternative_trigger.rs b/gtk4/src/auto/alternative_trigger.rs index eef5237a3bd4..873c948da8db 100644 --- a/gtk4/src/auto/alternative_trigger.rs +++ b/gtk4/src/auto/alternative_trigger.rs @@ -4,7 +4,6 @@ use crate::ShortcutTrigger; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkAlternativeTrigger")] @@ -101,9 +100,3 @@ impl AlternativeTriggerBuilder { self.builder.build() } } - -impl fmt::Display for AlternativeTrigger { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AlternativeTrigger") - } -} diff --git a/gtk4/src/auto/any_filter.rs b/gtk4/src/auto/any_filter.rs index 60f1f53e17b8..9109d01d738f 100644 --- a/gtk4/src/auto/any_filter.rs +++ b/gtk4/src/auto/any_filter.rs @@ -4,7 +4,6 @@ use crate::{Buildable, Filter, MultiFilter}; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkAnyFilter")] @@ -28,9 +27,3 @@ impl Default for AnyFilter { Self::new() } } - -impl fmt::Display for AnyFilter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AnyFilter") - } -} diff --git a/gtk4/src/auto/app_chooser.rs b/gtk4/src/auto/app_chooser.rs index 852b865e2835..94b23754e916 100644 --- a/gtk4/src/auto/app_chooser.rs +++ b/gtk4/src/auto/app_chooser.rs @@ -5,7 +5,6 @@ use crate::{Accessible, Buildable, ConstraintTarget, Widget}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkAppChooser")] @@ -61,9 +60,3 @@ pub trait AppChooserExt: IsA + sealed::Sealed + 'static { } impl> AppChooserExt for O {} - -impl fmt::Display for AppChooser { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppChooser") - } -} diff --git a/gtk4/src/auto/app_chooser_button.rs b/gtk4/src/auto/app_chooser_button.rs index a1736aa7ecd0..112625bd7fcc 100644 --- a/gtk4/src/auto/app_chooser_button.rs +++ b/gtk4/src/auto/app_chooser_button.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAppChooserButton")] @@ -185,7 +185,7 @@ impl AppChooserButton { connect_raw( self.as_ptr() as *mut _, b"activate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( activate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -213,7 +213,7 @@ impl AppChooserButton { connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -250,7 +250,7 @@ impl AppChooserButton { connect_raw( self.as_ptr() as *mut _, signal_name.as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( custom_item_activated_trampoline:: as *const (), )), Box_::into_raw(f), @@ -273,7 +273,7 @@ impl AppChooserButton { connect_raw( self.as_ptr() as *mut _, b"notify::heading\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_heading_trampoline:: as *const (), )), Box_::into_raw(f), @@ -296,7 +296,7 @@ impl AppChooserButton { connect_raw( self.as_ptr() as *mut _, b"notify::modal\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_modal_trampoline:: as *const (), )), Box_::into_raw(f), @@ -324,7 +324,7 @@ impl AppChooserButton { connect_raw( self.as_ptr() as *mut _, b"notify::show-default-item\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_default_item_trampoline:: as *const (), )), Box_::into_raw(f), @@ -349,7 +349,7 @@ impl AppChooserButton { connect_raw( self.as_ptr() as *mut _, b"notify::show-dialog-item\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_dialog_item_trampoline:: as *const (), )), Box_::into_raw(f), @@ -603,9 +603,3 @@ impl AppChooserButtonBuilder { self.builder.build() } } - -impl fmt::Display for AppChooserButton { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppChooserButton") - } -} diff --git a/gtk4/src/auto/app_chooser_dialog.rs b/gtk4/src/auto/app_chooser_dialog.rs index 6a4315d922ed..2c3cf98c650e 100644 --- a/gtk4/src/auto/app_chooser_dialog.rs +++ b/gtk4/src/auto/app_chooser_dialog.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAppChooserDialog")] @@ -118,7 +118,7 @@ impl AppChooserDialog { connect_raw( self.as_ptr() as *mut _, b"notify::heading\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_heading_trampoline:: as *const (), )), Box_::into_raw(f), @@ -126,9 +126,3 @@ impl AppChooserDialog { } } } - -impl fmt::Display for AppChooserDialog { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppChooserDialog") - } -} diff --git a/gtk4/src/auto/app_chooser_widget.rs b/gtk4/src/auto/app_chooser_widget.rs index 8e1dfe7a8d2b..bb2ef6937ba9 100644 --- a/gtk4/src/auto/app_chooser_widget.rs +++ b/gtk4/src/auto/app_chooser_widget.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAppChooserWidget")] @@ -203,7 +203,7 @@ impl AppChooserWidget { connect_raw( self.as_ptr() as *mut _, b"application-activated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( application_activated_trampoline:: as *const (), )), Box_::into_raw(f), @@ -231,7 +231,7 @@ impl AppChooserWidget { connect_raw( self.as_ptr() as *mut _, b"application-selected\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( application_selected_trampoline:: as *const (), )), Box_::into_raw(f), @@ -254,7 +254,7 @@ impl AppChooserWidget { connect_raw( self.as_ptr() as *mut _, b"notify::default-text\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_default_text_trampoline:: as *const (), )), Box_::into_raw(f), @@ -277,7 +277,7 @@ impl AppChooserWidget { connect_raw( self.as_ptr() as *mut _, b"notify::show-all\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_all_trampoline:: as *const (), )), Box_::into_raw(f), @@ -300,7 +300,7 @@ impl AppChooserWidget { connect_raw( self.as_ptr() as *mut _, b"notify::show-default\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_default_trampoline:: as *const (), )), Box_::into_raw(f), @@ -323,7 +323,7 @@ impl AppChooserWidget { connect_raw( self.as_ptr() as *mut _, b"notify::show-fallback\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_fallback_trampoline:: as *const (), )), Box_::into_raw(f), @@ -346,7 +346,7 @@ impl AppChooserWidget { connect_raw( self.as_ptr() as *mut _, b"notify::show-other\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_other_trampoline:: as *const (), )), Box_::into_raw(f), @@ -371,7 +371,7 @@ impl AppChooserWidget { connect_raw( self.as_ptr() as *mut _, b"notify::show-recommended\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_recommended_trampoline:: as *const (), )), Box_::into_raw(f), @@ -635,9 +635,3 @@ impl AppChooserWidgetBuilder { self.builder.build() } } - -impl fmt::Display for AppChooserWidget { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppChooserWidget") - } -} diff --git a/gtk4/src/auto/application.rs b/gtk4/src/auto/application.rs index d86a0a9eb511..1811a0af4039 100644 --- a/gtk4/src/auto/application.rs +++ b/gtk4/src/auto/application.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkApplication")] @@ -292,7 +292,7 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"query-end\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( query_end_trampoline:: as *const (), )), Box_::into_raw(f), @@ -321,7 +321,7 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"window-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( window_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -350,7 +350,7 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"window-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( window_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -376,7 +376,7 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::active-window\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_active_window_trampoline:: as *const (), )), Box_::into_raw(f), @@ -399,7 +399,7 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::menubar\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_menubar_trampoline:: as *const (), )), Box_::into_raw(f), @@ -425,7 +425,7 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::register-session\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_register_session_trampoline:: as *const (), )), Box_::into_raw(f), @@ -451,7 +451,7 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::screensaver-active\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_screensaver_active_trampoline:: as *const (), )), Box_::into_raw(f), @@ -461,9 +461,3 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { } impl> GtkApplicationExt for O {} - -impl fmt::Display for Application { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Application") - } -} diff --git a/gtk4/src/auto/application_window.rs b/gtk4/src/auto/application_window.rs index b5081b328194..deb03fa8b137 100644 --- a/gtk4/src/auto/application_window.rs +++ b/gtk4/src/auto/application_window.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkApplicationWindow")] @@ -491,7 +491,7 @@ pub trait ApplicationWindowExt: IsA + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"notify::show-menubar\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_show_menubar_trampoline:: as *const (), )), Box_::into_raw(f), @@ -501,9 +501,3 @@ pub trait ApplicationWindowExt: IsA + sealed::Sealed + 'stati } impl> ApplicationWindowExt for O {} - -impl fmt::Display for ApplicationWindow { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ApplicationWindow") - } -} diff --git a/gtk4/src/auto/aspect_frame.rs b/gtk4/src/auto/aspect_frame.rs index 64f6a5be0293..e7b14a7baa98 100644 --- a/gtk4/src/auto/aspect_frame.rs +++ b/gtk4/src/auto/aspect_frame.rs @@ -10,7 +10,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAspectFrame")] @@ -127,7 +127,7 @@ impl AspectFrame { connect_raw( self.as_ptr() as *mut _, b"notify::child\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_child_trampoline:: as *const (), )), Box_::into_raw(f), @@ -150,7 +150,7 @@ impl AspectFrame { connect_raw( self.as_ptr() as *mut _, b"notify::obey-child\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_obey_child_trampoline:: as *const (), )), Box_::into_raw(f), @@ -173,7 +173,7 @@ impl AspectFrame { connect_raw( self.as_ptr() as *mut _, b"notify::ratio\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_ratio_trampoline:: as *const (), )), Box_::into_raw(f), @@ -196,7 +196,7 @@ impl AspectFrame { connect_raw( self.as_ptr() as *mut _, b"notify::xalign\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_xalign_trampoline:: as *const (), )), Box_::into_raw(f), @@ -219,7 +219,7 @@ impl AspectFrame { connect_raw( self.as_ptr() as *mut _, b"notify::yalign\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_yalign_trampoline:: as *const (), )), Box_::into_raw(f), @@ -471,9 +471,3 @@ impl AspectFrameBuilder { self.builder.build() } } - -impl fmt::Display for AspectFrame { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AspectFrame") - } -} diff --git a/gtk4/src/auto/assistant.rs b/gtk4/src/auto/assistant.rs index 13de8ba7a3b2..57c6f790cf83 100644 --- a/gtk4/src/auto/assistant.rs +++ b/gtk4/src/auto/assistant.rs @@ -12,7 +12,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAssistant")] @@ -326,7 +326,7 @@ impl Assistant { connect_raw( self.as_ptr() as *mut _, b"apply\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( apply_trampoline:: as *const (), )), Box_::into_raw(f), @@ -349,7 +349,7 @@ impl Assistant { connect_raw( self.as_ptr() as *mut _, b"cancel\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( cancel_trampoline:: as *const (), )), Box_::into_raw(f), @@ -372,7 +372,7 @@ impl Assistant { connect_raw( self.as_ptr() as *mut _, b"close\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( close_trampoline:: as *const (), )), Box_::into_raw(f), @@ -395,7 +395,7 @@ impl Assistant { connect_raw( self.as_ptr() as *mut _, b"escape\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( escape_trampoline:: as *const (), )), Box_::into_raw(f), @@ -424,7 +424,7 @@ impl Assistant { connect_raw( self.as_ptr() as *mut _, b"prepare\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( prepare_trampoline:: as *const (), )), Box_::into_raw(f), @@ -447,7 +447,7 @@ impl Assistant { connect_raw( self.as_ptr() as *mut _, b"notify::pages\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_pages_trampoline:: as *const (), )), Box_::into_raw(f), @@ -832,9 +832,3 @@ impl AssistantBuilder { self.builder.build() } } - -impl fmt::Display for Assistant { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Assistant") - } -} diff --git a/gtk4/src/auto/assistant_page.rs b/gtk4/src/auto/assistant_page.rs index 197cbccefa55..d683f569a5a2 100644 --- a/gtk4/src/auto/assistant_page.rs +++ b/gtk4/src/auto/assistant_page.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkAssistantPage")] @@ -77,7 +77,7 @@ impl AssistantPage { connect_raw( self.as_ptr() as *mut _, b"notify::complete\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_complete_trampoline:: as *const (), )), Box_::into_raw(f), @@ -101,7 +101,7 @@ impl AssistantPage { connect_raw( self.as_ptr() as *mut _, b"notify::page-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_page_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -125,7 +125,7 @@ impl AssistantPage { connect_raw( self.as_ptr() as *mut _, b"notify::title\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_title_trampoline:: as *const (), )), Box_::into_raw(f), @@ -133,9 +133,3 @@ impl AssistantPage { } } } - -impl fmt::Display for AssistantPage { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AssistantPage") - } -} diff --git a/gtk4/src/auto/at_context.rs b/gtk4/src/auto/at_context.rs index c53867f69089..501dd1684aaf 100644 --- a/gtk4/src/auto/at_context.rs +++ b/gtk4/src/auto/at_context.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkATContext")] @@ -79,7 +79,7 @@ impl ATContext { connect_raw( self.as_ptr() as *mut _, b"state-change\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( state_change_trampoline:: as *const (), )), Box_::into_raw(f), @@ -102,7 +102,7 @@ impl ATContext { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-role\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_role_trampoline:: as *const (), )), Box_::into_raw(f), @@ -125,7 +125,7 @@ impl ATContext { connect_raw( self.as_ptr() as *mut _, b"notify::display\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_display_trampoline:: as *const (), )), Box_::into_raw(f), @@ -133,9 +133,3 @@ impl ATContext { } } } - -impl fmt::Display for ATContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ATContext") - } -} diff --git a/gtk4/src/auto/bin_layout.rs b/gtk4/src/auto/bin_layout.rs index d1a713b1e2c2..9f87b52aaec8 100644 --- a/gtk4/src/auto/bin_layout.rs +++ b/gtk4/src/auto/bin_layout.rs @@ -4,7 +4,6 @@ use crate::LayoutManager; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkBinLayout")] @@ -28,9 +27,3 @@ impl Default for BinLayout { Self::new() } } - -impl fmt::Display for BinLayout { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BinLayout") - } -} diff --git a/gtk4/src/auto/bookmark_list.rs b/gtk4/src/auto/bookmark_list.rs index 6955bf283451..2781a1fa7436 100644 --- a/gtk4/src/auto/bookmark_list.rs +++ b/gtk4/src/auto/bookmark_list.rs @@ -7,7 +7,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkBookmarkList")] @@ -75,7 +75,7 @@ impl BookmarkList { connect_raw( self.as_ptr() as *mut _, b"notify::attributes\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_attributes_trampoline:: as *const (), )), Box_::into_raw(f), @@ -98,7 +98,7 @@ impl BookmarkList { connect_raw( self.as_ptr() as *mut _, b"notify::io-priority\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_io_priority_trampoline:: as *const (), )), Box_::into_raw(f), @@ -121,7 +121,7 @@ impl BookmarkList { connect_raw( self.as_ptr() as *mut _, b"notify::loading\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_loading_trampoline:: as *const (), )), Box_::into_raw(f), @@ -129,9 +129,3 @@ impl BookmarkList { } } } - -impl fmt::Display for BookmarkList { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BookmarkList") - } -} diff --git a/gtk4/src/auto/bool_filter.rs b/gtk4/src/auto/bool_filter.rs index 7ff214a7a59a..aa7f79d8f65d 100644 --- a/gtk4/src/auto/bool_filter.rs +++ b/gtk4/src/auto/bool_filter.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkBoolFilter")] @@ -84,7 +84,7 @@ impl BoolFilter { connect_raw( self.as_ptr() as *mut _, b"notify::expression\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_expression_trampoline:: as *const (), )), Box_::into_raw(f), @@ -107,7 +107,7 @@ impl BoolFilter { connect_raw( self.as_ptr() as *mut _, b"notify::invert\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_invert_trampoline:: as *const (), )), Box_::into_raw(f), @@ -159,9 +159,3 @@ impl BoolFilterBuilder { self.builder.build() } } - -impl fmt::Display for BoolFilter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BoolFilter") - } -} diff --git a/gtk4/src/auto/box_.rs b/gtk4/src/auto/box_.rs index f1fb8738178f..cbac097c7c7a 100644 --- a/gtk4/src/auto/box_.rs +++ b/gtk4/src/auto/box_.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkBox")] @@ -428,7 +428,7 @@ pub trait BoxExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::baseline-child\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_baseline_child_trampoline:: as *const (), )), Box_::into_raw(f), @@ -454,7 +454,7 @@ pub trait BoxExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::baseline-position\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_baseline_position_trampoline:: as *const (), )), Box_::into_raw(f), @@ -477,7 +477,7 @@ pub trait BoxExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::homogeneous\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_homogeneous_trampoline:: as *const (), )), Box_::into_raw(f), @@ -500,7 +500,7 @@ pub trait BoxExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::spacing\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_spacing_trampoline:: as *const (), )), Box_::into_raw(f), @@ -510,9 +510,3 @@ pub trait BoxExt: IsA + sealed::Sealed + 'static { } impl> BoxExt for O {} - -impl fmt::Display for Box { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Box") - } -} diff --git a/gtk4/src/auto/box_layout.rs b/gtk4/src/auto/box_layout.rs index ed090abaf2cb..0eee5f5fd7b7 100644 --- a/gtk4/src/auto/box_layout.rs +++ b/gtk4/src/auto/box_layout.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkBoxLayout")] @@ -114,7 +114,7 @@ impl BoxLayout { connect_raw( self.as_ptr() as *mut _, b"notify::baseline-child\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_baseline_child_trampoline:: as *const (), )), Box_::into_raw(f), @@ -140,7 +140,7 @@ impl BoxLayout { connect_raw( self.as_ptr() as *mut _, b"notify::baseline-position\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_baseline_position_trampoline:: as *const (), )), Box_::into_raw(f), @@ -163,7 +163,7 @@ impl BoxLayout { connect_raw( self.as_ptr() as *mut _, b"notify::homogeneous\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_homogeneous_trampoline:: as *const (), )), Box_::into_raw(f), @@ -186,7 +186,7 @@ impl BoxLayout { connect_raw( self.as_ptr() as *mut _, b"notify::spacing\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_spacing_trampoline:: as *const (), )), Box_::into_raw(f), @@ -258,9 +258,3 @@ impl BoxLayoutBuilder { self.builder.build() } } - -impl fmt::Display for BoxLayout { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BoxLayout") - } -} diff --git a/gtk4/src/auto/buildable.rs b/gtk4/src/auto/buildable.rs index 781bcdf124af..2bcaa943145a 100644 --- a/gtk4/src/auto/buildable.rs +++ b/gtk4/src/auto/buildable.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkBuildable")] @@ -36,9 +35,3 @@ pub trait BuildableExt: IsA + sealed::Sealed + 'static { } impl> BuildableExt for O {} - -impl fmt::Display for Buildable { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Buildable") - } -} diff --git a/gtk4/src/auto/builder.rs b/gtk4/src/auto/builder.rs index a0c1e8007e04..ae764374ef33 100644 --- a/gtk4/src/auto/builder.rs +++ b/gtk4/src/auto/builder.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkBuilder")] @@ -53,7 +53,7 @@ impl Builder { #[doc(alias = "gtk_builder_add_from_resource")] pub fn add_from_resource(&self, resource_path: &str) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gtk_builder_add_from_resource( self.to_glib_none().0, resource_path.to_glib_none().0, @@ -72,7 +72,7 @@ impl Builder { pub fn add_from_string(&self, buffer: &str) -> Result<(), glib::Error> { let length = buffer.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gtk_builder_add_from_string( self.to_glib_none().0, buffer.to_glib_none().0, @@ -95,7 +95,7 @@ impl Builder { object_ids: &[&str], ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gtk_builder_add_objects_from_file( self.to_glib_none().0, filename.as_ref().to_glib_none().0, @@ -118,7 +118,7 @@ impl Builder { object_ids: &[&str], ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gtk_builder_add_objects_from_resource( self.to_glib_none().0, resource_path.to_glib_none().0, @@ -142,7 +142,7 @@ impl Builder { ) -> Result<(), glib::Error> { let length = buffer.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gtk_builder_add_objects_from_string( self.to_glib_none().0, buffer.to_glib_none().0, @@ -167,7 +167,7 @@ impl Builder { object: Option<&impl IsA>, ) -> Result, glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gtk_builder_create_closure( self.to_glib_none().0, function_name.to_glib_none().0, @@ -203,7 +203,7 @@ impl Builder { ) -> Result<(), glib::Error> { let length = buffer.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gtk_builder_extend_with_template( self.to_glib_none().0, object.as_ref().to_glib_none().0, @@ -293,7 +293,7 @@ impl Builder { ) -> Result { unsafe { let mut value = glib::Value::uninitialized(); - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gtk_builder_value_from_string( self.to_glib_none().0, pspec.as_ref().to_glib_none().0, @@ -318,7 +318,7 @@ impl Builder { ) -> Result { unsafe { let mut value = glib::Value::uninitialized(); - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::gtk_builder_value_from_string_type( self.to_glib_none().0, type_.into_glib(), @@ -350,7 +350,7 @@ impl Builder { connect_raw( self.as_ptr() as *mut _, b"notify::current-object\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_current_object_trampoline:: as *const (), )), Box_::into_raw(f), @@ -373,7 +373,7 @@ impl Builder { connect_raw( self.as_ptr() as *mut _, b"notify::scope\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_scope_trampoline:: as *const (), )), Box_::into_raw(f), @@ -399,7 +399,7 @@ impl Builder { connect_raw( self.as_ptr() as *mut _, b"notify::translation-domain\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_translation_domain_trampoline:: as *const (), )), Box_::into_raw(f), @@ -413,9 +413,3 @@ impl Default for Builder { Self::new() } } - -impl fmt::Display for Builder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Builder") - } -} diff --git a/gtk4/src/auto/builder_list_item_factory.rs b/gtk4/src/auto/builder_list_item_factory.rs index c99e6b2ae763..c49f0313a4ba 100644 --- a/gtk4/src/auto/builder_list_item_factory.rs +++ b/gtk4/src/auto/builder_list_item_factory.rs @@ -4,7 +4,6 @@ use crate::{BuilderScope, ListItemFactory}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkBuilderListItemFactory")] @@ -78,9 +77,3 @@ impl BuilderListItemFactory { } } } - -impl fmt::Display for BuilderListItemFactory { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BuilderListItemFactory") - } -} diff --git a/gtk4/src/auto/builder_scope.rs b/gtk4/src/auto/builder_scope.rs index a0b5112c019b..0f3d2d78e9f4 100644 --- a/gtk4/src/auto/builder_scope.rs +++ b/gtk4/src/auto/builder_scope.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::prelude::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkBuilderScope")] @@ -26,9 +25,3 @@ mod sealed { pub trait BuilderScopeExt: IsA + sealed::Sealed + 'static {} impl> BuilderScopeExt for O {} - -impl fmt::Display for BuilderScope { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("BuilderScope") - } -} diff --git a/gtk4/src/auto/button.rs b/gtk4/src/auto/button.rs index 58520b4a8870..faa8d9222727 100644 --- a/gtk4/src/auto/button.rs +++ b/gtk4/src/auto/button.rs @@ -11,7 +11,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute}; +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GtkButton")] @@ -465,7 +465,7 @@ pub trait ButtonExt: IsA