@@ -18,17 +18,32 @@ glib::wrapper! {
1818impl Box {
1919 #[ doc( alias = "graphene_box_contains_box" ) ]
2020 pub fn contains_box ( & self , b : & Box ) -> bool {
21- unsafe { ffi:: graphene_box_contains_box ( self . to_glib_none ( ) . 0 , b. to_glib_none ( ) . 0 ) }
21+ unsafe {
22+ from_glib ( ffi:: graphene_box_contains_box (
23+ self . to_glib_none ( ) . 0 ,
24+ b. to_glib_none ( ) . 0 ,
25+ ) )
26+ }
2227 }
2328
2429 #[ doc( alias = "graphene_box_contains_point" ) ]
2530 pub fn contains_point ( & self , point : & Point3D ) -> bool {
26- unsafe { ffi:: graphene_box_contains_point ( self . to_glib_none ( ) . 0 , point. to_glib_none ( ) . 0 ) }
31+ unsafe {
32+ from_glib ( ffi:: graphene_box_contains_point (
33+ self . to_glib_none ( ) . 0 ,
34+ point. to_glib_none ( ) . 0 ,
35+ ) )
36+ }
2737 }
2838
2939 #[ doc( alias = "graphene_box_equal" ) ]
3040 fn equal ( & self , b : & Box ) -> bool {
31- unsafe { ffi:: graphene_box_equal ( self . to_glib_none ( ) . 0 , b. to_glib_none ( ) . 0 ) }
41+ unsafe {
42+ from_glib ( ffi:: graphene_box_equal (
43+ self . to_glib_none ( ) . 0 ,
44+ b. to_glib_none ( ) . 0 ,
45+ ) )
46+ }
3247 }
3348
3449 #[ doc( alias = "graphene_box_expand" ) ]
@@ -128,6 +143,23 @@ impl Box {
128143 }
129144 }
130145
146+ #[ cfg( feature = "v1_12" ) ]
147+ #[ cfg_attr( docsrs, doc( cfg( feature = "v1_12" ) ) ) ]
148+ #[ doc( alias = "graphene_box_get_minmax" ) ]
149+ #[ doc( alias = "get_minmax" ) ]
150+ pub fn minmax ( & self ) -> ( Point3D , Point3D ) {
151+ unsafe {
152+ let mut min = Point3D :: uninitialized ( ) ;
153+ let mut max = Point3D :: uninitialized ( ) ;
154+ ffi:: graphene_box_get_minmax (
155+ self . to_glib_none ( ) . 0 ,
156+ min. to_glib_none_mut ( ) . 0 ,
157+ max. to_glib_none_mut ( ) . 0 ,
158+ ) ;
159+ ( min, max)
160+ }
161+ }
162+
131163 #[ doc( alias = "graphene_box_get_size" ) ]
132164 #[ doc( alias = "get_size" ) ]
133165 pub fn size ( & self ) -> Vec3 {
@@ -148,11 +180,11 @@ impl Box {
148180 pub fn intersection ( & self , b : & Box ) -> Option < Box > {
149181 unsafe {
150182 let mut res = Box :: uninitialized ( ) ;
151- let ret = ffi:: graphene_box_intersection (
183+ let ret = from_glib ( ffi:: graphene_box_intersection (
152184 self . to_glib_none ( ) . 0 ,
153185 b. to_glib_none ( ) . 0 ,
154186 res. to_glib_none_mut ( ) . 0 ,
155- ) ;
187+ ) ) ;
156188 if ret {
157189 Some ( res)
158190 } else {
0 commit comments