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 1
1
// Take a look at the license at the top of the repository in the LICENSE file.
2
2
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
+ }
7
10
8
11
impl 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
+
9
17
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;
11
23
}
12
24
13
25
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
15
31
}
16
32
}
17
33
Original file line number Diff line number Diff line change @@ -200,6 +200,9 @@ mod tree_view;
200
200
mod tree_view_column;
201
201
mod widget;
202
202
203
+ #[ cfg( feature = "v4_14" ) ]
204
+ #[ cfg_attr( docsrs, doc( cfg( feature = "v4_14" ) ) ) ]
205
+ pub use accessible_text_range:: AccessibleTextRange ;
203
206
pub use bitset_iter:: BitsetIter ;
204
207
pub use border:: Border ;
205
208
pub use builder_cscope:: BuilderCScope ;
You can’t perform that action at this time.
0 commit comments