Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cfa092cd
Commit
cfa092cd
authored
Jun 30, 2000
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document recently-added mouse-related functions
parent
a03e23ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
Doc/lib/libcurses.tex
Doc/lib/libcurses.tex
+50
-0
No files found.
Doc/lib/libcurses.tex
View file @
cfa092cd
...
@@ -130,6 +130,27 @@ Flash the screen.
...
@@ -130,6 +130,27 @@ Flash the screen.
Flush all input buffers.
Flush all input buffers.
\end{funcdesc}
\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
}{}
\begin{funcdesc}
{
getsyx
}{}
Returns the current coordinates of the virtual screen cursor in y and
Returns the current coordinates of the virtual screen cursor in y and
x. If leaveok is currently true, then -1,-1 is returned.
x. If leaveok is currently true, then -1,-1 is returned.
...
@@ -221,6 +242,23 @@ If \var{yes} is 1, allow 8-bit characters. If \var{yes} is 0,
...
@@ -221,6 +242,23 @@ If \var{yes} is 1, allow 8-bit characters. If \var{yes} is 0,
allow only 7-bit chars.
allow only 7-bit chars.
\end{funcdesc}
\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
}
\begin{funcdesc}
{
newpad
}{
nlines, ncols
}
Creates and returns a pointer to a new pad data structure with the
Creates and returns a pointer to a new pad data structure with the
given number of lines and columns. A pad is returned as a
given number of lines and columns. A pad is returned as a
...
@@ -370,6 +408,11 @@ Push \var{ch} so the next \method{getch()} will return it.
...
@@ -370,6 +408,11 @@ Push \var{ch} so the next \method{getch()} will return it.
is called.
is called.
\end{funcdesc}
\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
}
\begin{funcdesc}
{
use
_
env
}{
flag
}
If used, this function should be called before
\function
{
initscr
}
or
If used, this function should be called before
\function
{
initscr
}
or
newterm are called. When
\var
{
flag
}
is false, the values of
newterm are called. When
\var
{
flag
}
is false, the values of
...
@@ -522,6 +565,13 @@ Add character \var{ch} with attribute \var{attr}, and immediately
...
@@ -522,6 +565,13 @@ Add character \var{ch} with attribute \var{attr}, and immediately
call
\method
{
refresh
}
.
call
\method
{
refresh
}
.
\end{methoddesc}
\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}
\begin{methoddesc}
{
erase
}{}
\begin{methoddesc}
{
erase
}{}
Clear the window.
Clear the window.
\end{methoddesc}
\end{methoddesc}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment