@@ -65,19 +65,19 @@ impl NumericEntry for Spinbox {
65
65
66
66
fn on_changed < ' ctx , F : FnMut ( i32 ) +' ctx > ( & mut self , _ctx : & ' ctx UI , callback : F ) {
67
67
unsafe {
68
- let mut data: Box < Box < FnMut ( i32 ) > > =Box :: new ( Box :: new ( callback) ) ;
68
+ let mut data: Box < Box < dyn FnMut ( i32 ) > > =Box :: new ( Box :: new ( callback) ) ;
69
69
ui_sys:: uiSpinboxOnChanged (
70
70
self . uiSpinbox ,
71
71
Some ( c_callback) ,
72
- & mut * dataas * mut Box < FnMut ( i32 ) > as * mut c_void ,
72
+ & mut * dataas * mut Box < dyn FnMut ( i32 ) > as * mut c_void ,
73
73
) ;
74
74
mem:: forget ( data) ;
75
75
}
76
76
77
77
extern "C" fn c_callback ( spinbox : * mut uiSpinbox , data : * mut c_void ) {
78
78
unsafe {
79
79
let val = ui_sys:: uiSpinboxValue ( spinbox) ;
80
- mem:: transmute :: < * mut c_void , & mut Box < FnMut ( i32 ) > > ( data) ( val) ;
80
+ mem:: transmute :: < * mut c_void , & mut Box < dyn FnMut ( i32 ) > > ( data) ( val) ;
81
81
}
82
82
}
83
83
}
@@ -94,19 +94,19 @@ impl NumericEntry for Slider {
94
94
95
95
fn on_changed < ' ctx , F : FnMut ( i32 ) +' ctx > ( & mut self , _ctx : & ' ctx UI , callback : F ) {
96
96
unsafe {
97
- let mut data: Box < Box < FnMut ( i32 ) > > =Box :: new ( Box :: new ( callback) ) ;
97
+ let mut data: Box < Box < dyn FnMut ( i32 ) > > =Box :: new ( Box :: new ( callback) ) ;
98
98
ui_sys:: uiSliderOnChanged (
99
99
self . uiSlider ,
100
100
Some ( c_callback) ,
101
- & mut * dataas * mut Box < FnMut ( i32 ) > as * mut c_void ,
101
+ & mut * dataas * mut Box < dyn FnMut ( i32 ) > as * mut c_void ,
102
102
) ;
103
103
mem:: forget ( data) ;
104
104
}
105
105
106
106
extern "C" fn c_callback ( slider : * mut uiSlider , data : * mut c_void ) {
107
107
unsafe {
108
108
let val = ui_sys:: uiSliderValue ( slider) ;
109
- mem:: transmute :: < * mut c_void , & mut Box < FnMut ( i32 ) > > ( data) ( val) ;
109
+ mem:: transmute :: < * mut c_void , & mut Box < dyn FnMut ( i32 ) > > ( data) ( val) ;
110
110
}
111
111
}
112
112
}
@@ -163,11 +163,11 @@ impl TextEntry for Entry {
163
163
164
164
fn on_changed < ' ctx , F : FnMut ( String ) +' ctx > ( & mut self , _ctx : & ' ctx UI , callback : F ) {
165
165
unsafe {
166
- let mut data: Box < Box < FnMut ( String ) > > =Box :: new ( Box :: new ( callback) ) ;
166
+ let mut data: Box < Box < dyn FnMut ( String ) > > =Box :: new ( Box :: new ( callback) ) ;
167
167
ui_sys:: uiEntryOnChanged (
168
168
self . uiEntry ,
169
169
Some ( c_callback) ,
170
- & mut * dataas * mut Box < FnMut ( String ) > as * mut c_void ,
170
+ & mut * dataas * mut Box < dyn FnMut ( String ) > as * mut c_void ,
171
171
) ;
172
172
mem:: forget ( data) ;
173
173
}
@@ -177,7 +177,7 @@ impl TextEntry for Entry {
177
177
let string =CStr :: from_ptr ( ui_sys:: uiEntryText ( entry) )
178
178
. to_string_lossy ( )
179
179
. into_owned ( ) ;
180
- mem:: transmute :: < * mut c_void , & mut Box < FnMut ( String ) > > ( data) ( string) ;
180
+ mem:: transmute :: < * mut c_void , & mut Box < dyn FnMut ( String ) > > ( data) ( string) ;
181
181
mem:: forget ( entry) ;
182
182
}
183
183
}
@@ -199,11 +199,11 @@ impl TextEntry for PasswordEntry {
199
199
200
200
fn on_changed < ' ctx , F : FnMut ( String ) +' ctx > ( & mut self , _ctx : & ' ctx UI , callback : F ) {
201
201
unsafe {
202
- let mut data: Box < Box < FnMut ( String ) > > =Box :: new ( Box :: new ( callback) ) ;
202
+ let mut data: Box < Box < dyn FnMut ( String ) > > =Box :: new ( Box :: new ( callback) ) ;
203
203
ui_sys:: uiEntryOnChanged (
204
204
self . uiEntry ,
205
205
Some ( c_callback) ,
206
- & mut * dataas * mut Box < FnMut ( String ) > as * mut c_void ,
206
+ & mut * dataas * mut Box < dyn FnMut ( String ) > as * mut c_void ,
207
207
) ;
208
208
mem:: forget ( data) ;
209
209
}
@@ -213,7 +213,7 @@ impl TextEntry for PasswordEntry {
213
213
let string =CStr :: from_ptr ( ui_sys:: uiEntryText ( entry) )
214
214
. to_string_lossy ( )
215
215
. into_owned ( ) ;
216
- mem:: transmute :: < * mut c_void , & mut Box < FnMut ( String ) > > ( data) ( string) ;
216
+ mem:: transmute :: < * mut c_void , & mut Box < dyn FnMut ( String ) > > ( data) ( string) ;
217
217
mem:: forget ( entry) ;
218
218
}
219
219
}
@@ -235,11 +235,11 @@ impl TextEntry for MultilineEntry {
235
235
236
236
fn on_changed < ' ctx , F : FnMut ( String ) +' ctx > ( & mut self , _ctx : & ' ctx UI , callback : F ) {
237
237
unsafe {
238
- let mut data: Box < Box < FnMut ( String ) > > =Box :: new ( Box :: new ( callback) ) ;
238
+ let mut data: Box < Box < dyn FnMut ( String ) > > =Box :: new ( Box :: new ( callback) ) ;
239
239
ui_sys:: uiMultilineEntryOnChanged (
240
240
self . uiMultilineEntry ,
241
241
Some ( c_callback) ,
242
- & mut * dataas * mut Box < FnMut ( String ) > as * mut c_void ,
242
+ & mut * dataas * mut Box < dyn FnMut ( String ) > as * mut c_void ,
243
243
) ;
244
244
mem:: forget ( data) ;
245
245
}
@@ -249,7 +249,7 @@ impl TextEntry for MultilineEntry {
249
249
let string =CStr :: from_ptr ( ui_sys:: uiMultilineEntryText ( entry) )
250
250
. to_string_lossy ( )
251
251
. into_owned ( ) ;
252
- mem:: transmute :: < * mut c_void , & mut Box < FnMut ( String ) > > ( data) ( string) ;
252
+ mem:: transmute :: < * mut c_void , & mut Box < dyn FnMut ( String ) > > ( data) ( string) ;
253
253
mem:: forget ( entry) ;
254
254
}
255
255
}
@@ -287,19 +287,19 @@ impl Combobox {
287
287
288
288
pub fn on_selected < F : FnMut ( i32 ) > ( & mut self , _ctx : & UI , callback : F ) {
289
289
unsafe {
290
- let mut data: Box < Box < FnMut ( i32 ) > > =Box :: new ( Box :: new ( callback) ) ;
290
+ let mut data: Box < Box < dyn FnMut ( i32 ) > > =Box :: new ( Box :: new ( callback) ) ;
291
291
ui_sys:: uiComboboxOnSelected (
292
292
self . uiCombobox ,
293
293
Some ( c_callback) ,
294
- & mut * dataas * mut Box < FnMut ( i32 ) > as * mut c_void ,
294
+ & mut * dataas * mut Box < dyn FnMut ( i32 ) > as * mut c_void ,
295
295
) ;
296
296
mem:: forget ( data) ;
297
297
}
298
298
299
299
extern "C" fn c_callback ( combobox : * mut uiCombobox , data : * mut c_void ) {
300
300
unsafe {
301
301
let val = ui_sys:: uiComboboxSelected ( combobox) ;
302
- mem:: transmute :: < * mut c_void , & mut Box < FnMut ( i32 ) > > ( data) ( val) ;
302
+ mem:: transmute :: < * mut c_void , & mut Box < dyn FnMut ( i32 ) > > ( data) ( val) ;
303
303
}
304
304
}
305
305
}
@@ -328,19 +328,19 @@ impl Checkbox {
328
328
329
329
pub fn on_toggled < F : FnMut ( bool ) > ( & mut self , _ctx : & UI , callback : F ) {
330
330
unsafe {
331
- let mut data: Box < Box < FnMut ( bool ) > > =Box :: new ( Box :: new ( callback) ) ;
331
+ let mut data: Box < Box < dyn FnMut ( bool ) > > =Box :: new ( Box :: new ( callback) ) ;
332
332
ui_sys:: uiCheckboxOnToggled (
333
333
self . uiCheckbox ,
334
334
Some ( c_callback) ,
335
- & mut * dataas * mut Box < FnMut ( bool ) > as * mut c_void ,
335
+ & mut * dataas * mut Box < dyn FnMut ( bool ) > as * mut c_void ,
336
336
) ;
337
337
mem:: forget ( data) ;
338
338
}
339
339
340
340
extern "C" fn c_callback ( checkbox : * mut uiCheckbox , data : * mut c_void ) {
341
341
unsafe {
342
342
let val = ui_sys:: uiCheckboxChecked ( checkbox) !=0 ;
343
- mem:: transmute :: < * mut c_void , & mut Box < FnMut ( bool ) > > ( data) ( val) ;
343
+ mem:: transmute :: < * mut c_void , & mut Box < dyn FnMut ( bool ) > > ( data) ( val) ;
344
344
}
345
345
}
346
346
}
@@ -372,19 +372,19 @@ impl RadioButtons {
372
372
373
373
pub fn on_selected < ' ctx , F : FnMut ( i32 ) +' ctx > ( & self , _ctx : & ' ctx UI , callback : F ) {
374
374
unsafe {
375
- let mut data: Box < Box < FnMut ( i32 ) > > =Box :: new ( Box :: new ( callback) ) ;
375
+ let mut data: Box < Box < dyn FnMut ( i32 ) > > =Box :: new ( Box :: new ( callback) ) ;
376
376
ui_sys:: uiRadioButtonsOnSelected (
377
377
self . uiRadioButtons ,
378
378
Some ( c_callback) ,
379
- & mut * dataas * mut Box < FnMut ( i32 ) > as * mut c_void ,
379
+ & mut * dataas * mut Box < dyn FnMut ( i32 ) > as * mut c_void ,
380
380
) ;
381
381
mem:: forget ( data) ;
382
382
}
383
383
384
384
extern "C" fn c_callback ( radio_buttons : * mut uiRadioButtons , data : * mut c_void ) {
385
385
unsafe {
386
386
let val = ui_sys:: uiRadioButtonsSelected ( radio_buttons) ;
387
- mem:: transmute :: < * mut c_void , & mut Box < FnMut ( i32 ) > > ( data) ( val) ;
387
+ mem:: transmute :: < * mut c_void , & mut Box < dyn FnMut ( i32 ) > > ( data) ( val) ;
388
388
}
389
389
}
390
390
}