@@ -19,13 +19,13 @@ use str_tools::{from_toolkit_string, to_toolkit_string};
1919pub trait NumericEntry {
2020 fn value ( & self , ctx : & UI ) -> i32 ;
2121 fn set_value ( & mut self , ctx : & UI , value : i32 ) ;
22- fn on_changed < ' ctx , F : FnMut ( i32 ) + ' ctx > ( & mut self , ctx : & ' ctx UI , callback : F ) ;
22+ fn on_changed < ' ctx , F : FnMut ( i32 ) + ' static > ( & mut self , ctx : & ' ctx UI , callback : F ) ;
2323}
2424
2525pub trait TextEntry {
2626 fn value ( & self , ctx : & UI ) -> String ;
2727 fn set_value ( & mut self , ctx : & UI , value : & str ) ;
28- fn on_changed < ' ctx , F : FnMut ( String ) + ' ctx > ( & mut self , ctx : & ' ctx UI , callback : F ) ;
28+ fn on_changed < ' ctx , F : FnMut ( String ) + ' static > ( & mut self , ctx : & ' ctx UI , callback : F ) ;
2929}
3030
3131define_control ! {
@@ -70,7 +70,7 @@ impl NumericEntry for Spinbox {
7070
7171 fn on_changed < ' ctx , F > ( & mut self , _ctx : & ' ctx UI , callback : F )
7272 where
73- F : FnMut ( i32 ) + ' ctx ,
73+ F : FnMut ( i32 ) + ' static
7474 {
7575 extern "C" fn c_callback < G > ( spinbox : * mut uiSpinbox , data : * mut c_void )
7676 where
@@ -103,7 +103,7 @@ impl NumericEntry for Slider {
103103
104104 fn on_changed < ' ctx , F > ( & mut self , _ctx : & ' ctx UI , callback : F )
105105 where
106- F : FnMut ( i32 ) + ' ctx ,
106+ F : FnMut ( i32 ) + ' static
107107 {
108108 extern "C" fn c_callback < G > ( slider : * mut uiSlider , data : * mut c_void )
109109 where
@@ -169,7 +169,7 @@ impl TextEntry for Entry {
169169
170170 fn on_changed < ' ctx , F > ( & mut self , _ctx : & ' ctx UI , callback : F )
171171 where
172- F : FnMut ( String ) + ' ctx ,
172+ F : FnMut ( String ) + ' static ,
173173 {
174174 extern "C" fn c_callback < G > ( entry : * mut uiEntry , data : * mut c_void )
175175 where
@@ -235,7 +235,7 @@ impl TextEntry for MultilineEntry {
235235
236236 fn on_changed < ' ctx , F > ( & mut self , _ctx : & ' ctx UI , callback : F )
237237 where
238- F : FnMut ( String ) + ' ctx ,
238+ F : FnMut ( String ) + ' static ,
239239 {
240240 extern "C" fn c_callback < G > ( entry : * mut uiMultilineEntry , data : * mut c_void )
241241 where
@@ -288,7 +288,7 @@ impl Combobox {
288288
289289 pub fn on_selected < ' ctx , F > ( & mut self , _ctx : & ' ctx UI , callback : F )
290290 where
291- F : FnMut ( i32 ) + ' ctx ,
291+ F : FnMut ( i32 ) + ' static ,
292292 {
293293 extern "C" fn c_callback < G > ( combobox : * mut uiCombobox , data : * mut c_void )
294294 where
@@ -331,7 +331,7 @@ impl Checkbox {
331331
332332 pub fn on_toggled < ' ctx , F > ( & mut self , _ctx : & ' ctx UI , callback : F )
333333 where
334- F : FnMut ( bool ) + ' ctx ,
334+ F : FnMut ( bool ) + ' static ,
335335 {
336336 extern "C" fn c_callback < G > ( checkbox : * mut uiCheckbox , data : * mut c_void )
337337 where
@@ -376,7 +376,7 @@ impl RadioButtons {
376376 unsafe { ui_sys:: uiRadioButtonsSetSelected ( self . uiRadioButtons , idx) ; }
377377 }
378378
379- pub fn on_selected < ' ctx , F : FnMut ( i32 ) + ' ctx > ( & self , _ctx : & ' ctx UI , callback : F ) {
379+ pub fn on_selected < ' ctx , F : FnMut ( i32 ) + ' static > ( & self , _ctx : & ' ctx UI , callback : F ) {
380380 unsafe {
381381 let mut data: Box < Box < dyn FnMut ( i32 ) > > = Box :: new ( Box :: new ( callback) ) ;
382382 ui_sys:: uiRadioButtonsOnSelected (
0 commit comments