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: Macintosh Toolbox Essentials /
Chapter 2 - Event Manager / Event Manager Reference
Event Manager Routines / Getting Timing Information


GetDblTime

To determine whether a sequence of mouse events constitutes a double click, your application measures the elapsed time (in ticks) between a mouse-up event and a mouse-down event. If the time between the two mouse events is less than the value returned by GetDblTime, your application should interpret the two mouse events
as a double click.

FUNCTION GetDblTime: LongInt;
DESCRIPTION
The GetDblTime function returns the suggested maximum elapsed time, in ticks, between a mouse-up event and a mouse-down event. The user can adjust this value using the Mouse control panel.

If your application distinguishes a double click of the mouse from a single click, your application should use the value returned by GetDblTime to make this distinction. If your application uses TextEdit, the TextEdit procedures automatically recognize and handle double clicks of text within a TextEdit edit record by appropriately highlighting or unhighlighting the selection.

ASSEMBLY-LANGUAGE NOTE
The value returned by GetDblTime is also accessible in the system global variable DoubleTime.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996