Programming with X Starter Toolkit - 2

Widget are introduced and students can see the effect of resizing windows.

/*	Window with Message at the Bottom	*/
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>

void hello(Widget w)
{
	Dimension width, height;

	XtVaGetValues(w, XtNwidth, &width, XtNheight, &height, NULL);
	put_text("The end of the world is near",20,  height-20);
}

main()
{
	vis_window(hello);
}

put_text() and vis_window() are Starter Toolkit functions.