home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / bsd / dev / kmreg_com.h < prev    next >
Text File  |  1992-07-29  |  2KB  |  58 lines

  1. /*     Copyright (c) 1992 NeXT Computer, Inc.  All rights reserved. 
  2.  *
  3.  * kmreg_com.h - machine independent km ioctl interface.
  4.  *
  5.  * HISTORY
  6.  * 16-Jan-92    Doug Mitchell at NeXT 
  7.  *      Created. 
  8.  */
  9.  
  10. #ifndef    _BSD_DEV_KMREG_COM_
  11. #define _BSD_DEV_KMREG_COM_
  12.  
  13. #import <sys/types.h>
  14. #import <sys/ioctl.h> 
  15.  
  16. /* 
  17.  * Colors for fg, bg in struct km_drawrect 
  18.  */
  19. #define KM_COLOR_WHITE        0
  20. #define KM_COLOR_LTGRAY        1
  21. #define KM_COLOR_DKGRAY        2
  22. #define KM_COLOR_BLACK        3
  23.  
  24. /*
  25.  * The data to be rendered is treated as a pixmap of 2 bit pixels.
  26.  * The most significant bits of each byte is the leftmost pixel in that 
  27.  * byte.  Pixel values are assigned as described above.
  28.  *
  29.  * Each scanline should start on a 4 pixel boundry within the bitmap,
  30.  * and should be a multiple of 4 pixels in length.
  31.  *
  32.  * For the KMIOCERASERECT call, 'data' should be an integer set to the 
  33.  * color to be used for the clear operation (data.fill).
  34.  * A rect at (x,y) measuring 'width' by 'height' will be cleared to 
  35.  * the specified value.
  36.  */
  37. struct km_drawrect {
  38.     unsigned short x;    /* Upper left corner of rect to be imaged. */
  39.     unsigned short y;
  40.     unsigned short width;    /* Width and height of rect to be imaged, 
  41.                  * in pixels */
  42.     unsigned short height;
  43.     union {
  44.         void *bits;    /* Pointer to 2 bit per pixel raster data. */
  45.         int   fill;    /* Const color for erase operation. */
  46.     } data;
  47. };
  48.  
  49. #define    KMIOCPOPUP    _IO('k', 1)        /* popup new window */
  50. #define    KMIOCRESTORE    _IO('k', 2)        /* restore background */
  51. #define    KMIOCDUMPLOG    _IO('k', 3)        /* dump message log */
  52. #define KMIOCDRAWRECT    _IOW('k', 5, struct km_drawrect)  /* Draw rect from 
  53.                                * bits */
  54. #define KMIOCERASERECT    _IOW('k', 6, struct km_drawrect)  /* Erase a rect */
  55.  
  56.  
  57. #endif    _BSD_DEV_KMREG_COM_
  58.