From fd0a927b8f51a37befc36e202e5996938061848e Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Wed, 1 Nov 2023 10:50:58 +0100 Subject: [PATCH] Regen --- atk/src/auto/action.rs | 7 - atk/src/auto/alias.rs | 1 + atk/src/auto/component.rs | 26 +- atk/src/auto/document.rs | 16 +- atk/src/auto/editable_text.rs | 7 - atk/src/auto/enums.rs | 464 +---- atk/src/auto/flags.rs | 10 +- atk/src/auto/gobject_accessible.rs | 7 - atk/src/auto/hyperlink.rs | 16 +- atk/src/auto/hyperlink_impl.rs | 7 - atk/src/auto/hypertext.rs | 10 +- atk/src/auto/image.rs | 15 +- atk/src/auto/misc.rs | 7 - atk/src/auto/mod.rs | 3 +- atk/src/auto/no_op_object.rs | 7 - atk/src/auto/no_op_object_factory.rs | 7 - atk/src/auto/object.rs | 50 +- atk/src/auto/object_factory.rs | 7 - atk/src/auto/plug.rs | 7 - atk/src/auto/registry.rs | 7 - atk/src/auto/relation.rs | 12 +- atk/src/auto/relation_set.rs | 7 - atk/src/auto/selection.rs | 10 +- atk/src/auto/socket.rs | 7 - atk/src/auto/state_set.rs | 7 - atk/src/auto/streamable_content.rs | 7 - atk/src/auto/table.rs | 22 +- atk/src/auto/table_cell.rs | 19 +- atk/src/auto/text.rs | 38 +- atk/src/auto/util.rs | 8 - atk/src/auto/value.rs | 14 +- atk/src/auto/versions.txt | 4 +- atk/src/auto/window.rs | 26 +- atk/sys/tests/abi.rs | 18 +- atk/sys/versions.txt | 4 +- gdk/src/auto/app_launch_context.rs | 7 - gdk/src/auto/cursor.rs | 11 +- gdk/src/auto/device.rs | 50 +- gdk/src/auto/device_manager.rs | 14 +- gdk/src/auto/device_pad.rs | 7 - gdk/src/auto/device_tool.rs | 7 - gdk/src/auto/display.rs | 22 +- gdk/src/auto/display_manager.rs | 12 +- gdk/src/auto/drag_context.rs | 16 +- gdk/src/auto/drawing_context.rs | 7 - gdk/src/auto/enums.rs | 752 +------- gdk/src/auto/flags.rs | 100 +- gdk/src/auto/frame_clock.rs | 22 +- gdk/src/auto/functions.rs | 17 +- gdk/src/auto/gl_context.rs | 17 +- gdk/src/auto/keymap.rs | 22 +- gdk/src/auto/mod.rs | 5 +- gdk/src/auto/monitor.rs | 28 +- gdk/src/auto/rgba.rs | 11 +- gdk/src/auto/screen.rs | 18 +- gdk/src/auto/seat.rs | 16 +- gdk/src/auto/versions.txt | 4 +- gdk/src/auto/visual.rs | 25 +- gdk/src/auto/window.rs | 68 +- gdk/sys/tests/abi.rs | 18 +- gdk/sys/versions.txt | 4 +- gdkx11/src/auto/mod.rs | 5 +- gdkx11/src/auto/versions.txt | 4 +- gdkx11/src/auto/x11_app_launch_context.rs | 8 - gdkx11/src/auto/x11_cursor.rs | 7 - gdkx11/src/auto/x11_device_core.rs | 8 - gdkx11/src/auto/x11_device_manager_core.rs | 8 - gdkx11/src/auto/x11_device_manager_xi2.rs | 7 - gdkx11/src/auto/x11_device_xi2.rs | 7 - gdkx11/src/auto/x11_display.rs | 23 +- gdkx11/src/auto/x11_display_manager.rs | 8 - gdkx11/src/auto/x11_drag_context.rs | 8 - gdkx11/src/auto/x11_keymap.rs | 7 - gdkx11/src/auto/x11_monitor.rs | 7 - gdkx11/src/auto/x11_screen.rs | 10 +- gdkx11/src/auto/x11_visual.rs | 8 - gdkx11/src/auto/x11_window.rs | 7 - gdkx11/src/auto/x11gl_context.rs | 8 - gdkx11/sys/versions.txt | 4 +- gtk/src/auto/about_dialog.rs | 40 +- gtk/src/auto/accel_group.rs | 16 +- gtk/src/auto/accel_label.rs | 16 +- gtk/src/auto/action_bar.rs | 7 - gtk/src/auto/actionable.rs | 12 +- gtk/src/auto/adjustment.rs | 24 +- gtk/src/auto/app_chooser_button.rs | 16 +- gtk/src/auto/app_chooser_dialog.rs | 10 +- gtk/src/auto/app_chooser_widget.rs | 26 +- gtk/src/auto/application.rs | 24 +- gtk/src/auto/application_window.rs | 10 +- gtk/src/auto/aspect_frame.rs | 16 +- gtk/src/auto/assistant.rs | 18 +- gtk/src/auto/bin.rs | 7 - gtk/src/auto/box_.rs | 22 +- gtk/src/auto/buildable.rs | 7 - gtk/src/auto/builder.rs | 14 +- gtk/src/auto/button.rs | 24 +- gtk/src/auto/button_box.rs | 10 +- gtk/src/auto/calendar.rs | 48 +- gtk/src/auto/cell_area.rs | 42 +- gtk/src/auto/cell_area_box.rs | 10 +- gtk/src/auto/cell_area_context.rs | 36 +- gtk/src/auto/cell_editable.rs | 14 +- gtk/src/auto/cell_layout.rs | 8 +- gtk/src/auto/cell_renderer.rs | 70 +- gtk/src/auto/cell_renderer_accel.rs | 20 +- gtk/src/auto/cell_renderer_combo.rs | 16 +- gtk/src/auto/cell_renderer_pixbuf.rs | 24 +- gtk/src/auto/cell_renderer_progress.rs | 20 +- gtk/src/auto/cell_renderer_spin.rs | 14 +- gtk/src/auto/cell_renderer_spinner.rs | 14 +- gtk/src/auto/cell_renderer_text.rs | 102 +- gtk/src/auto/cell_renderer_toggle.rs | 20 +- gtk/src/auto/cell_view.rs | 20 +- gtk/src/auto/check_button.rs | 7 - gtk/src/auto/check_menu_item.rs | 16 +- gtk/src/auto/clipboard.rs | 14 +- gtk/src/auto/color_button.rs | 16 +- gtk/src/auto/color_chooser.rs | 14 +- gtk/src/auto/color_chooser_dialog.rs | 10 +- gtk/src/auto/color_chooser_widget.rs | 10 +- gtk/src/auto/combo_box.rs | 42 +- gtk/src/auto/combo_box_text.rs | 7 - gtk/src/auto/container.rs | 22 +- gtk/src/auto/css_provider.rs | 14 +- gtk/src/auto/dialog.rs | 12 +- gtk/src/auto/drawing_area.rs | 7 - gtk/src/auto/editable.rs | 11 +- gtk/src/auto/entry.rs | 134 +- gtk/src/auto/entry_completion.rs | 34 +- gtk/src/auto/enums.rs | 1708 ++--------------- gtk/src/auto/event_box.rs | 12 +- gtk/src/auto/event_controller.rs | 10 +- gtk/src/auto/event_controller_key.rs | 20 +- gtk/src/auto/event_controller_motion.rs | 14 +- gtk/src/auto/event_controller_scroll.rs | 18 +- gtk/src/auto/expander.rs | 24 +- gtk/src/auto/file_chooser.rs | 54 +- gtk/src/auto/file_chooser_button.rs | 14 +- gtk/src/auto/file_chooser_dialog.rs | 7 - gtk/src/auto/file_chooser_native.rs | 12 +- gtk/src/auto/file_chooser_widget.rs | 36 +- .../auto/file_chooser_widget_accessible.rs | 8 - gtk/src/auto/file_filter.rs | 8 +- gtk/src/auto/fixed.rs | 7 - gtk/src/auto/flags.rs | 194 +- gtk/src/auto/flow_box.rs | 36 +- gtk/src/auto/flow_box_child.rs | 10 +- gtk/src/auto/font_button.rs | 20 +- gtk/src/auto/font_chooser.rs | 24 +- gtk/src/auto/font_chooser_dialog.rs | 7 - gtk/src/auto/font_chooser_widget.rs | 10 +- gtk/src/auto/frame.rs | 22 +- gtk/src/auto/functions.rs | 20 +- gtk/src/auto/gesture.rs | 28 +- gtk/src/auto/gesture_drag.rs | 22 +- gtk/src/auto/gesture_long_press.rs | 14 +- gtk/src/auto/gesture_multi_press.rs | 14 +- gtk/src/auto/gesture_pan.rs | 12 +- gtk/src/auto/gesture_rotate.rs | 10 +- gtk/src/auto/gesture_single.rs | 14 +- gtk/src/auto/gesture_stylus.rs | 18 +- gtk/src/auto/gesture_swipe.rs | 14 +- gtk/src/auto/gesture_zoom.rs | 10 +- gtk/src/auto/gl_area.rs | 30 +- gtk/src/auto/grid.rs | 18 +- gtk/src/auto/header_bar.rs | 24 +- gtk/src/auto/header_bar_accessible.rs | 7 - gtk/src/auto/icon_info.rs | 30 +- gtk/src/auto/icon_theme.rs | 16 +- gtk/src/auto/icon_view.rs | 82 +- gtk/src/auto/im_context.rs | 34 +- gtk/src/auto/im_context_simple.rs | 7 - gtk/src/auto/im_multicontext.rs | 7 - gtk/src/auto/image.rs | 32 +- gtk/src/auto/info_bar.rs | 18 +- gtk/src/auto/invisible.rs | 10 +- gtk/src/auto/label.rs | 66 +- gtk/src/auto/layout.rs | 16 +- gtk/src/auto/level_bar.rs | 22 +- gtk/src/auto/link_button.rs | 14 +- gtk/src/auto/list_box.rs | 28 +- gtk/src/auto/list_box_row.rs | 14 +- gtk/src/auto/list_store.rs | 7 - gtk/src/auto/lock_button.rs | 20 +- gtk/src/auto/menu.rs | 30 +- gtk/src/auto/menu_bar.rs | 12 +- gtk/src/auto/menu_button.rs | 20 +- gtk/src/auto/menu_item.rs | 28 +- gtk/src/auto/menu_shell.rs | 26 +- gtk/src/auto/menu_tool_button.rs | 12 +- gtk/src/auto/message_dialog.rs | 20 +- gtk/src/auto/misc.rs | 7 - gtk/src/auto/mod.rs | 8 +- gtk/src/auto/model_button.rs | 26 +- gtk/src/auto/mount_operation.rs | 14 +- gtk/src/auto/native_dialog.rs | 18 +- gtk/src/auto/notebook.rs | 42 +- gtk/src/auto/offscreen_window.rs | 7 - gtk/src/auto/orientable.rs | 10 +- gtk/src/auto/overlay.rs | 7 - gtk/src/auto/pad_controller.rs | 7 - gtk/src/auto/page_setup.rs | 17 +- gtk/src/auto/paned.rs | 30 +- gtk/src/auto/paper_size.rs | 3 +- gtk/src/auto/places_sidebar.rs | 46 +- gtk/src/auto/plug.rs | 14 +- gtk/src/auto/plug_accessible.rs | 7 - gtk/src/auto/popover.rs | 20 +- gtk/src/auto/popover_menu.rs | 10 +- gtk/src/auto/print_context.rs | 15 +- gtk/src/auto/print_operation.rs | 68 +- gtk/src/auto/print_operation_preview.rs | 12 +- gtk/src/auto/print_settings.rs | 19 +- gtk/src/auto/progress_bar.rs | 20 +- gtk/src/auto/radio_button.rs | 10 +- gtk/src/auto/radio_menu_item.rs | 10 +- gtk/src/auto/radio_tool_button.rs | 7 - gtk/src/auto/range.rs | 36 +- gtk/src/auto/recent_chooser.rs | 36 +- gtk/src/auto/recent_chooser_dialog.rs | 7 - gtk/src/auto/recent_chooser_menu.rs | 10 +- gtk/src/auto/recent_chooser_widget.rs | 7 - gtk/src/auto/recent_filter.rs | 7 - gtk/src/auto/recent_info.rs | 13 +- gtk/src/auto/recent_manager.rs | 20 +- gtk/src/auto/revealer.rs | 16 +- gtk/src/auto/scale.rs | 22 +- gtk/src/auto/scale_button.rs | 22 +- gtk/src/auto/scrollable.rs | 16 +- gtk/src/auto/scrollbar.rs | 7 - gtk/src/auto/scrolled_window.rs | 48 +- gtk/src/auto/search_bar.rs | 12 +- gtk/src/auto/search_entry.rs | 16 +- gtk/src/auto/selection_data.rs | 5 +- gtk/src/auto/separator.rs | 7 - gtk/src/auto/separator_menu_item.rs | 7 - gtk/src/auto/separator_tool_item.rs | 10 +- gtk/src/auto/settings.rs | 110 +- gtk/src/auto/shortcut_label.rs | 12 +- gtk/src/auto/shortcuts_group.rs | 18 +- gtk/src/auto/shortcuts_section.rs | 18 +- gtk/src/auto/shortcuts_shortcut.rs | 30 +- gtk/src/auto/shortcuts_window.rs | 16 +- gtk/src/auto/size_group.rs | 10 +- gtk/src/auto/socket.rs | 12 +- gtk/src/auto/socket_accessible.rs | 7 - gtk/src/auto/spin_button.rs | 32 +- gtk/src/auto/spinner.rs | 10 +- gtk/src/auto/stack.rs | 26 +- gtk/src/auto/stack_sidebar.rs | 10 +- gtk/src/auto/stack_switcher.rs | 10 +- gtk/src/auto/statusbar.rs | 12 +- gtk/src/auto/style_context.rs | 18 +- gtk/src/auto/style_properties.rs | 7 - gtk/src/auto/style_provider.rs | 7 - gtk/src/auto/switch.rs | 16 +- gtk/src/auto/target_list.rs | 3 +- gtk/src/auto/text_buffer.rs | 40 +- gtk/src/auto/text_child_anchor.rs | 7 - gtk/src/auto/text_iter.rs | 7 +- gtk/src/auto/text_mark.rs | 7 - gtk/src/auto/text_tag.rs | 150 +- gtk/src/auto/text_tag_table.rs | 14 +- gtk/src/auto/text_view.rs | 98 +- gtk/src/auto/toggle_button.rs | 16 +- gtk/src/auto/toggle_tool_button.rs | 12 +- gtk/src/auto/tool_button.rs | 20 +- gtk/src/auto/tool_item.rs | 18 +- gtk/src/auto/tool_item_group.rs | 18 +- gtk/src/auto/tool_palette.rs | 14 +- gtk/src/auto/tool_shell.rs | 7 - gtk/src/auto/toolbar.rs | 24 +- gtk/src/auto/tooltip.rs | 7 - gtk/src/auto/tree_drag_dest.rs | 7 - gtk/src/auto/tree_drag_source.rs | 7 - gtk/src/auto/tree_model.rs | 16 +- gtk/src/auto/tree_model_filter.rs | 8 +- gtk/src/auto/tree_model_sort.rs | 7 - gtk/src/auto/tree_path.rs | 13 +- gtk/src/auto/tree_selection.rs | 16 +- gtk/src/auto/tree_sortable.rs | 10 +- gtk/src/auto/tree_store.rs | 7 - gtk/src/auto/tree_view.rs | 132 +- gtk/src/auto/tree_view_column.rs | 58 +- gtk/src/auto/versions.txt | 4 +- gtk/src/auto/viewport.rs | 10 +- gtk/src/auto/volume_button.rs | 10 +- gtk/src/auto/widget.rs | 236 +-- gtk/src/auto/widget_path.rs | 5 +- gtk/src/auto/window.rs | 94 +- gtk/src/auto/window_group.rs | 7 - gtk/sys/tests/abi.rs | 18 +- gtk/sys/versions.txt | 4 +- 294 files changed, 2321 insertions(+), 6545 deletions(-) diff --git a/atk/src/auto/action.rs b/atk/src/auto/action.rs index 111392cb305e..ffbcf8cdc71f 100644 --- a/atk/src/auto/action.rs +++ b/atk/src/auto/action.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkAction")] @@ -87,9 +86,3 @@ pub trait AtkActionExt: IsA + sealed::Sealed + 'static { } impl> AtkActionExt for O {} - -impl fmt::Display for Action { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Action") - } -} diff --git a/atk/src/auto/alias.rs b/atk/src/auto/alias.rs index 8d31731b7319..88c208916a13 100644 --- a/atk/src/auto/alias.rs +++ b/atk/src/auto/alias.rs @@ -5,4 +5,5 @@ #[allow(unused_imports)] use crate::auto::*; +#[doc(alias = "AtkState")] pub type State = u64; diff --git a/atk/src/auto/component.rs b/atk/src/auto/component.rs index 14444a09f705..2aaf2af1ccdb 100644 --- a/atk/src/auto/component.rs +++ b/atk/src/auto/component.rs @@ -11,7 +11,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 = "AtkComponent")] @@ -54,10 +54,10 @@ pub trait ComponentExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_extents")] fn extents(&self, coord_type: CoordType) -> (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(); ffi::atk_component_get_extents( self.as_ref().to_glib_none().0, x.as_mut_ptr(), @@ -91,8 +91,8 @@ pub trait ComponentExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_position")] fn position(&self, coord_type: CoordType) -> (i32, i32) { 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(); ffi::atk_component_get_position( self.as_ref().to_glib_none().0, x.as_mut_ptr(), @@ -107,8 +107,8 @@ pub trait ComponentExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_size")] fn size(&self) -> (i32, i32) { unsafe { - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); ffi::atk_component_get_size( self.as_ref().to_glib_none().0, width.as_mut_ptr(), @@ -223,7 +223,7 @@ pub trait ComponentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"bounds-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( bounds_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -233,9 +233,3 @@ pub trait ComponentExt: IsA + sealed::Sealed + 'static { } impl> ComponentExt for O {} - -impl fmt::Display for Component { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Component") - } -} diff --git a/atk/src/auto/document.rs b/atk/src/auto/document.rs index 9510b50e8f2d..5064894e056e 100644 --- a/atk/src/auto/document.rs +++ b/atk/src/auto/document.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 = "AtkDocument")] @@ -92,7 +92,7 @@ pub trait DocumentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"load-complete\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( load_complete_trampoline:: as *const (), )), Box_::into_raw(f), @@ -114,7 +114,7 @@ pub trait DocumentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"load-stopped\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( load_stopped_trampoline:: as *const (), )), Box_::into_raw(f), @@ -140,7 +140,7 @@ pub trait DocumentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"page-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( page_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -162,7 +162,7 @@ pub trait DocumentExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"reload\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( reload_trampoline:: as *const (), )), Box_::into_raw(f), @@ -172,9 +172,3 @@ pub trait DocumentExt: IsA + sealed::Sealed + 'static { } impl> DocumentExt for O {} - -impl fmt::Display for Document { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Document") - } -} diff --git a/atk/src/auto/editable_text.rs b/atk/src/auto/editable_text.rs index c513bcda8749..717c762e4a7b 100644 --- a/atk/src/auto/editable_text.rs +++ b/atk/src/auto/editable_text.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkEditableText")] @@ -69,9 +68,3 @@ pub trait EditableTextExt: IsA + sealed::Sealed + 'static { } impl> EditableTextExt for O {} - -impl fmt::Display for EditableText { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("EditableText") - } -} diff --git a/atk/src/auto/enums.rs b/atk/src/auto/enums.rs index 65ea4617fcc9..08aa93d7bbd9 100644 --- a/atk/src/auto/enums.rs +++ b/atk/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] @@ -19,21 +18,6 @@ pub enum CoordType { __Unknown(i32), } -impl fmt::Display for CoordType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "CoordType::{}", - match *self { - Self::Screen => "Screen", - Self::Window => "Window", - Self::Parent => "Parent", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for CoordType { type GlibType = ffi::AtkCoordType; @@ -66,6 +50,7 @@ impl FromGlib for CoordType { impl StaticType for CoordType { #[inline] + #[doc(alias = "atk_coord_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_coord_type_get_type()) } } @@ -77,7 +62,7 @@ impl glib::HasParamSpec for CoordType { 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 } } @@ -143,26 +128,6 @@ pub enum Layer { __Unknown(i32), } -impl fmt::Display for Layer { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Layer::{}", - match *self { - Self::Invalid => "Invalid", - Self::Background => "Background", - Self::Canvas => "Canvas", - Self::Widget => "Widget", - Self::Mdi => "Mdi", - Self::Popup => "Popup", - Self::Overlay => "Overlay", - Self::Window => "Window", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Layer { type GlibType = ffi::AtkLayer; @@ -205,6 +170,7 @@ impl FromGlib for Layer { impl StaticType for Layer { #[inline] + #[doc(alias = "atk_layer_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_layer_get_type()) } } @@ -216,7 +182,7 @@ impl glib::HasParamSpec for Layer { 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 } } @@ -274,23 +240,6 @@ pub enum Live { __Unknown(i32), } -#[cfg(feature = "v2_50")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_50")))] -impl fmt::Display for Live { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Live::{}", - match *self { - Self::None => "None", - Self::Polite => "Polite", - Self::Assertive => "Assertive", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v2_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_50")))] #[doc(hidden)] @@ -329,6 +278,7 @@ impl FromGlib for Live { #[cfg_attr(docsrs, doc(cfg(feature = "v2_50")))] impl StaticType for Live { #[inline] + #[doc(alias = "atk_live_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_live_get_type()) } } @@ -342,7 +292,7 @@ impl glib::HasParamSpec for Live { 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 } } @@ -459,40 +409,6 @@ impl RelationType { } } -impl fmt::Display for RelationType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "RelationType::{}", - match *self { - Self::Null => "Null", - Self::ControlledBy => "ControlledBy", - Self::ControllerFor => "ControllerFor", - Self::LabelFor => "LabelFor", - Self::LabelledBy => "LabelledBy", - Self::MemberOf => "MemberOf", - Self::NodeChildOf => "NodeChildOf", - Self::FlowsTo => "FlowsTo", - Self::FlowsFrom => "FlowsFrom", - Self::SubwindowOf => "SubwindowOf", - Self::Embeds => "Embeds", - Self::EmbeddedBy => "EmbeddedBy", - Self::PopupFor => "PopupFor", - Self::ParentWindowOf => "ParentWindowOf", - Self::DescribedBy => "DescribedBy", - Self::DescriptionFor => "DescriptionFor", - Self::NodeParentOf => "NodeParentOf", - Self::Details => "Details", - Self::DetailsFor => "DetailsFor", - Self::ErrorMessage => "ErrorMessage", - Self::ErrorFor => "ErrorFor", - Self::LastDefined => "LastDefined", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for RelationType { type GlibType = ffi::AtkRelationType; @@ -561,6 +477,7 @@ impl FromGlib for RelationType { impl StaticType for RelationType { #[inline] + #[doc(alias = "atk_relation_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_relation_type_get_type()) } } @@ -572,7 +489,7 @@ impl glib::HasParamSpec for RelationType { 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 } } @@ -902,147 +819,6 @@ impl Role { } } -impl fmt::Display for Role { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Role::{}", - match *self { - Self::Invalid => "Invalid", - Self::AcceleratorLabel => "AcceleratorLabel", - Self::Alert => "Alert", - Self::Animation => "Animation", - Self::Arrow => "Arrow", - Self::Calendar => "Calendar", - Self::Canvas => "Canvas", - Self::CheckBox => "CheckBox", - Self::CheckMenuItem => "CheckMenuItem", - Self::ColorChooser => "ColorChooser", - Self::ColumnHeader => "ColumnHeader", - Self::ComboBox => "ComboBox", - Self::DateEditor => "DateEditor", - Self::DesktopIcon => "DesktopIcon", - Self::DesktopFrame => "DesktopFrame", - Self::Dial => "Dial", - Self::Dialog => "Dialog", - Self::DirectoryPane => "DirectoryPane", - Self::DrawingArea => "DrawingArea", - Self::FileChooser => "FileChooser", - Self::Filler => "Filler", - Self::FontChooser => "FontChooser", - Self::Frame => "Frame", - Self::GlassPane => "GlassPane", - Self::HtmlContainer => "HtmlContainer", - Self::Icon => "Icon", - Self::Image => "Image", - Self::InternalFrame => "InternalFrame", - Self::Label => "Label", - Self::LayeredPane => "LayeredPane", - Self::List => "List", - Self::ListItem => "ListItem", - Self::Menu => "Menu", - Self::MenuBar => "MenuBar", - Self::MenuItem => "MenuItem", - Self::OptionPane => "OptionPane", - Self::PageTab => "PageTab", - Self::PageTabList => "PageTabList", - Self::Panel => "Panel", - Self::PasswordText => "PasswordText", - Self::PopupMenu => "PopupMenu", - Self::ProgressBar => "ProgressBar", - Self::PushButton => "PushButton", - Self::RadioButton => "RadioButton", - Self::RadioMenuItem => "RadioMenuItem", - Self::RootPane => "RootPane", - Self::RowHeader => "RowHeader", - Self::ScrollBar => "ScrollBar", - Self::ScrollPane => "ScrollPane", - Self::Separator => "Separator", - Self::Slider => "Slider", - Self::SplitPane => "SplitPane", - Self::SpinButton => "SpinButton", - Self::Statusbar => "Statusbar", - Self::Table => "Table", - Self::TableCell => "TableCell", - Self::TableColumnHeader => "TableColumnHeader", - Self::TableRowHeader => "TableRowHeader", - Self::TearOffMenuItem => "TearOffMenuItem", - Self::Terminal => "Terminal", - Self::Text => "Text", - Self::ToggleButton => "ToggleButton", - Self::ToolBar => "ToolBar", - Self::ToolTip => "ToolTip", - Self::Tree => "Tree", - Self::TreeTable => "TreeTable", - Self::Unknown => "Unknown", - Self::Viewport => "Viewport", - Self::Window => "Window", - Self::Header => "Header", - Self::Footer => "Footer", - Self::Paragraph => "Paragraph", - Self::Ruler => "Ruler", - Self::Application => "Application", - Self::Autocomplete => "Autocomplete", - Self::EditBar => "EditBar", - Self::Embedded => "Embedded", - Self::Entry => "Entry", - Self::Chart => "Chart", - Self::Caption => "Caption", - Self::DocumentFrame => "DocumentFrame", - Self::Heading => "Heading", - Self::Page => "Page", - Self::Section => "Section", - Self::RedundantObject => "RedundantObject", - Self::Form => "Form", - Self::Link => "Link", - Self::InputMethodWindow => "InputMethodWindow", - Self::TableRow => "TableRow", - Self::TreeItem => "TreeItem", - Self::DocumentSpreadsheet => "DocumentSpreadsheet", - Self::DocumentPresentation => "DocumentPresentation", - Self::DocumentText => "DocumentText", - Self::DocumentWeb => "DocumentWeb", - Self::DocumentEmail => "DocumentEmail", - Self::Comment => "Comment", - Self::ListBox => "ListBox", - Self::Grouping => "Grouping", - Self::ImageMap => "ImageMap", - Self::Notification => "Notification", - Self::InfoBar => "InfoBar", - Self::LevelBar => "LevelBar", - Self::TitleBar => "TitleBar", - Self::BlockQuote => "BlockQuote", - Self::Audio => "Audio", - Self::Video => "Video", - Self::Definition => "Definition", - Self::Article => "Article", - Self::Landmark => "Landmark", - Self::Log => "Log", - Self::Marquee => "Marquee", - Self::Math => "Math", - Self::Rating => "Rating", - Self::Timer => "Timer", - Self::DescriptionList => "DescriptionList", - Self::DescriptionTerm => "DescriptionTerm", - Self::DescriptionValue => "DescriptionValue", - Self::Static => "Static", - Self::MathFraction => "MathFraction", - Self::MathRoot => "MathRoot", - Self::Subscript => "Subscript", - Self::Superscript => "Superscript", - Self::Footnote => "Footnote", - Self::ContentDeletion => "ContentDeletion", - Self::ContentInsertion => "ContentInsertion", - Self::Mark => "Mark", - Self::Suggestion => "Suggestion", - Self::PushButtonMenu => "PushButtonMenu", - Self::LastDefined => "LastDefined", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for Role { type GlibType = ffi::AtkRole; @@ -1325,6 +1101,7 @@ impl FromGlib for Role { impl StaticType for Role { #[inline] + #[doc(alias = "atk_role_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_role_get_type()) } } @@ -1336,7 +1113,7 @@ impl glib::HasParamSpec for Role { 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 } } @@ -1402,27 +1179,6 @@ pub enum ScrollType { __Unknown(i32), } -#[cfg(feature = "v2_30")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_30")))] -impl fmt::Display for ScrollType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ScrollType::{}", - match *self { - Self::TopLeft => "TopLeft", - Self::BottomRight => "BottomRight", - Self::TopEdge => "TopEdge", - Self::BottomEdge => "BottomEdge", - Self::LeftEdge => "LeftEdge", - Self::RightEdge => "RightEdge", - Self::Anywhere => "Anywhere", - _ => "Unknown", - } - ) - } -} - #[cfg(feature = "v2_30")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_30")))] #[doc(hidden)] @@ -1469,6 +1225,7 @@ impl FromGlib for ScrollType { #[cfg_attr(docsrs, doc(cfg(feature = "v2_30")))] impl StaticType for ScrollType { #[inline] + #[doc(alias = "atk_scroll_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_scroll_type_get_type()) } } @@ -1482,7 +1239,7 @@ impl glib::HasParamSpec for ScrollType { 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 } } @@ -1645,63 +1402,6 @@ impl StateType { } } -impl fmt::Display for StateType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "StateType::{}", - match *self { - Self::Invalid => "Invalid", - Self::Active => "Active", - Self::Armed => "Armed", - Self::Busy => "Busy", - Self::Checked => "Checked", - Self::Defunct => "Defunct", - Self::Editable => "Editable", - Self::Enabled => "Enabled", - Self::Expandable => "Expandable", - Self::Expanded => "Expanded", - Self::Focusable => "Focusable", - Self::Focused => "Focused", - Self::Horizontal => "Horizontal", - Self::Iconified => "Iconified", - Self::Modal => "Modal", - Self::MultiLine => "MultiLine", - Self::Multiselectable => "Multiselectable", - Self::Opaque => "Opaque", - Self::Pressed => "Pressed", - Self::Resizable => "Resizable", - Self::Selectable => "Selectable", - Self::Selected => "Selected", - Self::Sensitive => "Sensitive", - Self::Showing => "Showing", - Self::SingleLine => "SingleLine", - Self::Stale => "Stale", - Self::Transient => "Transient", - Self::Vertical => "Vertical", - Self::Visible => "Visible", - Self::ManagesDescendants => "ManagesDescendants", - Self::Indeterminate => "Indeterminate", - Self::Truncated => "Truncated", - Self::Required => "Required", - Self::InvalidEntry => "InvalidEntry", - Self::SupportsAutocompletion => "SupportsAutocompletion", - Self::SelectableText => "SelectableText", - Self::Default => "Default", - Self::Animated => "Animated", - Self::Visited => "Visited", - Self::Checkable => "Checkable", - Self::HasPopup => "HasPopup", - Self::HasTooltip => "HasTooltip", - Self::ReadOnly => "ReadOnly", - #[cfg(feature = "v2_38")] - Self::Collapsed => "Collapsed", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for StateType { type GlibType = ffi::AtkStateType; @@ -1816,6 +1516,7 @@ impl FromGlib for StateType { impl StaticType for StateType { #[inline] + #[doc(alias = "atk_state_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_state_type_get_type()) } } @@ -1827,7 +1528,7 @@ impl glib::HasParamSpec for StateType { 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 } } @@ -1959,48 +1660,6 @@ impl TextAttribute { } } -impl fmt::Display for TextAttribute { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TextAttribute::{}", - match *self { - Self::Invalid => "Invalid", - Self::LeftMargin => "LeftMargin", - Self::RightMargin => "RightMargin", - Self::Indent => "Indent", - Self::Invisible => "Invisible", - Self::Editable => "Editable", - Self::PixelsAboveLines => "PixelsAboveLines", - Self::PixelsBelowLines => "PixelsBelowLines", - Self::PixelsInsideWrap => "PixelsInsideWrap", - Self::BgFullHeight => "BgFullHeight", - Self::Rise => "Rise", - Self::Underline => "Underline", - Self::Strikethrough => "Strikethrough", - Self::Size => "Size", - Self::Scale => "Scale", - Self::Weight => "Weight", - Self::Language => "Language", - Self::FamilyName => "FamilyName", - Self::BgColor => "BgColor", - Self::FgColor => "FgColor", - Self::BgStipple => "BgStipple", - Self::FgStipple => "FgStipple", - Self::WrapMode => "WrapMode", - Self::Direction => "Direction", - Self::Justification => "Justification", - Self::Stretch => "Stretch", - Self::Variant => "Variant", - Self::Style => "Style", - Self::TextPosition => "TextPosition", - Self::LastDefined => "LastDefined", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TextAttribute { type GlibType = ffi::AtkTextAttribute; @@ -2085,6 +1744,7 @@ impl FromGlib for TextAttribute { impl StaticType for TextAttribute { #[inline] + #[doc(alias = "atk_text_attribute_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_text_attribute_get_type()) } } @@ -2096,7 +1756,7 @@ impl glib::HasParamSpec for TextAttribute { 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 } } @@ -2160,25 +1820,6 @@ pub enum TextBoundary { __Unknown(i32), } -impl fmt::Display for TextBoundary { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TextBoundary::{}", - match *self { - Self::Char => "Char", - Self::WordStart => "WordStart", - Self::WordEnd => "WordEnd", - Self::SentenceStart => "SentenceStart", - Self::SentenceEnd => "SentenceEnd", - Self::LineStart => "LineStart", - Self::LineEnd => "LineEnd", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TextBoundary { type GlibType = ffi::AtkTextBoundary; @@ -2219,6 +1860,7 @@ impl FromGlib for TextBoundary { impl StaticType for TextBoundary { #[inline] + #[doc(alias = "atk_text_boundary_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_text_boundary_get_type()) } } @@ -2230,7 +1872,7 @@ impl glib::HasParamSpec for TextBoundary { 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 } } @@ -2288,22 +1930,6 @@ pub enum TextClipType { __Unknown(i32), } -impl fmt::Display for TextClipType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TextClipType::{}", - match *self { - Self::None => "None", - Self::Min => "Min", - Self::Max => "Max", - Self::Both => "Both", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TextClipType { type GlibType = ffi::AtkTextClipType; @@ -2338,6 +1964,7 @@ impl FromGlib for TextClipType { impl StaticType for TextClipType { #[inline] + #[doc(alias = "atk_text_clip_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_text_clip_type_get_type()) } } @@ -2349,7 +1976,7 @@ impl glib::HasParamSpec for TextClipType { 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 } } @@ -2409,23 +2036,6 @@ pub enum TextGranularity { __Unknown(i32), } -impl fmt::Display for TextGranularity { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "TextGranularity::{}", - match *self { - Self::Char => "Char", - Self::Word => "Word", - Self::Sentence => "Sentence", - Self::Line => "Line", - Self::Paragraph => "Paragraph", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for TextGranularity { type GlibType = ffi::AtkTextGranularity; @@ -2462,6 +2072,7 @@ impl FromGlib for TextGranularity { impl StaticType for TextGranularity { #[inline] + #[doc(alias = "atk_text_granularity_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_text_granularity_get_type()) } } @@ -2473,7 +2084,7 @@ impl glib::HasParamSpec for TextGranularity { 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 } } @@ -2571,34 +2182,6 @@ impl ValueType { } } -impl fmt::Display for ValueType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ValueType::{}", - match *self { - Self::VeryWeak => "VeryWeak", - Self::Weak => "Weak", - Self::Acceptable => "Acceptable", - Self::Strong => "Strong", - Self::VeryStrong => "VeryStrong", - Self::VeryLow => "VeryLow", - Self::Low => "Low", - Self::Medium => "Medium", - Self::High => "High", - Self::VeryHigh => "VeryHigh", - Self::VeryBad => "VeryBad", - Self::Bad => "Bad", - Self::Good => "Good", - Self::VeryGood => "VeryGood", - Self::Best => "Best", - Self::LastDefined => "LastDefined", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ValueType { type GlibType = ffi::AtkValueType; @@ -2655,6 +2238,7 @@ impl FromGlib for ValueType { impl StaticType for ValueType { #[inline] + #[doc(alias = "atk_value_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_value_type_get_type()) } } @@ -2666,7 +2250,7 @@ impl glib::HasParamSpec for ValueType { 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/atk/src/auto/flags.rs b/atk/src/auto/flags.rs index 17e48a3f76c8..fd227306b8ef 100644 --- a/atk/src/auto/flags.rs +++ b/atk/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)] @@ -14,12 +13,6 @@ bitflags! { } } -impl fmt::Display for HyperlinkStateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for HyperlinkStateFlags { type GlibType = ffi::AtkHyperlinkStateFlags; @@ -41,6 +34,7 @@ impl FromGlib for HyperlinkStateFlags { impl StaticType for HyperlinkStateFlags { #[inline] + #[doc(alias = "atk_hyperlink_state_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::atk_hyperlink_state_flags_get_type()) } } @@ -52,7 +46,7 @@ impl glib::HasParamSpec for HyperlinkStateFlags { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/atk/src/auto/gobject_accessible.rs b/atk/src/auto/gobject_accessible.rs index c3f6eef481b5..fc0f5bcfb744 100644 --- a/atk/src/auto/gobject_accessible.rs +++ b/atk/src/auto/gobject_accessible.rs @@ -4,7 +4,6 @@ use crate::Object; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkGObjectAccessible")] @@ -47,9 +46,3 @@ pub trait GObjectAccessibleExt: IsA + sealed::Sealed + 'stati } impl> GObjectAccessibleExt for O {} - -impl fmt::Display for GObjectAccessible { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GObjectAccessible") - } -} diff --git a/atk/src/auto/hyperlink.rs b/atk/src/auto/hyperlink.rs index 140879bf2e35..9b04c7cbcb08 100644 --- a/atk/src/auto/hyperlink.rs +++ b/atk/src/auto/hyperlink.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 = "AtkHyperlink")] @@ -98,7 +98,7 @@ pub trait HyperlinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"link-activated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( link_activated_trampoline:: as *const (), )), Box_::into_raw(f), @@ -121,7 +121,7 @@ pub trait HyperlinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::end-index\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_end_index_trampoline:: as *const (), )), Box_::into_raw(f), @@ -147,7 +147,7 @@ pub trait HyperlinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::number-of-anchors\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_number_of_anchors_trampoline:: as *const (), )), Box_::into_raw(f), @@ -173,7 +173,7 @@ pub trait HyperlinkExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::start-index\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_start_index_trampoline:: as *const (), )), Box_::into_raw(f), @@ -183,9 +183,3 @@ pub trait HyperlinkExt: IsA + sealed::Sealed + 'static { } impl> HyperlinkExt for O {} - -impl fmt::Display for Hyperlink { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Hyperlink") - } -} diff --git a/atk/src/auto/hyperlink_impl.rs b/atk/src/auto/hyperlink_impl.rs index 0dc883a06ab5..0cf031687b3f 100644 --- a/atk/src/auto/hyperlink_impl.rs +++ b/atk/src/auto/hyperlink_impl.rs @@ -4,7 +4,6 @@ use crate::Hyperlink; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkHyperlinkImpl")] @@ -37,9 +36,3 @@ pub trait HyperlinkImplExt: IsA + sealed::Sealed + 'static { } impl> HyperlinkImplExt for O {} - -impl fmt::Display for HyperlinkImpl { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("HyperlinkImpl") - } -} diff --git a/atk/src/auto/hypertext.rs b/atk/src/auto/hypertext.rs index bca6db7d0a51..574dc57a8d4c 100644 --- a/atk/src/auto/hypertext.rs +++ b/atk/src/auto/hypertext.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 = "AtkHypertext")] @@ -70,7 +70,7 @@ pub trait HypertextExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"link-selected\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( link_selected_trampoline:: as *const (), )), Box_::into_raw(f), @@ -80,9 +80,3 @@ pub trait HypertextExt: IsA + sealed::Sealed + 'static { } impl> HypertextExt for O {} - -impl fmt::Display for Hypertext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Hypertext") - } -} diff --git a/atk/src/auto/image.rs b/atk/src/auto/image.rs index 7fd12c4a9361..07ab33de9022 100644 --- a/atk/src/auto/image.rs +++ b/atk/src/auto/image.rs @@ -4,7 +4,6 @@ use crate::CoordType; use glib::{prelude::*, translate::*}; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "AtkImage")] @@ -49,8 +48,8 @@ pub trait AtkImageExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_image_position")] fn image_position(&self, coord_type: CoordType) -> (i32, i32) { 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(); ffi::atk_image_get_image_position( self.as_ref().to_glib_none().0, x.as_mut_ptr(), @@ -65,8 +64,8 @@ pub trait AtkImageExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_image_size")] fn image_size(&self) -> (i32, i32) { unsafe { - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); ffi::atk_image_get_image_size( self.as_ref().to_glib_none().0, width.as_mut_ptr(), @@ -88,9 +87,3 @@ pub trait AtkImageExt: IsA + sealed::Sealed + 'static { } impl> AtkImageExt for O {} - -impl fmt::Display for Image { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Image") - } -} diff --git a/atk/src/auto/misc.rs b/atk/src/auto/misc.rs index 8cddf87c9a12..1ef9addf9d2d 100644 --- a/atk/src/auto/misc.rs +++ b/atk/src/auto/misc.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkMisc")] @@ -47,9 +46,3 @@ pub trait AtkMiscExt: IsA + sealed::Sealed + 'static { } impl> AtkMiscExt for O {} - -impl fmt::Display for Misc { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Misc") - } -} diff --git a/atk/src/auto/mod.rs b/atk/src/auto/mod.rs index ab88855d071a..9884fa188c3d 100644 --- a/atk/src/auto/mod.rs +++ b/atk/src/auto/mod.rs @@ -119,8 +119,7 @@ pub use self::flags::HyperlinkStateFlags; mod alias; pub use self::alias::State; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::action::AtkActionExt; pub use super::component::ComponentExt; pub use super::document::DocumentExt; diff --git a/atk/src/auto/no_op_object.rs b/atk/src/auto/no_op_object.rs index ff265336983e..00ce4e71395c 100644 --- a/atk/src/auto/no_op_object.rs +++ b/atk/src/auto/no_op_object.rs @@ -7,7 +7,6 @@ use crate::{ TableCell, Text, Value, Window, }; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkNoOpObject")] @@ -30,9 +29,3 @@ impl NoOpObject { } } } - -impl fmt::Display for NoOpObject { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("NoOpObject") - } -} diff --git a/atk/src/auto/no_op_object_factory.rs b/atk/src/auto/no_op_object_factory.rs index e9440ccbb292..e36a829a5cba 100644 --- a/atk/src/auto/no_op_object_factory.rs +++ b/atk/src/auto/no_op_object_factory.rs @@ -4,7 +4,6 @@ use crate::ObjectFactory; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkNoOpObjectFactory")] @@ -30,9 +29,3 @@ impl Default for NoOpObjectFactory { Self::new() } } - -impl fmt::Display for NoOpObjectFactory { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("NoOpObjectFactory") - } -} diff --git a/atk/src/auto/object.rs b/atk/src/auto/object.rs index 62867a821ce4..6499a507a45a 100644 --- a/atk/src/auto/object.rs +++ b/atk/src/auto/object.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 = "AtkObject")] @@ -432,7 +432,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { 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()>( active_descendant_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -460,7 +460,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"announcement\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( announcement_trampoline:: as *const (), )), Box_::into_raw(f), @@ -499,7 +499,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { 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()>( children_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -532,7 +532,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notification\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notification_trampoline:: as *const (), )), Box_::into_raw(f), @@ -576,7 +576,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { 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()>( state_change_trampoline:: as *const (), )), Box_::into_raw(f), @@ -601,7 +601,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"visible-data-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( visible_data_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -630,7 +630,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-component-layer\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_component_layer_trampoline:: as *const (), )), Box_::into_raw(f), @@ -659,7 +659,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-component-mdi-zorder\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_component_mdi_zorder_trampoline:: as *const (), )), Box_::into_raw(f), @@ -688,7 +688,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-description\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_description_trampoline:: as *const (), )), Box_::into_raw(f), @@ -717,7 +717,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-hypertext-nlinks\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_hypertext_nlinks_trampoline:: as *const (), )), Box_::into_raw(f), @@ -743,7 +743,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-name\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_name_trampoline:: as *const (), )), Box_::into_raw(f), @@ -769,7 +769,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-parent\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_parent_trampoline:: as *const (), )), Box_::into_raw(f), @@ -795,7 +795,7 @@ pub trait AtkObjectExt: 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), @@ -824,7 +824,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-caption\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_table_caption_trampoline:: as *const (), )), Box_::into_raw(f), @@ -853,7 +853,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-caption-object\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_table_caption_object_trampoline:: as *const (), )), Box_::into_raw(f), @@ -882,7 +882,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-column-description\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_table_column_description_trampoline:: as *const (), )), Box_::into_raw(f), @@ -911,7 +911,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-column-header\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_table_column_header_trampoline:: as *const (), )), Box_::into_raw(f), @@ -940,7 +940,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-row-description\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_table_row_description_trampoline:: as *const (), )), Box_::into_raw(f), @@ -969,7 +969,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-row-header\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_table_row_header_trampoline:: as *const (), )), Box_::into_raw(f), @@ -998,7 +998,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-table-summary\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_table_summary_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1024,7 +1024,7 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accessible-value\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accessible_value_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1034,9 +1034,3 @@ pub trait AtkObjectExt: IsA + sealed::Sealed + 'static { } impl> AtkObjectExt for O {} - -impl fmt::Display for Object { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Object") - } -} diff --git a/atk/src/auto/object_factory.rs b/atk/src/auto/object_factory.rs index 33a45da9a373..4909466d2c38 100644 --- a/atk/src/auto/object_factory.rs +++ b/atk/src/auto/object_factory.rs @@ -4,7 +4,6 @@ use crate::Object; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkObjectFactory")] @@ -54,9 +53,3 @@ pub trait ObjectFactoryExt: IsA + sealed::Sealed + 'static { } impl> ObjectFactoryExt for O {} - -impl fmt::Display for ObjectFactory { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ObjectFactory") - } -} diff --git a/atk/src/auto/plug.rs b/atk/src/auto/plug.rs index c8538bd2e731..6b1efbb852b6 100644 --- a/atk/src/auto/plug.rs +++ b/atk/src/auto/plug.rs @@ -4,7 +4,6 @@ use crate::{Component, Object}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkPlug")] @@ -45,9 +44,3 @@ pub trait AtkPlugExt: IsA + sealed::Sealed + 'static { } impl> AtkPlugExt for O {} - -impl fmt::Display for Plug { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Plug") - } -} diff --git a/atk/src/auto/registry.rs b/atk/src/auto/registry.rs index 7e4490aad8af..9898afc64e37 100644 --- a/atk/src/auto/registry.rs +++ b/atk/src/auto/registry.rs @@ -4,7 +4,6 @@ use crate::ObjectFactory; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkRegistry")] @@ -60,9 +59,3 @@ pub trait RegistryExt: IsA + sealed::Sealed + 'static { } impl> RegistryExt for O {} - -impl fmt::Display for Registry { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Registry") - } -} diff --git a/atk/src/auto/relation.rs b/atk/src/auto/relation.rs index 78fa50b06ce1..6d4740c75656 100644 --- a/atk/src/auto/relation.rs +++ b/atk/src/auto/relation.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 = "AtkRelation")] @@ -109,7 +109,7 @@ pub trait RelationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::relation-type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_relation_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -132,7 +132,7 @@ pub trait RelationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::target\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_target_trampoline:: as *const (), )), Box_::into_raw(f), @@ -142,9 +142,3 @@ pub trait RelationExt: IsA + sealed::Sealed + 'static { } impl> RelationExt for O {} - -impl fmt::Display for Relation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Relation") - } -} diff --git a/atk/src/auto/relation_set.rs b/atk/src/auto/relation_set.rs index fda3822a3a98..7c156288e8ae 100644 --- a/atk/src/auto/relation_set.rs +++ b/atk/src/auto/relation_set.rs @@ -4,7 +4,6 @@ use crate::{Object, Relation, RelationType}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkRelationSet")] @@ -119,9 +118,3 @@ pub trait RelationSetExt: IsA + sealed::Sealed + 'static { } impl> RelationSetExt for O {} - -impl fmt::Display for RelationSet { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("RelationSet") - } -} diff --git a/atk/src/auto/selection.rs b/atk/src/auto/selection.rs index 4d4c8739e80d..f51ae935a737 100644 --- a/atk/src/auto/selection.rs +++ b/atk/src/auto/selection.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 = "AtkSelection")] @@ -110,7 +110,7 @@ pub trait SelectionExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"selection-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( selection_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -120,9 +120,3 @@ pub trait SelectionExt: IsA + sealed::Sealed + 'static { } impl> SelectionExt for O {} - -impl fmt::Display for Selection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Selection") - } -} diff --git a/atk/src/auto/socket.rs b/atk/src/auto/socket.rs index 0a758938a622..2682678dca1d 100644 --- a/atk/src/auto/socket.rs +++ b/atk/src/auto/socket.rs @@ -4,7 +4,6 @@ use crate::{Component, Object}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkSocket")] @@ -51,9 +50,3 @@ pub trait AtkSocketExt: IsA + sealed::Sealed + 'static { } impl> AtkSocketExt for O {} - -impl fmt::Display for Socket { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Socket") - } -} diff --git a/atk/src/auto/state_set.rs b/atk/src/auto/state_set.rs index c995da37ef28..81914b8ba871 100644 --- a/atk/src/auto/state_set.rs +++ b/atk/src/auto/state_set.rs @@ -4,7 +4,6 @@ use crate::StateType; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkStateSet")] @@ -124,9 +123,3 @@ pub trait StateSetExt: IsA + sealed::Sealed + 'static { } impl> StateSetExt for O {} - -impl fmt::Display for StateSet { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("StateSet") - } -} diff --git a/atk/src/auto/streamable_content.rs b/atk/src/auto/streamable_content.rs index e36a57fe922c..0b90968a7648 100644 --- a/atk/src/auto/streamable_content.rs +++ b/atk/src/auto/streamable_content.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "AtkStreamableContent")] @@ -60,9 +59,3 @@ pub trait StreamableContentExt: IsA + sealed::Sealed + 'stati } impl> StreamableContentExt for O {} - -impl fmt::Display for StreamableContent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("StreamableContent") - } -} diff --git a/atk/src/auto/table.rs b/atk/src/auto/table.rs index adaa4418f4da..333cb748cc89 100644 --- a/atk/src/auto/table.rs +++ b/atk/src/auto/table.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 = "AtkTable")] @@ -292,7 +292,7 @@ pub trait TableExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"column-deleted\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( column_deleted_trampoline:: as *const (), )), Box_::into_raw(f), @@ -319,7 +319,7 @@ pub trait TableExt: IsA
+ sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"column-inserted\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( column_inserted_trampoline:: as *const (), )), Box_::into_raw(f), @@ -341,7 +341,7 @@ pub trait TableExt: IsA
+ sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"column-reordered\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( column_reordered_trampoline:: as *const (), )), Box_::into_raw(f), @@ -363,7 +363,7 @@ pub trait TableExt: IsA
+ sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"model-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( model_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -390,7 +390,7 @@ pub trait TableExt: IsA
+ sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"row-deleted\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( row_deleted_trampoline:: as *const (), )), Box_::into_raw(f), @@ -417,7 +417,7 @@ pub trait TableExt: IsA
+ sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"row-inserted\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( row_inserted_trampoline:: as *const (), )), Box_::into_raw(f), @@ -439,7 +439,7 @@ pub trait TableExt: IsA
+ sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"row-reordered\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( row_reordered_trampoline:: as *const (), )), Box_::into_raw(f), @@ -449,9 +449,3 @@ pub trait TableExt: IsA
+ sealed::Sealed + 'static { } impl> TableExt for O {} - -impl fmt::Display for Table { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Table") - } -} diff --git a/atk/src/auto/table_cell.rs b/atk/src/auto/table_cell.rs index e285868499b0..02ea6bfbc076 100644 --- a/atk/src/auto/table_cell.rs +++ b/atk/src/auto/table_cell.rs @@ -4,7 +4,6 @@ use crate::Object; use glib::{prelude::*, translate::*}; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "AtkTableCell")] @@ -45,8 +44,8 @@ pub trait TableCellExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_position")] fn position(&self) -> Option<(i32, i32)> { unsafe { - let mut row = mem::MaybeUninit::uninit(); - let mut column = mem::MaybeUninit::uninit(); + let mut row = std::mem::MaybeUninit::uninit(); + let mut column = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::atk_table_cell_get_position( self.as_ref().to_glib_none().0, row.as_mut_ptr(), @@ -64,10 +63,10 @@ pub trait TableCellExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_row_column_span")] fn row_column_span(&self) -> Option<(i32, i32, i32, i32)> { unsafe { - let mut row = mem::MaybeUninit::uninit(); - let mut column = mem::MaybeUninit::uninit(); - let mut row_span = mem::MaybeUninit::uninit(); - let mut column_span = mem::MaybeUninit::uninit(); + let mut row = std::mem::MaybeUninit::uninit(); + let mut column = std::mem::MaybeUninit::uninit(); + let mut row_span = std::mem::MaybeUninit::uninit(); + let mut column_span = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::atk_table_cell_get_row_column_span( self.as_ref().to_glib_none().0, row.as_mut_ptr(), @@ -116,9 +115,3 @@ pub trait TableCellExt: IsA + sealed::Sealed + 'static { } impl> TableCellExt for O {} - -impl fmt::Display for TableCell { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("TableCell") - } -} diff --git a/atk/src/auto/text.rs b/atk/src/auto/text.rs index 788a2b9641f0..5cdadc693f0e 100644 --- a/atk/src/auto/text.rs +++ b/atk/src/auto/text.rs @@ -11,7 +11,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 = "AtkText")] @@ -91,10 +91,10 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_character_extents")] fn character_extents(&self, offset: i32, coords: CoordType) -> (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(); ffi::atk_text_get_character_extents( self.as_ref().to_glib_none().0, offset, @@ -169,8 +169,8 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_selection")] fn selection(&self, selection_num: i32) -> (glib::GString, i32, i32) { unsafe { - let mut start_offset = mem::MaybeUninit::uninit(); - let mut end_offset = mem::MaybeUninit::uninit(); + let mut start_offset = std::mem::MaybeUninit::uninit(); + let mut end_offset = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::atk_text_get_selection( self.as_ref().to_glib_none().0, selection_num, @@ -189,8 +189,8 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { granularity: TextGranularity, ) -> (Option, i32, i32) { unsafe { - let mut start_offset = mem::MaybeUninit::uninit(); - let mut end_offset = mem::MaybeUninit::uninit(); + let mut start_offset = std::mem::MaybeUninit::uninit(); + let mut end_offset = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::atk_text_get_string_at_offset( self.as_ref().to_glib_none().0, offset, @@ -222,8 +222,8 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { boundary_type: TextBoundary, ) -> (glib::GString, i32, i32) { unsafe { - let mut start_offset = mem::MaybeUninit::uninit(); - let mut end_offset = mem::MaybeUninit::uninit(); + let mut start_offset = std::mem::MaybeUninit::uninit(); + let mut end_offset = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::atk_text_get_text_at_offset( self.as_ref().to_glib_none().0, offset, @@ -321,7 +321,7 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"text-attributes-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( text_attributes_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -344,7 +344,7 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"text-caret-moved\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( text_caret_moved_trampoline:: as *const (), )), Box_::into_raw(f), @@ -385,7 +385,7 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { 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()>( text_insert_trampoline:: as *const (), )), Box_::into_raw(f), @@ -426,7 +426,7 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { 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()>( text_remove_trampoline:: as *const (), )), Box_::into_raw(f), @@ -451,7 +451,7 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"text-selection-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( text_selection_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -461,9 +461,3 @@ pub trait TextExt: IsA + sealed::Sealed + 'static { } impl> TextExt for O {} - -impl fmt::Display for Text { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Text") - } -} diff --git a/atk/src/auto/util.rs b/atk/src/auto/util.rs index 9589c8353620..07134e432989 100644 --- a/atk/src/auto/util.rs +++ b/atk/src/auto/util.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 = "AtkUtil")] pub struct Util(Object); @@ -16,9 +14,3 @@ glib::wrapper! { impl Util { pub const NONE: Option<&'static Util> = None; } - -impl fmt::Display for Util { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Util") - } -} diff --git a/atk/src/auto/value.rs b/atk/src/auto/value.rs index 16b840cf748f..a8ff65184fd4 100644 --- a/atk/src/auto/value.rs +++ b/atk/src/auto/value.rs @@ -8,7 +8,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 = "AtkValue")] @@ -107,8 +107,8 @@ pub trait ValueExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_value_and_text")] fn value_and_text(&self) -> (f64, glib::GString) { unsafe { - let mut value = mem::MaybeUninit::uninit(); - let mut text = ptr::null_mut(); + let mut value = std::mem::MaybeUninit::uninit(); + let mut text = std::ptr::null_mut(); ffi::atk_value_get_value_and_text( self.as_ref().to_glib_none().0, value.as_mut_ptr(), @@ -158,7 +158,7 @@ pub trait ValueExt: 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), @@ -168,9 +168,3 @@ pub trait ValueExt: IsA + sealed::Sealed + 'static { } impl> ValueExt for O {} - -impl fmt::Display for Value { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Value") - } -} diff --git a/atk/src/auto/versions.txt b/atk/src/auto/versions.txt index 17a2d3ead99b..14beda852edb 100644 --- a/atk/src/auto/versions.txt +++ b/atk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) -from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) +Generated by gir (https://github.com/gtk-rs/gir @ c0970367709d) +from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40) diff --git a/atk/src/auto/window.rs b/atk/src/auto/window.rs index 4772fc96089f..fbc76e2b8c73 100644 --- a/atk/src/auto/window.rs +++ b/atk/src/auto/window.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 = "AtkWindow")] @@ -43,7 +43,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { 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), @@ -65,7 +65,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"create\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( create_trampoline:: as *const (), )), Box_::into_raw(f), @@ -87,7 +87,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"deactivate\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( deactivate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -109,7 +109,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"destroy\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( destroy_trampoline:: as *const (), )), Box_::into_raw(f), @@ -131,7 +131,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"maximize\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( maximize_trampoline:: as *const (), )), Box_::into_raw(f), @@ -153,7 +153,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"minimize\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( minimize_trampoline:: as *const (), )), Box_::into_raw(f), @@ -175,7 +175,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"move\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( move_trampoline:: as *const (), )), Box_::into_raw(f), @@ -197,7 +197,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"resize\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( resize_trampoline:: as *const (), )), Box_::into_raw(f), @@ -219,7 +219,7 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"restore\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( restore_trampoline:: as *const (), )), Box_::into_raw(f), @@ -229,9 +229,3 @@ pub trait AtkWindowExt: IsA + sealed::Sealed + 'static { } impl> AtkWindowExt for O {} - -impl fmt::Display for Window { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Window") - } -} diff --git a/atk/sys/tests/abi.rs b/atk/sys/tests/abi.rs index a25b9251d173..3ffdd7c929e9 100644 --- a/atk/sys/tests/abi.rs +++ b/atk/sys/tests/abi.rs @@ -10,7 +10,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -70,9 +70,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -187,13 +189,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/atk/sys/versions.txt b/atk/sys/versions.txt index 17a2d3ead99b..14beda852edb 100644 --- a/atk/sys/versions.txt +++ b/atk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) -from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) +Generated by gir (https://github.com/gtk-rs/gir @ c0970367709d) +from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40) diff --git a/gdk/src/auto/app_launch_context.rs b/gdk/src/auto/app_launch_context.rs index 883dbeb95a8c..8103d46ea199 100644 --- a/gdk/src/auto/app_launch_context.rs +++ b/gdk/src/auto/app_launch_context.rs @@ -4,7 +4,6 @@ use crate::{Display, Screen}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkAppLaunchContext")] @@ -61,9 +60,3 @@ impl AppLaunchContext { ObjectExt::property(self, "display") } } - -impl fmt::Display for AppLaunchContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppLaunchContext") - } -} diff --git a/gdk/src/auto/cursor.rs b/gdk/src/auto/cursor.rs index cb01e058d4d1..9d48d3cb9b95 100644 --- a/gdk/src/auto/cursor.rs +++ b/gdk/src/auto/cursor.rs @@ -4,7 +4,6 @@ use crate::{CursorType, Display}; use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GdkCursor")] @@ -90,8 +89,8 @@ impl Cursor { #[doc(alias = "get_surface")] pub fn surface(&self) -> (Option, f64, f64) { unsafe { - let mut x_hot = mem::MaybeUninit::uninit(); - let mut y_hot = mem::MaybeUninit::uninit(); + let mut x_hot = std::mem::MaybeUninit::uninit(); + let mut y_hot = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::gdk_cursor_get_surface( self.to_glib_none().0, x_hot.as_mut_ptr(), @@ -101,9 +100,3 @@ impl Cursor { } } } - -impl fmt::Display for Cursor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Cursor") - } -} diff --git a/gdk/src/auto/device.rs b/gdk/src/auto/device.rs index 90430353fda7..4ce1dacb6056 100644 --- a/gdk/src/auto/device.rs +++ b/gdk/src/auto/device.rs @@ -11,7 +11,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 = "GdkDevice")] @@ -102,8 +102,8 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_key")] fn key(&self, index_: u32) -> Option<(u32, ModifierType)> { unsafe { - let mut keyval = mem::MaybeUninit::uninit(); - let mut modifiers = mem::MaybeUninit::uninit(); + let mut keyval = std::mem::MaybeUninit::uninit(); + let mut modifiers = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_device_get_key( self.as_ref().to_glib_none().0, index_, @@ -156,9 +156,9 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_position")] fn position(&self) -> (Screen, i32, i32) { unsafe { - let mut screen = ptr::null_mut(); - let mut x = mem::MaybeUninit::uninit(); - let mut y = mem::MaybeUninit::uninit(); + let mut screen = std::ptr::null_mut(); + let mut x = std::mem::MaybeUninit::uninit(); + let mut y = std::mem::MaybeUninit::uninit(); ffi::gdk_device_get_position( self.as_ref().to_glib_none().0, &mut screen, @@ -173,9 +173,9 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_position_double")] fn position_double(&self) -> (Screen, f64, f64) { unsafe { - let mut screen = ptr::null_mut(); - let mut x = mem::MaybeUninit::uninit(); - let mut y = mem::MaybeUninit::uninit(); + let mut screen = std::ptr::null_mut(); + let mut x = std::mem::MaybeUninit::uninit(); + let mut y = std::mem::MaybeUninit::uninit(); ffi::gdk_device_get_position_double( self.as_ref().to_glib_none().0, &mut screen, @@ -228,8 +228,8 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_window_at_position")] fn window_at_position(&self) -> (Option, i32, i32) { 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_window_at_position( self.as_ref().to_glib_none().0, win_x.as_mut_ptr(), @@ -243,8 +243,8 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_window_at_position_double")] fn window_at_position_double(&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_window_at_position_double( self.as_ref().to_glib_none().0, win_x.as_mut_ptr(), @@ -365,7 +365,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), @@ -394,7 +394,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), @@ -420,7 +420,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::associated-device\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_associated_device_trampoline:: as *const (), )), Box_::into_raw(f), @@ -443,7 +443,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::axes\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_axes_trampoline:: as *const (), )), Box_::into_raw(f), @@ -466,7 +466,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::input-mode\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_input_mode_trampoline:: as *const (), )), Box_::into_raw(f), @@ -489,7 +489,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), @@ -512,7 +512,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), @@ -535,7 +535,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), @@ -558,7 +558,7 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::type\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_type_trampoline:: as *const (), )), Box_::into_raw(f), @@ -568,9 +568,3 @@ pub trait DeviceExt: IsA + sealed::Sealed + 'static { } impl> DeviceExt for O {} - -impl fmt::Display for Device { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Device") - } -} diff --git a/gdk/src/auto/device_manager.rs b/gdk/src/auto/device_manager.rs index 2bb3422306fa..59e49c8addb1 100644 --- a/gdk/src/auto/device_manager.rs +++ b/gdk/src/auto/device_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 = "GdkDeviceManager")] @@ -41,7 +41,7 @@ impl DeviceManager { 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), @@ -64,7 +64,7 @@ impl DeviceManager { connect_raw( self.as_ptr() as *mut _, b"device-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( device_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -87,7 +87,7 @@ impl DeviceManager { 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), @@ -95,9 +95,3 @@ impl DeviceManager { } } } - -impl fmt::Display for DeviceManager { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DeviceManager") - } -} diff --git a/gdk/src/auto/device_pad.rs b/gdk/src/auto/device_pad.rs index eb1f5b249554..3f80e4b2f674 100644 --- a/gdk/src/auto/device_pad.rs +++ b/gdk/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/gdk/src/auto/device_tool.rs b/gdk/src/auto/device_tool.rs index ffcc7f1478a8..99b7372bff72 100644 --- a/gdk/src/auto/device_tool.rs +++ b/gdk/src/auto/device_tool.rs @@ -4,7 +4,6 @@ use crate::{AxisFlags, DeviceToolType}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkDeviceTool")] @@ -38,9 +37,3 @@ impl DeviceTool { ObjectExt::property(self, "axes") } } - -impl fmt::Display for DeviceTool { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DeviceTool") - } -} diff --git a/gdk/src/auto/display.rs b/gdk/src/auto/display.rs index fc0475391395..1a7872d765e6 100644 --- a/gdk/src/auto/display.rs +++ b/gdk/src/auto/display.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 = "GdkDisplay")] @@ -95,8 +95,8 @@ impl Display { #[doc(alias = "get_maximal_cursor_size")] pub fn maximal_cursor_size(&self) -> (u32, u32) { unsafe { - let mut width = mem::MaybeUninit::uninit(); - let mut height = mem::MaybeUninit::uninit(); + let mut width = std::mem::MaybeUninit::uninit(); + let mut height = std::mem::MaybeUninit::uninit(); ffi::gdk_display_get_maximal_cursor_size( self.to_glib_none().0, width.as_mut_ptr(), @@ -323,7 +323,7 @@ impl Display { 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), @@ -346,7 +346,7 @@ impl Display { connect_raw( self.as_ptr() as *mut _, b"monitor-added\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( monitor_added_trampoline:: as *const (), )), Box_::into_raw(f), @@ -372,7 +372,7 @@ impl Display { connect_raw( self.as_ptr() as *mut _, b"monitor-removed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( monitor_removed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -394,7 +394,7 @@ impl Display { 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), @@ -417,7 +417,7 @@ impl Display { 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), @@ -440,7 +440,7 @@ impl Display { 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), @@ -449,9 +449,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(&self.name()) } } diff --git a/gdk/src/auto/display_manager.rs b/gdk/src/auto/display_manager.rs index 25fe5cf4d06e..c59753a85a48 100644 --- a/gdk/src/auto/display_manager.rs +++ b/gdk/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/gdk/src/auto/drag_context.rs b/gdk/src/auto/drag_context.rs index 3427dcad53ff..5e318c07120d 100644 --- a/gdk/src/auto/drag_context.rs +++ b/gdk/src/auto/drag_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 = "GdkDragContext")] @@ -137,7 +137,7 @@ impl DragContext { connect_raw( self.as_ptr() as *mut _, b"action-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( action_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -163,7 +163,7 @@ impl DragContext { 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), @@ -185,7 +185,7 @@ impl DragContext { 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), @@ -208,7 +208,7 @@ impl DragContext { 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), @@ -216,9 +216,3 @@ impl DragContext { } } } - -impl fmt::Display for DragContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DragContext") - } -} diff --git a/gdk/src/auto/drawing_context.rs b/gdk/src/auto/drawing_context.rs index 34d369987685..93afd1733095 100644 --- a/gdk/src/auto/drawing_context.rs +++ b/gdk/src/auto/drawing_context.rs @@ -4,7 +4,6 @@ use crate::Window; use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkDrawingContext")] @@ -43,9 +42,3 @@ impl DrawingContext { unsafe { from_glib(ffi::gdk_drawing_context_is_valid(self.to_glib_none().0)) } } } - -impl fmt::Display for DrawingContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("DrawingContext") - } -} diff --git a/gdk/src/auto/enums.rs b/gdk/src/auto/enums.rs index 984ce6c02781..8d10b022dd2c 100644 --- a/gdk/src/auto/enums.rs +++ b/gdk/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] @@ -35,29 +34,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::Pressure => "Pressure", - Self::Xtilt => "Xtilt", - Self::Ytilt => "Ytilt", - Self::Wheel => "Wheel", - Self::Distance => "Distance", - Self::Rotation => "Rotation", - Self::Slider => "Slider", - Self::Last => "Last", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for AxisUse { type GlibType = ffi::GdkAxisUse; @@ -106,6 +82,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()) } } @@ -117,7 +94,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 } } @@ -171,20 +148,6 @@ pub enum ByteOrder { __Unknown(i32), } -impl fmt::Display for ByteOrder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ByteOrder::{}", - match *self { - Self::LsbFirst => "LsbFirst", - Self::MsbFirst => "MsbFirst", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ByteOrder { type GlibType = ffi::GdkByteOrder; @@ -215,6 +178,7 @@ impl FromGlib for ByteOrder { impl StaticType for ByteOrder { #[inline] + #[doc(alias = "gdk_byte_order_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_byte_order_get_type()) } } @@ -226,7 +190,7 @@ impl glib::HasParamSpec for ByteOrder { 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 } } @@ -294,27 +258,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; @@ -359,6 +302,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()) } } @@ -370,7 +314,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 } } @@ -580,98 +524,6 @@ pub enum CursorType { __Unknown(i32), } -impl fmt::Display for CursorType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "CursorType::{}", - match *self { - Self::XCursor => "XCursor", - Self::Arrow => "Arrow", - Self::BasedArrowDown => "BasedArrowDown", - Self::BasedArrowUp => "BasedArrowUp", - Self::Boat => "Boat", - Self::Bogosity => "Bogosity", - Self::BottomLeftCorner => "BottomLeftCorner", - Self::BottomRightCorner => "BottomRightCorner", - Self::BottomSide => "BottomSide", - Self::BottomTee => "BottomTee", - Self::BoxSpiral => "BoxSpiral", - Self::CenterPtr => "CenterPtr", - Self::Circle => "Circle", - Self::Clock => "Clock", - Self::CoffeeMug => "CoffeeMug", - Self::Cross => "Cross", - Self::CrossReverse => "CrossReverse", - Self::Crosshair => "Crosshair", - Self::DiamondCross => "DiamondCross", - Self::Dot => "Dot", - Self::Dotbox => "Dotbox", - Self::DoubleArrow => "DoubleArrow", - Self::DraftLarge => "DraftLarge", - Self::DraftSmall => "DraftSmall", - Self::DrapedBox => "DrapedBox", - Self::Exchange => "Exchange", - Self::Fleur => "Fleur", - Self::Gobbler => "Gobbler", - Self::Gumby => "Gumby", - Self::Hand1 => "Hand1", - Self::Hand2 => "Hand2", - Self::Heart => "Heart", - Self::Icon => "Icon", - Self::IronCross => "IronCross", - Self::LeftPtr => "LeftPtr", - Self::LeftSide => "LeftSide", - Self::LeftTee => "LeftTee", - Self::Leftbutton => "Leftbutton", - Self::LlAngle => "LlAngle", - Self::LrAngle => "LrAngle", - Self::Man => "Man", - Self::Middlebutton => "Middlebutton", - Self::Mouse => "Mouse", - Self::Pencil => "Pencil", - Self::Pirate => "Pirate", - Self::Plus => "Plus", - Self::QuestionArrow => "QuestionArrow", - Self::RightPtr => "RightPtr", - Self::RightSide => "RightSide", - Self::RightTee => "RightTee", - Self::Rightbutton => "Rightbutton", - Self::RtlLogo => "RtlLogo", - Self::Sailboat => "Sailboat", - Self::SbDownArrow => "SbDownArrow", - Self::SbHDoubleArrow => "SbHDoubleArrow", - Self::SbLeftArrow => "SbLeftArrow", - Self::SbRightArrow => "SbRightArrow", - Self::SbUpArrow => "SbUpArrow", - Self::SbVDoubleArrow => "SbVDoubleArrow", - Self::Shuttle => "Shuttle", - Self::Sizing => "Sizing", - Self::Spider => "Spider", - Self::Spraycan => "Spraycan", - Self::Star => "Star", - Self::Target => "Target", - Self::Tcross => "Tcross", - Self::TopLeftArrow => "TopLeftArrow", - Self::TopLeftCorner => "TopLeftCorner", - Self::TopRightCorner => "TopRightCorner", - Self::TopSide => "TopSide", - Self::TopTee => "TopTee", - Self::Trek => "Trek", - Self::UlAngle => "UlAngle", - Self::Umbrella => "Umbrella", - Self::UrAngle => "UrAngle", - Self::Watch => "Watch", - Self::Xterm => "Xterm", - Self::LastCursor => "LastCursor", - Self::BlankCursor => "BlankCursor", - Self::CursorIsPixmap => "CursorIsPixmap", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for CursorType { type GlibType = ffi::GdkCursorType; @@ -856,6 +708,7 @@ impl FromGlib for CursorType { impl StaticType for CursorType { #[inline] + #[doc(alias = "gdk_cursor_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_cursor_type_get_type()) } } @@ -867,7 +720,7 @@ impl glib::HasParamSpec for CursorType { 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 } } @@ -923,21 +776,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; @@ -970,6 +808,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()) } } @@ -981,7 +820,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 } } @@ -1047,26 +886,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; @@ -1109,6 +928,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()) } } @@ -1120,7 +940,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 } } @@ -1176,21 +996,6 @@ pub enum DeviceType { __Unknown(i32), } -impl fmt::Display for DeviceType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DeviceType::{}", - match *self { - Self::Master => "Master", - Self::Slave => "Slave", - Self::Floating => "Floating", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DeviceType { type GlibType = ffi::GdkDeviceType; @@ -1223,6 +1028,7 @@ impl FromGlib for DeviceType { impl StaticType for DeviceType { #[inline] + #[doc(alias = "gdk_device_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_device_type_get_type()) } } @@ -1234,7 +1040,7 @@ impl glib::HasParamSpec for DeviceType { 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 } } @@ -1290,21 +1096,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; @@ -1337,6 +1128,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()) } } @@ -1348,7 +1140,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 } } @@ -1414,26 +1206,6 @@ pub enum DragProtocol { __Unknown(i32), } -impl fmt::Display for DragProtocol { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "DragProtocol::{}", - match *self { - Self::None => "None", - Self::Motif => "Motif", - Self::Xdnd => "Xdnd", - Self::Rootwin => "Rootwin", - Self::Win32Dropfiles => "Win32Dropfiles", - Self::Ole2 => "Ole2", - Self::Local => "Local", - Self::Wayland => "Wayland", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for DragProtocol { type GlibType = ffi::GdkDragProtocol; @@ -1476,6 +1248,7 @@ impl FromGlib for DragProtocol { impl StaticType for DragProtocol { #[inline] + #[doc(alias = "gdk_drag_protocol_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_drag_protocol_get_type()) } } @@ -1487,7 +1260,7 @@ impl glib::HasParamSpec for DragProtocol { 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 } } @@ -1633,66 +1406,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::Nothing => "Nothing", - Self::Delete => "Delete", - Self::Destroy => "Destroy", - Self::Expose => "Expose", - Self::MotionNotify => "MotionNotify", - Self::ButtonPress => "ButtonPress", - Self::DoubleButtonPress => "DoubleButtonPress", - Self::TripleButtonPress => "TripleButtonPress", - Self::ButtonRelease => "ButtonRelease", - Self::KeyPress => "KeyPress", - Self::KeyRelease => "KeyRelease", - Self::EnterNotify => "EnterNotify", - Self::LeaveNotify => "LeaveNotify", - Self::FocusChange => "FocusChange", - Self::Configure => "Configure", - Self::Map => "Map", - Self::Unmap => "Unmap", - Self::PropertyNotify => "PropertyNotify", - Self::SelectionClear => "SelectionClear", - Self::SelectionRequest => "SelectionRequest", - Self::SelectionNotify => "SelectionNotify", - Self::ProximityIn => "ProximityIn", - Self::ProximityOut => "ProximityOut", - Self::DragEnter => "DragEnter", - Self::DragLeave => "DragLeave", - Self::DragMotion => "DragMotion", - Self::DragStatus => "DragStatus", - Self::DropStart => "DropStart", - Self::DropFinished => "DropFinished", - Self::ClientEvent => "ClientEvent", - Self::VisibilityNotify => "VisibilityNotify", - Self::Scroll => "Scroll", - Self::WindowState => "WindowState", - Self::Setting => "Setting", - Self::OwnerChange => "OwnerChange", - Self::GrabBroken => "GrabBroken", - Self::Damage => "Damage", - 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", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for EventType { type GlibType = ffi::GdkEventType; @@ -1813,6 +1526,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()) } } @@ -1824,7 +1538,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 } } @@ -1878,20 +1592,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; @@ -1922,6 +1622,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()) } } @@ -1933,7 +1634,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 } } @@ -1989,21 +1690,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", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for GLError { type GlibType = ffi::GdkGLError; @@ -2059,6 +1745,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()) } } @@ -2070,7 +1757,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 } } @@ -2126,21 +1813,6 @@ pub enum GrabOwnership { __Unknown(i32), } -impl fmt::Display for GrabOwnership { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "GrabOwnership::{}", - match *self { - Self::None => "None", - Self::Window => "Window", - Self::Application => "Application", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for GrabOwnership { type GlibType = ffi::GdkGrabOwnership; @@ -2173,6 +1845,7 @@ impl FromGlib for GrabOwnership { impl StaticType for GrabOwnership { #[inline] + #[doc(alias = "gdk_grab_ownership_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_grab_ownership_get_type()) } } @@ -2184,7 +1857,7 @@ impl glib::HasParamSpec for GrabOwnership { 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 } } @@ -2246,24 +1919,6 @@ pub enum GrabStatus { __Unknown(i32), } -impl fmt::Display for GrabStatus { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "GrabStatus::{}", - match *self { - Self::Success => "Success", - Self::AlreadyGrabbed => "AlreadyGrabbed", - Self::InvalidTime => "InvalidTime", - Self::NotViewable => "NotViewable", - Self::Frozen => "Frozen", - Self::Failed => "Failed", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for GrabStatus { type GlibType = ffi::GdkGrabStatus; @@ -2302,6 +1957,7 @@ impl FromGlib for GrabStatus { impl StaticType for GrabStatus { #[inline] + #[doc(alias = "gdk_grab_status_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_grab_status_get_type()) } } @@ -2313,7 +1969,7 @@ impl glib::HasParamSpec for GrabStatus { 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 } } @@ -2383,28 +2039,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; @@ -2451,6 +2085,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()) } } @@ -2462,7 +2097,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 } } @@ -2518,21 +2153,6 @@ pub enum InputMode { __Unknown(i32), } -impl fmt::Display for InputMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "InputMode::{}", - match *self { - Self::Disabled => "Disabled", - Self::Screen => "Screen", - Self::Window => "Window", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for InputMode { type GlibType = ffi::GdkInputMode; @@ -2565,6 +2185,7 @@ impl FromGlib for InputMode { impl StaticType for InputMode { #[inline] + #[doc(alias = "gdk_input_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_input_mode_get_type()) } } @@ -2576,7 +2197,7 @@ impl glib::HasParamSpec for InputMode { 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 } } @@ -2644,27 +2265,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::Eraser => "Eraser", - Self::Cursor => "Cursor", - 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; @@ -2709,6 +2309,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()) } } @@ -2720,7 +2321,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 } } @@ -2784,25 +2385,6 @@ pub enum ModifierIntent { __Unknown(i32), } -impl fmt::Display for ModifierIntent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "ModifierIntent::{}", - match *self { - Self::PrimaryAccelerator => "PrimaryAccelerator", - Self::ContextMenu => "ContextMenu", - Self::ExtendSelection => "ExtendSelection", - Self::ModifySelection => "ModifySelection", - Self::NoTextInput => "NoTextInput", - Self::ShiftGroup => "ShiftGroup", - Self::DefaultModMask => "DefaultModMask", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for ModifierIntent { type GlibType = ffi::GdkModifierIntent; @@ -2843,6 +2425,7 @@ impl FromGlib for ModifierIntent { impl StaticType for ModifierIntent { #[inline] + #[doc(alias = "gdk_modifier_intent_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_modifier_intent_get_type()) } } @@ -2854,7 +2437,7 @@ impl glib::HasParamSpec for ModifierIntent { 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 } } @@ -2916,24 +2499,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; @@ -2972,6 +2537,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()) } } @@ -2983,7 +2549,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 } } @@ -3039,21 +2605,6 @@ pub enum OwnerChange { __Unknown(i32), } -impl fmt::Display for OwnerChange { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "OwnerChange::{}", - match *self { - Self::NewOwner => "NewOwner", - Self::Destroy => "Destroy", - Self::Close => "Close", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for OwnerChange { type GlibType = ffi::GdkOwnerChange; @@ -3086,6 +2637,7 @@ impl FromGlib for OwnerChange { impl StaticType for OwnerChange { #[inline] + #[doc(alias = "gdk_owner_change_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_owner_change_get_type()) } } @@ -3097,7 +2649,7 @@ impl glib::HasParamSpec for OwnerChange { 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 } } @@ -3153,21 +2705,6 @@ pub enum PropMode { __Unknown(i32), } -impl fmt::Display for PropMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PropMode::{}", - match *self { - Self::Replace => "Replace", - Self::Prepend => "Prepend", - Self::Append => "Append", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for PropMode { type GlibType = ffi::GdkPropMode; @@ -3200,6 +2737,7 @@ impl FromGlib for PropMode { impl StaticType for PropMode { #[inline] + #[doc(alias = "gdk_prop_mode_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_prop_mode_get_type()) } } @@ -3211,7 +2749,7 @@ impl glib::HasParamSpec for PropMode { 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 } } @@ -3265,20 +2803,6 @@ pub enum PropertyState { __Unknown(i32), } -impl fmt::Display for PropertyState { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "PropertyState::{}", - match *self { - Self::NewValue => "NewValue", - Self::Delete => "Delete", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for PropertyState { type GlibType = ffi::GdkPropertyState; @@ -3309,6 +2833,7 @@ impl FromGlib for PropertyState { impl StaticType for PropertyState { #[inline] + #[doc(alias = "gdk_property_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_property_state_get_type()) } } @@ -3320,7 +2845,7 @@ impl glib::HasParamSpec for PropertyState { 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 } } @@ -3380,23 +2905,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; @@ -3433,6 +2941,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()) } } @@ -3444,7 +2953,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 } } @@ -3500,21 +3009,6 @@ pub enum SettingAction { __Unknown(i32), } -impl fmt::Display for SettingAction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "SettingAction::{}", - match *self { - Self::New => "New", - Self::Changed => "Changed", - Self::Deleted => "Deleted", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for SettingAction { type GlibType = ffi::GdkSettingAction; @@ -3547,6 +3041,7 @@ impl FromGlib for SettingAction { impl StaticType for SettingAction { #[inline] + #[doc(alias = "gdk_setting_action_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_setting_action_get_type()) } } @@ -3558,7 +3053,7 @@ impl glib::HasParamSpec for SettingAction { 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 } } @@ -3620,24 +3115,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; @@ -3676,6 +3153,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()) } } @@ -3687,7 +3165,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 } } @@ -3743,21 +3221,6 @@ pub enum VisibilityState { __Unknown(i32), } -impl fmt::Display for VisibilityState { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "VisibilityState::{}", - match *self { - Self::Unobscured => "Unobscured", - Self::Partial => "Partial", - Self::FullyObscured => "FullyObscured", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for VisibilityState { type GlibType = ffi::GdkVisibilityState; @@ -3790,6 +3253,7 @@ impl FromGlib for VisibilityState { impl StaticType for VisibilityState { #[inline] + #[doc(alias = "gdk_visibility_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_visibility_state_get_type()) } } @@ -3801,7 +3265,7 @@ impl glib::HasParamSpec for VisibilityState { 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 } } @@ -3863,24 +3327,6 @@ pub enum VisualType { __Unknown(i32), } -impl fmt::Display for VisualType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "VisualType::{}", - match *self { - Self::StaticGray => "StaticGray", - Self::Grayscale => "Grayscale", - Self::StaticColor => "StaticColor", - Self::PseudoColor => "PseudoColor", - Self::TrueColor => "TrueColor", - Self::DirectColor => "DirectColor", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for VisualType { type GlibType = ffi::GdkVisualType; @@ -3919,6 +3365,7 @@ impl FromGlib for VisualType { impl StaticType for VisualType { #[inline] + #[doc(alias = "gdk_visual_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_visual_type_get_type()) } } @@ -3930,7 +3377,7 @@ impl glib::HasParamSpec for VisualType { 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 } } @@ -3996,26 +3443,6 @@ pub enum WindowEdge { __Unknown(i32), } -impl fmt::Display for WindowEdge { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "WindowEdge::{}", - 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 WindowEdge { type GlibType = ffi::GdkWindowEdge; @@ -4058,6 +3485,7 @@ impl FromGlib for WindowEdge { impl StaticType for WindowEdge { #[inline] + #[doc(alias = "gdk_window_edge_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_window_edge_get_type()) } } @@ -4069,7 +3497,7 @@ impl glib::HasParamSpec for WindowEdge { 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 } } @@ -4133,25 +3561,6 @@ pub enum WindowType { __Unknown(i32), } -impl fmt::Display for WindowType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "WindowType::{}", - match *self { - Self::Root => "Root", - Self::Toplevel => "Toplevel", - Self::Child => "Child", - Self::Temp => "Temp", - Self::Foreign => "Foreign", - Self::Offscreen => "Offscreen", - Self::Subsurface => "Subsurface", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for WindowType { type GlibType = ffi::GdkWindowType; @@ -4192,6 +3601,7 @@ impl FromGlib for WindowType { impl StaticType for WindowType { #[inline] + #[doc(alias = "gdk_window_type_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_window_type_get_type()) } } @@ -4203,7 +3613,7 @@ impl glib::HasParamSpec for WindowType { 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 } } @@ -4281,32 +3691,6 @@ pub enum WindowTypeHint { __Unknown(i32), } -impl fmt::Display for WindowTypeHint { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "WindowTypeHint::{}", - match *self { - Self::Normal => "Normal", - Self::Dialog => "Dialog", - Self::Menu => "Menu", - Self::Toolbar => "Toolbar", - Self::Splashscreen => "Splashscreen", - Self::Utility => "Utility", - Self::Dock => "Dock", - Self::Desktop => "Desktop", - Self::DropdownMenu => "DropdownMenu", - Self::PopupMenu => "PopupMenu", - Self::Tooltip => "Tooltip", - Self::Notification => "Notification", - Self::Combo => "Combo", - Self::Dnd => "Dnd", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for WindowTypeHint { type GlibType = ffi::GdkWindowTypeHint; @@ -4359,6 +3743,7 @@ impl FromGlib for WindowTypeHint { impl StaticType for WindowTypeHint { #[inline] + #[doc(alias = "gdk_window_type_hint_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_window_type_hint_get_type()) } } @@ -4370,7 +3755,7 @@ impl glib::HasParamSpec for WindowTypeHint { 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 } } @@ -4424,20 +3809,6 @@ pub enum WindowWindowClass { __Unknown(i32), } -impl fmt::Display for WindowWindowClass { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "WindowWindowClass::{}", - match *self { - Self::InputOutput => "InputOutput", - Self::InputOnly => "InputOnly", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for WindowWindowClass { type GlibType = ffi::GdkWindowWindowClass; @@ -4468,6 +3839,7 @@ impl FromGlib for WindowWindowClass { impl StaticType for WindowWindowClass { #[inline] + #[doc(alias = "gdk_window_window_class_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_window_window_class_get_type()) } } @@ -4479,7 +3851,7 @@ impl glib::HasParamSpec for WindowWindowClass { 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/gdk/src/auto/flags.rs b/gdk/src/auto/flags.rs index cd820b78c3cb..095e99a0af69 100644 --- a/gdk/src/auto/flags.rs +++ b/gdk/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 } } @@ -135,12 +129,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; @@ -162,6 +150,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()) } } @@ -173,7 +162,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 } } @@ -234,12 +223,6 @@ bitflags! { } } -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; @@ -261,6 +244,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()) } } @@ -272,7 +256,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 } } @@ -373,12 +357,6 @@ bitflags! { } } -impl fmt::Display for EventMask { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for EventMask { type GlibType = ffi::GdkEventMask; @@ -400,6 +378,7 @@ impl FromGlib for EventMask { impl StaticType for EventMask { #[inline] + #[doc(alias = "gdk_event_mask_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_event_mask_get_type()) } } @@ -411,7 +390,7 @@ impl glib::HasParamSpec for EventMask { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -476,12 +455,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; @@ -503,6 +476,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()) } } @@ -514,7 +488,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 } } @@ -627,12 +601,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; @@ -654,6 +622,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()) } } @@ -665,7 +634,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 } } @@ -728,12 +697,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; @@ -755,6 +718,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()) } } @@ -766,7 +730,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 } } @@ -829,12 +793,6 @@ bitflags! { } } -impl fmt::Display for WMDecoration { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for WMDecoration { type GlibType = ffi::GdkWMDecoration; @@ -856,6 +814,7 @@ impl FromGlib for WMDecoration { impl StaticType for WMDecoration { #[inline] + #[doc(alias = "gdk_wm_decoration_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_wm_decoration_get_type()) } } @@ -867,7 +826,7 @@ impl glib::HasParamSpec for WMDecoration { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -928,12 +887,6 @@ bitflags! { } } -impl fmt::Display for WMFunction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for WMFunction { type GlibType = ffi::GdkWMFunction; @@ -955,6 +908,7 @@ impl FromGlib for WMFunction { impl StaticType for WMFunction { #[inline] + #[doc(alias = "gdk_wm_function_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_wm_function_get_type()) } } @@ -966,7 +920,7 @@ impl glib::HasParamSpec for WMFunction { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1033,12 +987,6 @@ bitflags! { } } -impl fmt::Display for WindowHints { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for WindowHints { type GlibType = ffi::GdkWindowHints; @@ -1060,6 +1008,7 @@ impl FromGlib for WindowHints { impl StaticType for WindowHints { #[inline] + #[doc(alias = "gdk_window_hints_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_window_hints_get_type()) } } @@ -1071,7 +1020,7 @@ impl glib::HasParamSpec for WindowHints { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } @@ -1154,12 +1103,6 @@ bitflags! { } } -impl fmt::Display for WindowState { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for WindowState { type GlibType = ffi::GdkWindowState; @@ -1181,6 +1124,7 @@ impl FromGlib for WindowState { impl StaticType for WindowState { #[inline] + #[doc(alias = "gdk_window_state_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gdk_window_state_get_type()) } } @@ -1192,7 +1136,7 @@ impl glib::HasParamSpec for WindowState { type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { - |name| Self::ParamSpec::builder(name) + Self::ParamSpec::builder } } diff --git a/gdk/src/auto/frame_clock.rs b/gdk/src/auto/frame_clock.rs index 74eedfc9e6c7..cee2c4ebd8b9 100644 --- a/gdk/src/auto/frame_clock.rs +++ b/gdk/src/auto/frame_clock.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 = "GdkFrameClock")] @@ -94,7 +94,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), @@ -116,7 +116,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), @@ -138,7 +138,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), @@ -160,7 +160,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), @@ -182,7 +182,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), @@ -204,7 +204,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), @@ -226,7 +226,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), @@ -234,9 +234,3 @@ impl FrameClock { } } } - -impl fmt::Display for FrameClock { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FrameClock") - } -} diff --git a/gdk/src/auto/functions.rs b/gdk/src/auto/functions.rs index f893e16f9027..33694f64cdf3 100644 --- a/gdk/src/auto/functions.rs +++ b/gdk/src/auto/functions.rs @@ -4,7 +4,6 @@ use crate::{Atom, Display, Event, EventType, ModifierType, Screen, Window, WindowState}; use glib::translate::*; -use std::{mem, ptr}; #[doc(alias = "gdk_beep")] pub fn beep() { @@ -40,7 +39,7 @@ pub fn error_trap_push() { pub fn events_get_angle(event1: &mut Event, event2: &mut Event) -> Option { assert_initialized_main_thread!(); unsafe { - let mut angle = mem::MaybeUninit::uninit(); + let mut angle = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_events_get_angle( event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, @@ -58,8 +57,8 @@ pub fn events_get_angle(event1: &mut Event, event2: &mut Event) -> Option { pub fn events_get_center(event1: &mut Event, event2: &mut Event) -> Option<(f64, f64)> { assert_initialized_main_thread!(); 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_events_get_center( event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, @@ -78,7 +77,7 @@ pub fn events_get_center(event1: &mut Event, event2: &mut Event) -> Option<(f64, pub fn events_get_distance(event1: &mut Event, event2: &mut Event) -> Option { assert_initialized_main_thread!(); unsafe { - let mut distance = mem::MaybeUninit::uninit(); + let mut distance = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_events_get_distance( event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, @@ -214,9 +213,9 @@ pub fn property_get( skip_assert_initialized!(); unsafe { let mut actual_property_type = Atom::uninitialized(); - let mut actual_format = mem::MaybeUninit::uninit(); - let mut actual_length = mem::MaybeUninit::uninit(); - let mut data = ptr::null_mut(); + let mut actual_format = std::mem::MaybeUninit::uninit(); + let mut actual_length = std::mem::MaybeUninit::uninit(); + let mut data = std::ptr::null_mut(); let ret = from_glib(ffi::gdk_property_get( window.to_glib_none().0, property.to_glib_none().0, @@ -457,7 +456,7 @@ pub fn text_property_to_utf8_list_for_display( skip_assert_initialized!(); let length = text.len() as _; unsafe { - let mut list = ptr::null_mut(); + let mut list = std::ptr::null_mut(); let ret = ffi::gdk_text_property_to_utf8_list_for_display( display.to_glib_none().0, encoding.to_glib_none().0, diff --git a/gdk/src/auto/gl_context.rs b/gdk/src/auto/gl_context.rs index 5ec59af3b28a..1d573102cf7b 100644 --- a/gdk/src/auto/gl_context.rs +++ b/gdk/src/auto/gl_context.rs @@ -4,7 +4,6 @@ use crate::{Display, Window}; use glib::translate::*; -use std::{fmt, mem, ptr}; glib::wrapper! { #[doc(alias = "GdkGLContext")] @@ -42,8 +41,8 @@ impl GLContext { #[doc(alias = "get_required_version")] pub 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.to_glib_none().0, major.as_mut_ptr(), @@ -74,8 +73,8 @@ impl GLContext { #[doc(alias = "get_version")] pub 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.to_glib_none().0, major.as_mut_ptr(), @@ -106,7 +105,7 @@ impl GLContext { #[doc(alias = "gdk_gl_context_realize")] pub 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.to_glib_none().0, &mut error); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { @@ -163,9 +162,3 @@ impl GLContext { unsafe { from_glib_none(ffi::gdk_gl_context_get_current()) } } } - -impl fmt::Display for GLContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("GLContext") - } -} diff --git a/gdk/src/auto/keymap.rs b/gdk/src/auto/keymap.rs index a1f47e102c12..16a3bcf42075 100644 --- a/gdk/src/auto/keymap.rs +++ b/gdk/src/auto/keymap.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 = "GdkKeymap")] @@ -74,10 +74,10 @@ impl Keymap { group: i32, ) -> Option<(u32, i32, i32, ModifierType)> { unsafe { - let mut keyval = mem::MaybeUninit::uninit(); - let mut effective_group = mem::MaybeUninit::uninit(); - let mut level = mem::MaybeUninit::uninit(); - let mut consumed_modifiers = mem::MaybeUninit::uninit(); + let mut keyval = std::mem::MaybeUninit::uninit(); + let mut effective_group = std::mem::MaybeUninit::uninit(); + let mut level = std::mem::MaybeUninit::uninit(); + let mut consumed_modifiers = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_keymap_translate_keyboard_state( self.to_glib_none().0, hardware_keycode, @@ -122,7 +122,7 @@ impl Keymap { connect_raw( self.as_ptr() as *mut _, b"direction-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( direction_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -144,7 +144,7 @@ impl Keymap { connect_raw( self.as_ptr() as *mut _, b"keys-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( keys_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -166,7 +166,7 @@ impl Keymap { connect_raw( self.as_ptr() as *mut _, b"state-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( state_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -174,9 +174,3 @@ impl Keymap { } } } - -impl fmt::Display for Keymap { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Keymap") - } -} diff --git a/gdk/src/auto/mod.rs b/gdk/src/auto/mod.rs index f4709f13f465..27acf717e149 100644 --- a/gdk/src/auto/mod.rs +++ b/gdk/src/auto/mod.rs @@ -114,10 +114,9 @@ pub use self::flags::WMFunction; pub use self::flags::WindowHints; pub use self::flags::WindowState; -pub mod functions; +pub(crate) mod functions; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::device::DeviceExt; pub use super::device_pad::DevicePadExt; pub use super::monitor::MonitorExt; diff --git a/gdk/src/auto/monitor.rs b/gdk/src/auto/monitor.rs index 9fa6cf9026c6..b88f93f7a93f 100644 --- a/gdk/src/auto/monitor.rs +++ b/gdk/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")] @@ -130,7 +130,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), @@ -153,7 +153,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), @@ -176,7 +176,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), @@ -202,7 +202,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), @@ -225,7 +225,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), @@ -251,7 +251,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), @@ -277,7 +277,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), @@ -303,7 +303,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), @@ -326,7 +326,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), @@ -349,7 +349,7 @@ pub trait MonitorExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::workarea\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_workarea_trampoline:: as *const (), )), Box_::into_raw(f), @@ -359,9 +359,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/gdk/src/auto/rgba.rs b/gdk/src/auto/rgba.rs index 5b4d7ef3a47c..c6a64d5862f5 100644 --- a/gdk/src/auto/rgba.rs +++ b/gdk/src/auto/rgba.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::{fmt, hash}; glib::wrapper! { pub struct RGBA(BoxedInline); @@ -51,19 +50,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/gdk/src/auto/screen.rs b/gdk/src/auto/screen.rs index aad7a2586f3c..41ba30217d3a 100644 --- a/gdk/src/auto/screen.rs +++ b/gdk/src/auto/screen.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 = "GdkScreen")] @@ -120,7 +120,7 @@ impl Screen { connect_raw( self.as_ptr() as *mut _, b"composited-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( composited_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -142,7 +142,7 @@ impl Screen { connect_raw( self.as_ptr() as *mut _, b"monitors-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( monitors_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -164,7 +164,7 @@ impl Screen { connect_raw( self.as_ptr() as *mut _, b"size-changed\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( size_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -187,7 +187,7 @@ impl Screen { connect_raw( self.as_ptr() as *mut _, b"notify::font-options\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_font_options_trampoline:: as *const (), )), Box_::into_raw(f), @@ -210,7 +210,7 @@ impl Screen { connect_raw( self.as_ptr() as *mut _, b"notify::resolution\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_resolution_trampoline:: as *const (), )), Box_::into_raw(f), @@ -218,9 +218,3 @@ impl Screen { } } } - -impl fmt::Display for Screen { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Screen") - } -} diff --git a/gdk/src/auto/seat.rs b/gdk/src/auto/seat.rs index d2df842d3d32..b8c40ff38e95 100644 --- a/gdk/src/auto/seat.rs +++ b/gdk/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")] @@ -139,7 +139,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), @@ -168,7 +168,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), @@ -197,7 +197,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), @@ -226,7 +226,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), @@ -236,9 +236,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/gdk/src/auto/versions.txt b/gdk/src/auto/versions.txt index 17a2d3ead99b..14beda852edb 100644 --- a/gdk/src/auto/versions.txt +++ b/gdk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) -from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) +Generated by gir (https://github.com/gtk-rs/gir @ c0970367709d) +from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40) diff --git a/gdk/src/auto/visual.rs b/gdk/src/auto/visual.rs index f462c3bdc153..b6a40c99d8e7 100644 --- a/gdk/src/auto/visual.rs +++ b/gdk/src/auto/visual.rs @@ -4,7 +4,6 @@ use crate::{Screen, VisualType}; use glib::translate::*; -use std::{fmt, mem}; glib::wrapper! { #[doc(alias = "GdkVisual")] @@ -20,9 +19,9 @@ impl Visual { #[doc(alias = "get_blue_pixel_details")] pub fn blue_pixel_details(&self) -> (u32, i32, i32) { unsafe { - let mut mask = mem::MaybeUninit::uninit(); - let mut shift = mem::MaybeUninit::uninit(); - let mut precision = mem::MaybeUninit::uninit(); + let mut mask = std::mem::MaybeUninit::uninit(); + let mut shift = std::mem::MaybeUninit::uninit(); + let mut precision = std::mem::MaybeUninit::uninit(); ffi::gdk_visual_get_blue_pixel_details( self.to_glib_none().0, mask.as_mut_ptr(), @@ -47,9 +46,9 @@ impl Visual { #[doc(alias = "get_green_pixel_details")] pub fn green_pixel_details(&self) -> (u32, i32, i32) { unsafe { - let mut mask = mem::MaybeUninit::uninit(); - let mut shift = mem::MaybeUninit::uninit(); - let mut precision = mem::MaybeUninit::uninit(); + let mut mask = std::mem::MaybeUninit::uninit(); + let mut shift = std::mem::MaybeUninit::uninit(); + let mut precision = std::mem::MaybeUninit::uninit(); ffi::gdk_visual_get_green_pixel_details( self.to_glib_none().0, mask.as_mut_ptr(), @@ -68,9 +67,9 @@ impl Visual { #[doc(alias = "get_red_pixel_details")] pub fn red_pixel_details(&self) -> (u32, i32, i32) { unsafe { - let mut mask = mem::MaybeUninit::uninit(); - let mut shift = mem::MaybeUninit::uninit(); - let mut precision = mem::MaybeUninit::uninit(); + let mut mask = std::mem::MaybeUninit::uninit(); + let mut shift = std::mem::MaybeUninit::uninit(); + let mut precision = std::mem::MaybeUninit::uninit(); ffi::gdk_visual_get_red_pixel_details( self.to_glib_none().0, mask.as_mut_ptr(), @@ -97,9 +96,3 @@ impl Visual { unsafe { from_glib(ffi::gdk_visual_get_visual_type(self.to_glib_none().0)) } } } - -impl fmt::Display for Visual { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Visual") - } -} diff --git a/gdk/src/auto/window.rs b/gdk/src/auto/window.rs index 63115e22ff94..f55991324a54 100644 --- a/gdk/src/auto/window.rs +++ b/gdk/src/auto/window.rs @@ -15,7 +15,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 = "GdkWindow")] @@ -130,8 +130,8 @@ impl Window { #[doc(alias = "gdk_window_coords_from_parent")] pub fn coords_from_parent(&self, parent_x: f64, parent_y: f64) -> (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(); ffi::gdk_window_coords_from_parent( self.to_glib_none().0, parent_x, @@ -146,8 +146,8 @@ impl Window { #[doc(alias = "gdk_window_coords_to_parent")] pub fn coords_to_parent(&self, x: f64, y: f64) -> (f64, f64) { unsafe { - let mut parent_x = mem::MaybeUninit::uninit(); - let mut parent_y = mem::MaybeUninit::uninit(); + let mut parent_x = std::mem::MaybeUninit::uninit(); + let mut parent_y = std::mem::MaybeUninit::uninit(); ffi::gdk_window_coords_to_parent( self.to_glib_none().0, x, @@ -162,7 +162,7 @@ impl Window { #[doc(alias = "gdk_window_create_gl_context")] pub fn create_gl_context(&self) -> Result { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let ret = ffi::gdk_window_create_gl_context(self.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) @@ -285,7 +285,7 @@ impl Window { #[doc(alias = "get_decorations")] pub fn decorations(&self) -> Option { unsafe { - let mut decorations = mem::MaybeUninit::uninit(); + let mut decorations = std::mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_window_get_decorations( self.to_glib_none().0, decorations.as_mut_ptr(), @@ -327,9 +327,9 @@ impl Window { device: &impl IsA, ) -> (Option, i32, i32, 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_none(ffi::gdk_window_get_device_position( self.to_glib_none().0, device.as_ref().to_glib_none().0, @@ -353,9 +353,9 @@ impl Window { 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_none(ffi::gdk_window_get_device_position_double( self.to_glib_none().0, device.as_ref().to_glib_none().0, @@ -382,7 +382,7 @@ impl Window { #[doc(alias = "get_drag_protocol")] pub fn drag_protocol(&self) -> (DragProtocol, Window) { unsafe { - let mut target = ptr::null_mut(); + let mut target = std::ptr::null_mut(); let ret = from_glib(ffi::gdk_window_get_drag_protocol( self.to_glib_none().0, &mut target, @@ -453,10 +453,10 @@ impl Window { #[doc(alias = "get_geometry")] pub fn geometry(&self) -> (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(); ffi::gdk_window_get_geometry( self.to_glib_none().0, x.as_mut_ptr(), @@ -496,8 +496,8 @@ impl Window { #[doc(alias = "get_origin")] pub fn origin(&self) -> (i32, i32, i32) { 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 = ffi::gdk_window_get_origin(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); (ret, x.assume_init(), y.assume_init()) @@ -521,8 +521,8 @@ impl Window { #[doc(alias = "get_position")] pub fn position(&self) -> (i32, i32) { 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(); ffi::gdk_window_get_position(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); (x.assume_init(), y.assume_init()) } @@ -532,8 +532,8 @@ impl Window { #[doc(alias = "get_root_coords")] pub fn root_coords(&self, x: i32, y: i32) -> (i32, i32) { unsafe { - let mut root_x = mem::MaybeUninit::uninit(); - let mut root_y = mem::MaybeUninit::uninit(); + let mut root_x = std::mem::MaybeUninit::uninit(); + let mut root_y = std::mem::MaybeUninit::uninit(); ffi::gdk_window_get_root_coords( self.to_glib_none().0, x, @@ -549,8 +549,8 @@ impl Window { #[doc(alias = "get_root_origin")] pub fn root_origin(&self) -> (i32, i32) { 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(); ffi::gdk_window_get_root_origin(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); (x.assume_init(), y.assume_init()) } @@ -1266,8 +1266,8 @@ impl Window { ) -> (i32, i32) { assert_initialized_main_thread!(); unsafe { - let mut new_width = mem::MaybeUninit::uninit(); - let mut new_height = mem::MaybeUninit::uninit(); + let mut new_width = std::mem::MaybeUninit::uninit(); + let mut new_height = std::mem::MaybeUninit::uninit(); ffi::gdk_window_constrain_size( geometry.to_glib_none_mut().0, flags.into_glib(), @@ -1301,7 +1301,7 @@ impl Window { connect_raw( self.as_ptr() as *mut _, b"create-surface\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( create_surface_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1344,7 +1344,7 @@ impl Window { connect_raw( self.as_ptr() as *mut _, b"pick-embedded-child\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( pick_embedded_child_trampoline:: as *const (), )), Box_::into_raw(f), @@ -1373,7 +1373,7 @@ impl Window { 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), @@ -1381,9 +1381,3 @@ impl Window { } } } - -impl fmt::Display for Window { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Window") - } -} diff --git a/gdk/sys/tests/abi.rs b/gdk/sys/tests/abi.rs index 41df8d1d9fd3..69e206470886 100644 --- a/gdk/sys/tests/abi.rs +++ b/gdk/sys/tests/abi.rs @@ -10,7 +10,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -70,9 +70,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -187,13 +189,15 @@ fn get_c_output(name: &str) -> Result> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/gdk/sys/versions.txt b/gdk/sys/versions.txt index 17a2d3ead99b..14beda852edb 100644 --- a/gdk/sys/versions.txt +++ b/gdk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) -from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) +Generated by gir (https://github.com/gtk-rs/gir @ c0970367709d) +from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40) diff --git a/gdkx11/src/auto/mod.rs b/gdkx11/src/auto/mod.rs index 133508b35d8f..b3ff072ab051 100644 --- a/gdkx11/src/auto/mod.rs +++ b/gdkx11/src/auto/mod.rs @@ -47,10 +47,9 @@ pub use self::x11_visual::X11Visual; mod x11_window; pub use self::x11_window::X11Window; -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/gdkx11/src/auto/versions.txt b/gdkx11/src/auto/versions.txt index 17a2d3ead99b..14beda852edb 100644 --- a/gdkx11/src/auto/versions.txt +++ b/gdkx11/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) -from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) +Generated by gir (https://github.com/gtk-rs/gir @ c0970367709d) +from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40) diff --git a/gdkx11/src/auto/x11_app_launch_context.rs b/gdkx11/src/auto/x11_app_launch_context.rs index 7976049dd4ab..cd805ab45d12 100644 --- a/gdkx11/src/auto/x11_app_launch_context.rs +++ b/gdkx11/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/gdkx11/src/auto/x11_cursor.rs b/gdkx11/src/auto/x11_cursor.rs index d8b40425afcf..0be7d1e2f527 100644 --- a/gdkx11/src/auto/x11_cursor.rs +++ b/gdkx11/src/auto/x11_cursor.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; use x11::xlib; glib::wrapper! { @@ -22,9 +21,3 @@ impl X11Cursor { unsafe { ffi::gdk_x11_cursor_get_xcursor(self.to_glib_none().0) } } } - -impl fmt::Display for X11Cursor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Cursor") - } -} diff --git a/gdkx11/src/auto/x11_device_core.rs b/gdkx11/src/auto/x11_device_core.rs index 4fd0722bde31..928eee35e5e5 100644 --- a/gdkx11/src/auto/x11_device_core.rs +++ b/gdkx11/src/auto/x11_device_core.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 = "GdkX11DeviceCore")] pub struct X11DeviceCore(Object) @extends gdk::Device; @@ -14,9 +12,3 @@ glib::wrapper! { } impl X11DeviceCore {} - -impl fmt::Display for X11DeviceCore { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11DeviceCore") - } -} diff --git a/gdkx11/src/auto/x11_device_manager_core.rs b/gdkx11/src/auto/x11_device_manager_core.rs index 90cd791a3503..5dfba47ab9e8 100644 --- a/gdkx11/src/auto/x11_device_manager_core.rs +++ b/gdkx11/src/auto/x11_device_manager_core.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 = "GdkX11DeviceManagerCore")] pub struct X11DeviceManagerCore(Object) @extends gdk::DeviceManager; @@ -16,9 +14,3 @@ glib::wrapper! { impl X11DeviceManagerCore { pub const NONE: Option<&'static X11DeviceManagerCore> = None; } - -impl fmt::Display for X11DeviceManagerCore { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11DeviceManagerCore") - } -} diff --git a/gdkx11/src/auto/x11_device_manager_xi2.rs b/gdkx11/src/auto/x11_device_manager_xi2.rs index 8d994443f7fd..e5824bbc8f0a 100644 --- a/gdkx11/src/auto/x11_device_manager_xi2.rs +++ b/gdkx11/src/auto/x11_device_manager_xi2.rs @@ -4,7 +4,6 @@ use crate::X11DeviceManagerCore; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkX11DeviceManagerXI2")] @@ -84,9 +83,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/gdkx11/src/auto/x11_device_xi2.rs b/gdkx11/src/auto/x11_device_xi2.rs index 7fbf6109e463..44a67b3e3c10 100644 --- a/gdkx11/src/auto/x11_device_xi2.rs +++ b/gdkx11/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")] @@ -126,9 +125,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/gdkx11/src/auto/x11_display.rs b/gdkx11/src/auto/x11_display.rs index 57daebc1b752..a32cb2a4b9c1 100644 --- a/gdkx11/src/auto/x11_display.rs +++ b/gdkx11/src/auto/x11_display.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::{fmt, mem, ptr}; glib::wrapper! { #[doc(alias = "GdkX11Display")] @@ -94,9 +93,9 @@ impl X11Display { pub fn string_to_compound_text(&self, str: &str) -> (i32, gdk::Atom, i32, Vec) { unsafe { let mut encoding = gdk::Atom::uninitialized(); - let mut format = mem::MaybeUninit::uninit(); - let mut ctext = ptr::null_mut(); - let mut length = mem::MaybeUninit::uninit(); + 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, @@ -125,9 +124,9 @@ impl X11Display { pub fn utf8_to_compound_text(&self, str: &str) -> Option<(gdk::Atom, i32, Vec)> { unsafe { let mut encoding = gdk::Atom::uninitialized(); - let mut format = mem::MaybeUninit::uninit(); - let mut ctext = ptr::null_mut(); - let mut length = mem::MaybeUninit::uninit(); + 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, @@ -153,8 +152,8 @@ impl X11Display { pub fn glx_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_x11_display_get_glx_version( display.as_ref().to_glib_none().0, major.as_mut_ptr(), @@ -168,9 +167,3 @@ impl X11Display { } } } - -impl fmt::Display for X11Display { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Display") - } -} diff --git a/gdkx11/src/auto/x11_display_manager.rs b/gdkx11/src/auto/x11_display_manager.rs index ad4189ca8480..0649440fff03 100644 --- a/gdkx11/src/auto/x11_display_manager.rs +++ b/gdkx11/src/auto/x11_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 = "GdkX11DisplayManager")] pub struct X11DisplayManager(Object) @extends gdk::DisplayManager; @@ -14,9 +12,3 @@ glib::wrapper! { } impl X11DisplayManager {} - -impl fmt::Display for X11DisplayManager { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11DisplayManager") - } -} diff --git a/gdkx11/src/auto/x11_drag_context.rs b/gdkx11/src/auto/x11_drag_context.rs index 6ea10353ee41..0a6c5c2360b8 100644 --- a/gdkx11/src/auto/x11_drag_context.rs +++ b/gdkx11/src/auto/x11_drag_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 = "GdkX11DragContext")] pub struct X11DragContext(Object) @extends gdk::DragContext; @@ -14,9 +12,3 @@ glib::wrapper! { } impl X11DragContext {} - -impl fmt::Display for X11DragContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11DragContext") - } -} diff --git a/gdkx11/src/auto/x11_keymap.rs b/gdkx11/src/auto/x11_keymap.rs index 9ec81efbd792..9872652a4141 100644 --- a/gdkx11/src/auto/x11_keymap.rs +++ b/gdkx11/src/auto/x11_keymap.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::translate::*; -use std::fmt; glib::wrapper! { #[doc(alias = "GdkX11Keymap")] @@ -31,9 +30,3 @@ impl X11Keymap { } } } - -impl fmt::Display for X11Keymap { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Keymap") - } -} diff --git a/gdkx11/src/auto/x11_monitor.rs b/gdkx11/src/auto/x11_monitor.rs index 8803de8d47d3..dc93ede2a8a0 100644 --- a/gdkx11/src/auto/x11_monitor.rs +++ b/gdkx11/src/auto/x11_monitor.rs @@ -3,7 +3,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; use x11::xlib; glib::wrapper! { @@ -23,9 +22,3 @@ impl X11Monitor { unsafe { ffi::gdk_x11_monitor_get_output(monitor.as_ref().to_glib_none().0) } } } - -impl fmt::Display for X11Monitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Monitor") - } -} diff --git a/gdkx11/src/auto/x11_screen.rs b/gdkx11/src/auto/x11_screen.rs index 7c1db708e321..5446999d66a8 100644 --- a/gdkx11/src/auto/x11_screen.rs +++ b/gdkx11/src/auto/x11_screen.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_; use x11::xlib; glib::wrapper! { @@ -89,7 +89,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), @@ -97,9 +97,3 @@ impl X11Screen { } } } - -impl fmt::Display for X11Screen { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Screen") - } -} diff --git a/gdkx11/src/auto/x11_visual.rs b/gdkx11/src/auto/x11_visual.rs index d3694c1db083..bb3a9c9f084e 100644 --- a/gdkx11/src/auto/x11_visual.rs +++ b/gdkx11/src/auto/x11_visual.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 = "GdkX11Visual")] pub struct X11Visual(Object) @extends gdk::Visual; @@ -14,9 +12,3 @@ glib::wrapper! { } impl X11Visual {} - -impl fmt::Display for X11Visual { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Visual") - } -} diff --git a/gdkx11/src/auto/x11_window.rs b/gdkx11/src/auto/x11_window.rs index a3ea03c05783..f51b33186830 100644 --- a/gdkx11/src/auto/x11_window.rs +++ b/gdkx11/src/auto/x11_window.rs @@ -4,7 +4,6 @@ use crate::X11Display; use glib::{prelude::*, translate::*}; -use std::fmt; use x11::xlib; glib::wrapper! { @@ -111,9 +110,3 @@ impl X11Window { } } } - -impl fmt::Display for X11Window { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("X11Window") - } -} diff --git a/gdkx11/src/auto/x11gl_context.rs b/gdkx11/src/auto/x11gl_context.rs index de3f64d820b6..df08d9242beb 100644 --- a/gdkx11/src/auto/x11gl_context.rs +++ b/gdkx11/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; @@ -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/gdkx11/sys/versions.txt b/gdkx11/sys/versions.txt index 17a2d3ead99b..14beda852edb 100644 --- a/gdkx11/sys/versions.txt +++ b/gdkx11/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 76bbe9b90aaa) -from gir-files (https://github.com/gtk-rs/gir-files @ 307566e1ab58) +Generated by gir (https://github.com/gtk-rs/gir @ c0970367709d) +from gir-files (https://github.com/gtk-rs/gir-files @ 20031a537e40) diff --git a/gtk/src/auto/about_dialog.rs b/gtk/src/auto/about_dialog.rs index 1bbb9c96e262..04dff9db7ac9 100644 --- a/gtk/src/auto/about_dialog.rs +++ b/gtk/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")] @@ -903,7 +903,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -926,7 +926,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -949,7 +949,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -975,7 +975,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1001,7 +1001,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1027,7 +1027,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1050,7 +1050,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1076,7 +1076,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1099,7 +1099,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1125,7 +1125,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1151,7 +1151,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1177,7 +1177,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1200,7 +1200,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1223,7 +1223,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1249,7 +1249,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1275,7 +1275,7 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { 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), @@ -1285,9 +1285,3 @@ pub trait AboutDialogExt: IsA + sealed::Sealed + 'static { } impl> AboutDialogExt for O {} - -impl fmt::Display for AboutDialog { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AboutDialog") - } -} diff --git a/gtk/src/auto/accel_group.rs b/gtk/src/auto/accel_group.rs index 0933642ae057..6d0a23d90e2c 100644 --- a/gtk/src/auto/accel_group.rs +++ b/gtk/src/auto/accel_group.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 = "GtkAccelGroup")] @@ -165,7 +165,7 @@ pub trait AccelGroupExt: IsA + sealed::Sealed + 'static { 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()>( accel_activate_trampoline:: as *const (), )), Box_::into_raw(f), @@ -206,7 +206,7 @@ pub trait AccelGroupExt: IsA + sealed::Sealed + 'static { 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()>( accel_changed_trampoline:: as *const (), )), Box_::into_raw(f), @@ -232,7 +232,7 @@ pub trait AccelGroupExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::is-locked\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_locked_trampoline:: as *const (), )), Box_::into_raw(f), @@ -258,7 +258,7 @@ pub trait AccelGroupExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::modifier-mask\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_modifier_mask_trampoline:: as *const (), )), Box_::into_raw(f), @@ -268,9 +268,3 @@ pub trait AccelGroupExt: IsA + sealed::Sealed + 'static { } impl> AccelGroupExt for O {} - -impl fmt::Display for AccelGroup { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AccelGroup") - } -} diff --git a/gtk/src/auto/accel_label.rs b/gtk/src/auto/accel_label.rs index 58f96207c6fd..6e95fa496579 100644 --- a/gtk/src/auto/accel_label.rs +++ b/gtk/src/auto/accel_label.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 = "GtkAccelLabel")] @@ -407,8 +407,8 @@ pub trait AccelLabelExt: IsA + sealed::Sealed + 'static { #[doc(alias = "get_accel")] fn accel(&self) -> (u32, gdk::ModifierType) { unsafe { - let mut accelerator_key = mem::MaybeUninit::uninit(); - let mut accelerator_mods = mem::MaybeUninit::uninit(); + let mut accelerator_key = std::mem::MaybeUninit::uninit(); + let mut accelerator_mods = std::mem::MaybeUninit::uninit(); ffi::gtk_accel_label_get_accel( self.as_ref().to_glib_none().0, accelerator_key.as_mut_ptr(), @@ -496,7 +496,7 @@ pub trait AccelLabelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accel-closure\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accel_closure_trampoline:: as *const (), )), Box_::into_raw(f), @@ -522,7 +522,7 @@ pub trait AccelLabelExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::accel-widget\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_accel_widget_trampoline:: as *const (), )), Box_::into_raw(f), @@ -532,9 +532,3 @@ pub trait AccelLabelExt: IsA + sealed::Sealed + 'static { } impl> AccelLabelExt for O {} - -impl fmt::Display for AccelLabel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AccelLabel") - } -} diff --git a/gtk/src/auto/action_bar.rs b/gtk/src/auto/action_bar.rs index c4fce2044418..4af5295b638e 100644 --- a/gtk/src/auto/action_bar.rs +++ b/gtk/src/auto/action_bar.rs @@ -4,7 +4,6 @@ use crate::{Align, Bin, Buildable, Container, PackType, ResizeMode, Widget}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkActionBar")] @@ -359,9 +358,3 @@ pub trait ActionBarExt: IsA + sealed::Sealed + 'static { } impl> ActionBarExt for O {} - -impl fmt::Display for ActionBar { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("ActionBar") - } -} diff --git a/gtk/src/auto/actionable.rs b/gtk/src/auto/actionable.rs index 98ea53ef5f9b..59df22d054a4 100644 --- a/gtk/src/auto/actionable.rs +++ b/gtk/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")] @@ -102,7 +102,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), @@ -128,7 +128,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), @@ -138,9 +138,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/gtk/src/auto/adjustment.rs b/gtk/src/auto/adjustment.rs index 78f0f3fd4c91..814e16bd4ce0 100644 --- a/gtk/src/auto/adjustment.rs +++ b/gtk/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/gtk/src/auto/app_chooser_button.rs b/gtk/src/auto/app_chooser_button.rs index daf941e07094..5cc5cf2f78f2 100644 --- a/gtk/src/auto/app_chooser_button.rs +++ b/gtk/src/auto/app_chooser_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 = "GtkAppChooserButton")] @@ -532,7 +532,7 @@ pub trait AppChooserButtonExt: IsA + sealed::Sealed + 'static 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), @@ -558,7 +558,7 @@ pub trait AppChooserButtonExt: IsA + sealed::Sealed + 'static 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), @@ -584,7 +584,7 @@ pub trait AppChooserButtonExt: IsA + sealed::Sealed + 'static 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), @@ -610,7 +610,7 @@ pub trait AppChooserButtonExt: IsA + sealed::Sealed + 'static 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), @@ -620,9 +620,3 @@ pub trait AppChooserButtonExt: IsA + sealed::Sealed + 'static } impl> AppChooserButtonExt for O {} - -impl fmt::Display for AppChooserButton { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppChooserButton") - } -} diff --git a/gtk/src/auto/app_chooser_dialog.rs b/gtk/src/auto/app_chooser_dialog.rs index e507713df195..7cd4359a7a79 100644 --- a/gtk/src/auto/app_chooser_dialog.rs +++ b/gtk/src/auto/app_chooser_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 = "GtkAppChooserDialog")] @@ -575,7 +575,7 @@ pub trait AppChooserDialogExt: IsA + sealed::Sealed + 'static 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), @@ -585,9 +585,3 @@ pub trait AppChooserDialogExt: IsA + sealed::Sealed + 'static } impl> AppChooserDialogExt for O {} - -impl fmt::Display for AppChooserDialog { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppChooserDialog") - } -} diff --git a/gtk/src/auto/app_chooser_widget.rs b/gtk/src/auto/app_chooser_widget.rs index df7df1ac1249..72777b3c8eb2 100644 --- a/gtk/src/auto/app_chooser_widget.rs +++ b/gtk/src/auto/app_chooser_widget.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 = "GtkAppChooserWidget")] @@ -505,7 +505,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static 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), @@ -537,7 +537,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static 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), @@ -571,7 +571,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static connect_raw( self.as_ptr() as *mut _, b"populate-popup\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( populate_popup_trampoline:: as *const (), )), Box_::into_raw(f), @@ -597,7 +597,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static 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), @@ -623,7 +623,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static 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), @@ -649,7 +649,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static 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), @@ -675,7 +675,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static 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), @@ -701,7 +701,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static 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), @@ -727,7 +727,7 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static 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), @@ -737,9 +737,3 @@ pub trait AppChooserWidgetExt: IsA + sealed::Sealed + 'static } impl> AppChooserWidgetExt for O {} - -impl fmt::Display for AppChooserWidget { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AppChooserWidget") - } -} diff --git a/gtk/src/auto/application.rs b/gtk/src/auto/application.rs index dc61ad683958..43de8331f8fd 100644 --- a/gtk/src/auto/application.rs +++ b/gtk/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")] @@ -341,7 +341,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), @@ -370,7 +370,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), @@ -399,7 +399,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), @@ -425,7 +425,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), @@ -451,7 +451,7 @@ pub trait GtkApplicationExt: IsA + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::app-menu\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_app_menu_trampoline:: as *const (), )), Box_::into_raw(f), @@ -474,7 +474,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), @@ -500,7 +500,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), @@ -528,7 +528,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), @@ -538,9 +538,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/gtk/src/auto/application_window.rs b/gtk/src/auto/application_window.rs index 6b3fc0a37e83..00e7119aee9d 100644 --- a/gtk/src/auto/application_window.rs +++ b/gtk/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")] @@ -528,7 +528,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), @@ -538,9 +538,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/gtk/src/auto/aspect_frame.rs b/gtk/src/auto/aspect_frame.rs index 08ba19d07219..9a81d365c5b4 100644 --- a/gtk/src/auto/aspect_frame.rs +++ b/gtk/src/auto/aspect_frame.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 = "GtkAspectFrame")] @@ -421,7 +421,7 @@ pub trait AspectFrameExt: IsA + sealed::Sealed + 'static { 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), @@ -444,7 +444,7 @@ pub trait AspectFrameExt: IsA + sealed::Sealed + 'static { 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), @@ -467,7 +467,7 @@ pub trait AspectFrameExt: IsA + sealed::Sealed + 'static { 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), @@ -490,7 +490,7 @@ pub trait AspectFrameExt: IsA + sealed::Sealed + 'static { 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), @@ -500,9 +500,3 @@ pub trait AspectFrameExt: IsA + sealed::Sealed + 'static { } impl> AspectFrameExt for O {} - -impl fmt::Display for AspectFrame { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("AspectFrame") - } -} diff --git a/gtk/src/auto/assistant.rs b/gtk/src/auto/assistant.rs index 6a22460e2186..c83e2c022d78 100644 --- a/gtk/src/auto/assistant.rs +++ b/gtk/src/auto/assistant.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 = "GtkAssistant")] @@ -806,7 +806,7 @@ pub trait AssistantExt: IsA + sealed::Sealed + 'static { 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), @@ -828,7 +828,7 @@ pub trait AssistantExt: 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), @@ -850,7 +850,7 @@ pub trait AssistantExt: IsA + sealed::Sealed + 'static { 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), @@ -872,7 +872,7 @@ pub trait AssistantExt: IsA + sealed::Sealed + 'static { 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), @@ -902,7 +902,7 @@ pub trait AssistantExt: IsA + sealed::Sealed + 'static { 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), @@ -912,9 +912,3 @@ pub trait AssistantExt: IsA + sealed::Sealed + 'static { } impl> AssistantExt for O {} - -impl fmt::Display for Assistant { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Assistant") - } -} diff --git a/gtk/src/auto/bin.rs b/gtk/src/auto/bin.rs index 960a623cf2ae..fd2a103c6b02 100644 --- a/gtk/src/auto/bin.rs +++ b/gtk/src/auto/bin.rs @@ -4,7 +4,6 @@ use crate::{Buildable, Container, Widget}; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkBin")] @@ -33,9 +32,3 @@ pub trait BinExt: IsA + sealed::Sealed + 'static { } impl> BinExt for O {} - -impl fmt::Display for Bin { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Bin") - } -} diff --git a/gtk/src/auto/box_.rs b/gtk/src/auto/box_.rs index 9c5da80ef213..ca0bb1278c1c 100644 --- a/gtk/src/auto/box_.rs +++ b/gtk/src/auto/box_.rs @@ -11,7 +11,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 = "GtkBox")] @@ -377,10 +377,10 @@ pub trait BoxExt: IsA + sealed::Sealed + 'static { #[doc(alias = "gtk_box_query_child_packing")] fn query_child_packing(&self, child: &impl IsA) -> (bool, bool, u32, PackType) { unsafe { - let mut expand = mem::MaybeUninit::uninit(); - let mut fill = mem::MaybeUninit::uninit(); - let mut padding = mem::MaybeUninit::uninit(); - let mut pack_type = mem::MaybeUninit::uninit(); + let mut expand = std::mem::MaybeUninit::uninit(); + let mut fill = std::mem::MaybeUninit::uninit(); + let mut padding = std::mem::MaybeUninit::uninit(); + let mut pack_type = std::mem::MaybeUninit::uninit(); ffi::gtk_box_query_child_packing( self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0, @@ -569,7 +569,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), @@ -592,7 +592,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), @@ -615,7 +615,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), @@ -625,9 +625,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/gtk/src/auto/buildable.rs b/gtk/src/auto/buildable.rs index c60e51af5685..e7a69301b8b6 100644 --- a/gtk/src/auto/buildable.rs +++ b/gtk/src/auto/buildable.rs @@ -4,7 +4,6 @@ use crate::Builder; use glib::{prelude::*, translate::*}; -use std::fmt; glib::wrapper! { #[doc(alias = "GtkBuildable")] @@ -104,9 +103,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/gtk/src/auto/builder.rs b/gtk/src/auto/builder.rs index 17b0ae03a89d..6f3f9aa558fa 100644 --- a/gtk/src/auto/builder.rs +++ b/gtk/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")] @@ -165,7 +165,7 @@ pub trait BuilderExt: IsA + sealed::Sealed + 'static { ) -> 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.as_ref().to_glib_none().0, pspec.as_ref().to_glib_none().0, @@ -190,7 +190,7 @@ pub trait BuilderExt: IsA + sealed::Sealed + 'static { ) -> 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.as_ref().to_glib_none().0, type_.into_glib(), @@ -225,7 +225,7 @@ pub trait BuilderExt: IsA + sealed::Sealed + 'static { 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), @@ -235,9 +235,3 @@ pub trait BuilderExt: IsA + sealed::Sealed + 'static { } impl> BuilderExt for O {} - -impl fmt::Display for Builder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("Builder") - } -} diff --git a/gtk/src/auto/button.rs b/gtk/src/auto/button.rs index 4e78a6c50c4e..3e8b2a480810 100644 --- a/gtk/src/auto/button.rs +++ b/gtk/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")] @@ -506,7 +506,7 @@ pub trait ButtonExt: IsA