File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -1135,6 +1135,21 @@ status = "generate"
11351135 name = " state"
11361136 # value glib::VariantTy
11371137 ignore = true
1138+ [[object .function ]]
1139+ name = " new_stateful"
1140+ [[object .function .parameter ]]
1141+ name = " state"
1142+ move = true
1143+ [[object .function ]]
1144+ name = " set_state"
1145+ [[object .function .parameter ]]
1146+ name = " value"
1147+ move = true
1148+ [[object .function ]]
1149+ name = " set_state_hint"
1150+ [[object .function .parameter ]]
1151+ name = " state_hint"
1152+ move = true
11381153
11391154[[object ]]
11401155name = " Gio.SimpleIOStream"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ impl<O: IsA<ActionMap>> ActionMapExtManual for O {
1515 fn add_action_entries ( & self , entries : impl IntoIterator < Item = ActionEntry < Self > > ) {
1616 for entry in entries. into_iter ( ) {
1717 let action = if let Some ( state) = entry. state ( ) {
18- SimpleAction :: new_stateful ( entry. name ( ) , entry. parameter_type ( ) , & state)
18+ SimpleAction :: new_stateful ( entry. name ( ) , entry. parameter_type ( ) , state. clone ( ) )
1919 } else {
2020 SimpleAction :: new ( entry. name ( ) , entry. parameter_type ( ) )
2121 } ;
Original file line number Diff line number Diff line change @@ -34,13 +34,13 @@ impl SimpleAction {
3434 pub fn new_stateful (
3535 name : & str ,
3636 parameter_type : Option < & glib:: VariantTy > ,
37- state : & glib:: Variant ,
37+ state : glib:: Variant ,
3838 ) -> SimpleAction {
3939 unsafe {
4040 from_glib_full ( ffi:: g_simple_action_new_stateful (
4141 name. to_glib_none ( ) . 0 ,
4242 parameter_type. to_glib_none ( ) . 0 ,
43- state. to_glib_none ( ) . 0 ,
43+ state. into_glib_ptr ( ) ,
4444 ) )
4545 }
4646 }
@@ -53,16 +53,16 @@ impl SimpleAction {
5353 }
5454
5555 #[ doc( alias = "g_simple_action_set_state" ) ]
56- pub fn set_state ( & self , value : & glib:: Variant ) {
56+ pub fn set_state ( & self , value : glib:: Variant ) {
5757 unsafe {
58- ffi:: g_simple_action_set_state ( self . to_glib_none ( ) . 0 , value. to_glib_none ( ) . 0 ) ;
58+ ffi:: g_simple_action_set_state ( self . to_glib_none ( ) . 0 , value. into_glib_ptr ( ) ) ;
5959 }
6060 }
6161
6262 #[ doc( alias = "g_simple_action_set_state_hint" ) ]
63- pub fn set_state_hint ( & self , state_hint : Option < & glib:: Variant > ) {
63+ pub fn set_state_hint ( & self , state_hint : Option < glib:: Variant > ) {
6464 unsafe {
65- ffi:: g_simple_action_set_state_hint ( self . to_glib_none ( ) . 0 , state_hint. to_glib_none ( ) . 0 ) ;
65+ ffi:: g_simple_action_set_state_hint ( self . to_glib_none ( ) . 0 , state_hint. into_glib_ptr ( ) ) ;
6666 }
6767 }
6868
You can’t perform that action at this time.
0 commit comments