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: Imaging With QuickDraw /
Chapter 5 - Graphics Devices / Graphics Devices Reference
Routines for Graphics Devices


Getting the Available Graphics Devices

To gain access to the GDevice record for a video device--for example, to determine the size and pixel depth of its attached screen--your application needs to get a handle to that record.

Your application can use the GetDeviceList function to obtain a handle to the first GDevice record in the device list, the GetGDevice function to obtain a handle to the GDevice record for the current device, the GetMainDevice function to obtain a handle to the GDevice record for the main screen, and the GetMaxDevice function to obtain a handle to the GDevice record for the video device with the greatest pixel depth.

All existing GDevice records are linked together in the device list. After using one of these functions to obtain a handle to one of the GDevice records in the device list, your application can use the GetNextDevice function to obtain a handle to the next GDevice record in the list.

Two related functions, GetGWorld and GetGWorldDevice, also allow you to obtain handles to GDevice records. To get the GDevice record for the current device, you can use the GetGWorld function. To get a handle to the GDevice record for a particular offscreen graphics world, you can use the GetGWorldDevice function. These two functions are described in the next chapter, "Offscreen Graphics Worlds."


Subtopics
GetGDevice
GetDeviceList
GetMainDevice
GetMaxDevice
GetNextDevice

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996