aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-01 22:53:54 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-01 22:53:54 +0300
commitdaead48672e56af966911abc4efe1e54573c02cc (patch)
tree897a7e525882adb0e24cddcafd17bdddd0f0695d /src/interface.h
parentca70c9061146386ce0986631cd7fc9209a935a34 (diff)
downloadsciteco-daead48672e56af966911abc4efe1e54573c02cc.tar.gz
implemented the ^W command for refreshing the screen in loops, for sleeping and also the CTRL+L immediate editing command
* ^W can be added to loops in order to view progress in interactive mode. It also sleeps for a given number of milliseconds (10ms by default). * In batch mode it is therefore the sleep command. * Since CTRL+W is an immediate editing command, you will usually type it Caret+W. ASCII 23 however will also be accepted. * While ^W only updates the screen, you can force a complete redraw by pressing CTRL+L. This is what most terminal applications use for redrawing. It will make it harder to insert ASCII 12, but this is seldom necessary since it is a form feed. ^L (ASCII 12 and the upcaret variant ) is still a whitespace character and therefore treated as a NOP. * DEC TECO had CTRL+W as the refresh immediate editing command. Video TECO uses <ET> as a regular command for refreshign in loops. I'd rather keep ET reserved as a potential terminal configuration command as in DEC TECO, though.
Diffstat (limited to 'src/interface.h')
-rw-r--r--src/interface.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/interface.h b/src/interface.h
index f22c023..02af8a2 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -41,6 +41,12 @@
* feature.
*/
+/**
+ * Interval between polling for keypresses (if necessary).
+ * In other words, this is the maximum latency to detect CTRL+C interruptions.
+ */
+#define TECO_POLL_INTERVAL 100000 /* microseconds */
+
/** @protected */
extern teco_view_t *teco_interface_current_view;
@@ -179,6 +185,9 @@ void teco_interface_stdio_msg(teco_msg_t type, const gchar *str, gsize len);
/** @protected */
teco_int_t teco_interface_stdio_getch(gboolean widechar);
+/** @protected */
+void teco_interface_refresh(gboolean force);
+
/** @pure */
void teco_interface_cleanup(void);