Annotation of kernel/bsd/dev/kmreg_com.h, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.