From ac4891d20d86b801cd4865bf87428443f1ccebbb Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Wed, 3 Jan 2024 08:47:22 +0100 Subject: [PATCH] Adapt to https://github.com/gtk-rs/gir/pull/1530 --- gdk4/src/toplevel_size.rs | 6 ++++-- gtk4/src/subclass/constraint_target.rs | 15 --------------- gtk4/src/subclass/mod.rs | 6 ------ gtk4/src/subclass/native.rs | 10 ---------- gtk4/src/subclass/root.rs | 10 ---------- 5 files changed, 4 insertions(+), 43 deletions(-) delete mode 100644 gtk4/src/subclass/constraint_target.rs delete mode 100644 gtk4/src/subclass/native.rs delete mode 100644 gtk4/src/subclass/root.rs diff --git a/gdk4/src/toplevel_size.rs b/gdk4/src/toplevel_size.rs index f6669c87c272..9a5b6df66983 100644 --- a/gdk4/src/toplevel_size.rs +++ b/gdk4/src/toplevel_size.rs @@ -7,9 +7,11 @@ use glib::translate::*; glib::wrapper! { #[doc(alias = "GdkToplevelSize")] - pub struct ToplevelSize(BoxedInline); + pub struct ToplevelSize(Boxed); match fn { + copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::gdk_toplevel_size_get_type(), ptr as *mut _) as *mut ffi::GdkToplevelSize, + free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::gdk_toplevel_size_get_type(), ptr as *mut _), type_ => || ffi::gdk_toplevel_size_get_type(), } @@ -24,7 +26,7 @@ impl ToplevelSize { let mut bounds_height = std::mem::MaybeUninit::uninit(); ffi::gdk_toplevel_size_get_bounds( - self.to_glib_none().0 as *mut _, + self.as_ptr(), bounds_width.as_mut_ptr(), bounds_height.as_mut_ptr(), ); diff --git a/gtk4/src/subclass/constraint_target.rs b/gtk4/src/subclass/constraint_target.rs deleted file mode 100644 index 87dd746c3b54..000000000000 --- a/gtk4/src/subclass/constraint_target.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Take a look at the license at the top of the repository in the LICENSE file. - -// rustdoc-stripper-ignore-next -//! Traits intended for implementing the -//! [`ConstraintTarget`](crate::ConstraintTarget) interface. - -use crate::{subclass::prelude::*, ConstraintTarget}; - -pub trait ConstraintTargetImpl: ObjectImpl {} - -unsafe impl IsImplementable for ConstraintTarget { - fn interface_init(_iface: &mut glib::Interface) { - assert_initialized_main_thread!(); - } -} diff --git a/gtk4/src/subclass/mod.rs b/gtk4/src/subclass/mod.rs index 03a491a792f1..2acf05ff3294 100644 --- a/gtk4/src/subclass/mod.rs +++ b/gtk4/src/subclass/mod.rs @@ -37,7 +37,6 @@ pub mod cell_renderer_text; pub mod check_button; pub mod color_chooser; pub mod combo_box; -pub mod constraint_target; pub mod dialog; pub mod drawing_area; pub mod editable; @@ -56,7 +55,6 @@ pub mod layout_manager; pub mod list_box_row; pub mod media_file; pub mod media_stream; -pub mod native; pub mod native_dialog; pub mod orientable; pub mod popover; @@ -64,7 +62,6 @@ pub mod print_operation; pub mod print_operation_preview; pub mod range; pub mod recent_manager; -pub mod root; pub mod scale; pub mod scale_button; pub mod scrollable; @@ -126,7 +123,6 @@ pub mod prelude { check_button::{CheckButtonImpl, CheckButtonImplExt}, color_chooser::{ColorChooserImpl, ColorChooserImplExt}, combo_box::{ComboBoxImpl, ComboBoxImplExt}, - constraint_target::ConstraintTargetImpl, dialog::{DialogImpl, DialogImplExt}, drawing_area::{DrawingAreaImpl, DrawingAreaImplExt}, editable::{EditableImpl, EditableImplExt}, @@ -145,7 +141,6 @@ pub mod prelude { list_box_row::{ListBoxRowImpl, ListBoxRowImplExt}, media_file::{MediaFileImpl, MediaFileImplExt}, media_stream::{MediaStreamImpl, MediaStreamImplExt}, - native::NativeImpl, native_dialog::{NativeDialogImpl, NativeDialogImplExt}, orientable::OrientableImpl, popover::{PopoverImpl, PopoverImplExt}, @@ -153,7 +148,6 @@ pub mod prelude { print_operation_preview::PrintOperationPreviewImpl, range::{RangeImpl, RangeImplExt}, recent_manager::{RecentManagerImpl, RecentManagerImplExt}, - root::RootImpl, scale::{ScaleImpl, ScaleImplExt}, scale_button::{ScaleButtonImpl, ScaleButtonImplExt}, scrollable::{ScrollableImpl, ScrollableImplExt}, diff --git a/gtk4/src/subclass/native.rs b/gtk4/src/subclass/native.rs deleted file mode 100644 index 719a8274d7eb..000000000000 --- a/gtk4/src/subclass/native.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Take a look at the license at the top of the repository in the LICENSE file. - -// rustdoc-stripper-ignore-next -//! Traits intended for implementing the [`Native`](crate::Native) interface. - -use crate::{subclass::prelude::*, Native}; - -pub trait NativeImpl: WidgetImpl {} - -unsafe impl IsImplementable for Native {} diff --git a/gtk4/src/subclass/root.rs b/gtk4/src/subclass/root.rs deleted file mode 100644 index 7a963a7052d5..000000000000 --- a/gtk4/src/subclass/root.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Take a look at the license at the top of the repository in the LICENSE file. - -// rustdoc-stripper-ignore-next -//! Traits intended for implementing the [`Root`](crate::Root) interface. - -use crate::{subclass::prelude::*, Root}; - -pub trait RootImpl: NativeImpl {} - -unsafe impl IsImplementable for Root {}