File tree Expand file tree Collapse file tree 4 files changed +555
-6
lines changed
Expand file tree Collapse file tree 4 files changed +555
-6
lines changed Original file line number Diff line number Diff line change 11// Take a look at the license at the top of the repository in the LICENSE file.
22
3- #[ derive( Copy , Clone ) ]
4- #[ doc( alias = "GtkAccessibleTextRange" ) ]
5- #[ repr( transparent) ]
6- pub struct AccessibleTextRange ( crate :: ffi:: GtkAccessibleTextRange ) ;
3+ use glib:: translate:: UnsafeFrom ;
4+ use gtk4_sys:: GtkAccessibleTextRange ;
5+
6+ glib:: wrapper! {
7+ #[ doc( alias = "GtkAccessibleTextRange" ) ]
8+ pub struct AccessibleTextRange ( BoxedInline <crate :: ffi:: GtkAccessibleTextRange >) ;
9+ }
710
811impl AccessibleTextRange {
12+ pub fn new ( start : usize , length : usize ) -> Self {
13+ unsafe { AccessibleTextRange :: unsafe_from ( GtkAccessibleTextRange { start, length } ) }
14+ }
15+
916 pub fn start ( & self ) -> usize {
10- self . 0 . start
17+ self . inner . start
1118 }
1219
1320 pub fn length ( & self ) -> usize {
14- self . 0 . length
21+ self . inner . length
1522 }
1623}
1724
Original file line number Diff line number Diff line change @@ -199,6 +199,9 @@ mod tree_view;
199199mod tree_view_column;
200200mod widget;
201201
202+ #[ cfg( feature = "v4_14" ) ]
203+ #[ cfg_attr( docsrs, doc( cfg( feature = "v4_14" ) ) ) ]
204+ pub use accessible_text_range:: AccessibleTextRange ;
202205pub use bitset_iter:: BitsetIter ;
203206pub use border:: Border ;
204207pub use builder_cscope:: BuilderCScope ;
You can’t perform that action at this time.
0 commit comments