[comp.windows.x] xnext - the shortest useful toolkit program :-)

roman@ATHENA.MIT.EDU (Roman J. Budzianowski) (12/21/88)

Usage:
For use with xdm. Start it in the foreground as the last item in
your .xsession script. When you get tired of X, click on the
NEXT button. The NEXT logo bitmap is from the poskbitmaps collection.

/* xnext.c
   to build : cc xnext.c -o xnext -lXaw -lXmu -lXt -lX
*/
#include <X11/Intrinsic.h>
#include <X11/Command.h>

/* ARGSUSED */
void quit(w, closure, call_data) Widget w; caddr_t closure; caddr_t call_data;
{  exit(0); }

static XtCallbackRec callbacks[] = { {quit,NULL}, {NULL,NULL} };

void main(argc,argv) int argc; char **argv;
{  Widget xnext; Arg args[1];
   xnext = XtInitialize(NULL,"XNext", NULL, 0, &argc, argv);
   XtSetArg(args[0],XtNcallback,callbacks);
   (void)XtCreateManagedWidget("NEXT",commandWidgetClass, xnext, args, 1);
   XtRealizeWidget(xnext);
   XtMainLoop();
}
***********************************************************************
!XNext.ad file
XNext*bitmap: next.xbm
XNext*background: firebrick
XNext*foreground: wheat
************************************************************************
#define next_width 64
#define next_height 64
static char next_bits[] = {
 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,
 0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,
 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x1f,0x00,0x00,0x00,0x00,0x00,0x80,0x07,
 0x1e,0x00,0x00,0x00,0x00,0x00,0xe0,0x01,0x38,0x00,0x00,0x00,0x00,0x00,0xf8,
 0xf0,0x30,0x00,0x00,0x00,0x00,0x00,0xfe,0xfc,0x73,0x00,0x00,0x00,0x00,0x80,
 0x7f,0xfc,0x61,0x00,0x00,0x00,0x00,0xe0,0x78,0x7e,0xf8,0x00,0x00,0x00,0x00,
 0xf8,0x78,0x1e,0xfe,0x00,0x00,0x00,0x00,0xfe,0x71,0x86,0xe7,0x01,0x00,0x00,
 0x80,0xff,0x71,0xe0,0xe7,0x01,0x00,0x00,0xe0,0xff,0x63,0xf8,0xe3,0x03,0x00,
 0x00,0xf8,0xff,0xe3,0xfc,0xf3,0x03,0x00,0x00,0x98,0xff,0xc7,0xf0,0xf0,0x07,
 0x00,0x00,0x10,0xf8,0xc7,0x01,0xf8,0x07,0x00,0x00,0x34,0x80,0x8f,0x07,0x7e,
 0x0e,0x00,0x00,0x24,0x00,0x88,0xff,0x1f,0x0c,0x00,0x00,0x6c,0x04,0x00,0xff,
 0x07,0x1c,0x00,0x00,0x4e,0x7c,0x00,0xff,0x01,0x1f,0x00,0x00,0xde,0xf8,0x07,
 0x7e,0xc0,0x3f,0x00,0x00,0x9e,0xf8,0x7f,0x1e,0xc0,0x3f,0x00,0x00,0xbf,0xf1,
 0xff,0x1f,0xc4,0x7f,0x00,0x00,0x3f,0xf1,0xff,0x3f,0x87,0x7f,0x00,0x00,0x7f,
 0xe3,0xff,0xfc,0x8f,0xff,0x00,0x80,0x7f,0xe2,0xff,0xf8,0x1f,0xff,0x00,0x80,
 0xff,0xc6,0x7f,0xfc,0x1f,0xff,0x01,0x80,0xff,0xc4,0x7f,0xfc,0x3f,0xfe,0x01,
 0xc0,0xff,0xfd,0x7f,0xfc,0x3f,0xfe,0x03,0xc0,0xff,0xb9,0x3f,0xfe,0x7f,0xfc,
 0x03,0x80,0xff,0x1b,0x3c,0xfe,0x7f,0xfc,0x00,0x80,0xff,0x13,0x20,0xfe,0xff,
 0x38,0x02,0x00,0xff,0x77,0x00,0xff,0xff,0x8e,0x03,0x00,0xff,0xe7,0x03,0xf8,
 0xff,0xe3,0x03,0x00,0xfe,0xef,0x1f,0xc0,0xff,0xf8,0x01,0x00,0xfe,0xcf,0x8f,
 0x00,0x3f,0xfe,0x01,0x00,0xfc,0xdf,0x8f,0x07,0x8f,0xff,0x01,0x00,0xfc,0x9f,
 0x8f,0xbf,0xe3,0xff,0x00,0x00,0xf8,0xbf,0xc7,0xff,0xf8,0xff,0x00,0x00,0xf8,
 0x3f,0xc7,0x3f,0xfe,0xff,0x00,0x00,0xf0,0x7f,0xc7,0x8f,0xff,0x7f,0x00,0x00,
 0xf0,0x7f,0xe2,0xe3,0xff,0x7f,0x00,0x00,0xe0,0xff,0xe6,0xf8,0xff,0x7f,0x00,
 0x00,0xe0,0xff,0x3c,0xfe,0xff,0x3f,0x00,0x00,0xc0,0xff,0x8d,0xff,0xff,0x3f,
 0x00,0x00,0xc0,0xff,0xe1,0xff,0xff,0x3f,0x00,0x00,0x80,0xff,0xfb,0xff,0xff,
 0x1f,0x00,0x00,0x80,0xff,0xfb,0xff,0xff,0x07,0x00,0x00,0x00,0xff,0xf9,0xff,
 0xff,0x01,0x00,0x00,0x00,0xff,0xfd,0xff,0x7f,0x00,0x00,0x00,0x00,0xfe,0xfd,
 0xff,0x1f,0x00,0x00,0x00,0x00,0xfe,0xfc,0xff,0x07,0x00,0x00,0x00,0x00,0xfc,
 0xfe,0xff,0x01,0x00,0x00,0x00,0x00,0xfc,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,
 0x78,0xfe,0x1f,0x00,0x00,0x00,0x00,0x00,0x78,0xff,0x07,0x00,0x00,0x00,0x00,
 0x00,0x70,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x30,0x7f,0x00,0x00,0x00,0x00,
 0x00,0x00,0xa0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x07,0x00,0x00,0x00,
 0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 0x00,0x00};