aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-10-12 00:18:19 +0000
committerTiago Cunha <tcunha@gmx.com>2009-10-12 00:18:19 +0000
commitb26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072 (patch)
tree698ba80e7b13c711d195e1b4c75adad2bfcc7d5f /tmux.h
parent323469723b29fdd05a88e55ce9d3346f10506458 (diff)
downloadrtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.tar.gz
rtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.tar.bz2
rtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.zip
Sync OpenBSD patchset 381:
Clean up by introducing a wrapper struct for mouse clicks rather than passing three u_chars around. As a side-effect this fixes incorrectly rejecting high cursor positions (because it was comparing them as signed char), reported by Tom Doherty.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/tmux.h b/tmux.h
index 8a5c09a9..75b8cfc9 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.466 2009-10-12 00:12:33 tcunha Exp $ */
+/* $Id: tmux.h,v 1.467 2009-10-12 00:18:19 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -672,13 +672,14 @@ struct input_ctx {
*/
struct client;
struct window;
+struct mouse_event;
struct window_mode {
struct screen *(*init)(struct window_pane *);
void (*free)(struct window_pane *);
void (*resize)(struct window_pane *, u_int, u_int);
void (*key)(struct window_pane *, struct client *, int);
void (*mouse)(struct window_pane *,
- struct client *, u_char, u_char, u_char);
+ struct client *, struct mouse_event *);
void (*timer)(struct window_pane *);
};
@@ -949,6 +950,13 @@ struct tty_ctx {
u_int orlower;
};
+/* Mouse input. */
+struct mouse_event {
+ u_char b;
+ u_char x;
+ u_char y;
+};
+
/* Client connection. */
struct client {
struct imsgbuf ibuf;
@@ -1283,7 +1291,7 @@ int tty_keys_cmp(struct tty_key *, struct tty_key *);
RB_PROTOTYPE(tty_keys, tty_key, entry, tty_keys_cmp);
void tty_keys_init(struct tty *);
void tty_keys_free(struct tty *);
-int tty_keys_next(struct tty *, int *, u_char *);
+int tty_keys_next(struct tty *, int *, struct mouse_event *);
/* options-cmd.c */
const char *set_option_print(
@@ -1540,7 +1548,7 @@ void input_parse(struct window_pane *);
/* input-key.c */
void input_key(struct window_pane *, int);
-void input_mouse(struct window_pane *, u_char, u_char, u_char);
+void input_mouse(struct window_pane *, struct mouse_event *);
/* colour.c */
void colour_set_fg(struct grid_cell *, int);
@@ -1703,7 +1711,7 @@ void window_pane_reset_mode(struct window_pane *);
void window_pane_parse(struct window_pane *);
void window_pane_key(struct window_pane *, struct client *, int);
void window_pane_mouse(struct window_pane *,
- struct client *, u_char, u_char, u_char);
+ struct client *, struct mouse_event *);
int window_pane_visible(struct window_pane *);
char *window_pane_search(
struct window_pane *, const char *, u_int *);