#include #include #include Display *display; Window win1; XSetWindowAttributes attributes; XFontStruct *fontinfo; GC gr_context1; XArc arcs[10]; Pixmap pixmap; Visual *visual; int screen; int depth; int i; main (argc, argv) char *argv[]; int argc; { XGCValues gr_values; XEvent event; setbuf (stdout, NULL); setbuf (stderr, NULL); display = XOpenDisplay(NULL); screen = DefaultScreen(display); visual = DefaultVisual(display,screen); depth = DefaultDept attributes.background_pixel = XWhitePixel(display,screen); attributes.border_pixel = XBlackPixel(display,screen); attributes.override_redirect = 0; win1= XCreateWindow(display, XRootWindow(display,screen), 200,200, 300,200,5, depth, InputOutput, visual, CWBackPixel | CWBorderPixel | CWOverrideRedirect,&attributes); XSelectInput(display,win1,ExposureMask | ButtonPressMask | KeyPressMask); fontinfo = XLoadQueryFont(display,"6x10"); gr_values.font = fontinfo->fid; gr_values.function = GXcopy; gr_values.plane_mask = AllPlanes;