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