]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_mouse.3x
ncurses 6.4 - patch 20230918
[ncurses.git] / man / curs_mouse.3x
index 9571648fe8b5f2450078cf494f5f3667dc4025a5..31d128f3d95891c8b64927b909d0fe4ad5bc254d 100644 (file)
@@ -1,6 +1,6 @@
 '\" t
 .\"***************************************************************************
-.\" Copyright 2018-2021,2022 Thomas E. Dickey                                *
+.\" Copyright 2018-2022,2023 Thomas E. Dickey                                *
 .\" Copyright 1998-2015,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_mouse.3x,v 1.58 2022/01/16 01:40:48 tom Exp $
+.\" $Id: curs_mouse.3x,v 1.71 2023/09/16 23:37:03 tom Exp $
+.TH curs_mouse 3X 2023-09-16 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
 .el       .ds '' ''
+.ie n .ds CW R
+.el   \{
+.ie \n(.g .ds CW CR
+.el       .ds CW CW
+.\}
 .de NS
 .ie n  .sp
 .el    .sp .5
 .ie n  .in +4
 .el    .in +2
 .nf
-.ft C                  \" Courier
+.ft \*(CW
 ..
 .de NE
 .fi
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
 ..
-.TH curs_mouse 3X ""
-.na
-.hy 0
 .SH NAME
-\fBhas_mouse\fP,
-\fBgetmouse\fP, \fBungetmouse\fP,
-\fBmousemask\fP, \fBwenclose\fP,
-\fBmouse_trafo\fP, \fBwmouse_trafo\fP,
-\fBmouseinterval\fP \- mouse interface through curses
-.ad
-.hy
+\fB\%has_mouse\fP,
+\fB\%getmouse\fP,
+\fB\%ungetmouse\fP,
+\fB\%mousemask\fP,
+\fB\%wenclose\fP,
+\fB\%mouse_trafo\fP,
+\fB\%wmouse_trafo\fP,
+\fB\%mouseinterval\fP \-
+get mouse events in \fIcurses\fR
 .SH SYNOPSIS
 \fB#include <curses.h>\fP
 .PP
 .PP
 .nf
 \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    short id;         \fI/* ID to distinguish multiple devices */\fR
+\fB    int x, y, z;      \fI/* event coordinates */\fR
+\fB    mmask_t bstate;   \fI/* button state bits */\fR
 \fB} MEVENT;\fP
 .fi
 .PP
 \fBbool has_mouse(void);\fP
 .sp
-\fBint getmouse(MEVENT *\fP\fIevent\fP\fB);\fP
+\fBint getmouse(MEVENT *\fIevent\fB);\fR
 .br
-\fBint ungetmouse(MEVENT *\fP\fIevent\fP\fB);\fP
+\fBint ungetmouse(MEVENT *\fIevent\fB);\fR
 .sp
-\fBmmask_t mousemask(mmask_t \fP\fInewmask\fP\fB, mmask_t *\fP\fIoldmask\fP\fB);\fP
+\fBmmask_t mousemask(mmask_t \fInewmask\fB, mmask_t *\fIoldmask\fB);\fR
 .sp
-\fBbool wenclose(const WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fP
+\fBbool wenclose(const WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
 .sp
-\fBbool mouse_trafo(int* \fP\fIpY\fP\fB, int* \fP\fIpX\fP\fB, bool \fP\fIto_screen\fP\fB);\fP
+\fBbool mouse_trafo(int* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB);\fR
 .br
-\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
+\fBbool wmouse_trafo(const WINDOW* \fIwin\fB,\fR
+                  \fBint* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB);\fR
 .sp
-\fBint mouseinterval(int \fP\fIerval\fP\fB);\fP
+\fBint mouseinterval(int \fIerval\fB);\fR
 .br
 .SH DESCRIPTION
 These functions provide an interface to mouse events from
@@ -98,7 +103,6 @@ These functions provide an interface to mouse events from
 Mouse events are represented by \fBKEY_MOUSE\fP
 pseudo-key values in the \fBwgetch\fP(3X) input stream.
 .SS mousemask
-.PP
 To make mouse events visible, use the \fBmousemask\fP function.
 This sets the mouse events to be reported.
 By default, no mouse events are reported.
@@ -118,7 +122,6 @@ As a side effect, setting a zero mousemask may turn off the mouse pointer;
 setting a nonzero mask may turn it on.
 Whether this happens is device-dependent.
 .SS Mouse events
-.PP
 Here are the mouse event type masks which may be defined:
 .PP
 .TS
@@ -164,7 +167,6 @@ REPORT_MOUSE_POSITION       report mouse movement
 _
 .TE
 .SS getmouse
-.PP
 Once a class of mouse events has been made visible in a window,
 calling the \fBwgetch\fP function on that window may return
 \fBKEY_MOUSE\fP as an indicator that a mouse event has been queued.
@@ -181,20 +183,17 @@ The corresponding data in the queue is marked invalid.
 A subsequent call to \fBgetmouse\fP will retrieve the next older
 item from the queue.
 .SS ungetmouse
-.PP
 The \fBungetmouse\fP function behaves analogously to \fBungetch\fP.
 It pushes
 a \fBKEY_MOUSE\fP event onto the input queue, and associates with that event
 the given state data and screen-relative character-cell coordinates.
 .SS wenclose
-.PP
 The \fBwenclose\fP function tests whether a given pair of screen-relative
 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
 The \fBwmouse_trafo\fP function transforms a given pair of coordinates
 from stdscr-relative coordinates
 to coordinates relative to the given window or vice versa.
@@ -226,12 +225,10 @@ The referenced coordinates
 are only replaced by the converted coordinates if the transformation was
 successful.
 .SS mouse_trafo
-.PP
 The \fBmouse_trafo\fP function performs the same translation
 as \fBwmouse_trafo\fP,
 using stdscr for \fIwin\fP.
 .SS mouseinterval
-.PP
 The \fBmouseinterval\fP function sets the maximum time (in thousands of a
 second) that can elapse between press and release events for them to
 be recognized as a click.
@@ -240,7 +237,6 @@ This function returns the previous interval value.
 Use \fBmouseinterval(\-1)\fP to obtain the interval without altering it.
 The default is one sixth of a second.
 .SS has_mouse
-.PP
 The \fBhas_mouse\fP function returns \fBTRUE\fP if the mouse driver has been
 successfully initialized.
 .PP