diff options
Diffstat (limited to 'payloads/libpayload/curses/PDCurses-3.4/pdcurses/mouse.c')
-rw-r--r-- | payloads/libpayload/curses/PDCurses-3.4/pdcurses/mouse.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/mouse.c b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/mouse.c index 1f476dd4b9..5071886d64 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/mouse.c +++ b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/mouse.c @@ -91,9 +91,9 @@ RCSID("$Id: mouse.c,v 1.45 2008/07/13 16:08:18 wmcbrine Exp $") reported) through 1000ms. In x11, the timeout can also be set via the clickPeriod resource. The return value from mouseinterval() is the old timeout. To check the old value - without setting a new one, call it with a parameter of -1. Note - that although there's no classic equivalent for this function - (apart from the clickPeriod resource), the value set applies in + without setting a new one, call it with a parameter of -1. Note + that although there's no classic equivalent for this function + (apart from the clickPeriod resource), the value set applies in both interfaces. wenclose() reports whether the given screen-relative y, x @@ -111,23 +111,23 @@ RCSID("$Id: mouse.c,v 1.45 2008/07/13 16:08:18 wmcbrine Exp $") mousemask() is nearly equivalent to mouse_set(), but instead of OK/ERR, it returns the value of the mask after setting it. (This isn't necessarily the same value passed in, since the mask could - be altered on some platforms.) And if the second parameter is a - non-null pointer, mousemask() stores the previous mask value - there. Also, since the ncurses interface doesn't work with + be altered on some platforms.) And if the second parameter is a + non-null pointer, mousemask() stores the previous mask value + there. Also, since the ncurses interface doesn't work with PDCurses' BUTTON_MOVED events, mousemask() filters them out. - nc_getmouse() returns the current mouse status in an MEVENT - struct. This is equivalent to ncurses' getmouse(), renamed to - avoid conflict with PDCurses' getmouse(). But if you define - NCURSES_MOUSE_VERSION (preferably as 2) before including - curses.h, it defines getmouse() to nc_getmouse(), along with a - few other redefintions needed for compatibility with ncurses - code. nc_getmouse() calls request_mouse_pos(), which (not + nc_getmouse() returns the current mouse status in an MEVENT + struct. This is equivalent to ncurses' getmouse(), renamed to + avoid conflict with PDCurses' getmouse(). But if you define + NCURSES_MOUSE_VERSION (preferably as 2) before including + curses.h, it defines getmouse() to nc_getmouse(), along with a + few other redefintions needed for compatibility with ncurses + code. nc_getmouse() calls request_mouse_pos(), which (not getmouse()) is the classic equivalent. - ungetmouse() is the mouse equivalent of ungetch(). However, - PDCurses doesn't maintain a queue of mouse events; only one can - be pushed back, and it can overwrite or be overwritten by real + ungetmouse() is the mouse equivalent of ungetch(). However, + PDCurses doesn't maintain a queue of mouse events; only one can + be pushed back, and it can overwrite or be overwritten by real mouse events. Portability X/Open BSD SYS V @@ -305,7 +305,7 @@ mmask_t mousemask(mmask_t mask, mmask_t *oldmask) if (oldmask) *oldmask = SP->_trap_mbe; - /* The ncurses interface doesn't work with our move events, so + /* The ncurses interface doesn't work with our move events, so filter them here */ mask &= ~(BUTTON1_MOVED | BUTTON2_MOVED | BUTTON3_MOVED); @@ -397,7 +397,7 @@ int ungetmouse(MEVENT *event) int shf = i * 5; short button = 0; - if (bstate & ((BUTTON1_RELEASED | BUTTON1_PRESSED | + if (bstate & ((BUTTON1_RELEASED | BUTTON1_PRESSED | BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED) << shf)) { pdc_mouse_status.changes |= 1 << i; |