From 4f95667e4785d780e87cd597fd89b7b902ad1545 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 1 Jun 2017 01:44:06 -0400 Subject: add accessor functions for which events the mouse reporting bits imply --- src/screen.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/screen.c') 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; -- cgit v1.2.3-54-g00ecf