From 3e00cdad31510dd4635a4beb47729b472841657c Mon Sep 17 00:00:00 2001 From: Wojciech Graj Date: Thu, 20 Jul 2023 23:08:25 +0200 Subject: [PATCH] Release v1.4 --- README.md | 5 +++++ termgl.h | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bb7bcb1..88954ff 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Features: - 24 bit RGB - Indexed color mode: 16 Background colors, 16 foreground colors, bold and underline - Non-blocking input from terminal +- Mouse tracking ### Gallery @@ -73,3 +74,7 @@ Renders a texture-mapped cube. Renders overlapping red, green, and blue circles. - 24 bit RGB - Text rendering +7. Mouse\ +Displays mouse position and button state. + - Mouse tracking + - Text rendering diff --git a/termgl.h b/termgl.h index a0dc029..cc2a7e8 100644 --- a/termgl.h +++ b/termgl.h @@ -14,7 +14,7 @@ extern "C" { #endif #define TGL_VERSION_MAJOR 1 -#define TGL_VERSION_MINOR 3 +#define TGL_VERSION_MINOR 4 #include #include @@ -358,7 +358,8 @@ typedef struct TGLMouseEvent { /** * Reads up to count bytes from raw terminal input into buf and optionally reads count_events mouse events * If mouse tracking is enabled but event_buf==NULL, buf may contain Xterm control sequences - * @param event_buf: Pass NULL if mouse tracking is disableda + * If mouse tracking is enabled, ensure sizeof(buf) >= count_events * 6 + * @param event_buf: Pass NULL if mouse tracking is disabled * @param count_events: Length of event_buf * @param count_read_events: Gets set to number of mouse events read * @return number of bytes read on success, negative value on failure