aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-12-16 20:31:40 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-12-16 20:31:40 +0000
commitd490cc84c0a78813403f6c2740a69ef3c8017f49 (patch)
tree151b9cce6ed2ca9a12f1da9e585708c0ea64b18c /terminal.h
parentterm: implement cursor blinking (diff)
term: cursor blink: cursor refresh now dirties the cursor cell
Normally we don't dirty the cell on cursor movement. But, since a blinking cursor isn't a cursor that has moved, our normal cursor rendering wont work. Dirty the cursor cell to force a redraw of it.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index e29f5269..f4fd5276 100644
--- a/terminal.h
+++ b/terminal.h
@@ -233,6 +233,7 @@ struct terminal {
enum cursor_style default_cursor_style;
enum cursor_style cursor_style;
struct {
+ bool active;
enum { CURSOR_BLINK_ON, CURSOR_BLINK_OFF } state;
int fd;
} cursor_blink;
@@ -351,6 +352,7 @@ void term_cursor_up(struct terminal *term, int count);
void term_cursor_down(struct terminal *term, int count);
void term_cursor_blink_enable(struct terminal *term);
void term_cursor_blink_disable(struct terminal *term);
+void term_cursor_blink_restart(struct terminal *term);
void term_scroll(struct terminal *term, int rows);
void term_scroll_reverse(struct terminal *term, int rows);