pub fn on_should_quit<F: FnMut() + 'static>(&self, callback: F) {
        extern "C" fn c_callback<G: FnMut()>(data: *mut c_void) -> i32 {
            unsafe {
                from_void_ptr::<G>(data)();
                0
            }
        }

        unsafe {
            ui_sys::uiOnShouldQuit(Some(c_callback::<F>), to_heap_ptr(callback));
        }
    }
/// Set a callback to be run when the application quits.
Set a callback to be run when the application quits.
Set a callback to be run when the application quits .
pub fn on_should_quit<F: FnMut() + 'static>(&self, callback: F) {
        extern "C" fn c_callback<G: FnMut()>(data: *mut c_void) -> i32 {
            unsafe {
                from_void_ptr::<G>(data)();
                0
            }
        }
        unsafe {
            ui_sys::uiOnShouldQuit(Some(c_callback::<F>), to_heap_ptr(callback));
        }
    }
pub fn on_should_quit < F : FnMut ( ) + ' static > ( & self , callback : F ) { extern " " fn c_callback < G : FnMut ( ) > ( data : * mut c_void ) -> i32 { unsafe { from_void_ptr :: < G > ( data ) ( ) ; 0 } } unsafe { ui_sys :: uiOnShouldQuit ( Some ( c_callback :: < F > ) , to_heap_ptr ( callback ) ) ; } }
Set a callback to be run when the application quits.
Set a callback to be run when the application quits .
&self
callback
F
&self
callback
F