The engine can reach a Hanja reading back into the text the client already holds, but only if the frontend hands that text over and can take some of it away again. GTK 3 has both: retrieve-surrounding brings the text around the cursor and delete-surrounding removes runes before it, and a widget that answers neither leaves the text empty, so nothing is ever reached into or taken from it. The wire grows a control frame for the text, sent like the caret only when it changes, and one byte in every response for the runes to take back. That byte moves the length fields along, so the version goes to 2: an old daemon and a new module, either way round, fail the handshake and the module falls through to GtkIMContextSimple rather than misread a frame. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
62 lines
1.5 KiB
C
62 lines
1.5 KiB
C
void die(char*, ...);
|
|
|
|
int sinit(Str*, char*, int);
|
|
void stail(Str*, char*, int);
|
|
void sclear(Str*);
|
|
void sputr(Str*, Rune);
|
|
void spopr(Str*);
|
|
void sappend(Str*, Str*);
|
|
int scmp(Str*, Str*);
|
|
int stoutf(Str*, char*, int);
|
|
Rune slastr(Str*);
|
|
|
|
int mapget(Trie*, Str*, Str*);
|
|
|
|
Trie* trienew(void);
|
|
void trieput(Trie*, char*, int, char*, int);
|
|
Trie* trieopen(char*);
|
|
void trieclose(Trie*);
|
|
int trienode(Trie*, Str*);
|
|
int trielookup(Trie*, Str*, char**, int*);
|
|
|
|
Lang* getlang(int);
|
|
void langinit(char*);
|
|
|
|
int dictlookup(Trie*, Str*, Str*, int);
|
|
int dictprefix(Trie*, Str*, Str*, int);
|
|
|
|
void drawthread(void*);
|
|
void popuparea(Area*, int, Area*, int, int, Area*);
|
|
void popupposition(Caret*, int, int, Area*, int, int, int*, int*);
|
|
int pagemarker(char*, int, int, int, int);
|
|
void popuplayout(Drawcmd*, int, int, Popup*);
|
|
void popupdraw(u32int*, Drawcmd*, Popup*);
|
|
void imthread(void*);
|
|
void impre(Im*, Str*);
|
|
void transstr(Lang*, Str*, Str*, Str*);
|
|
Emit transmap(Im*, Rune);
|
|
Emit transko(Im*, Rune);
|
|
Emit transvi(Im*, Rune);
|
|
void backko(Im*);
|
|
void backvi(Im*);
|
|
|
|
void srvinit(void);
|
|
void srvthread(void*);
|
|
void ibusthread(void*);
|
|
void ximthread(void*);
|
|
int wlinit(void);
|
|
void wlthread(void*);
|
|
int keymeaningful(u32int);
|
|
|
|
void composeinit(void);
|
|
void composedrop(int, void*);
|
|
int composekey(int, void*, u32int, char*, int);
|
|
|
|
void* emalloc(ulong);
|
|
void* erealloc(void*, ulong);
|
|
|
|
void textinit(void);
|
|
void textclose(void);
|
|
int textwidth(Str*);
|
|
void textdraw(u32int*, int, int, int, int, int, u32int, Str*);
|