File tree Expand file tree Collapse file tree 2 files changed +25
-6
lines changed
Expand file tree Collapse file tree 2 files changed +25
-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 crate :: ffi;
4+ use glib:: translate:: * ;
5+
6+ glib:: wrapper! {
7+ #[ doc( alias = "GtkAccessibleTextRange" ) ]
8+ pub struct AccessibleTextRange ( BoxedInline <ffi:: GtkAccessibleTextRange >) ;
9+ }
710
811impl AccessibleTextRange {
12+ pub fn new ( start : usize , length : usize ) -> Self {
13+ skip_assert_initialized ! ( ) ;
14+ unsafe { AccessibleTextRange :: unsafe_from ( ffi:: GtkAccessibleTextRange { start, length } ) }
15+ }
16+
917 pub fn start ( & self ) -> usize {
10- self . 0 . start
18+ self . inner . start
19+ }
20+
21+ pub fn set_start ( & mut self , start : usize ) {
22+ self . inner . start = start;
1123 }
1224
1325 pub fn length ( & self ) -> usize {
14- self . 0 . length
26+ self . inner . length
27+ }
28+
29+ pub fn set_length ( & mut self , length : usize ) {
30+ self . inner . length = length
1531 }
1632}
1733
Original file line number Diff line number Diff line change @@ -200,6 +200,9 @@ mod tree_view;
200200mod tree_view_column;
201201mod widget;
202202
203+ #[ cfg( feature = "v4_14" ) ]
204+ #[ cfg_attr( docsrs, doc( cfg( feature = "v4_14" ) ) ) ]
205+ pub use accessible_text_range:: AccessibleTextRange ;
203206pub use bitset_iter:: BitsetIter ;
204207pub use border:: Border ;
205208pub use builder_cscope:: BuilderCScope ;
You can’t perform that action at this time.
0 commit comments