/*------------------------------------------------------------------------------ # # MacOSª Sample Code # # Written by: Eric Anderson # AppleLink: ERIC3 # # Display Manager sample code # # RequestVideo # # RequestVideo.h - C Header # # Copyright © 1995 Apple Computer, Inc. # All rights reserved. # # Revision History: # # 5/31/95 ewa Added RVGetCurrentVideoSetting and RVConfirmVideoRequest routines # to make it easy to revert back to where you came from and to give # the user a chance to confirm the new setting if the new mode was # valid (ie: the card supports it) but not safe (the monitor may not). # 5/24/95 ewa Give the kAllValidModesBit requestFlags option for safe only or all # valid resolution timings. # # # # Components: PlayVideo.c # RequestVideo.c # RequestVideo.h # RequestVideo.rsrc # # For information on the use of this sample code, please the documentation in the Read Me file ------------------------------------------------------------------------------*/ #include #include // requestFlags bit values in VideoRequestRec (example use: 1< nil will force search of best device, otherwise search this device only short reqBitDepth; // requested bit depth short availBitDepth; // available bit depth unsigned long reqHorizontal; // requested horizontal resolution unsigned long reqVertical; // requested vertical resolution unsigned long availHorizontal; // available horizontal resolution unsigned long availVertical; // available vertical resolution unsigned long requestFlags; // request flags unsigned long availFlags; // available mode flags unsigned long displayMode; // mode used to set the screen resolution unsigned long depthMode; // mode used to set the depth VDSwitchInfoRec switchInfo; // DM2.0 uses this rather than displayMode/depthMode combo }; typedef struct VideoRequestRec VideoRequestRec; typedef struct VideoRequestRec *VideoRequestRecPtr; // Routine defines OSErr RVRequestVideoSetting(VideoRequestRecPtr requestRecPtr); OSErr RVGetCurrentVideoSetting(VideoRequestRecPtr requestRecPtr); OSErr RVSetVideoRequest (VideoRequestRecPtr requestRecPtr); OSErr RVConfirmVideoRequest (VideoRequestRecPtr requestRecPtr); OSErr RVSetVideoAsScreenPrefs (void);