home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD2.1 / includes / graphics / displayinfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-11  |  6.5 KB  |  217 lines

  1. #ifndef    GRAPHICS_DISPLAYINFO_H
  2. #define    GRAPHICS_DISPLAYINFO_H
  3. /*
  4. **    $VER: displayinfo.h 37.6 (08.11.91)
  5. **    Includes Release 38.56
  6. **
  7. **    include define file for displayinfo database
  8. **
  9. **    (C) Copyright 1985-1992 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 UTILITY_TAGITEM_H
  26. #include <utility/tagitem.h>
  27. #endif /* UTILITY_TAGITEM_H */
  28.  
  29. /* the "public" handle to a DisplayInfoRecord */
  30.  
  31. typedef APTR DisplayInfoHandle;
  32.  
  33. /* datachunk type identifiers */
  34.  
  35. #define DTAG_DISP        0x80000000
  36. #define DTAG_DIMS        0x80001000
  37. #define DTAG_MNTR        0x80002000
  38. #define DTAG_NAME        0x80003000
  39.  
  40. struct QueryHeader
  41. {
  42.     ULONG    StructID;    /* datachunk type identifier */
  43.     ULONG    DisplayID;    /* copy of display record key    */
  44.     ULONG    SkipID;        /* TAG_SKIP -- see tagitems.h */
  45.     ULONG    Length;        /* length of local data in double-longwords */
  46. };
  47.  
  48. struct DisplayInfo
  49. {
  50.     struct    QueryHeader Header;
  51.     UWORD    NotAvailable;    /* if NULL available, else see defines */
  52.     ULONG    PropertyFlags;    /* Properties of this mode see defines */
  53.     Point    Resolution;    /* ticks-per-pixel X/Y               */
  54.     UWORD    PixelSpeed;    /* aproximation in nanoseconds           */
  55.     UWORD    NumStdSprites;    /* number of standard amiga sprites    */
  56.     UWORD    PaletteRange;    /* distinguishable shades available    */
  57.     Point    SpriteResolution; /* std sprite ticks-per-pixel X/Y    */
  58.     UBYTE    pad[4];
  59.     ULONG    reserved[2];    /* terminator */
  60. };
  61.  
  62. /* availability */
  63.  
  64. #define DI_AVAIL_NOCHIPS    0x0001
  65. #define DI_AVAIL_NOMONITOR    0x0002
  66. #define DI_AVAIL_NOTWITHGENLOCK 0x0004
  67.  
  68. /* mode properties */
  69.  
  70. #define DIPF_IS_LACE        0x00000001
  71. #define DIPF_IS_DUALPF        0x00000002
  72. #define DIPF_IS_PF2PRI        0x00000004
  73. #define DIPF_IS_HAM        0x00000008
  74.  
  75. #define DIPF_IS_ECS        0x00000010    /*    note: ECS modes (SHIRES, VGA, and **
  76.                                             **    PRODUCTIVITY) do not support      **
  77.                                             **    attached sprites.          **
  78.                                             */
  79. #define DIPF_IS_PAL        0x00000020
  80. #define DIPF_IS_SPRITES    0x00000040
  81. #define DIPF_IS_GENLOCK    0x00000080
  82.  
  83. #define DIPF_IS_WB        0x00000100
  84. #define DIPF_IS_DRAGGABLE    0x00000200
  85. #define DIPF_IS_PANELLED    0x00000400
  86. #define DIPF_IS_BEAMSYNC    0x00000800
  87.  
  88. #define DIPF_IS_EXTRAHALFBRITE    0x00001000
  89.  
  90. struct DimensionInfo
  91. {
  92.     struct    QueryHeader Header;
  93.     UWORD    MaxDepth;          /* log2( max number of colors ) */
  94.     UWORD    MinRasterWidth;       /* minimum width in pixels      */
  95.     UWORD    MinRasterHeight;      /* minimum height in pixels     */
  96.     UWORD    MaxRasterWidth;       /* maximum width in pixels      */
  97.     UWORD    MaxRasterHeight;      /* maximum height in pixels     */
  98.     struct    Rectangle   Nominal;  /* "standard" dimensions          */
  99.     struct    Rectangle   MaxOScan; /* fixed, hardware dependant    */
  100.     struct    Rectangle VideoOScan; /* fixed, hardware dependant    */
  101.     struct    Rectangle   TxtOScan; /* editable via preferences     */
  102.     struct    Rectangle   StdOScan; /* editable via preferences     */
  103.     UBYTE    pad[14];
  104.     ULONG    reserved[2];          /* terminator */
  105. };
  106.  
  107. struct MonitorInfo
  108. {
  109.     struct    QueryHeader Header;
  110.     struct    MonitorSpec  *Mspc;   /* pointer to monitor specification  */
  111.     Point    ViewPosition;          /* editable via preferences       */
  112.     Point    ViewResolution;       /* standard monitor ticks-per-pixel  */
  113.     struct    Rectangle ViewPositionRange;  /* fixed, hardware dependant */
  114.     UWORD    TotalRows;          /* display height in scanlines       */
  115.     UWORD    TotalColorClocks;     /* scanline width in 280 ns units    */
  116.     UWORD    MinRow;          /* absolute minimum active scanline  */
  117.     WORD    Compatibility;          /* how this coexists with others       */
  118.     UBYTE    pad[36];
  119.         Point    DefaultViewPosition;  /* original, never changes */
  120.         ULONG    PreferredModeID;      /* for Preferences */
  121.     ULONG    reserved[2];          /* terminator */
  122. };
  123.  
  124. /* monitor compatibility */
  125.  
  126. #define MCOMPAT_MIXED    0    /* can share display with other MCOMPAT_MIXED */
  127. #define MCOMPAT_SELF    1    /* can share only within same monitor */
  128. #define MCOMPAT_NOBODY -1    /* only one viewport at a time */
  129.  
  130. #define DISPLAYNAMELEN 32
  131.  
  132. struct NameInfo
  133. {
  134.     struct    QueryHeader Header;
  135.     UBYTE    Name[DISPLAYNAMELEN];
  136.     ULONG    reserved[2];          /* terminator */
  137. };
  138.  
  139. /* DisplayInfoRecord identifiers */
  140.  
  141. #define INVALID_ID        ~0
  142.  
  143. /* normal identifiers */
  144.  
  145. #define MONITOR_ID_MASK        0xFFFF1000
  146.  
  147. #define DEFAULT_MONITOR_ID        0x00000000
  148. #define NTSC_MONITOR_ID        0x00011000
  149. #define PAL_MONITOR_ID            0x00021000
  150.  
  151. /* the following 20 composite keys are for Modes on the default Monitor */
  152. /* ntsc & pal "flavors" of these particular keys may be made by or'ing    */
  153. /* the ntsc or pal MONITOR_ID with the desired MODE_KEY... */
  154.  
  155. #define LORES_KEY            0x00000000
  156. #define HIRES_KEY            0x00008000
  157. #define SUPER_KEY            0x00008020
  158. #define HAM_KEY            0x00000800
  159. #define LORESLACE_KEY            0x00000004
  160. #define HIRESLACE_KEY            0x00008004
  161. #define SUPERLACE_KEY            0x00008024
  162. #define HAMLACE_KEY            0x00000804
  163. #define LORESDPF_KEY            0x00000400
  164. #define HIRESDPF_KEY            0x00008400
  165. #define SUPERDPF_KEY            0x00008420
  166. #define LORESLACEDPF_KEY        0x00000404
  167. #define HIRESLACEDPF_KEY        0x00008404
  168. #define SUPERLACEDPF_KEY        0x00008424
  169. #define LORESDPF2_KEY            0x00000440
  170. #define HIRESDPF2_KEY            0x00008440
  171. #define SUPERDPF2_KEY            0x00008460
  172. #define LORESLACEDPF2_KEY        0x00000444
  173. #define HIRESLACEDPF2_KEY        0x00008444
  174. #define SUPERLACEDPF2_KEY        0x00008464
  175. #define EXTRAHALFBRITE_KEY        0x00000080
  176. #define EXTRAHALFBRITELACE_KEY        0x00000084
  177.  
  178. /* vga identifiers */
  179.  
  180. #define VGA_MONITOR_ID            0x00031000
  181.  
  182. #define VGAEXTRALORES_KEY        0x00031004
  183. #define VGALORES_KEY            0x00039004
  184. #define VGAPRODUCT_KEY            0x00039024
  185. #define VGAHAM_KEY            0x00031804
  186. #define VGAEXTRALORESLACE_KEY        0x00031005
  187. #define VGALORESLACE_KEY        0x00039005
  188. #define VGAPRODUCTLACE_KEY        0x00039025
  189. #define VGAHAMLACE_KEY            0x00031805
  190. #define VGAEXTRALORESDPF_KEY        0x00031404
  191. #define VGALORESDPF_KEY        0x00039404
  192. #define VGAPRODUCTDPF_KEY        0x00039424
  193. #define VGAEXTRALORESLACEDPF_KEY    0x00031405
  194. #define VGALORESLACEDPF_KEY        0x00039405
  195. #define VGAPRODUCTLACEDPF_KEY        0x00039425
  196. #define VGAEXTRALORESDPF2_KEY        0x00031444
  197. #define VGALORESDPF2_KEY        0x00039444
  198. #define VGAPRODUCTDPF2_KEY        0x00039464
  199. #define VGAEXTRALORESLACEDPF2_KEY    0x00031445
  200. #define VGALORESLACEDPF2_KEY        0x00039445
  201. #define VGAPRODUCTLACEDPF2_KEY        0x00039465
  202. #define VGAEXTRAHALFBRITE_KEY        0x00031084
  203. #define VGAEXTRAHALFBRITELACE_KEY    0x00031085
  204.  
  205. /* a2024 identifiers */
  206.  
  207. #define A2024_MONITOR_ID        0x00041000
  208.  
  209. #define A2024TENHERTZ_KEY        0x00041000
  210. #define A2024FIFTEENHERTZ_KEY        0x00049000
  211.  
  212. /* prototype identifiers */
  213.  
  214. #define PROTO_MONITOR_ID        0x00051000
  215.  
  216. #endif    /* GRAPHICS_DISPLAYINFO_H */
  217.