1 /* $NetBSD: itevar.h,v 1.18 2005/12/11 12:16:28 christos Exp $ */
4 * Copyright (c) 1994 Christian E. Hopps
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Christian E. Hopps.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #if ! defined (_ITEVAR_H)
48 ATTR_KEYPAD
= 0x80 /* XXX */
54 char argbuf
[MAX_ARGSIZE
];
55 struct grf_softc
*grf
; /* XXX */
88 char linefeed_newline
;
97 enum ite_attr attribute
;
98 enum ite_attr save_attribute
;
106 ITE_ALIVE
= 0x1, /* grf layer is configed */
107 ITE_ISCONS
= 0x2, /* ite is acting console. */
108 ITE_INITED
= 0x4, /* ite has been inited. */
109 ITE_ISOPEN
= 0x8, /* ite has been opened */
110 ITE_INGRF
= 0x10, /* ite is in graphics mode */
111 ITE_ACTIVE
= 0x20, /* ite is an active terminal */
112 ITE_ATTACHED
= 0x40, /* ite is attached */
137 enum ite_special_keycodes
{
138 KBD_LEFT_SHIFT
= 0x60,
149 KBD_MOD_LSHIFT
= (1 << (KBD_LEFT_SHIFT
- KBD_LEFT_SHIFT
)),
150 KBD_MOD_RSHIFT
= (1 << (KBD_RIGHT_SHIFT
- KBD_LEFT_SHIFT
)),
151 KBD_MOD_CTRL
= (1 << (KBD_CTRL
- KBD_LEFT_SHIFT
)),
152 KBD_MOD_LALT
= (1 << (KBD_LEFT_ALT
- KBD_LEFT_SHIFT
)),
153 KBD_MOD_RALT
= (1 << (KBD_RIGHT_ALT
- KBD_LEFT_SHIFT
)),
154 KBD_MOD_LMETA
= (1 << (KBD_LEFT_META
- KBD_LEFT_SHIFT
)),
155 KBD_MOD_RMETA
= (1 << (KBD_RIGHT_META
- KBD_LEFT_SHIFT
)),
156 KBD_MOD_CAPS
= (1 << (KBD_CAPS_LOCK
- KBD_LEFT_SHIFT
)),
158 KBD_MOD_SHIFT
= (KBD_MOD_LSHIFT
| KBD_MOD_RSHIFT
),
159 KBD_MOD_ALT
= (KBD_MOD_LALT
| KBD_MOD_RALT
),
160 KBD_MOD_META
= (KBD_MOD_LMETA
| KBD_MOD_RMETA
),
175 enum ite_max_getsize
{ ITEBURST
= 64 };
177 enum tab_size
{ TABSIZE
= 8 };
178 #define TABEND(u) (ite_tty[u]->t_windsize.ws_col - TABSIZE) /* XXX */
180 #define set_attr(ip, attr) ((ip)->attribute |= (attr))
181 #define clr_attr(ip, attr) ((ip)->attribute &= ~(attr))
182 #define attrloc(ip, y, x) 0
183 #define attrclr(ip, sy, sx, h, w)
184 #define attrmov(ip, sy, sx, dy, dx, h, w)
185 #define attrtest(ip, attr) 0
186 #define attrset(ip, attr)
192 /* console related function */
193 void itecnprobe(struct consdev
*);
194 void itecninit(struct consdev
*);
195 int itecngetc(dev_t
);
196 void itecnputc(dev_t
, int);
197 void ite_cnfinish(struct ite_softc
*);
199 /* standard ite device entry points. */
201 void itestart(struct tty
*);
204 void ite_on(dev_t
, int);
205 void ite_off(dev_t
, int);
206 void ite_reinit(dev_t
);
207 int ite_param(struct tty
*, struct termios
*);
208 void ite_reset(struct ite_softc
*);
209 int ite_cnfilter(u_char
, enum caller
);
210 void ite_filter(u_char
,enum caller
);
211 int ite_grf_ioctl(struct ite_softc
*, u_long
, void *, int, struct lwp
*);
213 #endif /* _ITEVAR_H */