[Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.6,1.7
A.M. Kuchling
python-dev@python.org
Thu, 29 Jun 2000 18:05:42 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv30763
Modified Files:
libcurses.tex
Log Message:
Document recently-added mouse-related functions
Index: libcurses.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** libcurses.tex 2000/06/28 22:11:40 1.6
--- libcurses.tex 2000/06/30 01:05:39 1.7
***************
*** 131,134 ****
--- 131,155 ----
\end{funcdesc}
+ \begin{funcdesc}{getmouse}{}
+ After \method{getch()} returns \constant{KEY_MOUSE} to signal a mouse
+ event, this method should be call to retrieve the queued mouse event,
+ represented as a 5-tuple
+ \code{(\var{id}, \var{x}, \var{y}, \var{z}, \var{bstate})}.
+ \var{id} is an ID value used to distinguish multiple devices,
+ and \var{x}, \var{y}, \var{z} are the event's coordinates. (\var{z}
+ is currently unused.). \var{bstate} is an integer value whose bits
+ will be set to indicate the type of event, and will be the bitwise OR
+ of one or more of the following constants, where \var{n} is the button
+ number from 1 to 4:
+ \constant{BUTTON\var{n}_PRESSED},
+ \constant{BUTTON\var{n}_RELEASED},
+ \constant{BUTTON\var{n}_CLICKED},
+ \constant{BUTTON\var{n}_DOUBLE_CLICKED},
+ \constant{BUTTON\var{n}_TRIPLE_CLICKED},
+ \constant{BUTTON_SHIFT},
+ \constant{BUTTON_CTRL},
+ \constant{BUTTON_ALT}.
+ \end{funcdesc}
+
\begin{funcdesc}{getsyx}{}
Returns the current coordinates of the virtual screen cursor in y and
***************
*** 222,225 ****
--- 243,263 ----
\end{funcdesc}
+ \begin{funcdesc}{mouseinterval}{interval}
+ Sets the maximum time in millisecondsthat can elapse between press and
+ release events in order for them to be recognized as a click, and
+ returns the previous interval value. The default value is 200 msec,
+ or one fifth of a second.
+ \end{funcdesc}
+
+ \begin{funcdesc}{mousemask}{mousemask}
+ Sets the mouse events to be reported, and returns a tuple
+ \code{(\var{availmask}, \var{oldmask})}.
+ \var{availmask} indicates which of the
+ specified mouse events can be reported; on complete failure it returns
+ 0. \var{oldmask} is the previous value of the given window's mouse
+ event mask. If this function is never called, no mouse events are
+ ever reported.
+ \end{funcdesc}
+
\begin{funcdesc}{newpad}{nlines, ncols}
Creates and returns a pointer to a new pad data structure with the
***************
*** 371,374 ****
--- 409,417 ----
\end{funcdesc}
+ \begin{funcdesc}{ungetmouse}{id, x, y, z, bstate}
+ Push a \constant{KEY_MOUSE} event onto the input queue, associating
+ the given state data with it.
+ \end{funcdesc}
+
\begin{funcdesc}{use_env}{flag}
If used, this function should be called before \function{initscr} or
***************
*** 521,524 ****
--- 564,574 ----
Add character \var{ch} with attribute \var{attr}, and immediately
call \method{refresh}.
+ \end{methoddesc}
+
+ \begin{methoddesc}{enclose}{y, x}
+ Tests whether the given pair of screen-relative character-cell
+ coordinates are enclosed by the given window, returning true or
+ false. It is useful for determining what subset of the screen
+ windows enclose the location of a mouse event.
\end{methoddesc}