fbio.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1986,1997-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_FBIO_H
#define _SYS_FBIO_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS4.1.2 5.49 */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef ASM
/*
* Frame buffer descriptor.
* Returned by FBIOGTYPE ioctl on frame buffer devices.
*/
struct fbtype {
int fb_type; /* as defined below */
int fb_height; /* in pixels */
int fb_width; /* in pixels */
int fb_depth; /* bits per pixel */
int fb_cmsize; /* size of color map (entries) */
int fb_size; /* total size in bytes */
};
#ifdef _KERNEL
struct fbpixrect {
};
#endif /* _KERNEL */
/*
* General purpose structure for passing info in and out of frame buffers
* (used for gp1)
*/
struct fbinfo {
int fb_physaddr; /* physical frame buffer address */
int fb_hwwidth; /* fb board width */
int fb_hwheight; /* fb board height */
int fb_addrdelta; /* phys addr diff between boards */
unsigned char *fb_ropaddr; /* fb va thru kernelmap */
int fb_unit; /* minor devnum of fb */
};
/*
* Color map I/O. See also fbcmap_i below.
*/
struct fbcmap {
int index; /* first element (0 origin) */
int count; /* number of elements */
unsigned char *red; /* red color map elements */
unsigned char *green; /* green color map elements */
unsigned char *blue; /* blue color map elements */
};
#ifdef _SYSCALL32
struct fbcmap32 {
};
#endif /* _SYSCALL32 */
/*
*/
struct fbsattr {
int flags; /* misc flags */
int emu_type; /* emulation type (-1 if unused) */
};
struct fbgattr {
int real_type; /* real device type */
int owner; /* PID of owner, 0 if myself */
/* (-1 if unused) */
};
/*
* Video control
* (the unused bits are reserved for future use)
*/
#define FBVIDEO_OFF 0
#define FBVIDEO_ON 1
/* Vertical retrace support. */
/*
* Structure to pass double buffering state back and forth the device.
*/
/* used in devstate */
#define FBDBL_AVAIL 0x80000000
#define FBDBL_DONT_BLOCK 0x40000000
#define FBDBL_AVAIL_PG 0x20000000
#define FBDBL_A 0x1
#define FBDBL_B 0x2
#define FBDBL_NONE 0x4
struct fbdblinfo {
unsigned int dbl_devstate;
unsigned int dbl_read;
unsigned int dbl_write;
unsigned int dbl_display;
int dbl_depth;
char dbl_wid;
};
/* 8-bit emulation in 24-bit ioctls */
/*
* hardware cursor control
*/
struct fbcurpos {
short x, y;
};
struct fbcursor {
short set; /* what to set */
#define FB_CUR_SETCUR 0x01
#define FB_CUR_SETPOS 0x02
#define FB_CUR_SETHOT 0x04
#define FB_CUR_SETCMAP 0x08
#define FB_CUR_SETSHAPE 0x10
#define FB_CUR_SETALL 0x1F
char *image; /* cursor image bits */
char *mask; /* cursor mask bits */
};
#ifdef _SYSCALL32
struct fbcursor32 {
short set; /* what to set */
};
#endif /* _SYSCALL32 */
/* set/get cursor attributes/shape */
/* get max cursor size */
/* Window Grabber info ioctl */
/*
* Window Identification (wid) defines, structures, and ioctls.
*
* Some wids need to be unique when used for things such as double
* buffering or rendering clipping. Some wids can be shared when
* used for display attributes only. What can be shared and how
* may be device dependent. The fb_wid_alloc.wa_type and fb_wid_item
* structure members will be left to device specific interpretation.
*/
#define FB_WID_SHARED_8 0
#define FB_WID_SHARED_24 1
#define FB_WID_DBL_8 2
#define FB_WID_DBL_24 3
struct fb_wid_alloc {
unsigned int wa_type; /* special attributes */
int wa_index; /* base wid returned */
unsigned int wa_count; /* how many contiguous wids */
};
struct fb_wid_item {
unsigned int wi_type; /* special attributes */
int wi_index; /* which lut */
unsigned int wi_attrs; /* which attributes */
};
struct fb_wid_list {
unsigned int wl_flags;
unsigned int wl_count;
struct fb_wid_item *wl_list;
};
#ifdef _SYSCALL32
struct fb_wid_list32 {
};
#endif /* _SYSCALL32 */
struct fb_wid_dbl_info {
struct fb_wid_alloc dbl_wid;
char dbl_fore;
char dbl_back;
char dbl_read_state;
char dbl_write_state;
};
struct cg6_info {
};
struct s3_info {
};
struct p9000_info {
};
struct p9100_info {
};
struct wd90c24a2_info {
};
struct mon_info {
/* these are in pixel units */
};
/*
* Color map I/O.
*/
struct fbcmap_i {
unsigned int flags; /* see below */
int id; /* colormap id for multiple cmaps */
int index; /* first element (0 origin) */
int count; /* number of elements */
unsigned char *red; /* red color map elements */
unsigned char *green; /* green color map elements */
unsigned char *blue; /* blue color map elements */
};
#ifdef _SYSCALL32
struct fbcmap_i32 {
};
#endif /* _SYSCALL32 */
/* assigning a given window id to a pixrect - special for PHIGS */
/* assigning a given window to be stereo */
#define FB_WIN_STEREO 0x2
#endif /* !ASM */
/* frame buffer type codes */
#define FBTYPE_SUN1BW 0 /* Multibus mono */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FBIO_H */