home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / graphics / displayinfo.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  6KB  |  188 lines

  1. #ifndef    GRAPHICS_DISPLAYINFO_H
  2. #define    GRAPHICS_DISPLAYINFO_H
  3. /*
  4. **    $VER: displayinfo.h 39.13 (31.5.93)
  5. **    Includes Release 40.15
  6. **
  7. **    include define file for displayinfo database
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif /* EXEC_TYPES_H */
  16.  
  17. #ifndef GRAPHICS_GFX_H
  18. #include <graphics/gfx.h>
  19. #endif /* GRAPHICS_GFX_H */
  20.  
  21. #ifndef GRAPHICS_MONITOR_H
  22. #include <graphics/monitor.h>
  23. #endif /* GRAPHICS_MONITOR_H */
  24.  
  25. #ifndef GRAPHICS_MODEID_H
  26. #include <graphics/modeid.h>
  27. #endif /* GRAPHICS_MODEID_H */
  28.  
  29. #ifndef UTILITY_TAGITEM_H
  30. #include <utility/tagitem.h>
  31. #endif /* UTILITY_TAGITEM_H */
  32.  
  33. /* the "public" handle to a DisplayInfoRecord */
  34.  
  35. typedef APTR DisplayInfoHandle;
  36.  
  37. /* datachunk type identifiers */
  38.  
  39. #define DTAG_DISP        0x80000000
  40. #define DTAG_DIMS        0x80001000
  41. #define DTAG_MNTR        0x80002000
  42. #define DTAG_NAME        0x80003000
  43. #define DTAG_VEC        0x80004000    /* internal use only */
  44.  
  45. struct QueryHeader
  46. {
  47.     ULONG    StructID;    /* datachunk type identifier */
  48.     ULONG    DisplayID;    /* copy of display record key    */
  49.     ULONG    SkipID;        /* TAG_SKIP -- see tagitems.h */
  50.     ULONG    Length;        /* length of local data in double-longwords */
  51. };
  52.  
  53. struct DisplayInfo
  54. {
  55.     struct    QueryHeader Header;
  56.     UWORD    NotAvailable;    /* if NULL available, else see defines */
  57.     ULONG    PropertyFlags;    /* Properties of this mode see defines */
  58.     Point    Resolution;    /* ticks-per-pixel X/Y               */
  59.     UWORD    PixelSpeed;    /* aproximation in nanoseconds           */
  60.     UWORD    NumStdSprites;    /* number of standard amiga sprites    */
  61.     UWORD    PaletteRange;    /* OBSOLETE - use Red/Green/Blue bits instead */
  62.     Point    SpriteResolution; /* std sprite ticks-per-pixel X/Y    */
  63.     UBYTE    pad[4];        /* used internally */
  64.     UBYTE    RedBits;    /* number of Red bits this display supports (V39) */
  65.     UBYTE    GreenBits;    /* number of Green bits this display supports (V39) */
  66.     UBYTE    BlueBits;    /* number of Blue bits this display supports (V39) */
  67.     UBYTE    pad2[5];    /* find some use for this. */
  68.     ULONG    reserved[2];    /* terminator */
  69. };
  70.  
  71. /* availability */
  72.  
  73. #define DI_AVAIL_NOCHIPS    0x0001
  74. #define DI_AVAIL_NOMONITOR    0x0002
  75. #define DI_AVAIL_NOTWITHGENLOCK    0x0004
  76.  
  77. /* mode properties */
  78.  
  79. #define DIPF_IS_LACE        0x00000001
  80. #define DIPF_IS_DUALPF        0x00000002
  81. #define DIPF_IS_PF2PRI        0x00000004
  82. #define DIPF_IS_HAM        0x00000008
  83.  
  84. #define DIPF_IS_ECS        0x00000010    /* note: ECS modes (SHIRES, VGA, and **
  85.                                             ** PRODUCTIVITY) do not support      **
  86.                                             ** attached sprites.             **
  87.                                             */
  88. #define DIPF_IS_AA        0x00010000    /* AA modes - may only be available
  89.                         ** if machine has correct memory
  90.                         ** type to support required
  91.                         ** bandwidth - check availability.
  92.                         ** (V39)
  93.                         */
  94. #define DIPF_IS_PAL        0x00000020
  95. #define DIPF_IS_SPRITES        0x00000040
  96. #define DIPF_IS_GENLOCK        0x00000080
  97.  
  98. #define DIPF_IS_WB        0x00000100
  99. #define DIPF_IS_DRAGGABLE    0x00000200
  100. #define DIPF_IS_PANELLED    0x00000400
  101. #define DIPF_IS_BEAMSYNC    0x00000800
  102.  
  103. #define DIPF_IS_EXTRAHALFBRITE    0x00001000
  104.  
  105. /* The following DIPF_IS_... flags are new for V39 */
  106. #define DIPF_IS_SPRITES_ATT        0x00002000    /* supports attached sprites */
  107. #define DIPF_IS_SPRITES_CHNG_RES    0x00004000    /* supports variable sprite resolution */
  108. #define DIPF_IS_SPRITES_BORDER        0x00008000    /* sprite can be displayed in the border */
  109. #define DIPF_IS_SCANDBL            0x00020000    /* scan doubled */
  110. #define DIPF_IS_SPRITES_CHNG_BASE    0x00040000
  111.                                             /* can change the sprite base colour */
  112. #define DIPF_IS_SPRITES_CHNG_PRI    0x00080000
  113.                                             /* can change the sprite priority
  114.                                             ** with respect to the playfield(s).
  115.                                             */
  116. #define DIPF_IS_DBUFFER        0x00100000    /* can support double buffering */
  117. #define DIPF_IS_PROGBEAM    0x00200000    /* is a programmed beam-sync mode */
  118. #define DIPF_IS_FOREIGN        0x80000000    /* this mode is not native to the Amiga */
  119.  
  120.  
  121. struct DimensionInfo
  122. {
  123.     struct    QueryHeader Header;
  124.     UWORD    MaxDepth;          /* log2( max number of colors ) */
  125.     UWORD    MinRasterWidth;       /* minimum width in pixels      */
  126.     UWORD    MinRasterHeight;      /* minimum height in pixels     */
  127.     UWORD    MaxRasterWidth;       /* maximum width in pixels      */
  128.     UWORD    MaxRasterHeight;      /* maximum height in pixels     */
  129.     struct    Rectangle   Nominal;  /* "standard" dimensions          */
  130.     struct    Rectangle   MaxOScan; /* fixed, hardware dependent    */
  131.     struct    Rectangle VideoOScan; /* fixed, hardware dependent    */
  132.     struct    Rectangle   TxtOScan; /* editable via preferences     */
  133.     struct    Rectangle   StdOScan; /* editable via preferences     */
  134.     UBYTE    pad[14];
  135.     ULONG    reserved[2];          /* terminator */
  136. };
  137.  
  138. struct MonitorInfo
  139. {
  140.     struct    QueryHeader Header;
  141.     struct    MonitorSpec  *Mspc;   /* pointer to monitor specification  */
  142.     Point    ViewPosition;          /* editable via preferences       */
  143.     Point    ViewResolution;       /* standard monitor ticks-per-pixel  */
  144.     struct    Rectangle ViewPositionRange;  /* fixed, hardware dependent */
  145.     UWORD    TotalRows;          /* display height in scanlines       */
  146.     UWORD    TotalColorClocks;     /* scanline width in 280 ns units    */
  147.     UWORD    MinRow;          /* absolute minimum active scanline  */
  148.     WORD    Compatibility;          /* how this coexists with others       */
  149.     UBYTE    pad[32];
  150.     Point    MouseTicks;
  151.     Point    DefaultViewPosition;  /* original, never changes */
  152.     ULONG    PreferredModeID;      /* for Preferences */
  153.     ULONG    reserved[2];          /* terminator */
  154. };
  155.  
  156. /* monitor compatibility */
  157.  
  158. #define MCOMPAT_MIXED    0    /* can share display with other MCOMPAT_MIXED */
  159. #define MCOMPAT_SELF    1    /* can share only within same monitor */
  160. #define MCOMPAT_NOBODY -1    /* only one viewport at a time */
  161.  
  162. #define DISPLAYNAMELEN 32
  163.  
  164. struct NameInfo
  165. {
  166.     struct    QueryHeader Header;
  167.     UBYTE    Name[DISPLAYNAMELEN];
  168.     ULONG    reserved[2];          /* terminator */
  169. };
  170.  
  171. /******************************************************************************/
  172.  
  173. /* The following VecInfo structure is PRIVATE, for our use only
  174.  * Touch these, and burn! (V39)
  175.  */
  176.  
  177. struct VecInfo
  178. {
  179.     struct    QueryHeader   Header;
  180.     APTR    Vec;
  181.     APTR    Data;
  182.     UWORD    Type;
  183.     UWORD    pad[3];
  184.     ULONG    reserved[2];
  185. };
  186.  
  187. #endif    /* GRAPHICS_DISPLAYINFO_H */
  188.