X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_mouse.3x.html;h=d1bfe98c62ea12b61bd36d780393beca2d358743;hp=230948267bab30c6ca6b91bc93ae1e1b5f03063e;hb=77afe78361875f531dc2bf8d73f2e781c8e76176;hpb=82a087c4c47679fcfa59bb6d7bdbe587355ba3f6 diff --git a/doc/html/man/curs_mouse.3x.html b/doc/html/man/curs_mouse.3x.html index 23094826..d1bfe98c 100644 --- a/doc/html/man/curs_mouse.3x.html +++ b/doc/html/man/curs_mouse.3x.html @@ -2,7 +2,7 @@ @@ -48,9 +48,9 @@

NAME

-       getmouse, ungetmouse, mousemask, wenclose, mouse_trafo,
-       wmouse_trafo, mouseinterval - mouse interface through
-       curses
+       has_mouse, getmouse, ungetmouse, mousemask, wenclose,
+       mouse_trafo, wmouse_trafo, mouseinterval - mouse interface
+       through curses
 
 
 
@@ -66,6 +66,7 @@ mmask_t bstate; /* button state bits */ } MEVENT; + bool has_mouse(void); int getmouse(MEVENT *event); int ungetmouse(MEVENT *event); mmask_t mousemask(mmask_t newmask, mmask_t *oldmask); @@ -97,7 +98,6 @@ Here are the mouse event type masks which may be defined: - Name Description --------------------------------------------------------------------- BUTTON1_PRESSED mouse button 1 down @@ -148,7 +148,9 @@ 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 indicate the - event type. + event type. The corresponding data in the queue is marked + invalid. A subsequent call to getmouse will retrieve the + next older item from the queue. The ungetmouse function behaves analogously to ungetch. It pushes a KEY_MOUSE event onto the input queue, and as- @@ -195,98 +197,103 @@ val(-1) to obtain the interval without altering it. The default is one sixth of a second. - Note that mouse events will be ignored when input is in + The has_mouse function returns TRUE if the mouse driver + has been successfully initialized. + + 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 function such as get- + is being simulated in a window by a function such as get- str that expects a linefeed for input-loop termination.

RETURN VALUE

-       getmouse and ungetmouse return the integer ERR upon  fail-
+       getmouse  and ungetmouse return the integer ERR upon fail-
        ure or OK upon successful completion.
 
               getmouse
                    returns an error.  If no mouse driver was ini-
-                   tialized, or if the mask parameter is zero,
+                   tialized, or if the mask parameter is zero, It
+                   also returns an error if no more events remain
+                   in the queue.
 
               ungetmouse
                    returns an error if the FIFO is full.
 
        mousemask returns the mask of reportable events.
 
-       mouseinterval returns the previous interval value,  unless
-       the  terminal  was  not initialized.  In that case, it re-
+       mouseinterval  returns the previous interval value, unless
+       the terminal was not initialized.  In that  case,  it  re-
        turns the maximum interval value (166).
 
-       wenclose and wmouse_trafo are boolean functions  returning
+       wenclose  and wmouse_trafo are boolean functions returning
        TRUE or FALSE depending on their test result.
 
 
 

PORTABILITY

-       These  calls  were  designed  for ncurses(3x), and are not
+       These calls were designed for  ncurses(3x),  and  are  not
        found in SVr4 curses, 4.4BSD curses, or any other previous
        version of curses.
 
        The feature macro NCURSES_MOUSE_VERSION is provided so the
-       preprocessor can be used to test  whether  these  features
-       are  present.   If  the interface is changed, the value of
-       NCURSES_MOUSE_VERSION will be incremented.   These  values
-       for  NCURSES_MOUSE_VERSION may be specified when configur-
+       preprocessor  can  be  used to test whether these features
+       are present.  If the interface is changed,  the  value  of
+       NCURSES_MOUSE_VERSION  will  be incremented.  These values
+       for NCURSES_MOUSE_VERSION may be specified when  configur-
        ing ncurses:
 
-              1  has definitions for reserved events.   The  mask
+              1  has  definitions  for reserved events.  The mask
                  uses 28 bits.
 
               2  adds definitions for button 5, removes the defi-
-                 nitions for reserved events.  The mask  uses  29
+                 nitions  for  reserved events.  The mask uses 29
                  bits.
 
-       The  order  of the MEVENT structure members is not guaran-
-       teed.  Additional fields may be added to the structure  in
+       The order of the MEVENT structure members is  not  guaran-
+       teed.   Additional fields may be added to the structure in
        the future.
 
-       Under  ncurses(3x),  these calls are implemented using ei-
-       ther xterm's built-in mouse-tracking API or  platform-spe-
+       Under ncurses(3x), these calls are implemented  using  ei-
+       ther  xterm's built-in mouse-tracking API or platform-spe-
        cific drivers including
-              Alessandro Rubini's gpm server.
+              Alessandro Rubini's gpm server
               FreeBSD sysmouse
               OS/2 EMX
-       If  you  are  using  an  unsupported  configuration, mouse
-       events will not be visible to ncurses(3x) (and the  mouse-
+       If you  are  using  an  unsupported  configuration,  mouse
+       events  will not be visible to ncurses(3x) (and the mouse-
        mask function will always return 0).
 
-       If  the  terminfo entry contains a XM string, this is used
-       in the xterm mouse driver to control the way the  terminal
+       If the terminfo entry contains a XM string, this  is  used
+       in  the xterm mouse driver to control the way the terminal
        is initialized for mouse operation.  The default, if XM is
        not found, corresponds to private mode 1000 of xterm:
               \E[?1000%?%p1%{1}%=%th%el%;
        The z member in the event structure is not presently used.
-       It  is  intended  for use with touch screens (which may be
+       It is intended for use with touch screens  (which  may  be
        pressure-sensitive)   or   with   3D-mice/trackballs/power
        gloves.
 
 
 

BUGS

-       Mouse  events under xterm will not in fact be ignored dur-
-       ing cooked mode, if they have been enabled  by  mousemask.
-       Instead,  the  xterm  mouse report sequence will appear in
+       Mouse events under xterm will not in fact be ignored  dur-
+       ing  cooked  mode, if they have been enabled by mousemask.
+       Instead, the xterm mouse report sequence  will  appear  in
        the string read.
 
        Mouse events under xterm will not be detected correctly in
-       a  window  with  its keypad bit off, since they are inter-
-       preted as a variety of function key.   Your  terminfo  de-
-       scription  should  have kmous set to "\E[M" (the beginning
-       of the response from xterm for mouse clicks).  Other  val-
-       ues  for  kmous  are permitted, but under the same assump-
+       a window with its keypad bit off, since  they  are  inter-
+       preted  as  a  variety of function key.  Your terminfo de-
+       scription should have kmous set to "\E[M"  (the  beginning
+       of  the response from xterm for mouse clicks).  Other val-
+       ues for kmous are permitted, but under  the  same  assump-
        tion, i.e., it is the beginning of the response.
 
-       Because there are  no  standard  terminal  responses  that
-       would  serve to identify terminals which support the xterm
-       mouse protocol, ncurses assumes that if your  $TERM  envi-
-       ronment  variable contains "xterm", or kmous is defined in
+       Because  there  are  no  standard  terminal responses that
+       would serve to identify terminals which support the  xterm
+       mouse  protocol,  ncurses assumes that if your $TERM envi-
+       ronment variable contains "xterm", or kmous is defined  in
        the terminal description, then the terminal may send mouse
        events.