source: abuse/tags/pd/macabuse/imlib/port/mac/RequestVideo.h @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 11 years ago
  • Imported original public domain release, for future reference.
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1/*------------------------------------------------------------------------------
2#
3#       MacOSª Sample Code
4#       
5#       Written by: Eric Anderson
6#        AppleLink: ERIC3
7#
8#       Display Manager sample code
9#
10#       RequestVideo
11#
12#       RequestVideo.h  -       C Header
13#
14#       Copyright © 1995 Apple Computer, Inc.
15#       All rights reserved.
16#
17#       Revision History:
18#
19#       5/31/95         ewa             Added RVGetCurrentVideoSetting and RVConfirmVideoRequest routines
20#                                               to make it easy to revert back to where you came from and to give
21#                                               the user a chance to confirm the new setting if the new mode was
22#                                               valid (ie: the card supports it) but not safe (the monitor may not).
23#       5/24/95         ewa             Give the kAllValidModesBit requestFlags option for safe only or all
24#                                               valid resolution timings.
25#
26#
27#
28#       Components:     PlayVideo.c                     
29#                               RequestVideo.c         
30#                               RequestVideo.h         
31#                               RequestVideo.rsrc               
32#
33#       For information on the use of this sample code, please the documentation in the Read Me file
34------------------------------------------------------------------------------*/
35 
36#include <QuickDraw.h>
37#include <Video.h>
38
39// requestFlags bit values in VideoRequestRec (example use: 1<<kAbsoluteRequestBit)
40enum {
41        kBitDepthPriorityBit            = 0,    // Bit depth setting has priority over resolution
42        kAbsoluteRequestBit                     = 1,    // Available setting must match request
43        kShallowDepthBit                        = 2,    // Match bit depth less than or equal to request
44        kMaximizeResBit                         = 3,    // Match screen resolution greater than or equal to request
45        kAllValidModesBit                       = 4             // Match display with valid timing modes (may include modes which are not marked as safe)
46};
47
48// availFlags bit values in VideoRequestRec (example use: 1<<kModeValidNotSafeBit)
49enum {
50        kModeValidNotSafeBit            = 0             //  Available timing mode is valid but not safe (requires user confirmation of switch)
51};
52
53// video request structure
54struct VideoRequestRec  {
55        GDHandle                screenDevice;           // <in/out>     nil will force search of best device, otherwise search this device only
56        short                   reqBitDepth;            // <in>         requested bit depth
57        short                   availBitDepth;          // <out>        available bit depth
58        unsigned long   reqHorizontal;          // <in>         requested horizontal resolution
59        unsigned long   reqVertical;            // <in>         requested vertical resolution
60        unsigned long   availHorizontal;        // <out>        available horizontal resolution
61        unsigned long   availVertical;          // <out>        available vertical resolution
62        unsigned long   requestFlags;           // <in>         request flags
63        unsigned long   availFlags;                     // <out>        available mode flags
64        unsigned long   displayMode;            // <out>        mode used to set the screen resolution
65        unsigned long   depthMode;                      // <out>        mode used to set the depth
66        VDSwitchInfoRec switchInfo;                     // <out>        DM2.0 uses this rather than displayMode/depthMode combo
67};
68typedef struct VideoRequestRec VideoRequestRec;
69typedef struct VideoRequestRec *VideoRequestRecPtr;
70
71// Routine defines
72OSErr RVRequestVideoSetting(VideoRequestRecPtr requestRecPtr);
73OSErr RVGetCurrentVideoSetting(VideoRequestRecPtr requestRecPtr);
74OSErr RVSetVideoRequest (VideoRequestRecPtr requestRecPtr);
75OSErr HackSetRequest (VideoRequestRecPtr requestRecPtr);
76OSErr HackRestoreRequest (VideoRequestRecPtr requestRecPtr);
77
Note: See TracBrowser for help on using the repository browser.