xim: add callback preedit and UTF-8 negotiation

This commit is contained in:
2026-08-14 17:20:38 +09:00
parent 2376035524
commit 2b4c509d0d
5 changed files with 716 additions and 21 deletions

View File

@@ -48,6 +48,24 @@ checkutf8run(void)
free(ct);
}
static void
checkcorpus(void)
{
static const char *text[] = {
"한글",
"かなカナ",
"漢字",
"𠀋",
"😀",
"❤️",
"👩‍💻",
};
size_t i;
for(i = 0; i < sizeof text / sizeof text[0]; i++)
checktext(text[i]);
}
int
main(void)
{
@@ -73,9 +91,7 @@ main(void)
assert(keymaplookup(punctuation, 2, LockMask|ShiftMask) == XKB_KEY_exclam);
assert(keymaplookup(missing, 4, Group1) == XKB_KEY_a);
assert(keymaplookup(NULL, 0, 0) == XKB_KEY_NoSymbol);
checktext("한글");
checktext("😀");
checktext("❤️");
checkcorpus();
checktext("A😀한");
checkutf8run();
return 0;