Queue marked UTF-8 text. Updates do not change the document; commit replaces the selection once.
cancel discards the preedit. The queue copies text, so the caller may release it immediately.
Signature
send_composition :: (
ui: *UI_State,
text: string,
commit: bool = false,
cancel: bool = false,
cursor: int = -1
)
ui := headless();
defer free_ui(*ui);
send_composition(*ui, "かな");
send_composition(*ui, "仮名", commit = true);