From 2d777dd67e9be3c5bfd36660ade94710de0f4a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Wed, 19 Nov 2014 02:41:36 +0100 Subject: Rewrite the mouse API I wasn't aware of the fact that 1000, 1002 and 1003 are mutually exclusive and turn each other off. Also now it's not needed to set the protocol, it gets set by default. --- termo-internal.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'termo-internal.h') diff --git a/termo-internal.h b/termo-internal.h index b2b1c3a..adf3e8f 100644 --- a/termo-internal.h +++ b/termo-internal.h @@ -81,9 +81,12 @@ struct termo } method; - int guessed_mouse_proto; // What we think should be the mouse protocol - int mouse_proto; // The active mouse protocol - termo_mouse_tracking_t mouse_tracking; // Mouse tracking mode + // What we think should be the mouse protocol + termo_mouse_proto_t guessed_mouse_proto; + // The active mouse protocol + termo_mouse_proto_t mouse_proto; + // Mouse tracking mode + termo_mouse_tracking_t mouse_tracking; // The mouse unfortunately directly depends on the terminfo driver to let // it handle changes in the mouse protocol. @@ -92,7 +95,7 @@ struct termo struct { - bool (*set_mouse_proto) (void *, int, bool); + bool (*set_mouse_proto) (void *, termo_mouse_proto_t, bool); bool (*set_mouse_tracking_mode) (void *, termo_mouse_tracking_t, bool); } ti_method; -- cgit v1.2.3