From 3467a0adefc55851e8312f233ccc39366274765b Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Mon, 24 Feb 2020 21:52:13 +0100 Subject: [PATCH] [C++] API sync Added: * NCKey: `ScrollUp`, `ScrollDown` and `Return` * Plane: is_mouse_event (`ncplane_mouseevent_p`) --- include/ncpp/NCKey.hh | 3 +++ include/ncpp/Plane.hh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/include/ncpp/NCKey.hh b/include/ncpp/NCKey.hh index 8efa812c0..95fc58a8b 100644 --- a/include/ncpp/NCKey.hh +++ b/include/ncpp/NCKey.hh @@ -109,6 +109,9 @@ namespace ncpp static constexpr char32_t Button10 = NCKEY_BUTTON10; static constexpr char32_t Button11 = NCKEY_BUTTON11; static constexpr char32_t Release = NCKEY_RELEASE; + static constexpr char32_t ScrollUp = NCKEY_SCROLL_UP; + static constexpr char32_t ScrollDown = NCKEY_SCROLL_DOWN; + static constexpr char32_t Return = NCKEY_RETURN; static bool IsMouse (char32_t ch) noexcept { diff --git a/include/ncpp/Plane.hh b/include/ncpp/Plane.hh index 15143e5d9..2afb918c4 100644 --- a/include/ncpp/Plane.hh +++ b/include/ncpp/Plane.hh @@ -882,6 +882,11 @@ namespace ncpp return cell.has_no_foreground (); } + bool is_mouse_event (const ncinput *ni) const noexcept + { + return ncplane_mouseevent_p (plane, ni); + } + const char* get_extended_gcluster (Cell &cell) const noexcept { return cell_extended_gcluster (plane, cell);