home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntinc25.zoo / screen.h < prev    next >
C/C++ Source or Header  |  1992-10-18  |  2KB  |  71 lines

  1. #ifndef _SCREEN_H
  2. #define _SCREEN_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. /* Data structures for IOCTL on /dev/screen */
  9.  
  10. #define SCR_NUM_COLORS    256    /* max possible num. of colors (even more on Falcon) */
  11.  
  12. /* SCR_ALIGN gives a mask telling how the physical screen must be
  13.    aligned (for the SCRSETP ioctl call. A typical use might be
  14.       newscrn = malloc(size + SCR_ALIGN) & (~SCR_ALIGN)
  15.    If SCR_ALIGN is -1, then the physical screen may not be remapped
  16. */
  17. #define SCR_ALIGN    0x0ffL
  18.  
  19. /* define the following only if the physical memory occupied by the
  20.    screen is not accessible to user programs without an operating
  21.    system request to re-map or shar memory (i.e. don't define this
  22.    unless you have a version of Minix with a hardware memory
  23.    manager
  24. */
  25. /* #define SCR_VIRT_MEM     */    /* screen lives in virtual memory */
  26.  
  27.  
  28. /* physical screen attributes; information returned by the
  29.    SCRGETPARAM ioctl call */
  30.  
  31. struct scr_param {
  32.     long    scr_base;    /* physical address of screen */
  33.     short    scr_width;    /* width of screen (pixels) */
  34.     short    scr_height;    /* height of screen (pixels) */
  35.     short    scr_depth;    /* no. of bitplanes on screen */
  36.     short    scr_mode;    /* special mode info about screen */
  37. };
  38.  
  39. /* Each palette entry for the screen colors holds three entries;
  40.    the red, green, and blue values for this color, from 0 (no color)
  41.    to 255 (max. color).
  42.    The actual number of different values recognized by the hardware
  43.    is given by SCR_RGB_VALUES; for example, the atari ST recognizes
  44.    only 8 possible values for each of red, green, and blue, for
  45.    a total of 512 colors; for it, SCR_RGB_VALUES == 8.
  46. */
  47.  
  48. #define SCR_RGB_VALUES 16
  49.  
  50. /* constants for accessing the scr_rgb array */
  51. #define RED     0
  52. #define BLUE     1
  53. #define GREEN    2
  54.  
  55. /* data structure returned by SCRGETCOLOR ioctl call */
  56. struct scr_palette {
  57.     unsigned char scr_rgb[SCR_NUM_COLORS][3];
  58. };
  59.  
  60.  
  61. #define SCRGETPARAM     (('S'<<8) | 1)
  62. #define SCRSETPARAM    (('S'<<8) | 2)
  63. #define SCRGETCOLOR    (('S'<<8) | 3)
  64. #define SCRSETCOLOR    (('S'<<8) | 4)
  65.  
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69.  
  70. #endif /* _SCREEN_H */
  71.