#ifndef VTXIO_H
#define VTXIO_H
#include <X11/Xlib.h>
#include "vt.h"
#include "dllist.h"
typedef u32 lbits;
#define ALL_LINES ((1ul << H) - 1)
/* one xio per display */
struct xio
{
struct dl_node node[1];
int argc;
char **argv;
Display *dpy; /* display connection */
int fd; /* the displays file descriptor */
Atom xa_del_win; /* WM_DELETE_WINDOW atom */
Atom xa_targets; /* TARGETS atom (selection) */
Atom xa_timestamp; /* TIMESTAMP atom (selection) */
Atom xa_text; /* TEXT atom (selection) */
Atom xa_multiple; /* MULTIPLE atom (selection) */
Window group_leader; /* unmapped window */
int screen; /* DefaultScreen */
int width, height; /* DisplayWidth/Height */
int depth; /* DefaultDepth */
Window root; /* DefaultRoot */
Colormap cmap;
int color[16]; /* 8 normal, 8 dim intensity */
Pixmap font[2]; /* normal, dbl-height */
Pixmap icon; /* icon pixmap */
struct dl_head windows[1]; /* all windows on this display */
};
/* one vt_win per window */
struct xio_win
{
struct dl_node node[1];
struct xio *xio; /* display */
Window win; /* the drawing window */
Time tstamp; /* timestamp of last user event */
GC gc; /* it's graphics context */
u8 ch[H*W]; /* the page contents */
lbits modified, hidden, lhidden; /* states for each line */
lbits dheight, blink, concealed; /* attributes for each line */
int fg,