aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-05 13:13:06 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-05 13:13:06 +0000
commit1610828b8cefaee2588552578ba0eccf354e3c29 (patch)
tree05580c03cd7bfdf3bb685a454d5eb029e5414ee8 /terminal.h
parentvt: add support for \E[?1000h - report mouse button events (diff)
vt: add support for mouse motion reports
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/terminal.h b/terminal.h
index 2aa8699e..4642bbae 100644
--- a/terminal.h
+++ b/terminal.h
@@ -145,6 +145,15 @@ struct kbd {
int32_t rate;
uint32_t key;
} repeat;
+
+ xkb_mod_index_t mod_shift;
+ xkb_mod_index_t mod_alt;
+ xkb_mod_index_t mod_ctrl;
+
+ /* Enabled modifiers */
+ bool shift;
+ bool alt;
+ bool ctrl;
};
enum decckm { DECCKM_CSI, DECCKM_SS3 };
@@ -202,8 +211,9 @@ struct terminal {
struct rgba background;
struct {
- int x;
- int y;
+ int row;
+ int col;
+ int button;
} mouse;
struct cursor cursor;
@@ -250,3 +260,5 @@ void term_mouse_down(struct terminal *term, int button, int row, int col,
bool shift, bool alt, bool ctrl);
void term_mouse_up(struct terminal *term, int button, int row, int col,
bool shift, bool alt, bool ctrl);
+void term_mouse_motion(struct terminal *term, int button, int row, int col,
+ bool shift, bool alt, bool ctrl);