File tree Expand file tree Collapse file tree 3 files changed +552
-6
lines changed
Expand file tree Collapse file tree 3 files changed +552
-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
You can’t perform that action at this time.
0 commit comments