All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

with-busy-interface Macro

Summary

Displays an alternate cursor during the execution of some code, on platforms other than Cocoa.

Package

capi

Signature

with-busy-interface (pane &key cursor delay) &body body => result*

Arguments
pane
cursor
A keyword naming a cursor or a cursor object.
delay
A real number.
body
Lisp forms.
Values
result*
Multiple values.
Description

The macro with-busy-interface switches the cursor of the interface containing pane to be the busy cursor, evaluates the forms in body as an implicit progn, and then restores the cursor. The value of the last form is returned. This is useful when a piece of code may take significant time to run, and visual feedback should be provided.

cursor specifies the cursor to use while body is running. The default value is :busy. For other allowed values, see simple-pane.

delay specifies a time in seconds before the cursor is switched, so if body runs in less than delay seconds, then the cursor is not switched at all. This is usually more useful behavior than switching the cursor immediately. The default value of delay is 0.5.

with-busy-interface must be called in the process of the interface containing pane.

with-busy-interface has no effect on Cocoa.

See also

simple-pane


CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42