Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 4 - List Manager / List Manager Reference
Application-Defined Routines / Click-Loop Procedures


MyClickLoop

A click-loop procedure must have the following syntax:

PROCEDURE MyClickLoop;
DESCRIPTION
If your application defines a custom click-loop procedure, then the LClick function repeatedly calls the procedure until the user releases the mouse button. A click-loop procedure may perform any processing desired when it is executed.

Because no parameters are passed to the click-loop procedure, your click-loop procedure probably needs to access a global variable that contains a handle to the list record, which contains information about the location of the cursor and other information potentially of interest to a click-loop procedure. You might also create a global variable that stores the state of the modifier keys immediately before a call to the LClick function. You would need to set these global variables immediately before calling LClick.

A click-loop procedure should ordinarily set the Z flag to 1 just before returning. If a click-loop procedure sets the Z flag to 0, then the LClick function immediately returns.

SPECIAL CONSIDERATIONS
A click-loop procedure does not execute at interrupt time. Instead, it is called directly by the LClick function. Thus, a click-loop procedure can allocate memory, and it does not need to adjust the value contained in the A5 register.

ASSEMBLY-LANGUAGE INFORMATION
Your click-loop procedure should ordinarily set register D0 to 1. To stop the LClick function from calling your procedure for the current mouse-down event, set register D0 to 0.

For your convenience, register D5 contains the current mouse location.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996