Annotation of sys/arch/hp300/stand/include/itevar.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: itevar.h,v 1.5 2006/08/17 06:31:10 miod Exp $ */
! 2: /* $NetBSD: itevar.h,v 1.1 1996/03/03 04:23:42 thorpej Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1988 University of Utah.
! 6: * Copyright (c) 1990, 1993
! 7: * The Regents of the University of California. All rights reserved.
! 8: *
! 9: * This code is derived from software contributed to Berkeley by
! 10: * the Systems Programming Group of the University of Utah Computer
! 11: * Science Department.
! 12: *
! 13: * Redistribution and use in source and binary forms, with or without
! 14: * modification, are permitted provided that the following conditions
! 15: * are met:
! 16: * 1. Redistributions of source code must retain the above copyright
! 17: * notice, this list of conditions and the following disclaimer.
! 18: * 2. Redistributions in binary form must reproduce the above copyright
! 19: * notice, this list of conditions and the following disclaimer in the
! 20: * documentation and/or other materials provided with the distribution.
! 21: * 3. Neither the name of the University nor the names of its contributors
! 22: * may be used to endorse or promote products derived from this software
! 23: * without specific prior written permission.
! 24: *
! 25: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
! 26: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 27: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 28: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
! 29: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 30: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 31: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 32: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 33: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 34: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 35: * SUCH DAMAGE.
! 36: *
! 37: * from: Utah $Hdr: itevar.h 1.15 92/12/20$
! 38: *
! 39: * @(#)itevar.h 8.1 (Berkeley) 6/10/93
! 40: */
! 41:
! 42: /*
! 43: * Standalone version of hp300 ITE.
! 44: */
! 45:
! 46: struct ite_data;
! 47:
! 48: typedef void (*ite_windowmover)(struct ite_data *, int, int, int, int, int,
! 49: int, int);
! 50:
! 51: struct ite_data {
! 52: int alive;
! 53: struct itesw *isw;
! 54: caddr_t regbase, fbbase;
! 55: short curx, cury;
! 56: short cursorx, cursory;
! 57: short cblankx, cblanky;
! 58: short rows, cols;
! 59: short cpl;
! 60: short dheight, dwidth;
! 61: short fbheight, fbwidth;
! 62: short ftheight, ftwidth;
! 63: short fontx, fonty;
! 64: short planemask;
! 65: ite_windowmover bmv;
! 66: };
! 67:
! 68: struct itesw {
! 69: int ite_hwid;
! 70: void (*ite_init)(struct ite_data *);
! 71: void (*ite_clear)(struct ite_data *, int, int, int, int);
! 72: void (*ite_putc)(struct ite_data *, int, int, int);
! 73: void (*ite_cursor)(struct ite_data *, int);
! 74: void (*ite_scroll)(struct ite_data *);
! 75: };
! 76:
! 77: /*
! 78: * X and Y location of character 'c' in the framebuffer, in pixels.
! 79: */
! 80: #define charX(ip,c) \
! 81: (((c) % (ip)->cpl) * (ip)->ftwidth + (ip)->fontx)
! 82:
! 83: #define charX1bpp(ip,c) \
! 84: (((c) % (ip)->cpl) * ((((ip)->ftwidth + 7) / 8) * 8) + (ip)->fontx)
! 85:
! 86: #define charY(ip,c) \
! 87: (((c) / (ip)->cpl) * (ip)->ftheight + (ip)->fonty)
! 88:
! 89: /* Replacement Rules */
! 90: #define RR_CLEAR 0x0
! 91: #define RR_COPY 0x3
! 92: #define RR_XOR 0x6
! 93: #define RR_COPYINVERTED 0xc
! 94:
! 95: #define DRAW_CURSOR 0x00
! 96: #define ERASE_CURSOR 0x01
! 97: #define MOVE_CURSOR 0x02
! 98:
! 99: extern struct ite_data ite_data[];
! 100: extern struct itesw itesw[];
! 101: extern int nitesw;
! 102:
! 103: /*
! 104: * Prototypes.
! 105: */
! 106: void ite_fontinfo(struct ite_data *);
! 107: void ite_fontinit1bpp(struct ite_data *);
! 108: void ite_fontinit8bpp(struct ite_data *);
! 109: void ite_dio_clear(struct ite_data *, int, int, int, int);
! 110: void ite_dio_cursor(struct ite_data *, int);
! 111: void ite_dio_putc1bpp(struct ite_data *, int, int, int);
! 112: void ite_dio_putc8bpp(struct ite_data *, int, int, int);
! 113: void ite_dio_scroll(struct ite_data *);
! 114: void ite_dio_windowmove1bpp(struct ite_data *, int, int, int, int,
! 115: int, int, int);
! 116:
! 117: /*
! 118: * Framebuffer-specific ITE prototypes.
! 119: */
! 120: void topcat_init(struct ite_data *);
! 121: void gbox_init(struct ite_data *);
! 122: void gbox_scroll(struct ite_data *);
! 123: void rbox_init(struct ite_data *);
! 124: void dvbox_init(struct ite_data *);
! 125: void hyper_init(struct ite_data *);
! 126: void tvrx_init(struct ite_data *);
! 127:
! 128: void sti_iteinit(struct ite_data *);
! 129: void sti_clear(struct ite_data *, int, int, int, int);
! 130: void sti_putc(struct ite_data *, int, int, int);
! 131: void sti_cursor(struct ite_data *, int);
! 132: void sti_scroll(struct ite_data *);
CVSweb