foot/ime.h
Daniel Eklöf e8ffb05bc7
ime: move preedit state from terminal struct to the seat struct
This ensures different seat’s don’t step on each others IME pre-edit
state.

It also removes most dependencies on having a valid term pointer for
many IME operations.

We’re still not all the way, since we support disabling IME with a
private mode, which is per terminal, not seat.

Thus, we still require the seat to have keyboard focus on one of our
windows.

Closes #324. But note that *rendering* of multiple seat’s IME pre-edit
strings is still broken.
2021-03-25 09:36:07 +01:00

22 lines
634 B
C

#pragma once
#if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED
#include "text-input-unstable-v3.h"
extern const struct zwp_text_input_v3_listener text_input_listener;
#endif /* FOOT_IME_ENABLED */
struct seat;
struct terminal;
void ime_enable(struct seat *seat);
void ime_disable(struct seat *seat);
void ime_update_cursor_rect(struct seat *seat, struct terminal *term);
void ime_reset_pending_preedit(struct seat *seat);
void ime_reset_pending_commit(struct seat *seat);
void ime_reset_pending(struct seat *seat);
void ime_reset_preedit(struct seat *seat);
void ime_send_cursor_rect(struct seat *seat, struct terminal *term);