From 428dafa568923d5632101c716fb20a3de35d27be Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 15 Feb 2025 01:32:05 +0300 Subject: support mouse interaction with popup windows * Curses allows scrolling with the scroll wheel at least if mouse support is enabled via ED flags. Gtk always supported that. * Allow clicking on popup entries to fully autocomplete them. Since this behavior - just like auto completions - is parser state-dependant, I introduced a new state method (insert_completion_cb). All the implementations are currently in cmdline.c since there is some overlap with the process_edit_cmd_cb implementations. * Fixed pressing undefined function keys while showing the popup. The popup area is no longer redrawn/replaced with the Scintilla view. Instead, continue to show the popup. --- src/interface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/interface.h') diff --git a/src/interface.h b/src/interface.h index 967f14d..33b094b 100644 --- a/src/interface.h +++ b/src/interface.h @@ -132,7 +132,9 @@ typedef enum { void teco_interface_popup_add(teco_popup_entry_type_t type, const gchar *name, gsize name_len, gboolean highlight); /** @pure */ -void teco_interface_popup_show(void); +void teco_interface_popup_show(gsize prefix_len); +/** @pure */ +void teco_interface_popup_scroll(void); /** @pure */ gboolean teco_interface_popup_is_shown(void); /** @pure */ -- cgit v1.2.3