NameDateSize

..20-Dec-201638

base/H20-Dec-201691

curses.priv.hH A D08-Mar-201550.7 KiB

fifo_defs.hH A D08-Mar-20153.2 KiB

llib-lncursesH A D08-Mar-201553.5 KiB

llib-lncursestH A D08-Mar-201555.2 KiB

llib-lncurseswH A D08-Mar-201565.1 KiB

Makefile.inH A D08-Mar-20159.1 KiB

modulesH A D08-Mar-20158.8 KiB

READMEH A D08-Mar-20152.3 KiB

README.IZH A D08-Mar-20155 KiB

SigAction.hH A D08-Mar-20153.8 KiB

tinfo/H20-Dec-201656

trace/H20-Dec-201614

tty/H20-Dec-201612

widechar/H20-Dec-201622

README

1-------------------------------------------------------------------------------
2-- Copyright (c) 1998-2000,2006 Free Software Foundation, Inc.               --
3--                                                                           --
4-- Permission is hereby granted, free of charge, to any person obtaining a   --
5-- copy of this software and associated documentation files (the             --
6-- "Software"), to deal in the Software without restriction, including       --
7-- without limitation the rights to use, copy, modify, merge, publish,       --
8-- distribute, distribute with modifications, sublicense, and/or sell copies --
9-- of the Software, and to permit persons to whom the Software is furnished  --
10-- to do so, subject to the following conditions:                            --
11--                                                                           --
12-- The above copyright notice and this permission notice shall be included   --
13-- in all copies or substantial portions of the Software.                    --
14--                                                                           --
15-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
16-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
17-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
18-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
19-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
20-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
21-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
22--                                                                           --
23-- Except as contained in this notice, the name(s) of the above copyright    --
24-- holders shall not be used in advertising or otherwise to promote the      --
25-- sale, use or other dealings in this Software without prior written        --
26-- authorization.                                                            --
27-------------------------------------------------------------------------------
28-- $Id: README,v 1.9 2006/04/22 22:19:37 tom Exp $
29-------------------------------------------------------------------------------
30For discussion of the package internals, see hackguide.html in the doc/html
31directory.
32

README.IZ

1-------------------------------------------------------------------------------
2-- Copyright (c) 2002,2006 Free Software Foundation, Inc.                    --
3--                                                                           --
4-- Permission is hereby granted, free of charge, to any person obtaining a   --
5-- copy of this software and associated documentation files (the             --
6-- "Software"), to deal in the Software without restriction, including       --
7-- without limitation the rights to use, copy, modify, merge, publish,       --
8-- distribute, distribute with modifications, sublicense, and/or sell copies --
9-- of the Software, and to permit persons to whom the Software is furnished  --
10-- to do so, subject to the following conditions:                            --
11--                                                                           --
12-- The above copyright notice and this permission notice shall be included   --
13-- in all copies or substantial portions of the Software.                    --
14--                                                                           --
15-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
16-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
17-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
18-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
19-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
20-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
21-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
22--                                                                           --
23-- Except as contained in this notice, the name(s) of the above copyright    --
24-- holders shall not be used in advertising or otherwise to promote the      --
25-- sale, use or other dealings in this Software without prior written        --
26-- authorization.                                                            --
27-------------------------------------------------------------------------------
28-- $Id: README.IZ,v 1.2 2006/04/22 23:13:05 tom Exp $
29---------------------------------------------------------------------
30
31Here is the patch.  I did no testing whatsoever with event watching
32requests present (I need some applications which exersize this before
33this, probably lynx ;-), but the code looks working "the normal way".
34
35I had no way to test that the poll() branch compiles/works...
36
37Here is the API: 
38
39*) two new functions wgetch_events() wgetstrn_event() are introduced,
40   which allow an event-watch specification given as the last argument;
41
42*) if the last argument is NULL, they behave as wgetch() and
43   wgetstrn() (TESTED!);
44
45*) the event specification is a pointer to _nc_eventlist, which
46   contains bookkeeping elements (count and the summary of results),
47   and an array of pointers to _nc_event;
48
49*) each _nc_event is a typed union, with two types supported "as
50   shipped": _NC_EVENT_TIMEOUT_MSEC, _NC_EVENT_FILE.  For
51   _NC_EVENT_FILE the fields are fd, flag, and the output field.
52
53*) The only supported flag "as shipped" is _NC_EVENT_FILE_READABLE.
54   If the file was found readable, the return field is set to this,
55   otherwise to 0;
56
57*) If these functions return KEY_EVENT, this means that the return
58   fields in both the _nc_eventlist and _nc_event structures make
59   sense.  The field result_flags of _nc_eventlist may have a
60   combination of bits _NC_EVENT_TIMEOUT_MSEC and _NC_EVENT_FILE_READABLE
61   set;
62
63*) The timeout_msec field of _NC_EVENT_TIMEOUT_MSEC _nc_event's is
64   updated on return, even if the return is not KEY_EVENT.  However,
65   the change in the value represents only the amount of time spent in
66   waiting for events, not the amount of time spent bookkeeping;
67
68*) the return KEY_EVENT of wgetstrn_event() means that the output
69   string includes the user input typed so far, but the user did not have
70   a chance to press ENTER (or whatever).  This call should be
71   repeated (with "shifted" pointer to a buffer, of course) to
72   complete the input;
73
74*) The presence of this extension can be checked via inspecting
75   #ifdef NCURSES_EVENT_VERSION.  This symbol is not defined on BeOS,
76   since there is no support for this on BeOS.
77
78Known issues:  calls interrupted by KEY_EVENT reset the ESCDELAY
79timer.  This is not entirely new, since other synthetic events behave
80the same (see "if (ch >= KEY_MIN)" branch of kgetch()).  However,
81KEY_EVENT may be generated in a continuous stream (say, when
82downloading a file), thus this may be more important than with other
83synthetic keys.  An additional field in window structure which keeps
84timestamp of the first raw key in the queue may be needed to
85circumvent this.
86
87Another possible issue: KEY_EVENT has a preference over a user input,
88so a stream of KEY_EVENT's can make input hard.  Maybe use
89result_flags as in input parameter too, which specifies whether the
90user input should have higher precedence?
91
92Also: I took an opportunity to document kgetch() better.
93
94Enjoy,
95Ilya
96