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"
1135
1135
name = " state"
1136
1136
# value glib::VariantTy
1137
1137
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
1138
1153
1139
1154
[[object ]]
1140
1155
name = " Gio.SimpleIOStream"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ impl<O: IsA<ActionMap>> ActionMapExtManual for O {
15
15
fn add_action_entries ( & self , entries : impl IntoIterator < Item = ActionEntry < Self > > ) {
16
16
for entry in entries. into_iter ( ) {
17
17
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 ( ) )
19
19
} else {
20
20
SimpleAction :: new ( entry. name ( ) , entry. parameter_type ( ) )
21
21
} ;
Original file line number Diff line number Diff line change @@ -34,13 +34,13 @@ impl SimpleAction {
34
34
pub fn new_stateful (
35
35
name : & str ,
36
36
parameter_type : Option < & glib:: VariantTy > ,
37
- state : & glib:: Variant ,
37
+ state : glib:: Variant ,
38
38
) -> SimpleAction {
39
39
unsafe {
40
40
from_glib_full ( ffi:: g_simple_action_new_stateful (
41
41
name. to_glib_none ( ) . 0 ,
42
42
parameter_type. to_glib_none ( ) . 0 ,
43
- state. to_glib_none ( ) . 0 ,
43
+ state. into_glib_ptr ( ) ,
44
44
) )
45
45
}
46
46
}
@@ -53,16 +53,16 @@ impl SimpleAction {
53
53
}
54
54
55
55
#[ 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 ) {
57
57
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 ( ) ) ;
59
59
}
60
60
}
61
61
62
62
#[ 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 > ) {
64
64
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 ( ) ) ;
66
66
}
67
67
}
68
68
You can’t perform that action at this time.
0 commit comments