Home | History | Annotate | Line # | Download | only in dev
grfioctl.h revision 1.1
      1  1.1  mw /*
      2  1.1  mw  * Copyright (c) 1988 University of Utah.
      3  1.1  mw  * Copyright (c) 1990 The Regents of the University of California.
      4  1.1  mw  * All rights reserved.
      5  1.1  mw  *
      6  1.1  mw  * This code is derived from software contributed to Berkeley by
      7  1.1  mw  * the Systems Programming Group of the University of Utah Computer
      8  1.1  mw  * Science Department.
      9  1.1  mw  *
     10  1.1  mw  * Redistribution and use in source and binary forms, with or without
     11  1.1  mw  * modification, are permitted provided that the following conditions
     12  1.1  mw  * are met:
     13  1.1  mw  * 1. Redistributions of source code must retain the above copyright
     14  1.1  mw  *    notice, this list of conditions and the following disclaimer.
     15  1.1  mw  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1  mw  *    notice, this list of conditions and the following disclaimer in the
     17  1.1  mw  *    documentation and/or other materials provided with the distribution.
     18  1.1  mw  * 3. All advertising materials mentioning features or use of this software
     19  1.1  mw  *    must display the following acknowledgement:
     20  1.1  mw  *	This product includes software developed by the University of
     21  1.1  mw  *	California, Berkeley and its contributors.
     22  1.1  mw  * 4. Neither the name of the University nor the names of its contributors
     23  1.1  mw  *    may be used to endorse or promote products derived from this software
     24  1.1  mw  *    without specific prior written permission.
     25  1.1  mw  *
     26  1.1  mw  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     27  1.1  mw  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     28  1.1  mw  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     29  1.1  mw  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     30  1.1  mw  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     31  1.1  mw  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     32  1.1  mw  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     33  1.1  mw  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     34  1.1  mw  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     35  1.1  mw  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     36  1.1  mw  * SUCH DAMAGE.
     37  1.1  mw  *
     38  1.1  mw  * from: Utah $Hdr: grfioctl.h 1.1 90/07/09$
     39  1.1  mw  *
     40  1.1  mw  *	@(#)grfioctl.h	7.2 (Berkeley) 11/4/90
     41  1.1  mw  */
     42  1.1  mw 
     43  1.1  mw 
     44  1.1  mw /* these are changeable values, encapsulated in their own structure, so
     45  1.1  mw    no the whole thing has to be copied when setting parameters. */
     46  1.1  mw struct grfdyninfo {
     47  1.1  mw 	int	gdi_fbx;			/* frame buffer x offset */
     48  1.1  mw 	int	gdi_fby;			/* frame buffer y offset */
     49  1.1  mw 	int	gdi_dwidth;		/* displayed part width */
     50  1.1  mw 	int	gdi_dheight;		/* displayed part height */
     51  1.1  mw 	int	gdi_dx;			/* displayed part x offset */
     52  1.1  mw 	int	gdi_dy;			/* displayed part y offset */
     53  1.1  mw };
     54  1.1  mw 
     55  1.1  mw struct	grfinfo {
     56  1.1  mw 	caddr_t	gd_regaddr;		/* control registers physaddr */
     57  1.1  mw 	int	gd_regsize;		/* control registers size */
     58  1.1  mw 	caddr_t	gd_fbaddr;		/* frame buffer physaddr */
     59  1.1  mw 	int	gd_fbsize;		/* frame buffer size */
     60  1.1  mw 	short	gd_colors;		/* number of colors */
     61  1.1  mw 	short	gd_planes;		/* number of planes */
     62  1.1  mw 
     63  1.1  mw 	int	gd_fbwidth;		/* frame buffer width */
     64  1.1  mw 	int	gd_fbheight;		/* frame buffer height */
     65  1.1  mw 
     66  1.1  mw 	struct grfdyninfo gd_dyn;	/* everything changable by GRFIOCSINFO */
     67  1.1  mw /* compatibility... */
     68  1.1  mw #define gd_fbx		gd_dyn.gdi_fbx
     69  1.1  mw #define gd_fby		gd_dyn.gdi_fby
     70  1.1  mw #define gd_dwidth 	gd_dyn.gdi_dwidth
     71  1.1  mw #define gd_dheight	gd_dyn.gdi_dheight
     72  1.1  mw #define gd_dx		gd_dyn.gdi_dx
     73  1.1  mw #define gd_dy		gd_dyn.gdi_dy
     74  1.1  mw };
     75  1.1  mw 
     76  1.1  mw /*
     77  1.1  mw  * BSD ioctls
     78  1.1  mw  */
     79  1.1  mw #define	GRFIOCGINFO	_IOR('G', 0, struct grfinfo) /* get info on device */
     80  1.1  mw #define	GRFIOCON	_IO('G', 1)		/* turn graphics on */
     81  1.1  mw #define	GRFIOCOFF	_IO('G', 2)		/* turn graphics off */
     82  1.1  mw #define GRFIOCMAP	_IOWR('G', 5, int)	/* map in regs+framebuffer */
     83  1.1  mw #define GRFIOCUNMAP	_IOW('G', 6, int)	/* unmap regs+framebuffer */
     84  1.1  mw #define	GRFIOCSINFO	_IOW('G', 7, struct grfdyninfo) /* set info on device */
     85