home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-16 | 1.0 KB | 31 lines | [TEXT/R*ch] |
- # Replacements for getevent() and pollevent(),
- # and new functions ungetevent() and sync().
-
-
- # Every library module should ideally use this instead of
- # stdwin.{get,poll}event(), so applications can use the services
- # of ungetevent() and sync().
-
-
- import stdwin
-
-
- # Events read ahead are stored in this queue.
- #
- queue = []
-
-
- # Replacement for getevent().
- #
- def getevent():
- if queue:
- event = queue[0]
- del queue[0]
- return event
- else:
- return stdwin.getevent()
-
-
- # Replacement for pollevent().
- #
- def polle