1 /* $NetBSD: itevar.h,v 1.12 2007/03/04 05:59:40 christos Exp $ */
4 * Copyright (c) 1995 Leo Weppelman (Atari modifications)
5 * Copyright (c) 1994 Christian E. Hopps
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by Christian E. Hopps.
19 * 4. The name of the author may not be used to endorse or promote products
20 * derived from this software without specific prior written permission
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 #include <atari/dev/font.h>
52 ATTR_KEYPAD
= 0x80 /* XXX */
56 struct device device
; /* _Must_ be first */
57 char argbuf
[MAX_ARGSIZE
];
58 struct grf_softc
*grf
; /* XXX */
64 struct kbdmap
*kbdmap
;
81 char linefeed_newline
;
90 enum ite_attr attribute
;
91 enum ite_attr save_attribute
;
96 int (*itexx_ioctl
)(struct ite_softc
*, u_long
,
97 void *, int, struct lwp
*);
101 ITE_ALIVE
= 0x1, /* grf layer is configed */
102 ITE_ISCONS
= 0x2, /* ite is acting console. */
103 ITE_INITED
= 0x4, /* ite has been inited. */
104 ITE_ISOPEN
= 0x8, /* ite has been opened */
105 ITE_INGRF
= 0x10, /* ite is in graphics mode */
106 ITE_ACTIVE
= 0x20, /* ite is an active terminal */
107 ITE_ATTACHED
= 0x40, /* ite is attached */
132 enum ite_special_keycodes
{
133 KBD_LEFT_SHIFT
= 0x2a,
134 KBD_RIGHT_SHIFT
= 0x36,
135 KBD_CAPS_LOCK
= 0x3a,
141 KBD_MOD_LSHIFT
= 0x01,
142 KBD_MOD_RSHIFT
= 0x02,
146 KBD_MOD_SHIFT
= (KBD_MOD_LSHIFT
| KBD_MOD_RSHIFT
)
161 enum ite_max_getsize
{ ITEBURST
= 64 };
163 enum tab_size
{ TABSIZE
= 8 };
164 #define TABEND(u) (ite_tty[u]->t_windsize.ws_col - TABSIZE) /* XXX */
166 #define set_attr(ip, attr) ((ip)->attribute |= (attr))
167 #define clr_attr(ip, attr) ((ip)->attribute &= ~(attr))
168 #define attrloc(ip, y, x) 0
169 #define attrclr(ip, sy, sx, h, w)
170 #define attrmov(ip, sy, sx, dy, dx, h, w)
171 #define attrtest(ip, attr) 0
172 #define attrset(ip, attr)
176 extern int ite_default_x
;
177 extern int ite_default_y
;
178 extern int ite_default_width
;
179 extern int ite_default_depth
;
180 extern int ite_default_height
;
187 /* console related function */
188 void ite_cnprobe(struct consdev
*);
189 void ite_cninit(struct consdev
*);
190 int ite_cngetc(dev_t
);
191 void ite_cnputc(dev_t
, int);
192 void ite_cnfinish(struct ite_softc
*);
194 /* standard ite device entry points. */
198 void ite_on(dev_t
, int);
199 void ite_off(dev_t
, int);
200 void ite_reinit(dev_t
);
201 int ite_param(struct tty
*, struct termios
*);
202 void ite_reset(struct ite_softc
*);
203 int ite_cnfilter(u_int
, enum caller
);
204 void ite_filter(u_int
,enum caller
);
206 /* ite_cc functions */
207 int grfcc_cnprobe(void);
208 void grfcc_iteinit(struct grf_softc
*);
211 #endif /* _ITEVAR_H */