#ifndef lint static char rcsid[] = "$XConsortium: xlogo.c,v 1.9 89/07/16 15:36:11 jim Exp $"; #endif /* lint */ #include #include #include #include #include #include extern void exit(); /* * Report the syntax for calling xclock. */ Syntax(call) char *call; { (void) printf ("Usage: %s [-fg ] [-bg ] [-rv]\n", call); (void) printf (" [-bw ] [-bd ]\n"); (void) printf (" [-d []:[]]\n"); (void) printf (" [-g [][x][<+->[<+->]]]\n\n"); exit(1); } void main(argc, argv) int argc; char **argv; { Widget toplevel; Pixmap icon; Arg arg; XGCValues gcv; GC gcFore, gcBack; toplevel = XtInitialize(NULL, "XLogo", NULL, 0, &argc, argv); if (argc != 1) Syntax(argv[0]); icon = XCreatePixmap(XtDisplay(toplevel), XtScreen(toplevel)->root, 32, 32, 1); gcv.foreground = 1; gcFore = XCreateGC(XtDisplay(toplevel), icon, GCForeground, &gcv); gcv.foreground = 0; gcBack = XCreateGC(XtDisplay(toplevel), icon, GCForeground, &gcv); XmuDrawLogo(XtDisplay(toplevel), icon, gcFore, gcBack, 0, 0, 32, 32); XFreeGC(XtDisplay(toplevel), gcFore); XFreeGC(XtDisplay(toplevel), gcBack); arg.name = XtNiconPixmap; arg.value = (XtArgVal) icon; XtSetValues (toplevel, &arg, ONE); arg.name = XtNiconMask; arg.value = (XtArgVal) icon; XtSetValues (toplevel, &arg, ONE); XtCreateManagedWidget("xlogo", logoWidgetClass, toplevel, NULL, ZERO); XtRealizeWidget(toplevel); XtMainLoop(); }