extern "C" fn preedit_done_callback(
    _xim: ffi::XIM,
    client_data: ffi::XPointer,
    _call_data: ffi::XPointer,
) {
    let client_data = unsafe { &mut *(client_data as *mut ImeContextClientData) };

    // Drop text buffer and reset cursor position on done.
    client_data.text = Vec::new();
    client_data.cursor_pos = 0;

    client_data
        .event_sender
        .send((client_data.window, ImeEvent::End))
        .expect("failed to send preedit end event");
}
/// Done callback is used when the preedit should be hidden.
Done callback is used when the preedit should be hidden.
Done callback is used when the preedit should be hidden .
extern "C" fn preedit_done_callback(
    _xim: ffi::XIM,
    client_data: ffi::XPointer,
    _call_data: ffi::XPointer,
) {
    let client_data = unsafe { &mut *(client_data as *mut ImeContextClientData) };
    // Drop text buffer and reset cursor position on done.
    client_data.text = Vec::new();
    client_data.cursor_pos = 0;
    client_data
        .event_sender
        .send((client_data.window, ImeEvent::End))
        .expect("failed to send preedit end event");
}
extern " " fn preedit_done_callback ( _xim : ffi :: XIM , client_data : ffi :: XPointer , _call_data : ffi :: XPointer , ) { let client_data = unsafe { & mut * ( client_data as * mut ImeContextClientData ) } ; // Drop text buffer and reset cursor position on done. client_data . text = Vec :: new ( ) ; client_data . cursor_pos = 0 ; client_data . event_sender . send ( ( client_data . window , ImeEvent :: End ) ) . expect ( " " ) ; }
Done callback is used when the preedit should be hidden.
Done callback is used when the preedit should be hidden .
_xim
ffi::XIM
client_data
ffi::XPointer
_call_data
ffi::XPointer