#ifndef _ITEVAR_H
#define _ITEVAR_H
#include <atari/dev/font.h>
enum ite_arraymaxs {
MAX_ARGSIZE = 256,
MAX_TABS = 256,
};
enum ite_attr {
ATTR_NOR = 0,
ATTR_INV = 1,
ATTR_UL = 2,
ATTR_BOLD = 4,
ATTR_BLINK = 8,
ATTR_ALL = 16-1,
ATTR_KEYPAD = 0x80
};
struct ite_softc {
device_t device;
char argbuf[MAX_ARGSIZE];
struct grf_softc *grf;
char *ap;
struct tty *tp;
void *priv;
font_info font;
u_char *tabs;
struct kbdmap *kbdmap;
int flags;
short cursorx;
short cursory;
short rows;
short cols;
u_char *cursor;
char imode;
u_char escape;
u_char cursor_opt;
u_char key_repeat;
char G0;
char G1;
char G2;
char G3;
char *GL;
char *GR;
char sc_G0;
char sc_G1;
char sc_G2;
char sc_G3;
char *sc_GL;
char *sc_GR;
char linefeed_newline;
char auto_wrap;
char cursor_appmode;
char keypad_appmode;
short top_margin;
short bottom_margin;
short inside_margins;
short eightbit_C1;
short emul_level;
enum ite_attr attribute;
enum ite_attr save_attribute;
int curx;
int save_curx;
int cury;
int save_cury;
int (*itexx_ioctl)(struct ite_softc *, u_long,
void *, int, struct lwp *);
};
enum ite_flags {
ITE_ALIVE = 0x1,
ITE_ISCONS = 0x2,
ITE_INITED = 0x4,
ITE_ISOPEN = 0x8,
ITE_INGRF = 0x10,
ITE_ACTIVE = 0x20,
ITE_ATTACHED = 0x40,
};
enum ite_replrules {
RR_CLEAR = 0,
RR_COPY = 0x3,
RR_XOR = 0x6,
RR_COYINVERTED = 0xC
};
enum ite_scrolldir {
SCROLL_UP = 1,
SCROLL_DOWN,
SCROLL_LEFT,
SCROLL_RIGHT,
};
enum ite_cursact {
DRAW_CURSOR = 5,
ERASE_CURSOR,
MOVE_CURSOR,
START_CURSOROPT,
END_CURSOROPT
};
enum ite_special_keycodes {
KBD_LEFT_SHIFT = 0x2a,
KBD_RIGHT_SHIFT = 0x36,
KBD_CAPS_LOCK = 0x3a,
KBD_CTRL = 0x1d,
KBD_ALT = 0x38
};
enum ite_modifiers {
KBD_MOD_LSHIFT = 0x01,
KBD_MOD_RSHIFT = 0x02,
KBD_MOD_CTRL = 0x04,
KBD_MOD_ALT = 0x08,
KBD_MOD_CAPS = 0x10,
KBD_MOD_SHIFT = (KBD_MOD_LSHIFT | KBD_MOD_RSHIFT)
};
enum caller {
ITEFILT_TTY,
ITEFILT_CONSOLE,
ITEFILT_REPEATER
};
enum emul_level {
EMUL_VT100 = 1,
EMUL_VT300_8,
EMUL_VT300_7
};
enum ite_max_getsize { ITEBURST = 64 };
enum tab_size { TABSIZE = 8 };
#define TABEND(u) (ite_tty[u]->t_windsize.ws_col - TABSIZE)
#define set_attr(ip, attr) ((ip)->attribute |= (attr))
#define clr_attr(ip, attr) ((ip)->attribute &= ~(attr))
#define attrloc(ip, y, x) 0
#define attrclr(ip, sy, sx, h, w)
#define attrmov(ip, sy, sx, dy, dx, h, w)
#define attrtest(ip, attr) 0
#define attrset(ip, attr)
#ifdef _KERNEL
#define CSET_ASCII 0
#define CSET_DECGRAPH 1
extern int ite_default_x;
extern int ite_default_y;
extern int ite_default_width;
extern int ite_default_depth;
extern int ite_default_height;
struct proc;
struct consdev;
struct termios;
void ite_cnprobe(struct consdev *);
void ite_cninit(struct consdev *);
int ite_cngetc(dev_t);
void ite_cnputc(dev_t, int);
void ite_cnfinish(struct ite_softc *);
void iteinit(dev_t);
void ite_on(dev_t, int);
void ite_off(dev_t, int);
void ite_reinit(dev_t);
int ite_param(struct tty *, struct termios *);
void ite_reset(struct ite_softc *);
int ite_cnfilter(u_int, enum caller);
void ite_filter(u_int ,enum caller);
int grfcc_cnprobe(void);
void grfcc_iteinit(struct grf_softc *);
#endif
#endif