home *** CD-ROM | disk | FTP | other *** search
-
- PollMask
-
- By Ian Scott
-
- Instructions
- ------------
-
- This program is designed to aid WIMP programers. When writing software for
- the desktop, you will need a mask code for the Wimp_Poll loop so that the
- Wimp doesn't return control back to your application when it doesn't need
- that particular event. Say for example, your task may not need to use the
- Null_Reason_Code, it's important that you mask out this event so that the
- Wimp doesn't waste time passing control to your application, then passing
- control back to the Wimp, which (slightly) slows down the desktop.
-
- To use this application, load it up and an icon will appear on the icon bar.
- Click on the icon with either Select or Adjust and the mask generator window
- will open. Click on the events that you don't need and it will display the
- relevant mask code at an icon at the top in hex, which you just copy into
- your Wimp_Poll call. i.e.
-
- SYS "Wimp_Poll",&1831 (returned from PollMask),Block% TO Reason%
-
- Meanings
- --------
-
- RISC OS 3 - This event code will not be returned on a RISC OS 2 machine, it
- is RISC OS 3 only.
- Queue it - Masking out this event stops further events of the same type
- being passed around the Wimp tasks.
-
- Event codes
- -----------
-
- Some event codes can not be masked out, and the task must be prepared to
- handle them. Also it's pointless masking out some events (like
- Lose_Caret) if your application doesn't use writable icons, because they will
- neither be checked for, nor returned.