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: Processes
Chapter 4 - Vertical Retrace Manager / Vertical Retrace Manager Reference
Data Structure


The VBL Task Record

A VBL task record describes a vertical retrace task. It indicates which task record (if any) comes next in the vertical retrace queue, what procedure to use for the task, how many interrupts to wait before the task is executed, and in what phase to execute the task. The VBLTask data type defines a VBL task record.

TYPE VBLTask = 
RECORD
   qLink:      QElemPtr;   {next entry in vertical retrace queue}
   qType:      Integer;    {queue type}
   vblAddr:    ProcPtr;    {pointer to task procedure}
   vblCount:   Integer;    {interrupts until next execution}
   vblPhase:   Integer;    {task phase}
END;
Field Description
qLink
A pointer to the next entry in the task's vertical retrace queue.
qType
The queue type. This field must be set to ORD(vType).
vblAddr
A pointer to the VBL task.
vblCount
The number of interrupts between successive calls to the VBL task specified in the vblAddr field. If the value of vblCount is 0, the task will never be executed. The Vertical Retrace Manager decrements the value of this field after each interrupt. If decrementing vblCount produces a value of 0, the Vertical Retrace Manager executes the task. The task must then reset vblCount, or its entry will be removed from the queue after it has been executed.
vblPhase
The phase count of the VBL task. In most cases, you can set this field to 0. However, if you install multiple tasks with the same vblCount at the same time, you can assign them different vblPhase values so that the tasks are not executed during the same interrupt. The value of the vblPhase field must be less than the value of the vblCount field.
For more information about using the vblCount and vblPhase fields, see "The VBL Task Record" on page 4-6.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996