home *** CD-ROM | disk | FTP | other *** search
- /* hello_wc.c -- demo of color capabilities using physical attributes
-
- */
-
- #define WN_DEBUG
- #include <wfc.h>
- #undef ATT_LOGIC
- #include <wfc_glob.h>
-
- main()
- {
- WINDOW wn;
- int kc;
-
- init_wfc(); /*initialize WFC */
- vid_mode(CO80); /*80 column color display */
- vid_bdr(YELLOW); /*yellow screen border */
- color_sc(GREEN); /*set clear attribute to green */
- cls(); /*clear screen with green background */
- defs_wn(&wn, 5, 20, 10, 40, &bdr_dln);
- color_wn(WHITE, BLUE, &wn); /*must follow defs_wn() */
- sw_bdratt(c_att(YELLOW, BLACK), &wn); /*yellow border for window */
- set_wn(&wn); /*set window on screen */
- v_st("\nHello, world\n", &wn);
- mv_cs(v_rwq - 1, 0, &wn0); /*location for message at bottom */
- sw_att(c_att(RED, BLACK), &wn0); /*change attribute for wn0 */
- v_st("Do you want to change to a Monochrome Display Adapter ? (y/n): ", &wn0);
- pl_csr(&wn0); /*cursor at end of message */
- kc = ki(); /*wait for keystroke */
- if(kc == 'y' || kc == 'Y')
- vid_mode(MONO); /*go to Monochrome display */
- exit_wfc();
- return(0);
- }
-