File: uevent_onidle.man

package info (click to toggle)
tcllib 2.0%2Bdfsg-4
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 83,572 kB
  • sloc: tcl: 306,798; ansic: 14,272; sh: 3,035; xml: 1,766; yacc: 1,157; pascal: 881; makefile: 124; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (64 lines) | stat: -rw-r--r-- 1,797 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[manpage_begin uevent::onidle n 0.2]
[keywords callback]
[keywords deferal]
[keywords event]
[keywords idle]
[keywords merge]
[keywords on-idle]
[copyright {2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {User events}]
[titledesc {Request merging and deferal to idle time}]
[require Tcl "8.5 9"]
[require uevent::onidle [opt 0.2]]
[require logger]
[description]

This package provides objects which can merge multiple requestes for
an action and execute the action the moment the system (event loop)
becomes idle. The action to be run is configured during object
construction.

[section API]

The package exports a class, [class uevent::onidle], as specified
below.

[list_begin definitions]

[call [cmd ::uevent::onidle] [arg objectName] [arg commandprefix]]

The command creates a new [term onidle] object with an associated
global Tcl command whose name is [arg objectName].  This command may
be used to invoke various operations on the object.

[para]

The [arg commandprefix] is the action to perform when the event loop
is idle and the user asked for it using the method [method request]
(See below).

[list_end]

The object commands created by the class commands above have
the form:

[list_begin definitions]

[call [arg objectName] [method request]]

This method requests the execution of the command prefix specified
during the construction of [arg objectName] the next time the event
loop is idle. Multiple requests are merged and cause only one
execution of the command prefix.

[list_end]

[section Examples]

Examples of this type of deferal are buried in the (C-level)
implementations all the Tk widgets, defering geometry calculations and
window redraw activity in this manner.

[vset CATEGORY uevent]
[include ../common-text/feedback.inc]
[manpage_end]