]> git.saurik.com Git - apple/xnu.git/blame - bsd/dev/kmreg_com.h
xnu-7195.101.1.tar.gz
[apple/xnu.git] / bsd / dev / kmreg_com.h
CommitLineData
1c79356b 1/*
5d5c5d0d
A
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
2d21ac55 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
0a7de745 5 *
2d21ac55
A
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
0a7de745 14 *
2d21ac55
A
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
0a7de745 17 *
2d21ac55
A
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
8f6c56a5
A
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2d21ac55
A
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
0a7de745 25 *
2d21ac55 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
1c79356b 27 */
0a7de745 28/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
1c79356b
A
29 *
30 * kmreg_com.h - machine independent km ioctl interface.
31 *
32 * HISTORY
0a7de745
A
33 * 16-Jan-92 Doug Mitchell at NeXT
34 * Created.
1c79356b 35 */
1c79356b 36
0a7de745
A
37#ifdef KERNEL_PRIVATE
38
39#ifndef _BSD_DEV_KMREG_COM_
1c79356b
A
40#define _BSD_DEV_KMREG_COM_
41
42#include <sys/types.h>
0a7de745 43#include <sys/ioctl.h>
1c79356b 44
0a7de745
A
45/*
46 * Colors for fg, bg in struct km_drawrect
1c79356b 47 */
0a7de745
A
48#define KM_COLOR_WHITE 0
49#define KM_COLOR_LTGRAY 1
50#define KM_COLOR_DKGRAY 2
51#define KM_COLOR_BLACK 3
1c79356b
A
52
53/*
54 * The data to be rendered is treated as a pixmap of 2 bit pixels.
0a7de745 55 * The most significant bits of each byte is the leftmost pixel in that
1c79356b
A
56 * byte. Pixel values are assigned as described above.
57 *
58 * Each scanline should start on a 4 pixel boundry within the bitmap,
59 * and should be a multiple of 4 pixels in length.
60 *
0a7de745 61 * For the KMIOCERASERECT call, 'data' should be an integer set to the
1c79356b 62 * color to be used for the clear operation (data.fill).
0a7de745 63 * A rect at (x,y) measuring 'width' by 'height' will be cleared to
1c79356b
A
64 * the specified value.
65 */
66struct km_drawrect {
0a7de745 67 unsigned short x; /* Upper left corner of rect to be imaged. */
1c79356b 68 unsigned short y;
0a7de745
A
69 unsigned short width; /* Width and height of rect to be imaged,
70 * in pixels */
1c79356b
A
71 unsigned short height;
72 union {
0a7de745
A
73 void *bits; /* Pointer to 2 bit per pixel raster data. */
74 int fill; /* Const color for erase operation. */
1c79356b
A
75 } data;
76};
77
78/*
79 * Argument to KMIOCANIMCTL.
80 */
81typedef enum {
0a7de745
A
82 KM_ANIM_STOP, /* stop permanently */
83 KM_ANIM_SUSPEND, /* suspend */
84 KM_ANIM_RESUME /* resume */
1c79356b
A
85} km_anim_ctl_t;
86
0a7de745
A
87#define KMIOCPOPUP _IO('k', 1) /* popup new window */
88#define KMIOCRESTORE _IO('k', 2) /* restore background */
89#define KMIOCDUMPLOG _IO('k', 3) /* dump message log */
90#define KMIOCDRAWRECT _IOW('k', 5, struct km_drawrect) /* Draw rect from
91 * bits */
92#define KMIOCERASERECT _IOW('k', 6, struct km_drawrect) /* Erase a rect */
1c79356b 93
0a7de745
A
94#ifdef KERNEL_PRIVATE
95#define KMIOCDISABLCONS _IO('k', 8) /* disable console messages */
96#endif /* KERNEL_PRIVATE */
1c79356b 97
0a7de745
A
98#define KMIOCANIMCTL _IOW('k',9, km_anim_ctl_t)
99/* stop animation */
100#define KMIOCSTATUS _IOR('k',10, int) /* get status bits */
101#define KMIOCSIZE _IOR('k',11, struct winsize) /* get screen size */
1c79356b
A
102
103/*
104 * Status bits returned via KMIOCSTATUS.
105 */
0a7de745 106#define KMS_SEE_MSGS 0x00000001
1c79356b 107
0a7de745 108#endif /* _BSD_DEV_KMREG_COM_ */
1c79356b 109
0a7de745 110#endif /* KERNEL_PRIVATE */