]> www.wagner.pp.ru Git - oss/ck.git/blob - doc/update.n
Ck console graphics toolkit
[oss/ck.git] / doc / update.n
1 '\"
2 '\" Copyright (c) 1990-1992 The Regents of the University of California.
3 '\" Copyright (c) 1994-1995 Sun Microsystems, Inc.
4 '\" Copyright (c) 1996-1999 Christian Werner
5 '\"
6 '\" See the file "license.terms" for information on usage and redistribution
7 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 '\" 
9 .so man.macros
10 .TH update n 8.0 Ck "Ck Built-In Commands"
11 .BS
12 '\" Note:  do not modify the .SH NAME line immediately below!
13 .SH NAME
14 update \- Process pending events and/or when-idle handlers
15 .SH SYNOPSIS
16 \fBupdate\fR ?\fBidletasks|screen\fR?
17 .BE
18
19 .SH DESCRIPTION
20 .PP
21 This command is used to bring the entire application world
22 ``up to date.''
23 It flushes all pending output to the display,  waits for the
24 server to process that output and return errors or events,
25 handles all pending events of any sort (including when-idle handlers),
26 and repeats this set of operations until there are no pending
27 events, no pending when-idle handlers, no pending output to the server,
28 and no operations still outstanding at the server.  
29 .PP
30 If the \fBidletasks\fR keyword is specified as an argument to the
31 command, then no new events or errors are processed;  only when-idle
32 idlers are invoked.
33 This causes operations that are normally deferred, such as display
34 updates and window layout calculations, to be performed immediately.
35 .PP
36 The \fBupdate idletasks\fR command is useful in scripts where
37 changes have been made to the application's state and you want those
38 changes to appear on the display immediately, rather than waiting
39 for the script to complete.  Most display updates are performed as
40 idle handlers, so \fBupdate idletasks\fR will cause them to run.
41 However, there are some kinds of updates that only happen in
42 response to events, such as those triggered by window size changes;
43 these updates will not occur in \fBupdate idletasks\fR.
44 .PP
45 If the \fBscreen\fR keyword is specified as an argument to the command,
46 then the entire screen is repainted from scratch without handling any other
47 events. This is useful if the terminal's screen has been garbled by
48 another process.
49 .PP
50 The \fBupdate\fR command with no options is useful in scripts where
51 you are performing a long-running computation but you still want
52 the application to respond to user interactions;  if you occasionally
53 call \fBupdate\fR then user input will be processed during the
54 next call to \fBupdate\fR.
55
56 .SH KEYWORDS
57 event, flush, handler, idle, update