home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************/
- /* UW_TUT1.C */
- /* */
- /* NOTE: THIS FILE IS PUBLIC DOMAIN AND MAY BE MODIFIED AND USED AT WILL */
- /* */
- /* We start off by showing a minimum program, the infamous "hello world", */
- /* UltraWin style. As you can see, it's very small and simple. We simply */
- /* init the video, create and set a window, write text to it, wait for a */
- /* key, cleanup and exit. That's it! */
- /* */
- /* Dr. Boyd Gafford */
- /* Kevin Huck */
- /* EnQue Software */
- /* 08/31/92 */
- /****************************************************************************/
- #include <ctype.h>
- #include "uw.h" /* include the necessary headers */
-
- /*----------------------- global window variables --------------------------*/
- WINDOW Window1;
-
- /*********/
- /* ~main */
- /* ********************************************************************/
- /* Show basic window creation and output. */
- /****************************************************************************/
- int main()
- {
- WINDOW *wnp;
-
- wnp = &Window1; /* point to global window struct */
- init_video(80, 25); /* init video for 80 x 25 screen */
- wn_create(20, 5, 60, 20, SLD_BDR, WN_POPUP, wnp); /* create window */
- wn_set(wnp); /* display window in screen */
- wn_plst( CENTERED, 7, "Hello world from UltraWin!", wnp);
- wait_event(); /* wait for a keystroke */
- wn_destroy(wnp); /* remove the window from screen */
- end_video(); /* clean up before we exit */
- return(1);
- }
- /*** end of main ***/
-
- /*** END OF FILE ***/