.\" Copyright 1998-2015,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" Copyright 1998-2015,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
-\fBhas_mouse\fR,
-\fBgetmouse\fR, \fBungetmouse\fR,
-\fBmousemask\fR, \fBwenclose\fR,
-\fBmouse_trafo\fR, \fBwmouse_trafo\fR,
-\fBmouseinterval\fR \- mouse interface through curses
+\fBhas_mouse\fP,
+\fBgetmouse\fP, \fBungetmouse\fP,
+\fBmousemask\fP, \fBwenclose\fP,
+\fBmouse_trafo\fP, \fBwmouse_trafo\fP,
+\fBmouseinterval\fP \- mouse interface through curses
-\fBtypedef struct {\fR
-\fB short id; \fR\fI/* ID to distinguish multiple devices */\fR
-\fB int x, y, z; \fR\fI/* event coordinates */\fR
-\fB mmask_t bstate; \fR\fI/* button state bits */\fR
-\fB} MEVENT;\fR
+\fBtypedef struct {\fP
+\fB short id; \fP\fI/* ID to distinguish multiple devices */\fP
+\fB int x, y, z; \fP\fI/* event coordinates */\fP
+\fB mmask_t bstate; \fP\fI/* button state bits */\fP
+\fB} MEVENT;\fP
-\fBbool wmouse_trafo(const WINDOW* \fP\fIwin\fP\fB,\fR
- \fBint* \fP\fIpY\fP\fB, int* \fP\fIpX\fP\fB, bool \fP\fIto_screen\fP\fB);\fR
+\fBbool wmouse_trafo(const WINDOW* \fP\fIwin\fP\fB,\fP
+ \fBint* \fP\fIpY\fP\fB, int* \fP\fIpX\fP\fB, bool \fP\fIto_screen\fP\fB);\fP
-\fBncurses\fR(3X).
-Mouse events are represented by \fBKEY_MOUSE\fR
-pseudo-key values in the \fBwgetch\fR(3X) input stream.
+\fBncurses\fP(3X).
+Mouse events are represented by \fBKEY_MOUSE\fP
+pseudo-key values in the \fBwgetch\fP(3X) input stream.
This will set
the mouse events to be reported.
By default, no mouse events are reported.
This will set
the mouse events to be reported.
By default, no mouse events are reported.
BUTTON1_PRESSED mouse button 1 down
BUTTON1_RELEASED mouse button 1 up
BUTTON1_CLICKED mouse button 1 clicked
BUTTON1_PRESSED mouse button 1 down
BUTTON1_RELEASED mouse button 1 up
BUTTON1_CLICKED mouse button 1 clicked
-calling the \fBwgetch\fR function on that window may return
-\fBKEY_MOUSE\fR as an indicator that a mouse event has been queued.
+calling the \fBwgetch\fP function on that window may return
+\fBKEY_MOUSE\fP as an indicator that a mouse event has been queued.
-\fBgetmouse\fR.
-This function will return \fBOK\fR if a mouse event
-is actually visible in the given window, \fBERR\fR otherwise.
-When \fBgetmouse\fR returns \fBOK\fR, the data deposited as y and
+\fBgetmouse\fP.
+This function will return \fBOK\fP if a mouse event
+is actually visible in the given window, \fBERR\fP otherwise.
+When \fBgetmouse\fP returns \fBOK\fP, the data deposited as y and
x in the event structure coordinates will be screen-relative character-cell
coordinates.
The returned state mask will have exactly one bit set to
x in the event structure coordinates will be screen-relative character-cell
coordinates.
The returned state mask will have exactly one bit set to
character-cell coordinates is enclosed by a given window, returning \fBTRUE\fP
if it is and \fBFALSE\fP otherwise.
It is useful for determining what subset of
the screen windows enclose the location of a mouse event.
.SS wmouse_trafo
.PP
character-cell coordinates is enclosed by a given window, returning \fBTRUE\fP
if it is and \fBFALSE\fP otherwise.
It is useful for determining what subset of
the screen windows enclose the location of a mouse event.
.SS wmouse_trafo
.PP
from stdscr-relative coordinates
to coordinates relative to the given window or vice versa.
The resulting stdscr-relative coordinates are not always identical
to window-relative coordinates due to the mechanism to reserve lines on top
or bottom of the screen for other purposes
from stdscr-relative coordinates
to coordinates relative to the given window or vice versa.
The resulting stdscr-relative coordinates are not always identical
to window-relative coordinates due to the mechanism to reserve lines on top
or bottom of the screen for other purposes
-If the parameter \fBto_screen\fR is \fBTRUE\fR, the pointers
-\fBpY, pX\fR must reference the coordinates of a location
-inside the window \fBwin\fR.
+If the parameter \fIto_screen\fP is \fBTRUE\fP, the pointers
+\fIpY, pX\fP must reference the coordinates of a location
+inside the window \fIwin\fP.
.PP
Note that mouse events will be ignored when input is in cooked mode, and will
cause an error beep when cooked mode is being simulated in a window by a
.PP
Note that mouse events will be ignored when input is in cooked mode, and will
cause an error beep when cooked mode is being simulated in a window by a
returns the previous interval value, unless
the terminal was not initialized.
In that case, it returns the maximum interval value (166).
.PP
returns the previous interval value, unless
the terminal was not initialized.
In that case, it returns the maximum interval value (166).
.PP
-\fBwenclose\fR and \fBwmouse_trafo\fR
-are boolean functions returning \fBTRUE\fR or \fBFALSE\fR depending
+\fBwenclose\fP and \fBwmouse_trafo\fP
+are boolean functions returning \fBTRUE\fP or \fBFALSE\fP depending
It is mentioned in a few places, but with no supporting documentation:
.bP
the \*(``libcurses\*('' manual page lists functions for this feature
It is mentioned in a few places, but with no supporting documentation:
.bP
the \*(``libcurses\*('' manual page lists functions for this feature
.PP
If you are using an unsupported configuration,
mouse events will not be visible to
.PP
If you are using an unsupported configuration,
mouse events will not be visible to
this is used in the xterm mouse driver to control the
way the terminal is initialized for mouse operation.
this is used in the xterm mouse driver to control the
way the terminal is initialized for mouse operation.
presses of buttons 4 or 5 without matching button-releases.
.SH BUGS
Mouse events under xterm will not in fact be ignored during cooked mode,
presses of buttons 4 or 5 without matching button-releases.
.SH BUGS
Mouse events under xterm will not in fact be ignored during cooked mode,
Instead, the xterm mouse
report sequence will appear in the string read.
.PP
Mouse events under xterm will not be detected correctly in a window with
its keypad bit off, since they are interpreted as a variety of function key.
Instead, the xterm mouse
report sequence will appear in the string read.
.PP
Mouse events under xterm will not be detected correctly in a window with
its keypad bit off, since they are interpreted as a variety of function key.
but under the same assumption,
i.e., it is the beginning of the response.
.PP
Because there are no standard terminal responses that would serve to identify
but under the same assumption,
i.e., it is the beginning of the response.
.PP
Because there are no standard terminal responses that would serve to identify
-terminals which support the xterm mouse protocol, \fBncurses\fR assumes that
-if \fBkmous\fR is defined in the terminal description,
+terminals which support the xterm mouse protocol, \fBncurses\fP assumes that
+if \fBkmous\fP is defined in the terminal description,
or if the terminal description's primary name or aliases
contain the string \*(``xterm\*('',
then the terminal may send mouse events.
or if the terminal description's primary name or aliases
contain the string \*(``xterm\*('',
then the terminal may send mouse events.