viewioctl.h revision 1.4
11.4Stsutsui/*	$NetBSD: viewioctl.h,v 1.4 2023/01/06 10:28:28 tsutsui Exp $	*/
21.1Sleo
31.1Sleo/*
41.1Sleo * Copyright (c) 1994 Christian E. Hopps
51.1Sleo * All rights reserved.
61.1Sleo *
71.1Sleo * Redistribution and use in source and binary forms, with or without
81.1Sleo * modification, are permitted provided that the following conditions
91.1Sleo * are met:
101.1Sleo * 1. Redistributions of source code must retain the above copyright
111.1Sleo *    notice, this list of conditions and the following disclaimer.
121.1Sleo * 2. Redistributions in binary form must reproduce the above copyright
131.1Sleo *    notice, this list of conditions and the following disclaimer in the
141.1Sleo *    documentation and/or other materials provided with the distribution.
151.1Sleo * 3. All advertising materials mentioning features or use of this software
161.1Sleo *    must display the following acknowledgement:
171.1Sleo *      This product includes software developed by Christian E. Hopps.
181.1Sleo * 4. The name of the author may not be used to endorse or promote products
191.1Sleo *    derived from this software without specific prior written permission
201.1Sleo *
211.1Sleo * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221.1Sleo * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231.1Sleo * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241.1Sleo * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251.1Sleo * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261.1Sleo * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271.1Sleo * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281.1Sleo * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291.1Sleo * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301.1Sleo * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311.1Sleo */
321.1Sleo
331.1Sleo/*
341.1Sleo * The view major device is a placeholder device.  It serves
351.1Sleo * simply to map the semantics of a graphics display to
361.1Sleo * the semantics of a character block device.  In other
371.1Sleo * words the graphics system as currently built does not like to be
381.3Sandvar * referred to by open/close/ioctl.  This device serves as
391.1Sleo * a interface to graphics.
401.1Sleo */
411.1Sleo
421.2Sdholland#include <sys/ioccom.h>
431.2Sdholland
441.1Sleostruct view_size {
451.1Sleo    int		x;
461.1Sleo    int		y;
471.1Sleo    u_int	width;
481.1Sleo    u_int	height;
491.1Sleo    u_int	depth;
501.1Sleo};
511.1Sleo
521.1Sleo#define VIOCREMOVE	_IO('V', 0x0)	/* if displaying remove. */
531.1Sleo#define VIOCDISPLAY	_IO('V', 0x1)	/* if not displaying, display */
541.1Sleo#define VIOCSSIZE	_IOW('V', 0x2, struct view_size)
551.1Sleo#define VIOCGSIZE	_IOR('V', 0x3, struct view_size)
561.1Sleo#define VIOCGBMAP	_IOR('V', 0x4, bmap_t)
571.4Stsutsui#define VIOCSCMAP	_IOW('V', 0x5, colormap_t)
581.4Stsutsui#define VIOCGCMAP	_IOWR('V', 0x6, colormap_t)
591.1Sleo
60