Skip to content

Commit 07d14d1

Browse files
subclass: Mark deperecated types as such
1 parent b4c598a commit 07d14d1

13 files changed

+25
-1
lines changed

gtk4/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![allow(clippy::non_send_fields_in_send_ty)]
66
#![allow(clippy::too_many_arguments)]
77
#![allow(clippy::wrong_self_convention)]
8+
#![allow(deprecated)]
89
#![doc = include_str!("../README.md")]
910

1011
pub use ffi;
@@ -98,7 +99,6 @@ static TEST_THREAD_WORKER: once_cell::sync::Lazy<glib::ThreadPool> =
9899
#[allow(clippy::upper_case_acronyms)]
99100
#[allow(clippy::type_complexity)]
100101
#[allow(unused_imports)]
101-
#[allow(deprecated)]
102102
mod auto;
103103

104104
#[macro_use]

gtk4/src/subclass/cell_area.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl CellCallbackAllocate {
6363
}
6464
}
6565

66+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
6667
pub trait CellAreaImpl: CellAreaImplExt + ObjectImpl {
6768
fn cell_properties() -> &'static [ParamSpec] {
6869
&[]
@@ -218,6 +219,7 @@ pub trait CellAreaImpl: CellAreaImplExt + ObjectImpl {
218219
}
219220
}
220221

222+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
221223
pub trait CellAreaImplExt: ObjectSubclass {
222224
fn parent_activate<P: IsA<CellAreaContext>, W: IsA<Widget>>(
223225
&self,

gtk4/src/subclass/cell_area_context.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use glib::translate::*;
99
use glib::Cast;
1010
use std::mem::MaybeUninit;
1111

12+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1213
pub trait CellAreaContextImpl: CellAreaContextImplExt + ObjectImpl {
1314
fn reset(&self) {
1415
self.parent_reset()
@@ -27,6 +28,7 @@ pub trait CellAreaContextImpl: CellAreaContextImplExt + ObjectImpl {
2728
}
2829
}
2930

31+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3032
pub trait CellAreaContextImplExt: ObjectSubclass {
3133
fn parent_reset(&self);
3234
fn parent_preferred_height_for_width(&self, width: i32) -> (i32, i32);

gtk4/src/subclass/cell_editable.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use crate::CellEditable;
88
use glib::translate::*;
99
use glib::Cast;
1010

11+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1112
pub trait CellEditableImpl: ObjectImpl {
1213
fn editing_done(&self) {
1314
self.parent_editing_done()
@@ -22,6 +23,7 @@ pub trait CellEditableImpl: ObjectImpl {
2223
}
2324
}
2425

26+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2527
pub trait CellEditableImplExt: ObjectSubclass {
2628
fn parent_editing_done(&self);
2729
fn parent_remove_widget(&self);

gtk4/src/subclass/cell_layout.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ impl Drop for CellLayoutDataCallback {
4848
}
4949
}
5050

51+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
5152
pub trait CellLayoutImpl: ObjectImpl {
5253
fn add_attribute<R: IsA<CellRenderer>>(&self, cell: &R, attribute: &str, column: i32) {
5354
self.parent_add_attribute(cell, attribute, column)
@@ -91,6 +92,7 @@ pub trait CellLayoutImpl: ObjectImpl {
9192
}
9293
}
9394

95+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
9496
pub trait CellLayoutImplExt: ObjectSubclass {
9597
fn parent_add_attribute<R: IsA<CellRenderer>>(&self, cell: &R, attribute: &str, column: i32);
9698
fn parent_clear_attributes<R: IsA<CellRenderer>>(&self, cell: &R);

gtk4/src/subclass/cell_renderer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use glib::object::IsA;
1212
use glib::translate::*;
1313
use glib::{Cast, GString};
1414

15+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1516
pub trait CellRendererImpl: CellRendererImplExt + ObjectImpl {
1617
fn activate<P: IsA<Widget>>(
1718
&self,
@@ -92,6 +93,7 @@ pub trait CellRendererImpl: CellRendererImplExt + ObjectImpl {
9293
}
9394
}
9495

96+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
9597
pub trait CellRendererImplExt: ObjectSubclass {
9698
fn parent_activate<P: IsA<Widget>>(
9799
&self,

gtk4/src/subclass/cell_renderer_text.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ use crate::CellRendererText;
88
use glib::translate::*;
99
use glib::{Cast, GString};
1010

11+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1112
pub trait CellRendererTextImpl: CellRendererTextImplExt + CellRendererImpl {
1213
fn edited(&self, path: &str, new_text: &str) {
1314
self.parent_edited(path, new_text);
1415
}
1516
}
1617

18+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1719
pub trait CellRendererTextImplExt: ObjectSubclass {
1820
fn parent_edited(&self, path: &str, new_text: &str);
1921
}

gtk4/src/subclass/combo_box.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use crate::ComboBox;
88
use glib::translate::*;
99
use glib::{Cast, GString};
1010

11+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1112
pub trait ComboBoxImpl: ComboBoxImplExt + WidgetImpl {
1213
#[cfg(any(feature = "v4_6", feature = "dox"))]
1314
fn activate(&self) {
@@ -21,6 +22,7 @@ pub trait ComboBoxImpl: ComboBoxImplExt + WidgetImpl {
2122
}
2223
}
2324

25+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2426
pub trait ComboBoxImplExt: ObjectSubclass {
2527
#[cfg(any(feature = "v4_6", feature = "dox"))]
2628
fn parent_activate(&self);

gtk4/src/subclass/style_context.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ use crate::StyleContext;
88
use glib::translate::*;
99
use glib::Cast;
1010

11+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1112
pub trait StyleContextImpl: StyleContextImplExt + ObjectImpl {
1213
fn changed(&self) {
1314
self.parent_changed()
1415
}
1516
}
1617

18+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1719
pub trait StyleContextImplExt: ObjectSubclass {
1820
fn parent_changed(&self);
1921
}

gtk4/src/subclass/tree_drag_dest.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ use crate::{TreeDragDest, TreePath};
88
use glib::translate::*;
99
use glib::{Cast, Value};
1010

11+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1112
pub trait TreeDragDestImpl: ObjectImpl {
1213
fn drag_data_received(&self, dest: &TreePath, value: Value) -> bool;
1314
fn row_drop_possible(&self, dest: &TreePath, value: Value) -> bool;
1415
}
1516

17+
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1618
pub trait TreeDragDestImplExt: ObjectSubclass {
1719
fn parent_drag_data_received(&self, dest: &TreePath, value: Value) -> bool;
1820
fn parent_row_drop_possible(&self, dest: &TreePath, value: Value) -> bool;

0 commit comments

Comments
 (0)