Path: utzoo!attcan!uunet!snorkelwacker!usc!elroy.jpl.nasa.gov!decwrl!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.misc Subject: Re: OSF/Motif vs. NeWS vs. SUN/Open Windows vs. ? Message-ID: <2915@bacchus.dec.com> Date: 27 Feb 90 17:42:17 GMT References: <2164@unocss..unl.edu> <689@tci.bell-atl.com> <8450001@hpfcdc.HP.COM> <1990Feb21.145849.18857@phri.nyu.edu> Sender: news@decwrl.dec.com Reply-To: klee@decwrl.dec.com Organization: DEC Western Software Laboratory Lines: 30 In article <2164@unocss..unl.edu>, dent@unocss..unl.edu (Local Submission) writes: > "What's bigger than a major Interstate?" > "The source for the X-Windows version of 'Hello World'." For the record, here is the X version of 'hello, world'. Bigger than an Interstate? You judge. ============== #include #include #include main(argc, argv) int argc; char **argv; { Widget top = XtInitialize(argv[0], "xhw", NULL, 0, &argc, argv); XtCreateManagedWidget("hello, world", labelWidgetClass, top, NULL, NULL); XtRealizeWidget(top); XtMainLoop(); } ============== Compile it with the basic X libraries and run it. What's more, by changing just 2 words in this program, you can convert from a simple user interface to a Motif or OpenLook user interface. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee