diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2020-12-20 16:45:57 +0100 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2021-06-04 16:15:01 +0200 |
commit | 1bace02a96a7124accf7910f271663b0b7e8754b (patch) | |
tree | 754add41ed47ed999e37ff986811e7da33b8f2bc /gdb/tui/tui-data.h | |
parent | 25e821a6c2db1f7fea8a50ff0deeb34af2e72aa3 (diff) | |
download | gdb-1bace02a96a7124accf7910f271663b0b7e8754b.zip gdb-1bace02a96a7124accf7910f271663b0b7e8754b.tar.gz gdb-1bace02a96a7124accf7910f271663b0b7e8754b.tar.bz2 |
Initial TUI mouse support
Implements an overridable tui_win_info::click method whose arguments
are the mouse coordinates inside the specific window, and the mouse
button clicked.
And if the curses implementation supports 5 buttons, the 4th and 5th
buttons are used for scrolling.
gdb/ChangeLog:
2021-06-04 Hannes Domani <ssbssa@yahoo.de>
* ser-mingw.c (console_select_thread): Handle MOUSE_EVENT.
* tui/tui-data.h (struct tui_win_info): Add click function.
* tui/tui-io.c (tui_prep_terminal): Enable mouse events.
(tui_deprep_terminal): Disable mouse events.
(tui_dispatch_ctrl_char): Handle KEY_MOUSE.
* tui/tui.c (tui_disable): Disable mouse events.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r-- | gdb/tui/tui-data.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index b4d788d..9fa39fa 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -137,6 +137,13 @@ public: return true; } + /* Called for each mouse click inside this window. Coordinates MOUSE_X + and MOUSE_Y are 0-based relative to the window, and MOUSE_BUTTON can + be 1 (left), 2 (middle), or 3 (right). */ + virtual void click (int mouse_x, int mouse_y, int mouse_button) + { + } + void check_and_display_highlight_if_needed (); /* Window handle. */ |