1notimeout(3XCURSES)     X/Open Curses Library Functions    notimeout(3XCURSES)
2
3
4

NAME

6       notimeout, timeout, wtimeout - set timed blocking or non-blocking read
7

SYNOPSIS

9       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
10        -R  /usr/xpg4/lib  -lcurses  [ library... ]
11
12       c89 [ flag... ] file... -lcurses [ library... ]
13
14       #include <curses.h>
15
16       int notimeout(WINDOW *win, bool bf);
17
18
19       void timeout(int delay);
20
21
22       void wtimeout(WINDOW win, int delay);
23
24

PARAMETERS

26       win      Is a pointer to the window in which to set the timed blocking.
27
28
29       bf       Is a Boolean expression.
30
31
32       delay    Is the number of milliseconds to block or wait for input.
33
34

DESCRIPTION

36       If  bool  is  TRUE,  the notimeout() function disables a  timer used by
37       getch(3XCURSES) when handling multibyte function key sequences.
38
39
40       When bool is FALSE and keypad handling is enabled, a timer is   set  by
41       getch() to handle bytes received that could be the beginning of a func‐
42       tion key (for example, ESC). If the remainder of the  sequence  is  not
43       received  before  the time expires, the  first byte is returned; other‐
44       wise, the value of the function key is returned.  Subsequent  calls  to
45       the  getch()  function  will  return  the  other bytes received for the
46       incomplete key sequence.
47
48
49       The timeout() and wtimeout() functions set the length of time   getch()
50       waits for input for windows stdscr and win,  respectively.  These func‐
51       tions are similar to nodelay(3XCURSES) except the  time  to  block   or
52       wait for input can be specified.
53
54
55       A  negative  delay causes the program to wait indefinitely for input; a
56       delay of 0 returns ERR if no input is  ready;  and   a  positive  delay
57       blocks  until  input  arrives  or the time specified expires, (in which
58       case, ERR is returned).
59

RETURN VALUES

61       On success, the notimeout() function returns OK. Otherwise, it  returns
62       ERR.
63
64
65       The timeout() and wtimeout() functions do not return a value.
66

ERRORS

68       None.
69

ATTRIBUTES

71       See attributes(5) for descriptions of the following attributes:
72
73
74
75
76       ┌─────────────────────────────┬─────────────────────────────┐
77       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
78       ├─────────────────────────────┼─────────────────────────────┤
79       │Interface Stability          │Standard                     │
80       ├─────────────────────────────┼─────────────────────────────┤
81       │MT-Level                     │Unsafe                       │
82       └─────────────────────────────┴─────────────────────────────┘
83

SEE ALSO

85       getch(3XCURSES),    halfdelay(3XCURSES),   libcurses(3XCURSES),   node‐
86       lay(3XCURSES), attributes(5), standards(5)
87
88
89
90SunOS 5.11                        5 Jun 2002               notimeout(3XCURSES)
Impressum