summaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-06-01 01:44:06 -0400
committerJesse Luehrs <doy@tozt.net>2017-06-01 03:16:10 -0400
commit4f95667e4785d780e87cd597fd89b7b902ad1545 (patch)
treec53fa1788d1ce685242a787105e2c5f3f33fa1dd /src/screen.c
parent0c83f7b826880f7bf909ba2b7f101a604b2ac8df (diff)
downloadlibvt100-4f95667e4785d780e87cd597fd89b7b902ad1545.tar.gz
libvt100-4f95667e4785d780e87cd597fd89b7b902ad1545.zip
add accessor functions for which events the mouse reporting bits imply
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index 3e3f2ab..0121124 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -842,6 +842,32 @@ void vt100_screen_reset_mouse_reporting_sgr_mode(VT100Screen *vt)
vt->mouse_reporting_sgr_mode = 0;
}
+int vt100_screen_mouse_reporting_wants_button_press(VT100Screen *vt)
+{
+ return vt->mouse_reporting_press
+ || vt->mouse_reporting_press_release
+ || vt->mouse_reporting_button_motion
+ || vt->mouse_reporting_any_motion;
+}
+
+int vt100_screen_mouse_reporting_wants_button_release(VT100Screen *vt)
+{
+ return vt->mouse_reporting_press_release
+ || vt->mouse_reporting_button_motion
+ || vt->mouse_reporting_any_motion;
+}
+
+int vt100_screen_mouse_reporting_wants_button_motion(VT100Screen *vt)
+{
+ return vt->mouse_reporting_button_motion
+ || vt->mouse_reporting_any_motion;
+}
+
+int vt100_screen_mouse_reporting_wants_any_motion(VT100Screen *vt)
+{
+ return vt->mouse_reporting_any_motion;
+}
+
void vt100_screen_set_bracketed_paste(VT100Screen *vt)
{
vt->bracketed_paste = 1;