!short: wn_init
         ^bwn_init -- init window system^b

        ^UUSAGE^U

          wn_init()

          wn_init() and wn_exit(), if used, should be the first and last 
          functions called. wn_init() saves the video state and 
          application entry screen.  wn_init() is typically the very 
          first function called in the main program. wn_exit() restores 
          the saved video state and screen image.  wn_exit() is typically 
          called just prior to calling exit().
          
        ^URETURNS^U

          TRUE if successful, FALSE if error.

        ^UCAUTIONS^U

          NONE.
!short: wn_exit
         ^bwn_exit -- exit window system^b
         
        ^UUSAGE^U

          wn_exit()
          wn_init() and wn_exit(), if used, should be the first and last 
          functions called. wn_init() saves the video state and 
          application entry screen.  wn_init() is typically the very 
          first function called in the main program. wn_exit() restores 
          the saved video state and screen image.  wn_exit() is typically 
          called just prior to calling exit().
          
        ^URETURNS^U

          TRUE if successful, FALSE if error.

        ^UCAUTIONS^U

          NONE.
!short: wn_dmode
         ^bwn_dmode -- set window display mode^b

        ^UUSAGE^U

          wn_dmode(mode)
          int mode

                  mode = PAINT for painted windows
                  mode = FLASH for instant windows

          wn_dmode sets the windows display mode as per mode, PAINT style 
          windows appear to be painted (top to bottom) where FLASH style 
          windows instantly appear.

        ^URETURNS^U

          Nothing.

        ^UCAUTIONS^U

          CGA only. Updates are made directly to video memory.
!short: wn_open
         ^bwn_open -- open window ^b

        ^UUSAGE^U

          wn = (WINDOWPTR)wn_open(page, row, col, width, height, atrib, batrib)
          int page, row, col, width, height, atrib, batrib;

                page -  0 ,1000, or 800. 
                        1000 opens a borderless page
                         800 opens an exploding window
                row  -  row of upper left hand corner of the window
                col  -  column of upper left hand corner of the window
                width - INSIDE dimension (max value is 78, 80 if page = 1000)
                height- INSIDE dimension (max value is 23, 25 if page = 1000)
                atrib - attribute to be used IN the window
                batrib- attribute to be used for the border

          wn_open is usually the first function called to create and use 
          a window.  wn_open dynamically allocates memory to save the 
          area defined by row, col, width, and height - saves the image, 
          opens the window and homes the logical cursor to row 0, col 0 
          of the window.  The window is now ready to be used by the 
          various window management routines.  

          Attributes are defined in windows.h.

        ^URETURNS^U

          wn = window handle or NULL if error

        ^UCAUTIONS^U

          Width and height are inside dimensions. If you want a window 
          with a work area of 10 rows and 5 columns, the width is 7 and 
          the height is 12.  
          
          The flashing cursor will not be displayed unless wn_sync() has 
          been called with a value of TRUE.  

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_title
         ^bwn_title -- title window^b

        ^UUSAGE^U

          wn_title(wn,title)
          WINDOWPTR wn;
          char *title;

                wn    - window handle
                title - string pointer to title

          The title is displayed on the top border of the window using 
          the currently defined border attribute.  The cursor is 
          positioned off the screen after the title is written.  

        ^URETURNS^U

          TRUE if all is well, NULL if the title is to large to fit on 
          the top border or errror.

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_titla
         ^bwn_titla -- title window with attribute^b

        ^UUSAGE^U

          wn_titla(wn,title,atrib)
          WINDOWPTR wn;
          char *title;
          int atrib;

                wn    - window handle
                title - string pointer to title
                atrib - attribute to use for text

          The title is displayed on the top border of the window using 
          the attribute specified by atrib.  The cursor is positioned off 
          the screen after the title is written.  

        ^URETURNS^U

          TRUE if all is well, NULL if the title is to large to fit on 
          the top border or error.

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_close
         ^bwn_close -- close window^b

        ^UUSAGE^U

          wn_close(wn) 
          WINDOWPTR wn; 

                wn - handle of a previously opened window.

          wn_close removes the window specified by wn and restores the 
          screen area under the window to its previous contents.  The 
          memory allocated by wn_open is returned to the free list.  The 
          cursor is positioned to where it was located prior to the 
          wn_open call.  

        ^URETURNS^U 

          TRUE or NULL if error

        ^UCAUTIONS^U 

          None.
!short: wn_save
         ^bwn_save -- save screen image ^b

        ^UUSAGE^U

          wn = (WINDOWPTR)wn_save(page, row, col, width, height)
          int page, row, col, width, height;

                page -  always 0.
                row  -  row of upper left hand corner of the window
                col  -  column of upper left hand corner of the window
                width - INSIDE dimension (max value is 78)
                height- INSIDE dimension (max value is 23)

          wn_save can be used to save areas of the screen for purposes 
          other than windows.  

          Memory for the screen image is dynamically allocated.

        ^URETURNS^U

          wn = window handle or NULL if error

        ^UCAUTIONS^U

          The window handle returned by wn_save should only be used with 
          wn_restore, use with other routines could produce unpredictable 
          results.
!short: wn_restore
         ^bwn_restore -- restore saved screen image^b

        ^UUSAGE^U

          wn_restore(wn)
          WINDOWPTR wn;

                wn - handle of previously wn_save(ed) window.

          Restores the screen image corresponding to the window handle 
          wn, allocated memory is returned to the free list.

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          This function should only be used with window handles obtained 
          from wn_save.
!short: wn_move
         ^bwn_move -- move window^b

        ^UUSAGE^U

          wn = (WINDOWPTR)wn_move(wn,row,col)

                wn -  handle of window to be moved
                row - destination row
                col - destination column

          Moves the window corresponding to wn to a new location.  The 
          cursor is positioned off the screen after the call.  

        ^URETURNS^U

          Window handle of the window moved or NULL if error.

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_locate
         ^bwn_locate -- locate cursor in window^b

        ^UUSAGE^U

          wn_locate(wn, row, col)
          WINDOWPTR wn;
          int row, col;

                wn  - window handle
                row - row to position to (relative to window origin)
                col - column to position to (relative to window origin)

          Position the cursor to the row and column specified.  Row and  
          Column values are relative to the origin of the window (0,0 
          locates the cursor in the upper left hand corner of the window 
          referenced by wn).

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          Values of row & col are not checked.

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_printf
         ^bwn_printf -- window printf^b

        ^UUSAGE^U

          wn_printf(wn, cs, args)
          WINDOWPTR wn;
          char *cs;
          ?? arg1 ... argn;

                wn   - window handle
                cs   - format control string
                args - argument list

          printf function for windows!

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          Output string length is limited to 254 bytes.
          Registered users can, of course, edit the wn_printf function 
          set the limit to whatever they wish.

          Integer only for Microsoft 3.0.  This limitation 
          be overcome by using sprintf in conjunction with wn_printf.  
          For example:

                  char buf[256];
                       ..
                       ..
                  sprintf(buf,"%d %l %x\n", intval, longval, hexval);
                  wn_printf(wn, buf);

          Full support in Microsoft 4.0, Lattice, CI86, and Datalight.  

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_puts
         ^bwn_puts -- put string (high speed)^b

        ^UUSAGE^U

          wn_puts(wn, row, col, string)
          WINDOWPTR wn;
          int row, col;
          char *string;

                wn -    window handle
                row -   row to print the string at
                col -   column to print the string at
                string- the string to print

          Row and Col are relative to the origin of the window.

          The cursor is displayed only if wn_synflg has been called with 
          a value of TRUE.

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          wn_puts writes the string directly to the video ram. Tabs, line 
          feeds, carriage returns and other control characters are not 
          filtered or processed in any way.

          Range checks are not performed to insure the specified string 
          can be contained in the window.  

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_gets
         ^bwn_gets -- get string with validation^b

        ^UUSAGE^U

          (char *) wn_gets(wn, buf, va, uva)
          WINDOWPTR wn;
          char *buf;
          int va;
          char *uva;

                wn -    window handle
                buf -   user buffer for string
                va -    input validation to be used
                uva -   user validation list [optional]

          va specifies the type of input validation to be performed as 
          data is being entered. Options are:

                (1) none                no restrictions - accept everything
                (2) integer             accept: 0 thru 9 + -
                (3) floating point      accept: 0 thru 9 + - .
                (4) alpha only          accept: a thru z (upper & lower case)
                (5) upper case only     accept: A thru Z 
                (6) validation list     accept: only those characters
                    (optional)                  specified in the uva string.

                ORing va with 0x8000 disables data entry character echo.

          The following editing functions are supported:

                . backspace & rubout do the logical things
                . ^U, ^X, and ^C wipe the field clean
                . Return and Esc end the input function 

          Data entry takes place at the current logical cursor location. 
          You  can, of course, position the cursor to where you wish 
          prior to calling wn_gets.

          Example:

                wn_printf(wn,"Enter your name > ");
                wn_get(wn,buf,4,0);

        ^URETURNS^U

          Pointer to buf or NULL if error

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_putsa
         ^bwn_putsa -- put string and attribute (high speed)^b

        ^UUSAGE^U

          wn_putsa(wn, row, col, string, atrib)
          WINDOWPTR wn;
          int row, col;
          char *string;
          int atrib;

                wn -    window handle
                row -   row to print the string at
                col -   column to print the string at
                string- the string to print
                atrib - attribute to be used with string

          Row and Col are relative to the origin of the window.

          The cursor is displayed only if wn_synflg has been called with 
          a value of TRUE.

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          wn_puts writes the string directly to the video ram. Tabs, line 
          feeds, carriage returns and other control characters are not 
          filtered or processed in any way.

          Range checks are not performed to insure the specified string 
          can be contained in the window.  

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_insrow 
         ^bwn_insrow -- insert row in window^b

        ^UUSAGE^U

          wn_insrow(wn, row)
          WINDOWPTR wn;
          int row;

                wn -  window handle
                row - row at which a line is to be inserted

          Row is relative to the origin of the window.  All lines below 
          the row specified are scrolled down.  The currently defined 
          window attribute is used to clear the lines inserted.  

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_delrow
         ^bwn_delrow -- delete row from window^b

        ^UUSAGE^U

          wn_delrow(wn, row)
          WINDOWPTR wn;
          int row;

                wn -  window handle
                row - row at which a line is to be deleted

          Row is relative to the origin of the window.  All lines below 
          the row specified are scrolled up. The currently defined window 
          attribute is used to clear the lines inserted.  

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U
          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_clr
         ^bwn_clr -- clear window^b

        ^UUSAGE^U

          wn_clr(wn)
          WINDOWPTR wn;

                wn - window handle

          The window corresponding to wn is cleared (mini clear screen).  
          The currently defined window attribute is used to clear the 
          interior of the window.  

          The windows virtual cursor is homed.

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_activate
         ^bwn_activate -- activate window^b

        ^UUSAGE^U

          wn_activate(wn)
          WINDOWPTR wn;

             wn - window handle

          Activate a previously opened window.  The window specified by 
          "wn" becomes the top window tile.

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          None.
!short: wn_color
         ^bwn_color -- set window & border attribute^b

        ^UUSAGE^U

          wn_color(wn, atrib, batrib)
          WINDOWPTR wn;
          unsigned int atrib, batrib;

                wn -    window handle
                atrib - attribute to be used for the window
                batrib- attribute to be used for the border

          wn_color sets the attribute to be used for all subsequent 
          operations in the window.  The attribute byte contains the 
          background specific data in the upper 4 bits and the foreground 
          specific data in the lower 4 bits.  Color and bit definitions 
          can be found in windows.h. You can use a statement of the form:

                         atrib = (bground << 4 | fground);

          to set the attribute to the correct format.  

          Attributes are defined in windows.h.

        ^URETURNS^U

          Nothing.

        ^UCAUTIONS^U

          None.
!short: wn_wrap
         ^bwn_wrap -- set/clear line wrap flag^b

        ^UUSAGE^U

          wn_wrap(wn, flag) 
          WINDOWPTR wn;     
          int flag;

                wn -   window handle
                flag - wrap flag (TRUE or FALSE)

          Sets the line wrap flag for window functions.  If line wrap is 
          true, output that exceeds the width of a window is 
          automatically placed on the next line.  When the line wrap flag 
          is false, output that exceeds the width of the window is lost.  

        ^URETURNS^U

          Nothing.

        ^UCAUTIONS^U

          None.
!short: wn_sync
         ^bwn_sync -- set/clear cursor synchronization flag^b

        ^UUSAGE^U

          wn_sync(wn, flag) 
          WINDOWPTR wn;     
          int flag;

                wn -   window handle
                flag - synchronization flag (TRUE or FALSE)

          When wn_sync is called with a value of TRUE all subsequent text 
          output to the window will have a flashing (normal) cursor 
          displayed following the last character output. Calling wn_sync 
          with a value of false inhibits the cursor from physically 
          advancing (it is always logically advanced).  

        ^URETURNS^U

          Nothing.

        ^UCAUTIONS^U

          None.
!short: wn_scroll
         ^bwn_scroll -- set scrolling method for window^b

        ^UUSAGE^U

          wn_scroll(wn,method)
          WINDOWPTR wn;
          int method;

                  wn -      window handle.
                  method -  BIOS or DMAS

           Set the method to be used to scroll the contents of the window 
           to use either the rom bios (BIOS), or the flicker free DMA 
           logic.  BIOS and DMAS are defined in "windows.h".  

           The default scrolling mode is DMAS.

           The Window BOSS incorporates machine independent logic that 
           ensures that scrolling on color systems is performed in such a 
           way as to totally eliminate snow and flicker.  This logic, 
           although bulletproof, can slow scrolling down.  Setting the 
           scrolling method to BIOS provides a machine independent way to 
           improve the scrolling speed with a (perhaps) proportional 
           increase in flicker.  Keep in mind that recent developments in 
           CGA and EGA technology have, for the most part, eliminated 
           scrolling flicker at the hardware level.  If your system is 
           equipped with one of these boards, you may achieve a 
           noticeable improvement in scrolling speed by using wn_scroll() 
           to set the scrolling method to BIOS.  Additionally, there are 
           several console device drivers (FANSI and NANSI to mention 
           two) that "patch" the bios routines to achieve the same 
           result.  

           Setting the scrolling method to BIOS when wn_dmaflg=FALSE has 
           no effect.

        ^URETURNS^U

           Nothing.

        ^UCAUTIONS^U

           Color systems only.
!short: wn_dma
         ^bwn_dma -- set/clear write ram directly flag^b

        ^UUSAGE^U

          wn_dma(flag)      
          int flag;         

                flag - write to video ram flag (TRUE or FALSE).

          The windowing routines assume that your video card supports 
          direct access to the video ram (normal for monochrome 
          monitors).  

        ^URETURNS^U

          Nothing.

        ^UCAUTIONS^U

          None.
!short: wn_fixcsr
         ^bwn_fixcsr -- update window cursor position^b

        ^UUSAGE^U

          wn_fixcsr(wn)     
          WINDOWPTR wn;     

                wn - window handle

          wn_fixcsr is a companion routine to wn_sync.  Causes the 
          physical cursor to be placed at the logical cursor location.  
          It is typically called after wn_sync has been called to disable 
          cursor synchronization.  wn_fixcsr does not alter the state of 
          the windows cursor synchronization flag.  

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_boxset
         ^bwn_boxset -- set box drawing character set^b

        ^UUSAGE^U

          wn_boxset(ul, ur, tb, sd, ll, lr);
          int ul, ur, tb, sd, ll, lr;

            ul - upper left corner character
            ur - upper right corner character
            tb - top/bottom line character
            sd - left/right side character
            ll - lower left corner character
            lr - lower right corner character

          wn_boxset set the characters to be used to frame all future 
          windows.

        ^URETURNS^U

          Nothing.

        ^UCAUTIONS^U

          None.
!short: wn_natrib
         ^bwn_natrib -- set new attribute in window NOW!^b

        ^UUSAGE^U

          wn_natrib(wn,atrib)
          WINDOWPTR wn;
          int atrib;

            wn    - window handle
            atrib - attribute to set the window specified by wn to.  

          The attributes of the window are changed immediately.

          Attributes are defined in window.h

          The border is not altered.

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
!short: wn_dborder
         ^bwn_dborder -- draw (replace) border on window^b

        ^UUSAGE^U

          wn_dborder(wn, ul, ur, tb, sd, ll, lr);
          WINDOWPTR wn;
          int ul, ur, tb, sd, ll, lr;

            wn - window handle
            ul - upper left corner character
            ur - upper right corner character
            tb - top/bottom line character
            sd - left/right side character
            ll - lower left corner character
            lr - lower right corner character

          The currently defined border attribute is used when drawing the 
          border.

        ^URETURNS^U

          TRUE or NULL if error

        ^UCAUTIONS^U

          The window "wn" automatically becomes the top window tile upon 
          return.
