DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T b

⟦2d05c9195⟧ TextFile

    Length: 1854 (0x73e)
    Types: TextFile
    Names: »box.c«

Derivation

└─⟦8648bda34⟧ Bits:30007244 EUUGD5_II: X11R5
    └─⟦2ca9b63e1⟧ »./contrib-1/contrib-1.00« 
        └─⟦a8392fb20⟧ 
            └─⟦this⟧ »contrib/examples/OReilly/Vol1/winman/box.c« 

TextFile

/*
 * Copyright 1989 O'Reilly and Associates, Inc.
 * See ../Copyright for complete rights and liability information.
 */
#include <X11/Xlib.h>
#include <stdio.h>

extern Display *display;
extern int screen_num;

/*
draw_box(left, top, right, bottom)
int left, top, right, bottom;
{
	GC gcontext;
	XPoint points[4];
	int npoints = 4;
	int mode = CoordModeOrigin;

	points[0].x = left;
	points[0].y = top;

	points[1].x = left;
	points[1].y = bottom;

	points[2].x = right;
	points[2].y = bottom;

	points[3].x = right;
	points[3].y = top;

        gcontext = XCreateGC(display, RootWindow(display,screen_num), 
			0, NULL);  

	XSetForeground(display,gcontext,BlackPixel(display,screen_num));
	XDrawLines(display, RootWindow(display, screen_num), gcontext, 
			points, npoints, mode);


	XFlush(display);
}
*/

undraw_box(gc, left, top, right, bottom)
GC gc;
int left,top,right,bottom;
	{
	draw_box(gc, left,top,right,bottom);
	}

draw_box(gc, left, top, right, bottom)
GC gc;
int left, top, right, bottom;
{

	XSetForeground(display, gc, WhitePixel(display, screen_num) ^ BlackPixel(display, screen_num));
	XDrawRectangle(display, RootWindow(display,screen_num), gc, left, 
			top, right - left, bottom - top);
}

/*
draw_box(left,top,right,bottom)
int left,top,right,bottom;
{
	Vertex corner[5];
	int vertexcount = 5;
	int bwidth = 1, bheight = 1; 
	int pixel = WhitePixel;
	int func = GXxor;
	int planes = 1;
	
	corner[0].x = left;
	corner[0].y = top;
	corner[0].flags = 0;
	
	corner[1].x = left;
	corner[1].y = bottom;
	corner[1].flags = 0;
	
	corner[2].x = right;
	corner[2].y = bottom;
	corner[2].flags = 0;
	
	corner[3].x = right;
	corner[3].y = top;
	corner[3].flags = 0;
	
	corner[4].x = left;
	corner[4].y = top;
	corner[4].flags = 0;
	
	XDraw(RootWindow, corner, vertexcount , bwidth, bheight, pixel, 
			func, planes);
	XFlush(display);
}
*/