XSWindow, XSWindowClose

SYNTAX

	wid=XSWindow(parent,x,y,width,height,name)

	XSWidget *wid,*parent;
	int x,y,width,height;
	char *name;

	void XSWindowClose(wid);
	
	XSWidget wid;

DESCRIPTION

XSWindow create a new window in the selected parent, in the position x,y with size width,height. If parent widget is the desktop, a decorative title bar will be drawed by the active window manager of this screen and the name of window will be placed in the title bar.

XSWindowClose destroy a selected window.

All operations of XSWindow and XSWindowClose in the X server are delayed until XSCheckEvent is executed.

Example

#include <xstep.h>
#include <stdlib.h>

int main(int argc,char **argv) {

	XSWidget *d1,*w1;
	
	d1=XSDesktop(getenv("DISPLAY"),argv,argc);
	w1=XSWindow(d1,0,0,400,400,"window example");
	
	XSButton(w1,-8,-8,72,24,"Close",XSWindowClose);
	
	while(XSCheckEvent(d1,XS_BLOCK));

	return 0;
}