home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
bsd
/
dev
/
kmreg_com.h
< prev
next >
Wrap
Text File
|
1992-07-29
|
2KB
|
58 lines
/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
*
* kmreg_com.h - machine independent km ioctl interface.
*
* HISTORY
* 16-Jan-92 Doug Mitchell at NeXT
* Created.
*/
#ifndef _BSD_DEV_KMREG_COM_
#define _BSD_DEV_KMREG_COM_
#import <sys/types.h>
#import <sys/ioctl.h>
/*
* Colors for fg, bg in struct km_drawrect
*/
#define KM_COLOR_WHITE 0
#define KM_COLOR_LTGRAY 1
#define KM_COLOR_DKGRAY 2
#define KM_COLOR_BLACK 3
/*
* The data to be rendered is treated as a pixmap of 2 bit pixels.
* The most significant bits of each byte is the leftmost pixel in that
* byte. Pixel values are assigned as described above.
*
* Each scanline should start on a 4 pixel boundry within the bitmap,
* and should be a multiple of 4 pixels in length.
*
* For the KMIOCERASERECT call, 'data' should be an integer set to the
* color to be used for the clear operation (data.fill).
* A rect at (x,y) measuring 'width' by 'height' will be cleared to
* the specified value.
*/
struct km_drawrect {
unsigned short x; /* Upper left corner of rect to be imaged. */
unsigned short y;
unsigned short width; /* Width and height of rect to be imaged,
* in pixels */
unsigned short height;
union {
void *bits; /* Pointer to 2 bit per pixel raster data. */
int fill; /* Const color for erase operation. */
} data;
};
#define KMIOCPOPUP _IO('k', 1) /* popup new window */
#define KMIOCRESTORE _IO('k', 2) /* restore background */
#define KMIOCDUMPLOG _IO('k', 3) /* dump message log */
#define KMIOCDRAWRECT _IOW('k', 5, struct km_drawrect) /* Draw rect from
* bits */
#define KMIOCERASERECT _IOW('k', 6, struct km_drawrect) /* Erase a rect */
#endif _BSD_DEV_KMREG_COM_