cg6var.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) 1988-1989,1997-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_CG6VAR_H
#define _SYS_CG6VAR_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS-4.1 1.8 */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef FBC_REV0
#endif
#define CG6_DEPTH 8
#include <sys/pr_impl_util.h>
/* FBIOSATTR device specific array indices */
#define FB_ATTR_CG6_SETOWNER_CMD 0
#define FB_ATTR_CG6_SETOWNER_PID 1
#ifndef _KERNEL
/* pixrect private data */
struct cg6pr {
int fd; /* device file descriptor */
};
/* pixrect ops vector */
extern struct pixrectops cg6_ops;
/* int cg6_rop(); */
int cg6_stencil();
int cg6_batchrop();
int cg6_destroy();
int cg6_get();
int cg6_put();
int cg6_vector();
Pixrect *cg6_region();
/* int cg6_putcolormap(); */
int cg6_getcolormap();
int cg6_putattributes();
int cg6_getattributes();
/* macros */
#define cg6_waitidle(fbc) \
#define cg6_setinx(fbc, x, y) \
((fbc)->l_fbc_autoincx = (x), \
(fbc)->l_fbc_autoincy = (y))
/*
* return draw status, if full loop until registers available before returning.
*/
#define cg6_draw_done(fbc, r) \
do \
(r) = (int)(fbc)->l_fbc_drawstatus; \
while ((int)(r) < 0 && (r & L_FBC_FULL))
/*
* set clip area.
*/
extern uint_t cg6_rop_table[];
(fbc)->l_fbc_rasteroffx = (x); \
(fbc)->l_fbc_rasteroffy = (y); \
cg6_waitidle(fbc); \
(fbc)->l_fbc_status = 0; \
/* can set this before idle in FBC1 */ \
(fbc)->l_fbc_clipcheck = 0; \
)
/*
* FBC0 workarounds
*/
#if FBC_REV0
int cg6_vector0();
(r) = L_FBC_DRAW_EXCEPTION; \
else cg6_draw_done((fbc), (r))
#else /* FBC_REV0 */
cg6_draw_done((fbc), (r))
#endif /* FBC_REV0 */
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_CG6VAR_H */