tweaks: swap the row and col parameters to a more consistent order

This commit is contained in:
Benno Schulenberg 2018-01-27 20:00:14 +01:00
parent 90ebff00ca
commit f5c87a7fee
6 changed files with 7 additions and 7 deletions

View File

@ -121,7 +121,7 @@ char *do_browser(char *path)
int mouse_x, mouse_y;
/* We can click on the edit window to select a filename. */
if (get_mouseinput(&mouse_x, &mouse_y, TRUE) == 0 &&
if (get_mouseinput(&mouse_y, &mouse_x, TRUE) == 0 &&
wmouse_trafo(edit, &mouse_y, &mouse_x, FALSE)) {
/* longest is the width of each column. There
* are two spaces between each column. */

View File

@ -220,8 +220,8 @@ void do_help(void)
#endif
#ifdef ENABLE_MOUSE
} else if (kbinput == KEY_MOUSE) {
int dummy_x, dummy_y;
get_mouseinput(&dummy_x, &dummy_y, TRUE);
int dummy_row, dummy_col;
get_mouseinput(&dummy_row, &dummy_col, TRUE);
#endif
} else if (func == do_exit) {
/* Exit from the help viewer. */

View File

@ -1565,7 +1565,7 @@ void unbound_key(int code)
int do_mouse(void)
{
int click_row, click_col;
int retval = get_mouseinput(&click_col, &click_row, TRUE);
int retval = get_mouseinput(&click_row, &click_col, TRUE);
/* If the click is wrong or already handled, we're done. */
if (retval != 0)

View File

@ -33,7 +33,7 @@ static size_t statusbar_x = HIGHEST_POSITIVE;
int do_statusbar_mouse(void)
{
int click_row, click_col;
int retval = get_mouseinput(&click_col, &click_row, TRUE);
int retval = get_mouseinput(&click_row, &click_col, TRUE);
/* We can click on the statusbar window text to move the cursor. */
if (retval == 0 && wmouse_trafo(bottomwin, &click_row, &click_col, FALSE)) {

View File

@ -629,7 +629,7 @@ int get_control_kbinput(int kbinput);
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
int *parse_verbatim_kbinput(WINDOW *win, size_t *count);
#ifdef ENABLE_MOUSE
int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts);
int get_mouseinput(int *mouse_row, int *mouse_col, bool allow_shortcuts);
#endif
const sc *get_shortcut(int *kbinput);
void blank_row(WINDOW *win, int y, int x, int n);

View File

@ -1597,7 +1597,7 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count)
* it's been handled by putting back keystrokes that need to be handled.
* or 2 if it's been ignored. Assume that KEY_MOUSE has already been
* read in. */
int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts)
int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts)
{
MEVENT mevent;
bool in_bottomwin;