Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
- | - |
Exit | |
---|---|
- | All registers preserved |
This The purpose of this call is to enable the display of the hourglass mouse pointer.
Internally the hourglass module delays the activation of the hourglass by about a third of a second. This delay is intended to prevent situations where the hourglass briefly flashes on the screen before vanishing again, due to an operation completing quicker than the calling code expects (e.g. due to running on a faster computer, or due to having less data to process). This means that, in general, code which wants to use the hourglass should avoid making any time estimations itself – if there’s a task which operates on an arbitrary amount of user-supplied data, or one which is known to be computationally expensive on slow computers, then the code should simply activate the hourglass at the start of the task and let the module decide whether the processing has taken long enough that the hourglass is worth displaying to the user. However, if necessary, Hourglass_Start can be used to enable the hourglass with a custom delay.
At the end of your processing you must take care to call Hourglass_Off to disable the hourglass again.
The module retains a count of how many times Hourglass_On has been called; Hourglass_Off must be called an equal number of times in order for the hourglass to vanish. This allows for code which uses the hourglass to safely call other code which uses the hourglass. Hourglass_Smash can also be used to force the hourglass to vanish; this is most useful when dealing with errors, to ensure the mouse pointer returns to a user-friendly state.