From 2ec568579823c991b919fa3a2c8583a8db21cb81 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 30 Jul 2025 23:58:32 +0300 Subject: implemented ^T command: allows typing by code and getting characters from stdin or the user * n:^T always prints bytes (cf. :^A) * ^T without arguments returns a codepoint or byte from stdin. In interactive mode, this currentply places a cursor in the message line and waits for a keypress. --- src/interface.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/interface.h') diff --git a/src/interface.h b/src/interface.h index 0e03a98..f22c023 100644 --- a/src/interface.h +++ b/src/interface.h @@ -65,6 +65,9 @@ void teco_interface_msg_literal(teco_msg_t type, const gchar *str, gsize len); void teco_interface_msg(teco_msg_t type, const gchar *fmt, ...) G_GNUC_PRINTF(2, 3); +/** @pure */ +teco_int_t teco_interface_getch(gboolean widechar); + /** @pure */ void teco_interface_msg_clear(void); @@ -173,6 +176,9 @@ gboolean teco_interface_event_loop(GError **error); /** @protected */ void teco_interface_stdio_msg(teco_msg_t type, const gchar *str, gsize len); +/** @protected */ +teco_int_t teco_interface_stdio_getch(gboolean widechar); + /** @pure */ void teco_interface_cleanup(void); -- cgit v1.2.3