home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / GRAPHICS / WINDOWPR.ZIP / PRO.DOC < prev    next >
Encoding:
Text File  |  1987-11-30  |  203.9 KB  |  8,383 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                     The WINDOW PRO
  8.                                    by Kenneth Stott
  9.                                      version 1.2
  10.                                            
  11.                                            
  12.                                            
  13.                                            
  14.                                            
  15.                                            
  16.                                            
  17.                                            
  18.                                            
  19.                                            
  20.                                   Seabreeze Software
  21.                                      66 Krebs Rd.
  22.                              Plainsboro, New Jersey 08536
  23.                                            
  24.                                     (609-275-8715)
  25.                                            
  26.                                            
  27.                                            
  28.                                            
  29.                                            
  30.                                            
  31.                                            
  32.                                            
  33.                       Copyright (c) 1986, 1987 by Kenneth Stott
  34.                                  All Rights Reserved
  35.                                            
  36.                                            
  37.                                            
  38.                                            
  39.                                            
  40.                                            
  41.                                            
  42.                                            
  43.                                            
  44.           The WINDOW PRO shareware diskette, containing a copy of this
  45.           manual, may be freely copied and shared.  But, printed copies of
  46.           this document may not be copied by any method without the express
  47.           written permission of Seabreeze Software.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.           ---------------- The WINDOW PRO registration form ---------------
  75.           
  76.           Mailing Address
  77.           
  78.           Name         :___________________________________________________
  79.           Company Name :___________________________________________________
  80.           Position     :___________________________________________________
  81.           Street       :___________________________________________________
  82.                         ___________________________________________________
  83.           City         :_________________  State  :__  Zip Code :__________
  84.           Country      :___________________________________________________
  85.           Compuserve # :___________________________________________________
  86.           
  87.           
  88.           Demographics
  89.           
  90.           Age          :__  
  91.           Sex          :__
  92.           
  93.           Computer System
  94.           
  95.           Manufacturer :___________________________________________________
  96.           Model        :___________________________________________________
  97.           RAM          :___________________________________________________
  98.           
  99.           Disk Media   5 1/4" 360K __    5 1/4" 1.2mb __  
  100.                        3 1/2" 720K __    3 1/2" 1.4mb __
  101.           Hard Disk
  102.             Capacity   :___________________________________________________
  103.           Video Adapter:___________________________________________________
  104.           Monitor      :___________________________________________________
  105.           
  106.           
  107.           How did you hear about WINDOW PRO? ______________________________
  108.           _________________________________________________________________
  109.           _________________________________________________________________
  110.           _________________________________________________________________
  111.           
  112.           Desired Support Level (check one)
  113.           
  114.           __ $15,  The WINDOW PRO shareware diskette
  115.           __ $50,  registered WINDOW PRO shareware library user
  116.           __ $75,  registered WINDOW PRO source code user (non-commercial)
  117.           __ $150, registered WINDOW PRO source code user (commercial)
  118.           
  119.           Include a check for the amount corresponding to the desired level
  120.           of service.  Make the check payable to, Seabreeze Software.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.           Window Pro v. 1.2                                Shareware Manual
  138.  
  139.  
  140.  
  141.           I.    Introduction . . . . . . . . . . . . . . . . . . . . .    1
  142.           II.   Technical Notes  . . . . . . . . . . . . . . . . . . .    2
  143.           III.  Shareware  . . . . . . . . . . . . . . . . . . . . . .    4
  144.           IV.   Registration . . . . . . . . . . . . . . . . . . . . .    5
  145.           V.    Support Details  . . . . . . . . . . . . . . . . . . .    7
  146.           VI.   Diskette . . . . . . . . . . . . . . . . . . . . . . .    8
  147.           VII.  Installation . . . . . . . . . . . . . . . . . . . . .    9
  148.           VIII. Compiling and linking the demo . . . . . . . . . . . .   10
  149.           IX.   Overview . . . . . . . . . . . . . . . . . . . . . . .   11
  150.           X.    Glossary . . . . . . . . . . . . . . . . . . . . . . .   12
  151.           XI.   Tutorial . . . . . . . . . . . . . . . . . . . . . . .   15
  152.           XII.  Reference  . . . . . . . . . . . . . . . . . . . . . .   20
  153.              A. Overview . . . . . . . . . . . . . . . . . . . . . . .   20
  154.              B. Keyboard and Mouse Functions . . . . . . . . . . . . .   24
  155.                 1.  kb_getshift  . . . . . . . . . . . . . . . . . . .   24
  156.                 2.  kb_getxc . . . . . . . . . . . . . . . . . . . . .   25
  157.                 3.  kb_hidemouse . . . . . . . . . . . . . . . . . . .   26
  158.                 4.  kb_ismouse . . . . . . . . . . . . . . . . . . . .   27
  159.                 5.  kb_mouseclicks . . . . . . . . . . . . . . . . . .   28
  160.                 6.  kb_mousemickeys  . . . . . . . . . . . . . . . . .   29
  161.                 7.  kb_mousemotion . . . . . . . . . . . . . . . . . .   30
  162.                 8.  kb_mousepressed  . . . . . . . . . . . . . . . . .   31
  163.                 9.  kb_mousereleased . . . . . . . . . . . . . . . . .   32
  164.                 10. kb_mousestatus . . . . . . . . . . . . . . . . . .   33
  165.                 11. kb_putmouse  . . . . . . . . . . . . . . . . . . .   34
  166.                 12. kb_resetmouse  . . . . . . . . . . . . . . . . . .   35
  167.                 13. kb_setgraphicsicon . . . . . . . . . . . . . . . .   36
  168.                 14. kb_setmousexrange  . . . . . . . . . . . . . . . .   37
  169.                 15. kb_setmouseyrange  . . . . . . . . . . . . . . . .   38
  170.                 16. kb_settextcursor . . . . . . . . . . . . . . . . .   39
  171.                 17. kb_showmouse . . . . . . . . . . . . . . . . . . .   40
  172.              C. Video Functions  . . . . . . . . . . . . . . . . . . .   41
  173.                 1. v_curshape  . . . . . . . . . . . . . . . . . . . .   41
  174.                 2. v_cursor_report . . . . . . . . . . . . . . . . . .   42
  175.                 3. v_getchar . . . . . . . . . . . . . . . . . . . . .   43
  176.                 4. v_getmode . . . . . . . . . . . . . . . . . . . . .   44
  177.                 5. v_getpage . . . . . . . . . . . . . . . . . . . . .   45
  178.                 6. v_getwidth  . . . . . . . . . . . . . . . . . . . .   46
  179.                 7. v_gotoxy  . . . . . . . . . . . . . . . . . . . . .   47
  180.                 8. v_putchar . . . . . . . . . . . . . . . . . . . . .   48
  181.                 9. v_setmode . . . . . . . . . . . . . . . . . . . . .   49
  182.              D. Virtual Screen Functions . . . . . . . . . . . . . . .   50
  183.                 1.  vs_clr*  . . . . . . . . . . . . . . . . . . . . .   50
  184.                 2.  vs_delcolumn . . . . . . . . . . . . . . . . . . .   52
  185.                 3.  vs_delrow  . . . . . . . . . . . . . . . . . . . .   53
  186.                 4.  vs_fillattr  . . . . . . . . . . . . . . . . . . .   54
  187.                 5.  vs_fillchar  . . . . . . . . . . . . . . . . . . .   55
  188.                 6.  vs_format  . . . . . . . . . . . . . . . . . . . .   56
  189.                 7.  vs_gets  . . . . . . . . . . . . . . . . . . . . .   57
  190.                 8.  vs_inscolumn . . . . . . . . . . . . . . . . . . .   58
  191.                 9.  vs_insrow  . . . . . . . . . . . . . . . . . . . .   59
  192.                 10. vs_locatecur . . . . . . . . . . . . . . . . . . .   60
  193.                 11. vs_printf  . . . . . . . . . . . . . . . . . . . .   61
  194.                 12. vs_putc  . . . . . . . . . . . . . . . . . . . . .   62
  195.  
  196.  
  197.  
  198.                                      - index 1 -
  199.  
  200.  
  201.  
  202.  
  203.  
  204.           Window Pro v. 1.2                                Shareware Manual
  205.  
  206.  
  207.  
  208.                 13. vs_puts  . . . . . . . . . . . . . . . . . . . . .   62
  209.              E. Window and Tile Functions  . . . . . . . . . . . . . .   64
  210.                 1.  wn_actt  . . . . . . . . . . . . . . . . . . . . .   64
  211.                 2.  wn_actw  . . . . . . . . . . . . . . . . . . . . .   65
  212.                 3.  wn_bordrng . . . . . . . . . . . . . . . . . . . .   66
  213.                 4.  wn_chgbord . . . . . . . . . . . . . . . . . . . .   67
  214.                 5.  wn_chgcolor  . . . . . . . . . . . . . . . . . . .   68
  215.                 6.  wn_closet  . . . . . . . . . . . . . . . . . . . .   69
  216.                 7.  wn_closew  . . . . . . . . . . . . . . . . . . . .   70
  217.                 8.  wn_createt . . . . . . . . . . . . . . . . . . . .   71
  218.                 9.  wn_createw . . . . . . . . . . . . . . . . . . . .   72
  219.                 10. wn_defrost . . . . . . . . . . . . . . . . . . . .   74
  220.                 11. wn_deletet . . . . . . . . . . . . . . . . . . . .   75
  221.                 12. wn_delw  . . . . . . . . . . . . . . . . . . . . .   76
  222.                 13. wn_draww . . . . . . . . . . . . . . . . . . . . .   77
  223.                 14. wn_flybox  . . . . . . . . . . . . . . . . . . . .   78
  224.                 15. wn_freeze  . . . . . . . . . . . . . . . . . . . .   79
  225.                 16. wn_hidecur . . . . . . . . . . . . . . . . . . . .   80
  226.                 17. wn_hidew . . . . . . . . . . . . . . . . . . . . .   81
  227.                 18. wn_init  . . . . . . . . . . . . . . . . . . . . .   82
  228.                 19. wn_ison* . . . . . . . . . . . . . . . . . . . . .   83
  229.                 20. wn_locatevs  . . . . . . . . . . . . . . . . . . .   88
  230.                 21. wn_locatew . . . . . . . . . . . . . . . . . . . .   89
  231.                 22. wn_moverng . . . . . . . . . . . . . . . . . . . .   90
  232.                 23. wn_movew . . . . . . . . . . . . . . . . . . . . .   91
  233.                 24. wn_namet . . . . . . . . . . . . . . . . . . . . .   92
  234.                 25. wn_namew . . . . . . . . . . . . . . . . . . . . .   93
  235.                 26. wn_opent . . . . . . . . . . . . . . . . . . . . .   94
  236.                 27. wn_openw . . . . . . . . . . . . . . . . . . . . .   95
  237.                 28. wn_redraw  . . . . . . . . . . . . . . . . . . . .   96
  238.                 29. wn_restorescr  . . . . . . . . . . . . . . . . . .   97
  239.                 30. wn_savescr . . . . . . . . . . . . . . . . . . . .   98
  240.                 31. wn_scrollvs  . . . . . . . . . . . . . . . . . . .   99
  241.                 32. wn_showcur . . . . . . . . . . . . . . . . . . . .  100
  242.                 33. wn_sizerng . . . . . . . . . . . . . . . . . . . .  101
  243.                 34. wn_sizet . . . . . . . . . . . . . . . . . . . . .  102
  244.                 35. wn_suspendt  . . . . . . . . . . . . . . . . . . .  103
  245.                 36. wn_suspendw  . . . . . . . . . . . . . . . . . . .  104
  246.                 37. wn_swapt . . . . . . . . . . . . . . . . . . . . .  105
  247.                 38. wn_togborder . . . . . . . . . . . . . . . . . . .  106
  248.                 39. wn_togbordrng  . . . . . . . . . . . . . . . . . .  107
  249.                 40. wn_togscroll . . . . . . . . . . . . . . . . . . .  108
  250.                 41. wn_togscrollrng  . . . . . . . . . . . . . . . . .  109
  251.                 42. wn_updatet . . . . . . . . . . . . . . . . . . . .  110
  252.                 43. wn_updatew . . . . . . . . . . . . . . . . . . . .  111
  253.                 44. wn_zoomw . . . . . . . . . . . . . . . . . . . . .  112
  254.              F. Global Variables and Data Structures . . . . . . . . .  113
  255.                 1.  active_attr, inactive_attr . . . . . . . . . . . .  113
  256.                 2.  active_tile_attr, inactive_tile_attr . . . . . . .  113
  257.                 3.  active_wdw . . . . . . . . . . . . . . . . . . . .  113
  258.                 4.  ansi_fcolor_table, ansi_fcolor_table . . . . . . .  113
  259.                 5.  balance1 . . . . . . . . . . . . . . . . . . . . .  113
  260.                 6.  buf[]  . . . . . . . . . . . . . . . . . . . . . .  113
  261.                 7.  cursor_e, cursor_b, cursor_on  . . . . . . . . . .  114
  262.  
  263.  
  264.  
  265.                                      - index 2 -
  266.  
  267.  
  268.  
  269.  
  270.  
  271.           Window Pro v. 1.2                                Shareware Manual
  272.  
  273.  
  274.  
  275.                 8.  cursor_position, change_color  . . . . . . . . . .  114
  276.                 9.  default_box, box0, box1, box2, box3, box4, box . .  114
  277.                 10. ega_mline  . . . . . . . . . . . . . . . . . . . .  115
  278.                 11. error_flag . . . . . . . . . . . . . . . . . . . .  115
  279.                 12. first_wdw, last_wdw  . . . . . . . . . . . . . . .  115
  280.                 13. frozen . . . . . . . . . . . . . . . . . . . . . .  115
  281.                 14. ibm_fcolor_table, ibm_bcolor_table . . . . . . . .  115
  282.                 15. method . . . . . . . . . . . . . . . . . . . . . .  115
  283.                 16. oldx, oldy, oldb, olde . . . . . . . . . . . . . .  116
  284.                 17. overlay  . . . . . . . . . . . . . . . . . . . . .  116
  285.                 18. physical_columns, physical_rows  . . . . . . . . .  116
  286.                 19. primary_scr, alt_scr, curr_scr . . . . . . . . . .  116
  287.                 20. screen_buffer  . . . . . . . . . . . . . . . . . .  116
  288.                 21. scroll_bars_on . . . . . . . . . . . . . . . . . .  116
  289.                 22. tab_expansion  . . . . . . . . . . . . . . . . . .  117
  290.                 23. vpage  . . . . . . . . . . . . . . . . . . . . . .  117
  291.                 24. window[] . . . . . . . . . . . . . . . . . . . . .  117
  292.                 25. zoomed . . . . . . . . . . . . . . . . . . . . . .  117
  293.                 26. zoomed_tile  . . . . . . . . . . . . . . . . . . .  117
  294.                 27. zoomed_wdw . . . . . . . . . . . . . . . . . . . .  117
  295.                 28. wdw_rec  . . . . . . . . . . . . . . . . . . . . .  118
  296.                 29. tile_rec . . . . . . . . . . . . . . . . . . . . .  119
  297.                 30. blkrec . . . . . . . . . . . . . . . . . . . . . .  120
  298.              G. Forthcoming Enhancements . . . . . . . . . . . . . . .  121
  299.              H. Other Seabreeze Products . . . . . . . . . . . . . . .  122
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.                                      - index 3 -
  333.  
  334.  
  335.  
  336.  
  337.  
  338.           Window Pro v. 1.2                                Shareware Manual
  339.  
  340.  
  341.  
  342.           I.    Introduction
  343.           
  344.           WINDOW PRO is one of the most comprehensive, compact, and easiest
  345.           to use screen control libraries available for "C" language
  346.           development of applications and systems software.  
  347.           
  348.              . WINDOW PRO lets you easily create programs that look and
  349.                feel like Framework, Lotus, dBase III, and other
  350.                top-sellers.  Dialog boxes, context-sensitive help, pop-up
  351.                and pull-down menus are a snap to implement.  
  352.           
  353.              . Your programs will be able to drag, zoom, split, hide, and
  354.                scroll windows fast, flicker-free, and without snow.  
  355.           
  356.              . Sensing video cards, setting video modes, and cursor control
  357.                are simple straight-forward operations.  
  358.              
  359.              . WINDOW PRO is compiler and machine independent.  You can use
  360.                the same applications interface for your VAX, IBM PC, or
  361.                APPLE II.
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.                                         - 1 -
  400.  
  401.  
  402.  
  403.  
  404.  
  405.           Window Pro v. 1.2                                Shareware Manual
  406.  
  407.  
  408.  
  409.           II.   Technical Notes
  410.           
  411.              . Compatibility - Seabreeze Software currently supports WINDOW
  412.                PRO under MS-DOS running on the IBM-PC/XT/AT and
  413.                compatibles.  It works with CGA, MDA, and EGA cards in black
  414.                and white or color and operates in 40 X 25, 80 X 25, and 80
  415.                X 43 modes.  It also supports the multi-page capabilities of
  416.                the CGA and EGA video cards.  WINDOW PRO includes a large
  417.                model version of its library, in a Borland Turbo C version
  418.                and a Microsoft C 4.0 version. (Turbo-C huge model is
  419.                available by mail.)
  420.              
  421.              . Limitations - The number of windows on the screen is
  422.                algorithmically unlimited.  Your compiler or hardware may
  423.                limit the number of windows.
  424.              
  425.              . Error handling - WINDOW PRO has extensive error handling
  426.                capabilities.  The centralized error handling feature can be
  427.                switched on or off during run-time via a function call. 
  428.                With the feature disabled WINDOW PRO functions return
  429.                extensive error handling information for customized error
  430.                handling.
  431.              
  432.              . Machine independence - WINDOW PRO use three methods of
  433.                screen updating: 
  434.              
  435.                  .. Direct memory access ("DMA") - Usable on IBM PC/XT/AT
  436.                     and compatibles.  This is the fastest and most
  437.                     efficient method. 
  438.                  
  439.                  .. IBM PC BIOS method ("BIOS") - Considered well-behaved
  440.                     by programs such as DESQVIEW, and MICROSOFT WINDOWS. 
  441.                  
  442.                  .. Direct cursor positioning ("ANSI") -  Requires a
  443.                     terminal that can position the cursor at a coordinate
  444.                     on the screen.  This is by default setup for an ANSI
  445.                     type terminal, but can be modified at run-time for
  446.                     others.  
  447.                   
  448.                In all modes no assumptions are made about screen size,
  449.                video memory locations, etc.  But you are provided with
  450.                several functions for sensing and setting video modes on an
  451.                IBM-PC.  
  452.              
  453.              . Compiler independence -  WINDOW PRO coding adheres to the
  454.                current proposed ANSI standard.  Although we are in the
  455.                process of testing WINDOW PRO with several compilers we can
  456.                only recommend Borland Turbo C and Microsoft C version 4.
  457.              
  458.                For now, If you would like to use another compiler, you will
  459.                have to purchase the source code (see registration, next
  460.                section.)  WINDOW PRO uses the following functions from the
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                                         - 2 -
  467.  
  468.  
  469.  
  470.  
  471.  
  472.           Window Pro v. 1.2                                Shareware Manual
  473.  
  474.  
  475.  
  476.                compilers' libraries.  Your compiler  will need to support
  477.                these functions, or you will need to provide suitable
  478.                substitutes, to make use of the WINDOW PRO source code:
  479.              
  480.                   . far malloc, far free.  An absolute must, although you
  481.                     might try your hand at changing the source code to
  482.                     support small model. (If your compiler doesn't support
  483.                     large model.)  We're still working on the small model
  484.                     version.
  485.                   
  486.                   . vsprintf.  Necessary for the wprintf feature.
  487.                   
  488.                   . int86.  Necessary for sensing the video card, setting
  489.                     the video mode, setting the cursor size and position,
  490.                     and other IBM PC specific functions.
  491.                   
  492.                   . getch.  Necessary for WINDOW PRO's wgets function.
  493.                   
  494.                   . putchar. Necessary for ANSI mode.
  495.                   
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.                                         - 3 -
  534.  
  535.  
  536.  
  537.  
  538.  
  539.           Window Pro v. 1.2                                Shareware Manual
  540.  
  541.  
  542.  
  543.           III.  Shareware
  544.           
  545.           Seabreeze Software distributes WINDOW PRO under the shareware
  546.           marketing concept.  Because WINDOW PRO is shareware you can
  547.           freely copy and share the WINDOW PRO shareware diskette with its
  548.           programs and manual.  You can also obtain it from Seabreeze
  549.           Software for $15 (the cost of the diskette, postage, and
  550.           handling.)  In fact, we hope you do help us by sharing unmodified
  551.           copies of the WINDOW PRO shareware diskette with other
  552.           programmers.
  553.           
  554.           You may incorporate WINDOW PRO into your programs and distribute
  555.           those programs absolutely royalty free.  You may not however
  556.           sell, or give away, the WINDOW PRO source code -- even if you
  557.           purchase the right to use it (see registration section.)
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.                                         - 4 -
  601.  
  602.  
  603.  
  604.  
  605.  
  606.           Window Pro v. 1.2                                Shareware Manual
  607.  
  608.  
  609.  
  610.           IV.   Registration
  611.           
  612.           Shareware is software which can be freely copied and
  613.           distributed.  It is copyrighted software which the author
  614.           encourages people to copy and share with others.
  615.           
  616.           You can register with Seabreeze Software for three levels of
  617.           support:
  618.           
  619.            .  For $50 you receive
  620.           
  621.                .  A serialized diskette containing all the latest libraries
  622.                   for all supported compilers and memory models.
  623.                
  624.                .  Single user telephone support (BBS, Compuserve, and
  625.                   voice.)  See next section for details.
  626.                
  627.                .  Free updates for one year.
  628.           
  629.            .  For $75 you receive 
  630.            
  631.                .  the above, 
  632.                .  one hundred pages of liberally commented documented
  633.                   source code (on diskette,) and 
  634.                .  a Kernel Functions Reference Manual.  
  635.                
  636.                   This support-level is usable for non-commercial
  637.                   programs.  Non-commercial programs are those created for
  638.                   limited user (less than 100 users) installations (as
  639.                   typically might be found in a small consulting situation
  640.                   or a small corporate software development setting,) for
  641.                   unlimited shareware or freeware distribution.
  642.             
  643.            .  For $150 you receive 
  644.            
  645.                .  the above, plus 
  646.                .  the right to use WINDOW PRO in commercial applications. 
  647.            
  648.            .  Call for details regarding multiple user-support, consulting
  649.               services, and customizations.
  650.              
  651.           
  652.           Seabreeze Software retains the following rights:
  653.           
  654.            .  If you purchase the source code you may not distribute it
  655.               except as part of an application program.  In other words,
  656.               you can't resell the source in its current or modified form
  657.               in a way that competes with the original product.  
  658.            
  659.            .  If you provide the WINDOW PRO source code to a purchaser of
  660.               your applications software you must leave the remarks in the
  661.               source code indicating that the original copyright is held by
  662.               Seabreeze Software.  If you rewrite portions of WINDOW PRO
  663.  
  664.  
  665.  
  666.  
  667.                                         - 5 -
  668.  
  669.  
  670.  
  671.  
  672.  
  673.           Window Pro v. 1.2                                Shareware Manual
  674.  
  675.  
  676.  
  677.               you may point out the modifications made by yourself but you
  678.               are still legally obligated to leave the original copyright
  679.               notice in the source code.
  680.            
  681.            .  Seabreeze Software may modify its pricing and distribution
  682.               policies at any time without notification.  This does not
  683.               imply that we will not honor our contractual obligations. But
  684.               that we reserve the right to not contract for the above
  685.               services at the above prices, i.e. we are not bound by 'old'
  686.               advertising.
  687.           
  688.           The registration form is at the back of this manual.
  689.           
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.                                         - 6 -
  735.  
  736.  
  737.  
  738.  
  739.  
  740.           Window Pro v. 1.2                                Shareware Manual
  741.  
  742.  
  743.  
  744.           V.    Support Details
  745.           
  746.           Support is provided under three methods.
  747.           
  748.            .  Commercial E-mail.  Send mail to Kenneth Stott, Compuserve
  749.               ID# 72330, 705
  750.            
  751.            .  Public E-mail.  Leave messages to Kenneth Stott at the
  752.               "Second Opinion" BBS, 412-826-0822.  Kenneth Stott, The
  753.               WINDOW PRO, and Seabreeze Software are in no way affiliated
  754.               with "The Second Opinion" BBS or Bob Rakov, "The Second
  755.               Opinion"  BBS sysop.  (He just happens to run a first-class
  756.               BBS.)
  757.            
  758.            .  Voice.  You may leave voice messages (answering machine) at
  759.               609-275-8715, Monday through Friday, 9 a.m. to 5 p.m.  Eastern
  760.               Time.
  761.           
  762.           Technical support is available to registered users only, you must
  763.           leave your license agreement number, your name, and instructions
  764.           for answering the question (like - "please answer via Compuserve
  765.           E-mail ID# XXXXX, XXX." or  "Please call me at XXX-XXX-XXXX for
  766.           verbal consultation.")  Give as many details as possible. 
  767.           Answers will generally be received within 24 hours or less,
  768.           Monday through Friday.
  769.           
  770.           Seabreeze Software will respond to general questions from
  771.           unregistered users, like "I have version X.XX, what is the latest
  772.           version?" or "What is the current price for support level X?"  We
  773.           cannot respond to technical questions from unregistered users.
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.                                         - 7 -
  802.  
  803.  
  804.  
  805.  
  806.  
  807.           Window Pro v. 1.2                                Shareware Manual
  808.  
  809.  
  810.  
  811.           VI.   Diskette
  812.           
  813.           The shareware diskette should contain the following files:
  814.           
  815.           Read.me             Any last minute corrections, additions, etc.
  816.           Pkxarc.exe          Unarchives Pro.arc
  817.           Pro.arc             Contains the manual and libraries
  818.           
  819.           Pro.arc contains:
  820.           
  821.           Demo.c              Source code for the WINDOW PRO demo program
  822.           Demo.exe            The WINDOW PRO demo program
  823.           Demo.prj            Project file for Borland Turbo C
  824.           Mscpro.bat          Microsoft C ver 4 compiler and linker driver
  825.                               batch file
  826.           Tcpro.bat           Turbo C compiler driver and linker driver
  827.                               batch file (TCC.EXE and TLINK.EXE)
  828.           Pro.h               Type checking include files
  829.           Vs.h                "
  830.           Video.h             "
  831.           Keyboard.h          "
  832.           Mouse.h             "
  833.           Colors.h            Color defintion macros for IBM-PC
  834.           Werrors.h           Error handler definitions
  835.           Vidmodes.h          Video mode definition macros for IBM-PC
  836.           Xglobals.h          Global declarations
  837.           tcpower.lib         Turbo C large model WINDOW PRO library
  838.           mscpower.lib        Microsoft C ver 4 large model WINDOW PRO
  839.                               library
  840.           Tutor1.c            Source and turbo project file for tutorial
  841.                               number 1.
  842.           Tutor1.prj          "
  843.           Tutor2.c            Source and turbo project file for tutorial
  844.                               number 2.
  845.           Tutor2.prj          "
  846.           Tutor3.c            Source and turbo project file for tutorial
  847.                               number 3.
  848.           Tutor3.prj          "
  849.           Tutor4.c            Source and turbo project file for tutorial
  850.                               number 4.
  851.           Tutor4.prj          "
  852.           Tutor5.c            Source and turbo project file for tutorial
  853.                               number 5.
  854.           Tutor5.prj          "
  855.           
  856.           Note: BBS operators may repackage The WINDOW PRO files to
  857.           optimize on-line time.  If you received your files via a BBS
  858.           please make sure you have all of The WINDOW PRO shareware files.
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.                                         - 8 -
  869.  
  870.  
  871.  
  872.  
  873.  
  874.           Window Pro v. 1.2                                Shareware Manual
  875.  
  876.  
  877.  
  878.           VII.  Installation
  879.           
  880.             1. Backup your shareware diskette.
  881.             
  882.             2. Type "pkxarc Pro" at the dos prompt.  Pkxarc will unarc
  883.                Pro.arc into the current default directory.  You can run
  884.                pkxarc.exe from another directory, and unarc Pro.arc located
  885.                on another drive or directory by preceding each with a drive
  886.                and directory specification, for example
  887.             
  888.             
  889.                C:\Pro>a:pkxarc a:Pro
  890.             
  891.                will run pkxarc from the a: drive and unarc Pro.arc located
  892.                on the a: drive into the c: drive and into a sub-directory
  893.                called Pro.
  894.             
  895.             3. Copy the library file (extension of ".lib") to the diskette
  896.                or sub-directory you usually use with your C compiler.  The
  897.                lib files should be in the same sub-directory as your C
  898.                runtime libraries.  
  899.             
  900.             4. Copy the compiler/linker driver batch file that corresponds
  901.                to your compiler to
  902.             
  903.                PRO.BAT
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.                                         - 9 -
  936.  
  937.  
  938.  
  939.  
  940.  
  941.           Window Pro v. 1.2                                Shareware Manual
  942.  
  943.  
  944.  
  945.           VIII. Compiling and linking the demo
  946.           
  947.           Compile the demo by typing 
  948.           
  949.           PRO DEMO
  950.           
  951.           at the dos prompt.
  952.           
  953.           Note: The compiler/linker batch files assume that you have
  954.           installed the your compiler as suggested by your compiler's
  955.           manual.  If you are using Turbo-C it assumes that the
  956.           sub-directories LIB and INCLUDE are child directories of the
  957.           default directory.  If you are using MSC it assumes that the BIN
  958.           sub-directory is in your PATH, and that the environment variables
  959.           LIB and INCLUDE are properly set.
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.                                        - 10 -
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.           Window Pro v. 1.2                                Shareware Manual
  1009.  
  1010.  
  1011.  
  1012.            IX.   Overview
  1013.           
  1014.            WINDOW PRO is a virtual screen manager.  Instead of  working with
  1015.            a single screen like a traditional program, you can define
  1016.            hundreds of screens.  And with simple commands, like vs_gets and
  1017.            vs_printf, you send output to any virtual screen.  You can
  1018.            display parts of a virtual screen on the physical screen through
  1019.            a window.  
  1020.            
  1021.            Windows may overlap one another so that some windows will obscure
  1022.            others.  A collection of overlapping windows on a screen could
  1023.            like this.  
  1024.            
  1025.            
  1026.                            +--------------------+ 
  1027.                            |                    | 
  1028.                            |     window #1      | 
  1029.                            |                    | 
  1030.                            |                    |-------------+ 
  1031.                            |                    |             | 
  1032.                            |                    |             | 
  1033.                            |                    |             | 
  1034.                            |                    |             | 
  1035.                            |                    |             | 
  1036.                            +--------------------+             | 
  1037.                                 |         |                   | 
  1038.                                 |         |     window #2     | 
  1039.                                 |         |                   | 
  1040.                                 |         |                   | 
  1041.                                 |         +-------------------+ 
  1042.                                 |                      | 
  1043.                                 |     window #3        | 
  1044.                                 |                      | 
  1045.                                 +----------------------+ 
  1046.            
  1047.            Because all WINDOW PRO operation modes can be decided at
  1048.            runtime.  You can support several MS-DOS supported machines with
  1049.            one executable file.  Creating programs with fancy terminal
  1050.            installations is very simple, or for the IBM PC world, creating
  1051.            programs that automatically sense, or set, video modes, sense
  1052.            display adapters, etc. is quite easy.
  1053.            
  1054.            WINDOW PRO provides mouse support.  Mice and windows are a team. 
  1055.            So we have provided extensive and sophisticated support for
  1056.            MICROSOFT MOUSE compatible devices.  
  1057.            
  1058.            WINDOW PRO, for all of its added features just doesn't take much
  1059.            space.  If you use just the basic functions you will only add
  1060.            about 20K of code to your application.  If you use all of the
  1061.            features you will add about 60K. (Depends on you compiler.)  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.                                        - 11 -
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.           Window Pro v. 1.2                                Shareware Manual
  1076.  
  1077.  
  1078.  
  1079.            X.    Glossary
  1080.           
  1081.               . Physical screen - the physical screen is your computer or
  1082.                 terminal screen. Unlike a virtual screen it is limited in
  1083.                 size to whatever modes your computer or terminal supports.
  1084.               
  1085.               . Virtual screen - WINDOW PRO allows you to create an
  1086.                 unlimited number of virtual screens.  Instead of sending
  1087.                 output to the physical screen, you send output to the
  1088.                 virtual screen of your choice.  WINDOW PRO will update the
  1089.                 physical screen only if there is a window onto the virtual
  1090.                 screen displayed on the physical screen. Virtual screens are
  1091.                 not limited in size.  A virtual screen does not have to have
  1092.                 an open window on the physical screen, i.e. a program can
  1093.                 update a virtual screen without affecting the physical
  1094.                 screen.
  1095.               
  1096.               . Window - a window allows you to show part of a virtual
  1097.                 screen on the physical screen.  WINDOW PRO lets you open a
  1098.                 window and place it anywhere on the physical screen. 
  1099.                 Windows can be moved or resized through simple function
  1100.                 calls.  Windows may overlap on the physical screen.  
  1101.               
  1102.                 You can control the overlapping of windows in several ways. 
  1103.                 If you need to see a window which is partially or completely
  1104.                 obscured you can 'activate' the window, which will bring it
  1105.                 temporarily to the top of the physical screen.  You put the
  1106.                 the 'active' window back into its original position by
  1107.                 'deactivating' it.  A window may be brought to the top
  1108.                 permanently by 'opening' it.  You remove a window from the
  1109.                 physical screen by 'closing' it.
  1110.               
  1111.               . Handle - when a window is created WINDOW PRO returns an
  1112.                 internal name - a handle - by which the window can be
  1113.                 referred to.
  1114.               
  1115.               . Viewport - The rectangular region of a virtual screen
  1116.                 displayed within a window.
  1117.               
  1118.               . Border - the area of the window which surrounds the viewport
  1119.                 is called the border.  You can specify the border characters
  1120.                 and can select from several types of display styles to
  1121.                 create shadowing effects.
  1122.               
  1123.               . Freezing or Suspending - A physical screen, virtual screen,
  1124.                 or window may be frozen or suspended.  If an item is frozen
  1125.                 the results of any actions performed on it are not updated
  1126.                 to the physical screen.  Defrosting the item flashes the
  1127.                 results of all the operations subsequent to the freeze to
  1128.                 the physical screen.  (Suspending is identical to freezing
  1129.                 but is a toggle.  Unlike suspend, every call to freeze must
  1130.                 be matched by the same number of defrosts to un-freeze the
  1131.                 item.)
  1132.               
  1133.  
  1134.  
  1135.  
  1136.                                        - 12 -
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.           Window Pro v. 1.2                                Shareware Manual
  1143.  
  1144.  
  1145.  
  1146.               . Display List - WINDOW PRO uses the display list to keep
  1147.                 track of the windows which have been opened on the physical
  1148.                 screen, and the order in which they are shown. The display
  1149.                 list is used to make sure that the windows on the physical
  1150.                 screen are stacked up in the right order when the physical
  1151.                 screen is redrawn.  You can reorder the list through various
  1152.                 function calls. Although you will never deal with this list
  1153.                 directly it is referred to often in the WINDOW PRO functions
  1154.                 reference.
  1155.               
  1156.               . Hiding a window - if a window is hidden it retains its
  1157.                 position in the display list, but it is not displayed on the
  1158.                 physical screen. (Some useful effects can be programmed by
  1159.                 hiding and unhiding windows.)
  1160.               
  1161.               . Tiles - a tile is a subdivision of a window.  This is very
  1162.                 similar to the old split screen approach used by many word
  1163.                 processors and spreadsheets, and looks something like this: 
  1164.                 
  1165.               
  1166.                               +--------------------+ 
  1167.                               |                    | 
  1168.                               |     window #1      | 
  1169.                               |      tile #1       | 
  1170.                               |                    |-------------+ 
  1171.                               |--------------------|             | 
  1172.                               |                    |             | 
  1173.                               |     window #1      |             | 
  1174.                               |      tile #2       |             | 
  1175.                               |                    |             | 
  1176.                               +--------------------+             | 
  1177.                                    |         |                   | 
  1178.                                    |window #3|     window #2     | 
  1179.                                    | tile #1 |      tile #1      | 
  1180.                                    |         |                   | 
  1181.                                    |         +-------------------+ 
  1182.                                    |----------------------| 
  1183.                                    |       window #3      | 
  1184.                                    |        tile #2       | 
  1185.                                    +----------------------+ 
  1186.               
  1187.                 Many WINDOW PRO functions which are available at window
  1188.                 level are also available at tile level.  All operations
  1189.                 applied to the window will affect its tiles.  If the window
  1190.                 is hidden, then all the tiles are hidden.  If the window is
  1191.                 made bigger, then the size of the tiles is adjusted too.
  1192.                 Each window has a tile display list (similar to the window
  1193.                 display list,) which controls how tiles are displayed within
  1194.                 the window.  
  1195.               
  1196.                 The advantage of tiles is that you can display several
  1197.                 virtual screens in a single window.  This is useful when
  1198.                 creating segmented pull down menus, or in creating window
  1199.                 based editors.  For example, a text editor might use one
  1200.  
  1201.  
  1202.  
  1203.                                        - 13 -
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.           Window Pro v. 1.2                                Shareware Manual
  1210.  
  1211.  
  1212.  
  1213.                 tile for editing text, and a second to display formatting
  1214.                 information.  There are lots of uses for this feature, and
  1215.                 you will not find it anywhere else.  
  1216.               
  1217.                 Tiles are also referred to by 'handles.' A single virtual
  1218.                 screen is always associated with a tile.
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.                                        - 14 -
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.           Window Pro v. 1.2                                Shareware Manual
  1277.  
  1278.  
  1279.  
  1280.           XI.   Tutorial
  1281.           
  1282.           The easiest way to understand WINDOW PRO is to study some code
  1283.           which employs the WINDOW PRO library.  I've included a few simple
  1284.           examples to show you how to get started.  The following
  1285.           illustration is also found in TUTOR1.C.  You can compile and link
  1286.           TUTOR1 by typing
  1287.           
  1288.           PRO TUTOR1 
  1289.           
  1290.           at the dos prompt.  
  1291.           
  1292.           There are five tutorials in all, TUTOR1 to TUTOR5.  I suggest
  1293.           that you run through each in order by first printing the source
  1294.           code, compiling and linking the source, running the executable,
  1295.           and simultaneously tracing through the source code to see how the
  1296.           various screen effects were performed.  There are numerous
  1297.           getch() statements sprinkled through each tutor?.c file to help
  1298.           slow down the action.  The TUTOR source code is liberally
  1299.           commented.  You should not have a great deal of trouble comparing
  1300.           the code to the screen action.
  1301.           
  1302.           Lets put a window on the screen and type the words 'WINDOW PRO'
  1303.           inside of it.
  1304.           
  1305.           
  1306.           /* 
  1307.            * We'll need this for type checking on the windows functions
  1308.           */
  1309.           #include "pro.h"
  1310.           
  1311.           
  1312.           /*
  1313.            * You've got to have this.  It will setup the WINDOW PRO global
  1314.            * variables.
  1315.           */
  1316.           #include "xglobals.h"
  1317.           
  1318.           
  1319.           /*
  1320.            * We'll need this for type checking on the virtual screen 
  1321.            * functions
  1322.           */
  1323.           #include "vs.h"
  1324.           
  1325.           
  1326.           /*
  1327.            * This is really handy, it defines the IBM-PC colors
  1328.           */
  1329.           #include "colors.h"
  1330.           
  1331.           
  1332.           int main()
  1333.           {
  1334.  
  1335.  
  1336.  
  1337.                                        - 15 -
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.           Window Pro v. 1.2                                Shareware Manual
  1344.  
  1345.  
  1346.  
  1347.           
  1348.                /*
  1349.                 * We'll use this to store the window and tile handle 
  1350.                 * returned when we create a window.
  1351.                */
  1352.                unsigned int window_handle;
  1353.                
  1354.                /*
  1355.                 * Initialize WINDOW PRO.  If you don't do this -- forget 
  1356.                 * it, everything blows up.
  1357.                */
  1358.                wn_init();
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.                                        - 16 -
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.           Window Pro v. 1.2                                Shareware Manual
  1411.  
  1412.  
  1413.  
  1414.           
  1415.                /*
  1416.                 * Create a window and get a handle back.  
  1417.           
  1418.                 * The window's virtual screen will be 25 rows by 80 
  1419.                 * columns,
  1420.                */
  1421.           
  1422.                window_handle = wn_createw(25, 80, 
  1423.           
  1424.                /*
  1425.                 * The upper left corner of the window will be located at the
  1426.                 * physical screen coordinates of (2,3); second column and 
  1427.                 * third row.
  1428.                */
  1429.           
  1430.                   2, 3,
  1431.           
  1432.                /* 
  1433.                 * The upper left corner of the window will map to the 
  1434.                 * virtual screen coordinate (1,1); first column and 
  1435.                 * first row.
  1436.                */
  1437.           
  1438.                   1, 1,
  1439.           
  1440.                /*
  1441.                 * The inner dimensions of the window will be 5,10; 
  1442.                 * 5 rows by 10 columns.
  1443.                */
  1444.           
  1445.                   5, 10,
  1446.           
  1447.                */
  1448.                 * The window will not be suspended, i.e. all output
  1449.                 * to the virtual screen will be immediately displayed
  1450.                 * on the physical screen.
  1451.                */
  1452.           
  1453.                   FALSE,
  1454.           
  1455.                */
  1456.                 * We won't use any shadowing effects.
  1457.                */
  1458.           
  1459.                   HEAD_ON,
  1460.           
  1461.                /*
  1462.                 * Nor will we assign a name to the tile or window.
  1463.                */
  1464.           
  1465.                  NULL, NULL);
  1466.           
  1467.           
  1468.  
  1469.  
  1470.  
  1471.                                        - 17 -
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.           Window Pro v. 1.2                                Shareware Manual
  1478.  
  1479.  
  1480.  
  1481.                /* 
  1482.                 * More simply put:       
  1483.                 * wn_createw(25,80,2,3,1,1,5,10,FALSE,HEAD_ON,NULL,NULL);
  1484.                */
  1485.           
  1486.           
  1487.                */
  1488.                 * Here comes the confusing part:
  1489.                 * All windows, even those that aren't divided into tiles
  1490.                 * have tiles.  You really should think of windows as a
  1491.                 * way of grouping tiles together.  In the above case
  1492.                 * When we created the window, we also created a tile, and
  1493.                 * a virtual screen.  The first tile created in a new
  1494.                 * window always has a handle of 0 and every virtual
  1495.                 * screen is associated with a tile. We always
  1496.                 * reference a virtual screen by a pair of handles:
  1497.                 * A window handle (pointing to a group of tiles), and
  1498.                 * a tile handle.  In the window we just created the window
  1499.                 * has a handle of 'window_handle', the tile has a handle
  1500.                 * of 0, and we reference the virtual screen using
  1501.                 * {window_handle, 0}.
  1502.                */
  1503.           
  1504.                /*
  1505.                 * Now let's put something in the virtual screen
  1506.                 *
  1507.                */
  1508.           
  1509.                /*
  1510.                 * first we reference the virtual screen
  1511.                */
  1512.           
  1513.                  vs_puts(window_handle, 0,
  1514.           
  1515.                /* 
  1516.                 * Then we say where we want the string put (column, row).
  1517.                */
  1518.           
  1519.                  1, 1,
  1520.           
  1521.                /*
  1522.                 * Now we indicate the maximum length of the string to output
  1523.                */
  1524.           
  1525.                  10,
  1526.           
  1527.                /* Now the foreground and background color of the string.
  1528.                 * Note, if the string is shorter than the maximum length
  1529.                 * The function pads spaces to the end.
  1530.                */
  1531.           
  1532.                  WHITE, BLUE, 
  1533.           
  1534.                /*
  1535.  
  1536.  
  1537.  
  1538.                                        - 18 -
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.           Window Pro v. 1.2                                Shareware Manual
  1545.  
  1546.  
  1547.  
  1548.                 * And finally, the string to output.
  1549.                */
  1550.           
  1551.                  "WINDOW PRO");
  1552.           
  1553.                /*
  1554.                 * More simply put:
  1555.                 * vs_puts(window_handle,0,1,1,10,WHITE,BLUE,"WINDOW PRO");
  1556.                */
  1557.           
  1558.                /*
  1559.                 * However, before anything happens on the screen we need to
  1560.                 * open it.
  1561.                */
  1562.           
  1563.                  wn_openw(window_handle);
  1564.           
  1565.                /*
  1566.                 * That's it:
  1567.           
  1568.                ***********************************************************
  1569.                * {                                                       *
  1570.                * wn_init();                                              * 
  1571.                *                                                         *
  1572.                * window_handle =                                         *
  1573.                * wn_createw(25,80,2,3,1,1,5,10,FALSE,HEAD_ON,NULL,NULL); *
  1574.                *                                                         *
  1575.                * vs_puts(window_handle,0,1,1,10,WHITE,BLUE,              *
  1576.                * "WINDOW PRO");                                          *
  1577.                *                                                         * 
  1578.                * wn_openw(window_handle);                                *
  1579.                * }                                                       *
  1580.                ***********************************************************
  1581.           
  1582.           } 
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.                                        - 19 -
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.           Window Pro v. 1.2                                Shareware Manual
  1612.  
  1613.  
  1614.  
  1615.           XII.  Reference
  1616.           
  1617.           A. Overview
  1618.           
  1619.           WINDOW PRO classifies its functions into five groupings:
  1620.           
  1621.              . Windows (and tiles)
  1622.              . Virtual screens
  1623.              . Video
  1624.              . Kernel
  1625.              . Keyboard and mouse
  1626.              
  1627.           The kernel functions are not documented in the shareware manual. 
  1628.           You really shouldn't use them until you have gained considerable
  1629.           experience with WINDOW PRO.  They can be useful for tweaking a
  1630.           bit of extra speed, or reducing code size.
  1631.           
  1632.           The windows and tile functions deal with changing the window
  1633.           sizes, positions on the physical screen, border characters,
  1634.           border styles, etc.
  1635.           
  1636.           The virtual screen functions manipulate the virtual screens. 
  1637.           They allow you to print to a virtual screen, erase areas, etc.
  1638.           
  1639.           The video functions let you change cursor shapes, sense video
  1640.           cards, set video modes, for IBM-PC and compatibles.
  1641.           
  1642.           The mouse and keyboard functions provide extended keyboard
  1643.           support (so you can, for example, distinguish between the grey
  1644.           and white '+' key) and functions for reporting on mouse activity,
  1645.           limiting where it can roam, etc.
  1646.           
  1647.           The following is a laundry list of the types of functions you can
  1648.           find in each general area.  It is not a complete list but it will
  1649.           give you a feel for where you might find functions and helps
  1650.           demonstrate the breadth of functionality encompassed by WINDOW
  1651.           PRO.
  1652.           
  1653.           
  1654.           WINDOWS AND TILES:
  1655.           
  1656.                INITIALIZE WINDOW PRO --  initializes various variables  and
  1657.                allocates memory for various structures.  
  1658.                
  1659.                CREATE a window -- sets up a window in memory and defines a
  1660.                virtual screen.  
  1661.                
  1662.                OPEN a window -- puts a previously created window on top of
  1663.                the display list.  
  1664.                
  1665.                CLOSE a window -- removes a window from the display list.  
  1666.                
  1667.                DELETE a window -- removes a window from memory.  
  1668.                
  1669.  
  1670.  
  1671.  
  1672.                                        - 20 -
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.           Window Pro v. 1.2                                Shareware Manual
  1679.  
  1680.  
  1681.  
  1682.                HIDE a window -- suppresses the display of a window, but
  1683.                keeps its position in the display list.  
  1684.                
  1685.                ACTIVATE a window -- temporarily places a window on top of
  1686.                the display list, any previously active window is reinserted
  1687.                into its original location in the display list.  
  1688.                
  1689.                MOVE a window -- changes the position of a window on the
  1690.                physical screen relative to its current position.  
  1691.                
  1692.                LOCATE a window -- changes the position of a window on the
  1693.                physical screen to an absolute position.  
  1694.                
  1695.                BORDERS  -- Each window can have its own unique border
  1696.                characters, decided by you.  This is useful for
  1697.                distinguishing between different types of windows on the
  1698.                screen, for example menus, dialog boxes, and editing
  1699.                windows.  You can also determine a border style such as
  1700.                NORMAL, BORDERLESS, or SHADED.  Shaded borders provide you
  1701.                with several types of shadow effects.  You can determine the
  1702.                color of the border characters.  
  1703.                
  1704.                SIZE a window -- changes the size of a window relative to
  1705.                its current position.  
  1706.                
  1707.                RANGE -- virtually every function has a range oriented
  1708.                version. This allows you to define groups of windows and
  1709.                then move or size them as a group.  This is really handy
  1710.                when developing applications where an object on the screen
  1711.                is made up of a several overlapping windows, for example a
  1712.                pop-up calculator might be programmed in this way.  
  1713.                
  1714.                NAME a window -- a window can be given a name which is
  1715.                displayed in its borders.  
  1716.                
  1717.                SUSPEND a window -- operations performed on a suspended
  1718.                window are not displayed on the screen (the window is
  1719.                frozen.)  When the window is un-suspended the result of all
  1720.                the operations performed are "flashed" on the screen at
  1721.                once.  
  1722.                
  1723.                FREEZE and DEFROST the system -- If the entire system is
  1724.                "frozen" absolutely no operation is reflected on the
  1725.                screen.  "defrosting" the screen "flashes" all of the
  1726.                changes on he screen at once.  
  1727.                
  1728.                ZOOM a window -- the active window can be temporarily
  1729.                increased in size, and then un-zoomed back to its original
  1730.                size.  
  1731.                
  1732.                CREATE a tile -- sets up additional virtual screens
  1733.                associated with a window in memory.  
  1734.                
  1735.  
  1736.  
  1737.  
  1738.  
  1739.                                        - 21 -
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.           Window Pro v. 1.2                                Shareware Manual
  1746.  
  1747.  
  1748.  
  1749.                OPEN a tile -- inserts a tile below the currently active
  1750.                tile in a window.  
  1751.                
  1752.                CLOSE a tile -- removes a tile from the tile display list.  
  1753.                
  1754.                DELETE a tile -- removes a tile from memory.  
  1755.                
  1756.                SIZE a tile -- changes the size of tile relative to its
  1757.                current size.  
  1758.                
  1759.                NAME a tile -- a tile can be given a name which is displayed
  1760.                in its borders.  
  1761.                
  1762.                SUSPEND a tile -- similar to suspending a window described
  1763.                above.  
  1764.                
  1765.                
  1766.           VIRTUAL SCREEN FUNCTIONS: 
  1767.           
  1768.                PRINTF -- you can output to any virtual screen using a
  1769.                windows-type printf which operates pretty much like regular
  1770.                old printf, except that you can define background and
  1771.                foreground attributes.  
  1772.                
  1773.                GETS -- you can collect input inside of windows using a
  1774.                windows-type gets.  It is similar to regular gets but allows
  1775.                for the definition of character colors, and scrolling
  1776.                methods.  
  1777.                
  1778.                FILL -- you can fill any defined region in a virtual screen
  1779.                with a character and attribute (great for erasing parts of
  1780.                virtual screens)or with just an attribute (works well for
  1781.                highlighting and dehighlighting words, etc.) 
  1782.                
  1783.                CURSOR -- Every virtual screen has its own cursor position. 
  1784.                You can move it to any position you like.  
  1785.                
  1786.                SCROLL -- Because a virtual screen may actually be larger
  1787.                than the window that displays it you can define what part of
  1788.                the virtual screen is displayed in the window/tile.  This
  1789.                can be used to create scrolling effects.  
  1790.                
  1791.                
  1792.           VIDEO FUNCTIONS:
  1793.           
  1794.                CURSOR SHAPE -- you can define the shape of the cursor.  
  1795.                
  1796.                CURSOR LOCATION -- moves the cursor to any location on the
  1797.                screen.  
  1798.                
  1799.                PUTC -- output a character and attribute to any location on
  1800.                the screen.  
  1801.                
  1802.  
  1803.  
  1804.  
  1805.  
  1806.                                        - 22 -
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.           Window Pro v. 1.2                                Shareware Manual
  1813.  
  1814.  
  1815.  
  1816.                SAVE/RESTORE SCREEN -- you can save any screen and use it as
  1817.                a backdrop behind your windows display.  This is useful for
  1818.                creating background screens, or in pop-up programs which
  1819.                need to restore the screen to its state prior to be
  1820.                "popped-up." 
  1821.                
  1822.                
  1823.           KEYBOARD and MOUSE FUNCTIONS:
  1824.           
  1825.                EXTENDED KEYBOARD GETCH -- returns a full integer value
  1826.                giving a scan code and ascii value.  This will let you
  1827.                distinguish between say the grey + and the white + key.  
  1828.                
  1829.                MOUSE EXISTENCE -- tells you if a MICROSOFT compatible mouse
  1830.                is installed.  
  1831.                
  1832.                MOUSE STATUS -- tells you if a button was pressed and where
  1833.                the mouse is on the screen.  
  1834.                
  1835.                MOUSE MOTION -- tells you how far the mouse has traveled and
  1836.                in what direction since you last checked its motion
  1837.                indicators.  
  1838.                
  1839.                MOUSE PRESSED/RELEASED -- tells you is button was pressed or
  1840.                released and where the mouse was located at the time of the
  1841.                event.  
  1842.                
  1843.                MOUSE CLICKS -- reports on typical macro-type mouse events
  1844.                typically used in a mouse interface, e.g. clicks,
  1845.                double-clicks, releases, and presses.
  1846.                
  1847.                MOUSE CURSOR -- you can control the style of the mouse
  1848.                cursor and turn it on and off at will.  
  1849.                
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.                                        - 23 -
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.           Window Pro v. 1.2                                Shareware Manual
  1880.  
  1881.  
  1882.  
  1883.           B. Keyboard and Mouse Functions
  1884.           
  1885.           1.  kb_getshift
  1886.           
  1887.           Summary
  1888.           
  1889.           #include "keyboard.h"
  1890.           
  1891.           unsigned int v_getshift();
  1892.           
  1893.           
  1894.           Description
  1895.           
  1896.           Returns an integer where each bit returns the following
  1897.           information:
  1898.           
  1899.           15        Insert; active=1; inactive=0
  1900.           14        Caps Lock; active=1; inactive=0
  1901.           13        Num Lock; active=1; inactive=0
  1902.           12        Scroll Lock; active=1; inactive=0
  1903.           11        Alt Shift; active=1; inactive=0
  1904.           10        Ctrl Shift; active=1; inactive=0
  1905.           9         Normal Left Shift; active=1; inactive=0
  1906.           8         Normal Right Shift; active=1; inactive=0
  1907.           7         Ins; depressed=1
  1908.           6         Caps Lock; depressed=1
  1909.           5         Num Lock; depressed=1
  1910.           4         Scroll Lock; depressed=1
  1911.           3         Hold State Active=1
  1912.           2         PC Jr keyboard click active=1
  1913.           1         Not Used
  1914.           0         Not Used
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.                                        - 24 -
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.           Window Pro v. 1.2                                Shareware Manual
  1947.  
  1948.  
  1949.  
  1950.           2.  kb_getxc
  1951.           
  1952.           Summary
  1953.           
  1954.           #include "keyboard.h"
  1955.           
  1956.           unsigned int kb_getshift();
  1957.           
  1958.           
  1959.           Description
  1960.           
  1961.           Returns a single unsigned integer where the upper byte is the
  1962.           scan code (see the IBM technical reference manual -- each
  1963.           physical key has a scan code assigned) and the lower byte is the
  1964.           ascii code (0 if no ascii code.)
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.                                        - 25 -
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.           Window Pro v. 1.2                                Shareware Manual
  2014.  
  2015.  
  2016.  
  2017.           3.  kb_hidemouse
  2018.           
  2019.           Summary
  2020.           
  2021.           #include "mouse.h"
  2022.           
  2023.           void kb_hidemouse()
  2024.           
  2025.           
  2026.           Description
  2027.           
  2028.           Turns off the mouse cursor.
  2029.           
  2030.           
  2031.           Returns
  2032.           
  2033.           None.
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.                                        - 26 -
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.           Window Pro v. 1.2                                Shareware Manual
  2081.  
  2082.  
  2083.  
  2084.           4.  kb_ismouse
  2085.           
  2086.           Summary
  2087.           
  2088.           #include "mouse.h"
  2089.           
  2090.           int kb_ismouse()
  2091.           
  2092.           
  2093.           Description
  2094.           
  2095.           Returns TRUE if a Microsoft compatible mouse is installed,
  2096.           otherwise it returns FALSE.  Resets the mouse internal registers.
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.                                        - 27 -
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.           Window Pro v. 1.2                                Shareware Manual
  2148.  
  2149.  
  2150.  
  2151.           5.  kb_mouseclicks
  2152.           
  2153.           Summary
  2154.           
  2155.           #include "mouse.h"
  2156.           
  2157.           void kb_mouseclicks(button, timeout, x, y)
  2158.           int button, timeout, *x, *y;
  2159.           
  2160.           
  2161.           Description
  2162.           
  2163.           kb_mouseclicks can interpret things like clicks, double-clicks,
  2164.           presses and releases.  On calling kb_mouseclicks you pass it the
  2165.           button of interest in 'button'  and a timeout value in 'timeout.'
  2166.           
  2167.           button = 1, left
  2168.           button = 2, right
  2169.           button = 3, both
  2170.           
  2171.           The timeout value represents the number of iterations that
  2172.           kb_mouseclicks will make through its main loop without sensing
  2173.           button activity -- triggering a return to the calling function. 
  2174.           Although this number is processor dependent there doesn't seem to
  2175.           be a noticeable difference between a PC and an 8mhz AT.  Until we
  2176.           make it processor independent you might consider reading the BIOS
  2177.           for the machine type and estimating a good number that way, or
  2178.           you might choose a good median number and let the user adjust
  2179.           it.  Anyway, 150 - 400 seems to be a good figure.
  2180.           
  2181.           Also, if there are any keys in the buffer or if any keys put in
  2182.           the keyboard buffer during kb_mouseclicks, kb_mouseclicks will
  2183.           terminate early and not report on any interim mouse events.  This
  2184.           works pretty well in practice because typically you'll want to
  2185.           stick kb_mouseclicks in the main command loop.  If every call to
  2186.           kb_mouseclicks results in a wait for timeout then keyboard entry
  2187.           slows down considerably.
  2188.           
  2189.           the mouse cursor location as of the last button event is returned
  2190.           in x, y.
  2191.           
  2192.           
  2193.           Returns
  2194.           
  2195.           DOUBLECLICK         interpreted a double-click
  2196.           CLICK               interpreted a click
  2197.           PRESS               interpreted a button press
  2198.           HOLDING             user continues to hold a button after a
  2199.                               reported button press
  2200.           RELEASE             interpreted a button release
  2201.           UNKNOWN             no activity, or unknown activity
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.                                        - 28 -
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.           Window Pro v. 1.2                                Shareware Manual
  2215.  
  2216.  
  2217.  
  2218.           6.  kb_mousemickeys
  2219.           
  2220.           Summary
  2221.           
  2222.           #include "mouse.h"
  2223.           
  2224.           void kb_mousemickeys(x, y)
  2225.           int x, y;
  2226.           
  2227.           
  2228.           Description
  2229.           
  2230.           Allows you to reset the mouse sensitivity.  The default vertical
  2231.           ratio is about one pixel for every 2 mickeys, the horizontal
  2232.           ratio is 1 to 1.  Set x to the desired number of mickeys per 8
  2233.                                 x                                       
  2234.           pixels for horizontal movement, and y for vertical movement.
  2235.                                               y                       
  2236.           
  2237.           
  2238.           Returns
  2239.           
  2240.           None.
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.                                        - 29 -
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.           Window Pro v. 1.2                                Shareware Manual
  2284.  
  2285.  
  2286.  
  2287.           7.  kb_mousemotion
  2288.           
  2289.           Summary
  2290.           
  2291.           #include "mouse.h"
  2292.           
  2293.           void kb_mousemotion(xcounter, ycounter)
  2294.           int *xcounter, *ycounter;
  2295.           
  2296.           
  2297.           Description
  2298.           
  2299.           Keeps a raw tally of mouse motion measured in mickeys (there are
  2300.           about 200 mickeys to the inch)  since the last call.  There
  2301.           doesn't seem to be a lot of use for this.  However, it is
  2302.           documented in the Microsoft Mouse Programmers Reference Manual
  2303.           and for the sake of completeness it is available to you.
  2304.           
  2305.           
  2306.           Returns
  2307.           
  2308.           None.
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.                                        - 30 -
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.           Window Pro v. 1.2                                Shareware Manual
  2351.  
  2352.  
  2353.  
  2354.           8.  kb_mousepressed
  2355.           
  2356.           Summary
  2357.           
  2358.           #include "mouse.h"
  2359.           
  2360.           void kb_mousepressed(m1, m2, m3, m4)
  2361.           int *m1, *m2, *m3, *m4;
  2362.           
  2363.           
  2364.           Description
  2365.           
  2366.           Set m1 to the value of the button of interest (1=left, 2=right,
  2367.           3=both).  The function returns in m1 the current state of the
  2368.           buttons.  In m2 it indicates the number of times the buttons
  2369.           (indicated in m1 on input) have been pressed since the last call
  2370.           to this function. m3 (x coordinate) and m4 (y coordinate)
  2371.           indicate the position of the mouse cursor on the last press.
  2372.           
  2373.           
  2374.           Returns
  2375.           
  2376.           None.
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.                                        - 31 -
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.           Window Pro v. 1.2                                Shareware Manual
  2418.  
  2419.  
  2420.  
  2421.           9.  kb_mousereleased
  2422.           
  2423.           Summary
  2424.           
  2425.           #include "mouse.h"
  2426.           
  2427.           void kb_mousereleased(m1, m2, m3, m4)
  2428.           int *m1, *m2, *m3, *m4;
  2429.           
  2430.           
  2431.           Description
  2432.           
  2433.           Operates identically to kb_mousepressed, but for releases.
  2434.                                   kb mousepressed                   
  2435.           
  2436.           
  2437.           Returns
  2438.           
  2439.           None.
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.                                        - 32 -
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.           Window Pro v. 1.2                                Shareware Manual
  2486.  
  2487.  
  2488.  
  2489.           10. kb_mousestatus
  2490.           
  2491.           Summary
  2492.           
  2493.           #include "mouse.h"
  2494.           
  2495.           void kb_mousestatus(m2, m3, m4)
  2496.           int *m2, *m3, *m4;
  2497.           
  2498.           
  2499.           Description
  2500.           
  2501.           The status of the mouse buttons is returned in m2:  1 if the left
  2502.           button is pressed, 2 if the right button is pressed and 3 if both
  2503.           buttons are pressed.
  2504.           
  2505.           The current mouse cursor x position is returned in m3, in the
  2506.           range 0 to 640.  The current mouse cursor y position is returned
  2507.           in m4, in the range 0 to 200.  It is up to you to convert these
  2508.           to character positions.  Remember the physical screen coordinate
  2509.           system starts with 1,1 not 0,0.
  2510.           
  2511.           
  2512.           Returns
  2513.           
  2514.           None.
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.                                        - 33 -
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.           Window Pro v. 1.2                                Shareware Manual
  2553.  
  2554.  
  2555.  
  2556.           11. kb_putmouse
  2557.           
  2558.           Summary
  2559.           
  2560.           #include "mouse.h"
  2561.           
  2562.           void kb_putmouse(x, y)
  2563.           int x, y;
  2564.           
  2565.           
  2566.           Description
  2567.           
  2568.           Places the mouse cursor at the location specified by x, y.  See
  2569.                                                                x  y      
  2570.           kb_mousestatus for an explanation of the mouse cursor coordinate
  2571.           kb mousestatus                                                  
  2572.           system.
  2573.           
  2574.           
  2575.           Returns
  2576.           
  2577.           None.
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.                                        - 34 -
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.           Window Pro v. 1.2                                Shareware Manual
  2622.  
  2623.  
  2624.  
  2625.           12. kb_resetmouse
  2626.           
  2627.           Summary
  2628.           
  2629.           #include "mouse.h"
  2630.           
  2631.           void kb_resetmouse()
  2632.           
  2633.           
  2634.           Description
  2635.           
  2636.           Resets various internal registers, cursor positions, etc.  
  2637.           
  2638.           
  2639.           Returns
  2640.           
  2641.           None.
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.                                        - 35 -
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.           Window Pro v. 1.2                                Shareware Manual
  2689.  
  2690.  
  2691.  
  2692.           13. kb_setgraphicsicon
  2693.           
  2694.           Summary
  2695.           
  2696.           #include "mouse.h"
  2697.           
  2698.           void kb_setgraphicsicon()
  2699.           
  2700.           
  2701.           Read the MICROSOFT MOUSE PROGRAMMERS MANUAL.  Applicable to
  2702.           WINDOW PRO only when using the IBM PC graphics mode (available
  2703.           under The WINDOW PRO, but requires use of the BIOS screen update
  2704.           method.)
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.                                        - 36 -
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.           Window Pro v. 1.2                                Shareware Manual
  2756.  
  2757.  
  2758.  
  2759.           14. kb_setmousexrange
  2760.           
  2761.           Summary
  2762.           
  2763.           #include "mouse.h"
  2764.           
  2765.           void kb_setmousexrange(min, max)
  2766.           int min, max;
  2767.           
  2768.           
  2769.           Description
  2770.           
  2771.           Limits the columns in which the mouse cursor can roam.  See
  2772.           kb_mousestatus for an explanation of the mouse coordinate system.
  2773.           kb mousestatus                                                   
  2774.           
  2775.           
  2776.           Returns
  2777.           
  2778.           None.
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.                                        - 37 -
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.           Window Pro v. 1.2                                Shareware Manual
  2824.  
  2825.  
  2826.  
  2827.           15. kb_setmouseyrange
  2828.           
  2829.           Summary
  2830.           
  2831.           #include "mouse.h"
  2832.           
  2833.           void kb_setmouseyrange(min, max)
  2834.           int min, max;
  2835.           
  2836.           
  2837.           Description
  2838.           
  2839.           Limits the rows in which the mouse cursor can roam.  See
  2840.           kb_mousestatus for an explanation of the mouse coordinate system.
  2841.           kb mousestatus                                                   
  2842.           
  2843.           
  2844.           Returns
  2845.           
  2846.           None.
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.                                        - 38 -
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.           Window Pro v. 1.2                                Shareware Manual
  2892.  
  2893.  
  2894.  
  2895.           16. kb_settextcursor
  2896.           
  2897.           Summary
  2898.           
  2899.           #include "mouse.h"
  2900.           
  2901.           void kb_settextcursor(cursor_type, start, stop)
  2902.           int cursor_type, start, stop;
  2903.           
  2904.           
  2905.           Description
  2906.           
  2907.           Set cursor_type to 0 to select the software cursor and set
  2908.           cursor_type to 1 to select the hardware text cursor.  The
  2909.           software cursor is the default setting.  If the hardware cursor
  2910.           is selected start, stop represent the beginning and ending scan
  2911.                       start  stop                                        
  2912.           lines for the cursor shape.
  2913.           
  2914.           
  2915.           Returns
  2916.           
  2917.           None.
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.                                        - 39 -
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.           Window Pro v. 1.2                                Shareware Manual
  2960.  
  2961.  
  2962.  
  2963.           17. kb_showmouse
  2964.           
  2965.           Summary
  2966.           
  2967.           #include "mouse.h"
  2968.           
  2969.           void kb_showmouse()
  2970.           
  2971.           
  2972.           Description
  2973.           
  2974.           Turns on the mouse cursor.
  2975.           
  2976.           
  2977.           Returns
  2978.           
  2979.           None.
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.                                        - 40 -
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.           Window Pro v. 1.2                                Shareware Manual
  3027.  
  3028.  
  3029.  
  3030.           C. Video Functions
  3031.           
  3032.           1. v_curshape
  3033.           
  3034.           Summary
  3035.           
  3036.           #include "werrors.h"
  3037.           #include "video.h"
  3038.           
  3039.           void v_curshape(start, end);
  3040.           char start, end;
  3041.           
  3042.           
  3043.           Description
  3044.           
  3045.           Changes the shape of an IBM-PC cursor where start is the
  3046.                                                       start       
  3047.           beginning scan line and end is the ending scan line.
  3048.                                   end                         
  3049.           
  3050.           
  3051.           Returns
  3052.           
  3053.           None
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.                                        - 41 -
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.           Window Pro v. 1.2                                Shareware Manual
  3096.  
  3097.  
  3098.  
  3099.           2. v_cursor_report
  3100.           
  3101.           Summary
  3102.           
  3103.           #include "video.h"
  3104.           
  3105.           int v_cursor_report(x, y, b, e);
  3106.           unsigned int *x, *y, *b, *e;
  3107.           
  3108.           
  3109.           Description
  3110.           
  3111.           Returns the cursor column in x, the cursor row in y, the starting
  3112.           scan line in b, and the ending scan line in e.  The global
  3113.           variable vpage must be set to the correct video page number. 
  3114.           This is done automatically in wn_init.  But you can also obtain
  3115.           the current video page via v_getpage.
  3116.           
  3117.           
  3118.           Returns
  3119.           
  3120.           None.
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.                                        - 42 -
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.           Window Pro v. 1.2                                Shareware Manual
  3163.  
  3164.  
  3165.  
  3166.           3. v_getchar
  3167.           
  3168.           Summary
  3169.           
  3170.           #include "werrors.h"
  3171.           #include "video.h"
  3172.           
  3173.           int v_getchar(x, y);
  3174.           int x, y;
  3175.           
  3176.           
  3177.           Description
  3178.           
  3179.           Uses the IBM-PC BIOS to read the character at the coordinate x,y,
  3180.           where the upper left corner of the screen is 1,1.
  3181.           
  3182.           
  3183.           Returns
  3184.           
  3185.           Returns the value of the character in the low byte and the
  3186.           attribute value in the high byte.
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.                                        - 43 -
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.           Window Pro v. 1.2                                Shareware Manual
  3230.  
  3231.  
  3232.  
  3233.           4. v_getmode
  3234.           
  3235.           Summary
  3236.           
  3237.           #include "werrors.h"
  3238.           #include "video.h"
  3239.           
  3240.           int v_getmode();
  3241.           
  3242.           
  3243.           Description
  3244.           
  3245.           Returns the video mode of an IBM-PC or compatible.  The video
  3246.           modes are defined in vidmodes.h
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.                                        - 44 -
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.           Window Pro v. 1.2                                Shareware Manual
  3297.  
  3298.  
  3299.  
  3300.           5. v_getpage
  3301.           
  3302.           Summary
  3303.           
  3304.           #include "werrors.h"
  3305.           #include "video.h"
  3306.           
  3307.           int v_getpage();
  3308.           
  3309.           
  3310.           Description
  3311.           
  3312.           Returns the current video page.
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.                                        - 45 -
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.           Window Pro v. 1.2                                Shareware Manual
  3364.  
  3365.  
  3366.  
  3367.           6. v_getwidth
  3368.           
  3369.           Summary
  3370.           
  3371.           #include "werrors.h"
  3372.           #include "video.h"
  3373.           
  3374.           int v_getwidth();
  3375.           
  3376.           
  3377.           Description
  3378.           
  3379.           Returns the width in characters for the current video mode.
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.                                        - 46 -
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.           Window Pro v. 1.2                                Shareware Manual
  3431.  
  3432.  
  3433.  
  3434.           7. v_gotoxy
  3435.           
  3436.           Summary
  3437.           
  3438.           #include "werrors.h"
  3439.           #include "video.h"
  3440.           
  3441.           void v_gotoxy(x, y);
  3442.           int x, y;
  3443.           
  3444.           
  3445.           Description
  3446.           
  3447.           Positions the hardware cursor at location x,y where the upper
  3448.           left corner of the screen is 0,0.  If the global variable method
  3449.                                                                     method
  3450.           = ANSI it uses the ANSI method of repositioning the hardware
  3451.             ANSI                                                      
  3452.           cursor.  Otherwise it uses the IBM-PC BIOS method.
  3453.           
  3454.           
  3455.           Returns
  3456.           
  3457.           None
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.                                        - 47 -
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.           Window Pro v. 1.2                                Shareware Manual
  3500.  
  3501.  
  3502.  
  3503.           8. v_putchar
  3504.           
  3505.           Summary
  3506.           
  3507.           #include "werrors.h"
  3508.           #include "video.h"
  3509.           
  3510.           int v_putchar(x, y, character, attribute);
  3511.           int x, y;
  3512.           char character, attribute;
  3513.           
  3514.           
  3515.           Description
  3516.           
  3517.           Puts a character on the physical screen at the coordinate (x,y)
  3518.           where (1,1) is the upper left corner of the screen.  No range
  3519.           checking is performed.  Uses IBM-PC specific BIOS calls.
  3520.           
  3521.           
  3522.           Returns
  3523.           
  3524.           None
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.                                        - 48 -
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.           Window Pro v. 1.2                                Shareware Manual
  3567.  
  3568.  
  3569.  
  3570.           9. v_setmode
  3571.           
  3572.           Summary
  3573.           
  3574.           #include "werrors.h"
  3575.           #include "video.h"
  3576.           
  3577.           int v_setmode(vid_mode);
  3578.           char vid_mode;
  3579.           
  3580.           
  3581.           Description
  3582.           
  3583.           Sets the video mode of an IBM-PC or compatible.  The video modes
  3584.           are defined in vidmodes.h
  3585.           
  3586.           
  3587.           Returns
  3588.           
  3589.           BAD_PARAMS          vid_mode was not one the modes defined in
  3590.                               vid_mode                                 
  3591.                               "vidmodes.h."
  3592.           
  3593.           OK                  No errors.
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.                                        - 49 -
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.           Window Pro v. 1.2                                Shareware Manual
  3635.  
  3636.  
  3637.  
  3638.           D. Virtual Screen Functions
  3639.           
  3640.           1.  vs_clr*
  3641.           
  3642.           a. vs_clrvs
  3643.           
  3644.           #include "werrors.h"
  3645.           #include "vs.h"
  3646.           
  3647.           int vs_clrvs(handle, tile_handle, foreground, background)
  3648.           unsigned int handle;
  3649.           unsigned char tile_handle, foreground, background;
  3650.           
  3651.           Erases an entire virtual screen defined by (handle,
  3652.           tile_handle.)  The resulting screen is blank and of color
  3653.           foreground, background.
  3654.           
  3655.           See fill_char for return values.
  3656.               fill char                   
  3657.           
  3658.           
  3659.           b. vs_clrbol
  3660.           
  3661.           #include "werrors.h"
  3662.           #include "vs.h"
  3663.           
  3664.           int vs_clrbol(handle, tile_handle, foreground, background)
  3665.           unsigned int handle;
  3666.           unsigned char tile_handle, foreground, background;
  3667.           
  3668.           Erases from the tile's logical cursor position to the beginning
  3669.           of the line, erased portion has the color of foreground,
  3670.                                                        foreground 
  3671.           background.
  3672.           background 
  3673.           
  3674.           See fill_char for return values.
  3675.               fill char                   
  3676.           
  3677.           
  3678.           c. vs_clreol
  3679.           
  3680.           #include "werrors.h"
  3681.           #include "vs.h"
  3682.           
  3683.           int vs_clreol(handle, tile_handle, foreground, background)
  3684.           unsigned int handle;
  3685.           unsigned char tile_handle, foreground, background;
  3686.           
  3687.           Erases from the tile's logical cursor position to the end of the
  3688.           line, erased portion has the color of foreground, background.
  3689.                                                 foreground  background 
  3690.           
  3691.           See fill_char for return values.
  3692.               fill char                   
  3693.           
  3694.           
  3695.           d. vs_clrtoend
  3696.           
  3697.           #include "werrors.h"
  3698.  
  3699.  
  3700.  
  3701.                                        - 50 -
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.           Window Pro v. 1.2                                Shareware Manual
  3708.  
  3709.  
  3710.  
  3711.           #include "vs.h"
  3712.           
  3713.           int vs_clrtoend(handle, tile_handle, foreground, background)
  3714.           unsigned int handle;
  3715.           unsigned char tile_handle, foreground, background;
  3716.           
  3717.           Erases from the tile's logical cursor position to the end of the
  3718.           virtual screen, erased portion has the color of foreground,
  3719.                                                           foreground 
  3720.           background.
  3721.           background 
  3722.           
  3723.           See fill_char for return values.
  3724.               fill char                   
  3725.  
  3726.  
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.                                        - 51 -
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.           Window Pro v. 1.2                                Shareware Manual
  3778.  
  3779.  
  3780.  
  3781.           2.  vs_delcolumn
  3782.           
  3783.           Summary
  3784.           
  3785.           #include "werrors.h"
  3786.           #include "vs.h"
  3787.           
  3788.           int vs_delcolumn(handle, tile_handle, x1, y1, x2, y2, vs_columns,
  3789.                          foreground, background)
  3790.           unsigned int handle;
  3791.           unsigned char tile_handle, foreground, background;
  3792.           int x1, y1, x2, y2, vs_columns;
  3793.           
  3794.           
  3795.           Description
  3796.           
  3797.           (x1,y1) and (x2,y2) define the upper left and lower right corners
  3798.           of a rectangular region in a virtual screen (handle,
  3799.           tile_handle.)  The function deletes vs_columns columns on the
  3800.           left side of this rectangle and scrolls all rows to the left,
  3801.           inserting blank columns on the right side of the region.  The new
  3802.           columns have the color defined by foreground, background.
  3803.           
  3804.           
  3805.           Returns
  3806.           
  3807.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  3808.                                   handle                                 
  3809.                               was probably not initialized via wn_createw,
  3810.                                                                wn createw 
  3811.                               but may have been corrupted.
  3812.           
  3813.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  3814.                                   tile handle                              
  3815.                               it was probably not properly initialized via
  3816.                               a call to wn_createt, but may also have been
  3817.                                         wn createt                        
  3818.                               corrupted.
  3819.           
  3820.           BAD_PARAMS          x1,y1 & x2,y2 did not represent an upper left
  3821.                               and lower right coordinate or were not within
  3822.                               the virtual screen.
  3823.           
  3824.           OK                  No errors detected.
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841.  
  3842.                                        - 52 -
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.           Window Pro v. 1.2                                Shareware Manual
  3849.  
  3850.  
  3851.  
  3852.           3.  vs_delrow
  3853.           
  3854.           Summary
  3855.           
  3856.           #include "werrors.h"
  3857.           #include "vs.h"
  3858.           
  3859.           int vs_delrow(handle, tile_handle, x1, y1, x2, y2, vs_rows,
  3860.                          foreground, background)
  3861.           unsigned int handle;
  3862.           unsigned char tile_handle, foreground, background;
  3863.           int x1, y1, x2, y2, vs_rows;
  3864.           
  3865.           
  3866.           Description
  3867.           
  3868.           (x1,y1) and (x2,y2) define the upper left and lower right corners
  3869.           of a rectangular region in a virtual screen (handle,
  3870.           tile_handle.)  The function deletes vs_rows rows from the top of
  3871.           the rectangle and scrolls all rows up, inserting blank rows at
  3872.           the bottom of the region.  The new rows have the color defined by
  3873.           foreground, background.
  3874.           
  3875.           
  3876.           Returns
  3877.           
  3878.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  3879.                                   handle                                 
  3880.                               was probably not initialized via wn_createw,
  3881.                                                                wn createw 
  3882.                               but may have been corrupted.
  3883.           
  3884.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  3885.                                   tile handle                              
  3886.                               it was probably not properly initialized via
  3887.                               a call to wn_createt, but may also have been
  3888.                                         wn createt                        
  3889.                               corrupted.
  3890.           
  3891.           BAD_PARAMS          x1,y1 & x2,y2 did not represent an upper left
  3892.                               and lower right coordinate or were not within
  3893.                               the virtual screen.
  3894.           
  3895.           OK                  No errors detected.
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.  
  3902.  
  3903.  
  3904.  
  3905.  
  3906.  
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.  
  3913.                                        - 53 -
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.           Window Pro v. 1.2                                Shareware Manual
  3920.  
  3921.  
  3922.  
  3923.           4.  vs_fillattr
  3924.           
  3925.           Summary
  3926.           
  3927.           #include "werrors.h"
  3928.           #include "vs.h"
  3929.           
  3930.           int vs_fillattr(handle, tile_handle, x1, y1, x2, y2, foreground,
  3931.                          background)
  3932.           unsigned int handle;
  3933.           unsigned char tile_handle, foreground, background;
  3934.           int x1, y1, x2, y2;
  3935.           
  3936.           
  3937.           Description
  3938.           
  3939.           (x1,y1) and (x2,y2) define the upper left and lower right corners
  3940.           of a rectangular region in a virtual screen (handle,
  3941.           tile_handle.)  The function changes the color of all characters
  3942.           in the region to foreground, background.
  3943.           
  3944.           
  3945.           Returns
  3946.           
  3947.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  3948.                                   handle                                 
  3949.                               was probably not initialized via wn_createw,
  3950.                                                                wn createw 
  3951.                               but may have been corrupted.
  3952.           
  3953.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  3954.                                   tile handle                              
  3955.                               it was probably not properly initialized via
  3956.                               a call to wn_createt, but may also have been
  3957.                                         wn createt                        
  3958.                               corrupted.
  3959.           
  3960.           BAD_PARAMS          x1,y1 & x2,y2 did not represent an upper left
  3961.                               and lower right coordinate or were not within
  3962.                               the virtual screen.
  3963.           
  3964.           OK                  No errors detected.
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978.  
  3979.  
  3980.  
  3981.  
  3982.  
  3983.  
  3984.                                        - 54 -
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.           Window Pro v. 1.2                                Shareware Manual
  3991.  
  3992.  
  3993.  
  3994.           5.  vs_fillchar
  3995.           
  3996.           Summary
  3997.           
  3998.           #include "werrors.h"
  3999.           #include "vs.h"
  4000.           
  4001.           int vs_fillchar(handle, tile_handle, x1, y1, x2, y2, character,
  4002.                          foreground, background)
  4003.           unsigned int handle;
  4004.           unsigned char tile_handle, character, foreground, background;
  4005.           int x1, y1, x2, y2;
  4006.           
  4007.           
  4008.           Description
  4009.           
  4010.           (x1,y1) and (x2,y2) define the upper left and lower right corners
  4011.            x1,y1       x2 y2                                               
  4012.           of a rectangular region in a virtual screen (handle,
  4013.           tile_handle.)  The function fills the region with the character
  4014.           'character' and the color (foreground, background.)
  4015.            character                (foreground, background.)
  4016.           
  4017.           
  4018.           Returns
  4019.           
  4020.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4021.                                   handle                                 
  4022.                               was probably not initialized via wn_createw,
  4023.                                                                wn createw 
  4024.                               but may have been corrupted.
  4025.           
  4026.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4027.                                   tile handle                              
  4028.                               it was probably not properly initialized via
  4029.                               a call to wn_createt, but may also have been
  4030.                                         wn createt                        
  4031.                               corrupted.
  4032.           
  4033.           BAD_PARAMS          x1,y1 & x2,y2 did not represent an upper left
  4034.                               and lower right coordinate or were not within
  4035.                               the virtual screen.
  4036.           
  4037.           OK                  No errors detected.
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.                                        - 55 -
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.           Window Pro v. 1.2                                Shareware Manual
  4064.  
  4065.  
  4066.  
  4067.           6.  vs_format
  4068.           
  4069.           Summary
  4070.           
  4071.           #include "werrors.h"
  4072.           #include "vs.h"
  4073.           
  4074.           int vs_format(handle, tile_handle, foreground, background,
  4075.                          string)
  4076.           
  4077.           unsigned int handle;
  4078.           unsigned char tile_handle, foreground, background;
  4079.           char *string;
  4080.           
  4081.           
  4082.           Description
  4083.           
  4084.           This function is an alternative to the vs_printf function which
  4085.           is available only under the Borland WINDOW PRO Library.  Prints a
  4086.           string to the virtual screen defined by {handle, tile_handle},
  4087.                                                    handle  tile_handle  
  4088.           with the video attributes of foreground and background.  TABS are
  4089.                                        foreground     background           
  4090.           expanded, CR/LF is interpreted, long lines automatically wrap to
  4091.           the beginning of the the next line, and the virtual screen
  4092.           automatically scrolls on reaching the bottom of the virtual
  4093.           screen.
  4094.           
  4095.           
  4096.           Returns
  4097.           
  4098.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4099.                               was probably not initialized via wn_createw,
  4100.                               but may have been corrupted.
  4101.           
  4102.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4103.                               it was probably not properly initialized via
  4104.                               a call to wn_createt, but may also have been
  4105.                               corrupted.
  4106.           
  4107.           OK                  No errors detected.
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.                                        - 56 -
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.           Window Pro v. 1.2                                Shareware Manual
  4133.  
  4134.  
  4135.  
  4136.           7.  vs_gets
  4137.           
  4138.           Summary
  4139.           
  4140.           #include "werrors.h"
  4141.           #include "vs.h"
  4142.           
  4143.           int vs_gets(handle, tile_handle, scroll, bufstr, foreground,
  4144.                          background, maxlen)
  4145.           unsigned int handle;
  4146.           unsigned char tile_handle, foreground, background;
  4147.           char scroll, *buffer;
  4148.           int maxlen;
  4149.           
  4150.           
  4151.           Description
  4152.           
  4153.           Retrieves a string from the keyboard.  The string is stored at
  4154.           bufstr and may have a maximum length of maxlen.  The initial
  4155.           bufstr                                  maxlen              
  4156.           cursor position is determined by the tile's {handle, tile_handle}
  4157.           logical cursor position.  If scroll is TRUE the virtual screen
  4158.                                        scroll                           
  4159.           will scroll left or right to keep the cursor on the physical
  4160.           screen.  Otherwise, the user can continue to input but the
  4161.           results of his typing are not seen on the physical screen (when
  4162.           the cursor advances beyond the the displayed area of the virtual
  4163.           screen.)
  4164.           
  4165.           Tabs are not expanded.  Hitting the end of the virtual screen
  4166.           automatically wraps the cursor around to the beginning of the
  4167.           next line.  Terminate wn_gets with a carriage return.  Backspace
  4168.                                 wn_gets                                   
  4169.           deletes the character to the left of the cursor and pulls the
  4170.           cursor back one position.
  4171.           
  4172.           
  4173.           Returns
  4174.           
  4175.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4176.                               was probably not initialized via wn_createw,
  4177.                               but may have been corrupted.
  4178.           
  4179.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4180.                               it was probably not properly initialized via
  4181.                               a call to wn_createt, but may also have been
  4182.                               corrupted.
  4183.           
  4184.           OK                  No errors detected.
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.                                        - 57 -
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.           Window Pro v. 1.2                                Shareware Manual
  4203.  
  4204.  
  4205.  
  4206.           8.  vs_inscolumn
  4207.           
  4208.           Summary
  4209.           
  4210.           #include "werrors.h"
  4211.           #include "vs.h"
  4212.           
  4213.           int vs_inscolumn(handle, tile_handle, x1, y1, x2, y2, vs_columns,
  4214.                          foreground, background)
  4215.           unsigned int handle;
  4216.           unsigned char tile_handle, foreground, background;
  4217.           int x1, y1, x2, y2, vs_columns;
  4218.           
  4219.           
  4220.           Description
  4221.           
  4222.           (x1,y1) and (x2,y2) define the upper left and lower right corners
  4223.           of a rectangular region in a virtual screen (handle,
  4224.           tile_handle.)  The function inserts vs_columns columns on the
  4225.           left side of this rectangle and scrolls all rows to the right,
  4226.           overwriting the rightmost rows in the rectangle.  The new rows
  4227.           have the color defined by foreground, background.
  4228.           
  4229.           
  4230.           Returns
  4231.           
  4232.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4233.                                   handle                                 
  4234.                               was probably not initialized via wn_createw,
  4235.                                                                wn createw 
  4236.                               but may have been corrupted.
  4237.           
  4238.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4239.                                   tile handle                              
  4240.                               it was probably not properly initialized via
  4241.                               a call to wn_createt, but may also have been
  4242.                                         wn createt                        
  4243.                               corrupted.
  4244.           
  4245.           BAD_PARAMS          x1,y1 & x2,y2 did not represent an upper left
  4246.                               and lower right coordinate or were not within
  4247.                               the virtual screen.
  4248.           
  4249.           OK                  No errors detected.
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.                                        - 58 -
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.           Window Pro v. 1.2                                Shareware Manual
  4274.  
  4275.  
  4276.  
  4277.           9.  vs_insrow
  4278.           
  4279.           Summary
  4280.           
  4281.           #include "werrors.h"
  4282.           #include "vs.h"
  4283.           
  4284.           int vs_insrow(handle, tile_handle, x1, y1, x2, y2, vs_rows,
  4285.                          foreground, background)
  4286.           unsigned int handle;
  4287.           unsigned char tile_handle, foreground, background;
  4288.           int x1, y1, x2, y2, vs_rows;
  4289.           
  4290.           
  4291.           Description
  4292.           
  4293.           (x1,y1) and (x2,y2) define the upper left and lower right corners
  4294.           of a rectangular region in a virtual screen (handle,
  4295.           tile_handle.)  The function inserts vs_rows rows at the top of
  4296.           the rectangle and scrolls the lines below down, overwriting the
  4297.           bottom lines in the rectangle.  The new lines have the color
  4298.           defined by foreground, background.
  4299.           
  4300.           
  4301.           Returns
  4302.           
  4303.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4304.                                   handle                                 
  4305.                               was probably not initialized via wn_createw,
  4306.                                                                wn createw 
  4307.                               but may have been corrupted.
  4308.           
  4309.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4310.                                   tile handle                              
  4311.                               it was probably not properly initialized via
  4312.                               a call to wn_createt, but may also have been
  4313.                                         wn createt                        
  4314.                               corrupted.
  4315.           
  4316.           BAD_PARAMS          x1,y1 & x2,y2 did not represent an upper left
  4317.                               and lower right coordinate or were not within
  4318.                               the virtual screen.
  4319.           
  4320.           OK                  No errors detected.
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.                                        - 59 -
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.           Window Pro v. 1.2                                Shareware Manual
  4345.  
  4346.  
  4347.  
  4348.           10. vs_locatecur
  4349.           
  4350.           Summary
  4351.           
  4352.           #include "werrors.h"
  4353.           #include "vs.h"
  4354.           
  4355.           int vs_locatecur(handle, tile_handle, x, y)
  4356.           unsigned int handle, x, y;
  4357.           char tile_handle, ch;
  4358.           
  4359.           
  4360.           Description
  4361.           
  4362.           Positions the tile's (handle, tile_handle) logical cursor at
  4363.                                 handle  tile handle                   
  4364.           coordinate x,y.
  4365.                      x,y 
  4366.           
  4367.           
  4368.           Returns
  4369.           
  4370.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4371.                               was probably not initialized via wn_createw,
  4372.                               but may have been corrupted.
  4373.           
  4374.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4375.                               it was probably not properly initialized via
  4376.                               a call to wn_createt, but may also have been
  4377.                               corrupted.
  4378.           
  4379.           BAD_PARAMS          x, y is not within the virtual screen.
  4380.                               x, y                                  
  4381.           
  4382.           OK                  No errors detected.
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.                                        - 60 -
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.           Window Pro v. 1.2                                Shareware Manual
  4415.  
  4416.  
  4417.  
  4418.           11. vs_printf
  4419.           
  4420.           Summary
  4421.           
  4422.           #include "werrors.h"
  4423.           #include "vs.h"
  4424.           
  4425.           int vs_printf(handle, tile_handle, foreground, background,
  4426.                          format,...)
  4427.           
  4428.           unsigned int handle;
  4429.           unsigned char tile_handle, foreground, background;
  4430.           char *format;
  4431.           
  4432.           
  4433.           Description
  4434.           
  4435.           This function is only available under the Borland Library. 
  4436.           Prints a 'printf-type' formatted string to the virtual screen
  4437.           defined by the {handle, tile_handle}, with the video attributes
  4438.                           handle  tile_handle                            
  4439.           of foreground and background.  The function accepts variable
  4440.              foreground     background                                
  4441.           arguments similar to the standard printf function.
  4442.           
  4443.           
  4444.           Returns
  4445.           
  4446.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4447.                               was probably not initialized via wn_createw,
  4448.                               but may have been corrupted.
  4449.           
  4450.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4451.                               it was probably not properly initialized via
  4452.                               a call to wn_createt, but may also have been
  4453.                               corrupted.
  4454.           
  4455.           OK                  No errors detected.
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.                                        - 61 -
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.           Window Pro v. 1.2                                Shareware Manual
  4484.  
  4485.  
  4486.  
  4487.           12. vs_putc
  4488.           
  4489.           Summary
  4490.           
  4491.           #include "werrors.h"
  4492.           #include "vs.h"
  4493.           
  4494.           int vs_putc(handle, tile_handle, column, row, foreground,
  4495.                          background, ch)
  4496.           unsigned int handle, column, row, foreground, background;
  4497.           unsigned char tile_handle, ch;
  4498.           
  4499.           
  4500.           Description
  4501.           
  4502.           Outputs a character {ch} to the virtual screen defined by
  4503.                                ch                                  
  4504.           {handle, tile_handle} at the position {column, row} with
  4505.            handle, tile_handle                   column, row      
  4506.           attributes of {foreground, background}.  The upper left
  4507.                          foreground, background                  
  4508.           coordinate of a virtual screen is column 1, row 1.
  4509.           
  4510.           Note that this function has no effect on the physical screen if
  4511.           the tile or window is suspended or hidden, or if the point on the
  4512.           virtual screen is obscured on the physical screen.
  4513.           
  4514.           
  4515.           Returns
  4516.           
  4517.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4518.                               was probably not initialized via wn_createw,
  4519.                               but may have been corrupted.
  4520.           
  4521.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4522.                               it was probably not properly initialized via
  4523.                               a call to wn_createt, but may also have been
  4524.                               corrupted.
  4525.           
  4526.           BAD_PARAMS          The column or row is not within the virtual
  4527.                                   column    row                          
  4528.                               screen.
  4529.           
  4530.           OK                  No errors detected.
  4531.           
  4532.           
  4533.           13. vs_puts
  4534.           
  4535.           Summary
  4536.           
  4537.           #include "werrors.h"
  4538.           #include "vs.h"
  4539.           
  4540.           int vs_puts(handle, tile_handle, bcolumn, brow, maxlen,
  4541.                          foreground, background, pass)
  4542.           unsigned int handle, bcolumn, brow, maxlen;
  4543.           unsigned char tile_handle, foreground, background, *pass;
  4544.           
  4545.  
  4546.  
  4547.  
  4548.                                        - 62 -
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.           Window Pro v. 1.2                                Shareware Manual
  4555.  
  4556.  
  4557.  
  4558.           Description
  4559.           
  4560.           Outputs the string pointed to by pass on the virtual screen
  4561.                                            pass                      
  4562.           (handle, tile_handle) starting at the coordinate (bcolumn, brow)
  4563.            handle, tile_handle                              bcolumn  brow 
  4564.           and in the colors designated by foreground and background.  No
  4565.                                           foreground     background     
  4566.           checking is done to make sure that the string doesn't extend
  4567.           beyond the end of the virtual screen and it does not expand tabs
  4568.           or interpret carriage returns.  All characters 1 to 255 are
  4569.           output as defined in the IBM extended character set.
  4570.           
  4571.           
  4572.           Returns
  4573.           
  4574.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  4575.                                   handle                                 
  4576.                               was probably not initialized via wn_createw,
  4577.                                                                wn createw 
  4578.                               but may have been corrupted.
  4579.           
  4580.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  4581.                                   tile handle                              
  4582.                               it was probably not properly initialized via
  4583.                               a call to wn_createt, but may also have been
  4584.                                         wn createt                        
  4585.                               corrupted.
  4586.           
  4587.           OUT_OF_MEMORY       Could not allocate sufficient working space. 
  4588.                               Try breaking the string into smaller pieces.
  4589.           
  4590.           NULL_POINTER        Pass is a null pointer.
  4591.                               Pass                   
  4592.           
  4593.           OK                  No errors detected.
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.                                        - 63 -
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.           Window Pro v. 1.2                                Shareware Manual
  4630.  
  4631.  
  4632.  
  4633.           E. Window and Tile Functions
  4634.           
  4635.           1.  wn_actt
  4636.           
  4637.           Summary
  4638.           
  4639.           #include "werrors.h"
  4640.           #include "Pro.h"
  4641.           
  4642.           int wn_actt(handle, tile_handle)
  4643.           unsigned int handle;
  4644.           unsigned char tile_handle;
  4645.           
  4646.           
  4647.           Description
  4648.           
  4649.           Designates a tile as the active tile.  If another tile is already
  4650.           designated as the active tile, it is un-designated.  If the tile
  4651.           is not open it is first opened via a call to wn_opent.  See
  4652.                                                        wn_opent      
  4653.           wn_opent for further explanation.  The color of the name of the
  4654.           wn_opent                                                       
  4655.           newly active tile is changed to the value of the global variable
  4656.           active_tile_attr.  The color of the name of the previously active
  4657.           active_tile_attr                                                 
  4658.           tile is changed to the value of the global variable
  4659.           inactive_tile_attr.
  4660.           inactive_tile_attr 
  4661.           
  4662.           
  4663.           Returns
  4664.           
  4665.           BAD_WDW_HANDLE           Handle de-references to NULL.  It was
  4666.                                    probably not initialized via wn_createw,
  4667.                                    but may have been corrupted.
  4668.           
  4669.           BAD_TILE_HANDLE          Tile_handle de-references to NULL.  It
  4670.                                    was probably not initialized via
  4671.                                    wn_createt, but may have been corrupted.
  4672.           
  4673.           OK                       No errors.
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.                                        - 64 -
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.           Window Pro v. 1.2                                Shareware Manual
  4701.  
  4702.  
  4703.  
  4704.           2.  wn_actw
  4705.           
  4706.           Summary
  4707.           
  4708.           #include "werrors.h"
  4709.           #include "Pro.h"
  4710.           
  4711.           int wn_actw(handle)
  4712.           unsigned int handle;
  4713.           
  4714.           
  4715.           Description
  4716.           
  4717.           Designates a window as the active window.  The active window is
  4718.           temporarily placed on top of the display list.  If the window is
  4719.           not currently displayed it is first opened via a call to
  4720.           wn_openw.  See wn_openw for further explanation.  The previously
  4721.           wn_openw       wn_openw                                         
  4722.           active window is reinserted back into the display list at its
  4723.           original position.   The border color of the previously active
  4724.           window is set to the value of the global variable inactive_attr. 
  4725.                                                             inactive_attr  
  4726.           The border color of the newly active window is set to the value
  4727.           of the global variable active_attr.
  4728.                                  active_attr 
  4729.           
  4730.           
  4731.           Returns
  4732.           
  4733.           BAD_WDW_HANDLE           Handle de-references to NULL.  It was
  4734.                                    probably not initialized via wn_createw,
  4735.                                    but may have been corrupted.
  4736.           
  4737.           OK                       No errors.
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.                                        - 65 -
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.           Window Pro v. 1.2                                Shareware Manual
  4771.  
  4772.  
  4773.  
  4774.           3.  wn_bordrng
  4775.           
  4776.           Summary
  4777.           
  4778.           #include "werrors.h"
  4779.           #include "Pro.h"
  4780.           
  4781.           int wn_bordrng(handle1, handle2, borders)
  4782.           unsigned int handle1, handle2;
  4783.           char *borders;
  4784.           
  4785.           
  4786.           Description
  4787.           
  4788.           Changes the border characters for a range of windows to an array
  4789.           of 13 border characters pointed to by borders.  See wn_chgbord
  4790.                                                 borders                 
  4791.           for an explanation of the border characters.
  4792.           
  4793.           The operation begins with handle1 and progresses towards the top
  4794.           of the display until it reaches handle2 or the top of the display
  4795.           list.
  4796.           
  4797.           
  4798.           Returns
  4799.           
  4800.           BAD_WDW_HANDLE      Handle1 or handle2 de-references to NULL. 
  4801.                               Handle1    handle2                        
  4802.                               One was probably not initialized via
  4803.                               wn_createw, but may have been corrupted.
  4804.           
  4805.           NULL_POINTER        Borders is NULL.
  4806.                               Borders         
  4807.           
  4808.           OK                  No errors detected.
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.                                        - 66 -
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.           Window Pro v. 1.2                                Shareware Manual
  4841.  
  4842.  
  4843.  
  4844.           4.  wn_chgbord
  4845.           
  4846.           Summary
  4847.           
  4848.           #include "werrors.h"
  4849.           #include "Pro.h"
  4850.           
  4851.           int wn_chgbord(handle, borders)
  4852.           unsigned int handle;
  4853.           char *borders;
  4854.           
  4855.           
  4856.           Description
  4857.           
  4858.           Changes the border characters for a window to an array of 13
  4859.           border characters pointed to by borders.
  4860.                                           borders 
  4861.           
  4862.           Each element of the array is interpreted as follows:
  4863.           
  4864.           0    upper left corner
  4865.           1    upper right corner
  4866.           2    lower right corner
  4867.           3    lower left corner
  4868.           4    horizontal bar (top and bottom of window)
  4869.           5    vertical bar
  4870.           6    left side of window name delimiter
  4871.           7    right side of window name delimiter
  4872.           8    left side of tile name delimiter
  4873.           9    right side of tile name delimiter
  4874.           10   horizontal bar (middle bar -- the one that divides tiles)
  4875.           11   left elbow
  4876.           12   right elbow
  4877.           
  4878.           Predefined in the global variables are five border styles box0,
  4879.           box1, box2, box3 and box4.  The global variable default_box is
  4880.           automatically assigned to a window when it is created. 
  4881.           Default_box is initialized to box0 for starters.
  4882.           
  4883.           
  4884.           Returns
  4885.           
  4886.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  4887.                               Handle                               
  4888.                               probably not initialized via wn_createw, but
  4889.                               may have been corrupted.
  4890.           
  4891.           NULL_POINTER        Borders is NULL.
  4892.                               Borders         
  4893.           
  4894.           OK                  No errors detected.
  4895.  
  4896.  
  4897.  
  4898.  
  4899.  
  4900.  
  4901.  
  4902.  
  4903.  
  4904.                                        - 67 -
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910.           Window Pro v. 1.2                                Shareware Manual
  4911.  
  4912.  
  4913.  
  4914.           5.  wn_chgcolor
  4915.           
  4916.           Summary
  4917.           
  4918.           #include "werrors.h"
  4919.           #include "colors.h"
  4920.           #include "Pro.h"
  4921.           
  4922.           int wn_chgcolor(handle, foreground, background)
  4923.           unsigned int handle;
  4924.           unsigned char foreground, background;
  4925.           
  4926.           
  4927.           Description
  4928.           
  4929.           Changes the color of the border of the window (handle) to
  4930.                                                          handle    
  4931.           foreground, background.
  4932.           foreground  background 
  4933.           
  4934.           
  4935.           Returns
  4936.           
  4937.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  4938.                               probably not initialized via wn_createw, but
  4939.                               may have been corrupted.
  4940.           
  4941.           OK                  No errors detected.
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.                                        - 68 -
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.           Window Pro v. 1.2                                Shareware Manual
  4980.  
  4981.  
  4982.  
  4983.           6.  wn_closet
  4984.           
  4985.           Summary
  4986.           
  4987.           #include "werrors.h"
  4988.           #include "Pro.h"
  4989.           
  4990.           int wn_closet(handle, tile_handle)
  4991.           unsigned int handle;
  4992.           unsigned char tile_handle;
  4993.           
  4994.           
  4995.           Description
  4996.           
  4997.           Closes a displayed tile.  The space is always taken by the tile
  4998.           above, or in the case of the first tile by the tile below. If the
  4999.           tile being closed was also designated as the active tile, the
  5000.           last tile in the window is designated as the active tile.
  5001.           
  5002.           This function does not delete the tile from memory.  It is still
  5003.           a valid tile handle and you may perform all operations on its
  5004.           virtual screen.  You can redisplay the tile via the wn_opent
  5005.                                                               wn_opent
  5006.           function.
  5007.           
  5008.           
  5009.           Returns
  5010.           
  5011.           BAD_WDW_HANDLE           Handle de-references to NULL.  It was
  5012.                                    probably not initialized via wn_createw,
  5013.                                    but may have been corrupted.
  5014.           
  5015.           BAD_TILE_HANDLE          Tile_handle de-references to NULL.  It
  5016.                                    was probably not initialized via
  5017.                                    wn_createt, but may have been corrupted.
  5018.           
  5019.           CANT_CLOSE_LAST_TILE     Every window must have at least one
  5020.                                    tile.  So, you can't close the last
  5021.                                    remaining tile.
  5022.           
  5023.           OK                       No errors.
  5024.  
  5025.  
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.                                        - 69 -
  5042.  
  5043.  
  5044.  
  5045.  
  5046.  
  5047.           Window Pro v. 1.2                                Shareware Manual
  5048.  
  5049.  
  5050.  
  5051.           7.  wn_closew
  5052.           
  5053.           Summary
  5054.           
  5055.           #include "werrors.h"
  5056.           #include "Pro.h"
  5057.           
  5058.           int wn_closew(handle)
  5059.           unsigned int handle;
  5060.           
  5061.           
  5062.           Description
  5063.           
  5064.           Closes a displayed window, i.e. removes it from the display list.
  5065.           
  5066.           This function does not delete the window from memory.  It is
  5067.           still a valid window handle and you may perform all operations on
  5068.           its virtual screen.  You may redisplay it via the wn_openw
  5069.                                                             wn_openw
  5070.           function.
  5071.           
  5072.           
  5073.           Returns
  5074.           
  5075.           BAD_WDW_HANDLE           Handle de-references to NULL.  It was
  5076.                                    probably not initialized via wn_createw,
  5077.                                    but may have been corrupted.
  5078.           
  5079.           OK                       No errors.
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.  
  5100.  
  5101.  
  5102.  
  5103.  
  5104.  
  5105.  
  5106.  
  5107.  
  5108.  
  5109.                                        - 70 -
  5110.  
  5111.  
  5112.  
  5113.  
  5114.  
  5115.           Window Pro v. 1.2                                Shareware Manual
  5116.  
  5117.  
  5118.  
  5119.           8.  wn_createt
  5120.           
  5121.           Summary
  5122.           
  5123.           #include "werrors.h"
  5124.           #include "Pro.h"
  5125.           
  5126.           int wn_createt(handle, tile_name, vs_columns, vs_rows,
  5127.           virtual_x,           virtual_y)
  5128.           unsigned int handle, vs_columns, vs_rows, virtual_x, virtual_y;
  5129.           char *tile_name;
  5130.           
  5131.           
  5132.           Description
  5133.           
  5134.           Creates a new tile.  Sets up a tile record, allocates memory for
  5135.           a virtual screen, etc.  The logical cursor is placed at location
  5136.           1,1.  The virtual screen is vs_columns wide and vs_rows high. 
  5137.                                       vs_columns          vs_rows       
  5138.           The viewport (whose actual size is not defined until the tile is
  5139.           opened) is placed over the virtual screen at coordinate
  5140.           virtual_x, virtual_y.  The tile name is defined by tile_name. 
  5141.           virtual_x, virtual_y                               tile_name  
  5142.           The tile name is displayed below the tile centered in the
  5143.           border.  If tile_name is NULL nothing is display.
  5144.                       tile_name    NULL                    
  5145.           
  5146.           
  5147.           Returns
  5148.           
  5149.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  5150.                               probably not initialized via wn_createw, but
  5151.                               may have been corrupted.
  5152.           
  5153.           BAD_PARAMS          Virtual_x,virtual_y is not in the range
  5154.                               defined by vs_columns, vs_rows.
  5155.           
  5156.           OUT_OF_MEMORY       Could not allocate memory for the various
  5157.                               data structures required to set up a tile. 
  5158.                               You might try reducing the size of the
  5159.                               virtual screen.
  5160.           
  5161.           MAXIMUM_TILES       Exceeded the maximum number of tile handles
  5162.                               allocated for this window.  Try deleting some
  5163.                               unused tiles.
  5164.           
  5165.           new handle          Any value greater than or equal to 0
  5166.                               represents a valid tile handle.  Several
  5167.                               functions use tile_handles to refer to
  5168.                               virtual screens, etc.
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.                                        - 71 -
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.           Window Pro v. 1.2                                Shareware Manual
  5186.  
  5187.  
  5188.  
  5189.           9.  wn_createw
  5190.           
  5191.           Summary
  5192.           
  5193.           #include "werrors.h"
  5194.           #include "Pro.h"
  5195.           
  5196.           int wn_createw(vs_rows, vs_columns, physical_x, physical_y, 
  5197.                          virtual_x, virtual_y, port_rows, port_columns,
  5198.                          suspend, border, wdw_name, tile_name)
  5199.           
  5200.           unsigned int vs_rows, vs_columns, physical_x, physical_y,
  5201.           virtual_x, virtual_y, port_rows, port_columns, suspend, border;
  5202.           char *wdw_name, *tile_name;
  5203.           
  5204.           
  5205.           Description
  5206.           
  5207.           Creates a window record and virtual screen.  It simply sets up
  5208.           the information in memory it does not insert the window into the
  5209.           display list.  See wn_actw and wn_openw for additional
  5210.                              wn actw     wn openw               
  5211.           information.
  5212.           
  5213.           The window is created with a single tile.  The tile_handle for
  5214.                                                          tile handle    
  5215.           the first tile in a new window is always 0.
  5216.           
  5217.           The upper left corner of the window is located at the physical
  5218.           coordinates (physical_x, physical_y).  The window has inner
  5219.           dimensions of port_rows rows and port_columns columns.  It has a
  5220.           border style of border (see wn_chgbord for additional
  5221.           information.)  You can optionally suspend the window upon
  5222.           creation by setting suspend to FALSE otherwise set suspend to
  5223.           TRUE (see wn_suspendw for additional information.)  The border
  5224.           characters are set to the global variable default_box (see
  5225.           wn_togbord for additional information.)  The virtual screen for
  5226.           the first tile in the window as dimensions of vs_rows by
  5227.           vs_columns.  The viewport is positioned over the virtual screen
  5228.           so that the logical coordinate virtual_x, virtual_y is in the
  5229.           upper left hand corner.  The logical cursor is initialized to the
  5230.           logical coordinate 1,1.  The border color is set to the value of
  5231.           the global variable inactive_attr.  The scroll bars are on if the
  5232.           global variable scroll_bars_on is TRUE.
  5233.           
  5234.           
  5235.           Returns
  5236.           
  5237.           OUT_OF_MEMORY            Not enough memory to initialize the
  5238.                                    window structures.  Try using a smaller
  5239.                                    virtual screen.
  5240.           
  5241.           MAXIMUM_WINDOWS          There are no more window handles left to
  5242.                                    allocate.  Try deleting some unused
  5243.                                    windows.
  5244.           
  5245.  
  5246.  
  5247.  
  5248.                                        - 72 -
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.           Window Pro v. 1.2                                Shareware Manual
  5255.  
  5256.  
  5257.  
  5258.           new handle               any value equal to or greater than 0 and
  5259.                                    less than MAX_WINDOWS is a valid window
  5260.                                    handle.
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.                                        - 73 -
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.           Window Pro v. 1.2                                Shareware Manual
  5322.  
  5323.  
  5324.  
  5325.           10. wn_defrost
  5326.           
  5327.           Summary
  5328.           
  5329.           #include "werrors.h"
  5330.           #include "Pro.h"
  5331.           
  5332.           void wn_defrost()
  5333.           
  5334.           
  5335.           Description
  5336.           
  5337.           See wn_freeze.
  5338.               wn freeze 
  5339.           
  5340.           
  5341.           Returns
  5342.           
  5343.           None.
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.                                        - 74 -
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.           Window Pro v. 1.2                                Shareware Manual
  5390.  
  5391.  
  5392.  
  5393.           11. wn_deletet
  5394.           
  5395.           Summary
  5396.           
  5397.           #include "werrors.h"
  5398.           #include "Pro.h"
  5399.           
  5400.           int wn_deletet(handle, tile_handle)
  5401.           unsigned int handle;
  5402.           unsigned char tile_handle;
  5403.           
  5404.           
  5405.           Description
  5406.           
  5407.           Deletes a displayed tile, removing it from memory forever and
  5408.           ever.  If the tile is not closed it first closes it via a call to
  5409.           wn_closet.  See wn_closet for additional information.
  5410.           wn_closet       wn_closet                            
  5411.           
  5412.           
  5413.           Returns
  5414.           
  5415.           BAD_WDW_HANDLE           Handle de-references to NULL.  It was
  5416.                                    probably not initialized via wn_createw,
  5417.                                    but may have been corrupted.
  5418.           
  5419.           BAD_TILE_HANDLE          Tile_handle de-references to NULL.  It
  5420.                                    was probably not initialized via
  5421.                                    wn_createt, but may have been corrupted.
  5422.           
  5423.           CANT_CLOSE_LAST_TILE     Every window must have at least one
  5424.                                    tile.  So, you can't close the last
  5425.                                    remaining tile.
  5426.           
  5427.           OK                       No errors.
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.                                        - 75 -
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.           Window Pro v. 1.2                                Shareware Manual
  5458.  
  5459.  
  5460.  
  5461.           12. wn_delw
  5462.           
  5463.           Summary
  5464.           
  5465.           #include "werrors.h"
  5466.           #include "Pro.h"
  5467.           
  5468.           int wn_delw(handle)
  5469.           unsigned int handle;
  5470.           
  5471.           
  5472.           Description
  5473.           
  5474.           Deletes a displayed window, removing it from memory forever and
  5475.           ever.  If the window is not closed it first closes it via a call
  5476.           to wn_closew.  See wn_closew for additional information.
  5477.              wn_closew       wn_closew                            
  5478.           
  5479.           
  5480.           Returns
  5481.           
  5482.           BAD_WDW_HANDLE           Handle de-references to NULL.  It was
  5483.                                    probably not initialized via wn_createw,
  5484.                                    but may have been corrupted.
  5485.           
  5486.           OK                       No errors.
  5487.  
  5488.  
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497.  
  5498.  
  5499.  
  5500.  
  5501.  
  5502.  
  5503.  
  5504.  
  5505.  
  5506.  
  5507.  
  5508.  
  5509.  
  5510.  
  5511.  
  5512.  
  5513.  
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.                                        - 76 -
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.           Window Pro v. 1.2                                Shareware Manual
  5526.  
  5527.  
  5528.  
  5529.           13. wn_draww
  5530.           
  5531.           Summary
  5532.           
  5533.           #include "werrors.h"
  5534.           #include "Pro.h"
  5535.           
  5536.           int wn_draww(handle)
  5537.           unsigned int handle;
  5538.           
  5539.           
  5540.           Description
  5541.           
  5542.           Redraws the window on the physical screen.
  5543.           
  5544.           
  5545.           Returns
  5546.           
  5547.           BAD_WDW_HANDLE           Handle de-references to NULL.  It was
  5548.                                    probably not initialized via wn_createw,
  5549.                                    but may have been corrupted.
  5550.           
  5551.           NOT_DONE                 Window was designated as hidden.
  5552.           
  5553.           OK                       No errors.
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566.  
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.                                        - 77 -
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.           Window Pro v. 1.2                                Shareware Manual
  5593.  
  5594.  
  5595.  
  5596.           14. wn_flybox
  5597.           
  5598.           Summary
  5599.           
  5600.           #include "werrors.h"
  5601.           #include "Pro.h"
  5602.           
  5603.           void wn_flybox(bx, by, br, bc, ex, ey, er, ec, granularity,      
  5604.                          speed, boxchars, foreground, background)
  5605.           int bx, by, br, bc, ex, ey, er, ec;
  5606.           unsigned int granularity, speed;
  5607.           char *boxchars;
  5608.           unsigned char foreground, background;
  5609.           
  5610.           
  5611.           Description
  5612.           
  5613.           Draws boxes and erases them.  Use this function to give the
  5614.           illusion of exploding/imploding boxes, or (a la Framework) boxes
  5615.           which emerge from a point on the screen.
  5616.           
  5617.           The first box drawn places its upper left corner at the physical
  5618.           coordinate (bx, by) and has inner dimensions of br rows and bc
  5619.                       bx  by                              br          bc
  5620.           columns and has the color foreground, background.  This box is
  5621.                                     foreground  background              
  5622.           left on the screen for the duration of a for-loop of 'speed'
  5623.                                                                'speed 
  5624.           repetitions.  This box is then erased.  'granularity' additional
  5625.                                                   'granularity            
  5626.           boxes will each be drawn and erased in the same manner, with each
  5627.           progressing incrementally towards the ending dimensions (ex, ey,
  5628.                                                                    ex  ey 
  5629.           er, ec).
  5630.           er  ec  
  5631.           
  5632.           No error checking is performed on the validity of the box
  5633.           dimensions.  If the dimensions are outside of the physical screen
  5634.           it will cause unpredictable side effects.
  5635.           
  5636.           
  5637.           Returns
  5638.           
  5639.           None.
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.                                        - 78 -
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.           Window Pro v. 1.2                                Shareware Manual
  5666.  
  5667.  
  5668.  
  5669.           15. wn_freeze
  5670.           
  5671.           Summary
  5672.           
  5673.           #include "werrors.h"
  5674.           #include "Pro.h"
  5675.           
  5676.           void wn_freeze()
  5677.           
  5678.           
  5679.           Description
  5680.           
  5681.           Freezes the entire screen.  No windows or virtual screen commands
  5682.           are displayed on the physical screen.  A call to wn_defrost will
  5683.                                                            wn defrost     
  5684.           update the screen for any commands executed since the call to
  5685.           wn_freeze.
  5686.           wn freeze 
  5687.           
  5688.           
  5689.           Returns
  5690.           
  5691.           None.
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.                                        - 79 -
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.           Window Pro v. 1.2                                Shareware Manual
  5735.  
  5736.  
  5737.  
  5738.           16. wn_hidecur
  5739.           
  5740.           Summary
  5741.           
  5742.           #include "werrors.h"
  5743.           #include "Pro.h"
  5744.           
  5745.           void wn_hidecur()
  5746.           
  5747.           
  5748.           Description
  5749.           
  5750.           Changes the IBM-PC cursor to a non-viewable shape, and sets the
  5751.           global variable cursor_on to FALSE.
  5752.                           cursor on    FALSE 
  5753.           
  5754.           
  5755.           Returns
  5756.           
  5757.           None.
  5758.  
  5759.  
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.                                        - 80 -
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.           Window Pro v. 1.2                                Shareware Manual
  5803.  
  5804.  
  5805.  
  5806.           17. wn_hidew
  5807.           
  5808.           Summary
  5809.           
  5810.           #include "werrors.h"
  5811.           #include "Pro.h"
  5812.           
  5813.           int wn_hidew(handle)
  5814.           unsigned int handle;
  5815.           
  5816.           
  5817.           Description
  5818.           
  5819.           Designates a displayed window as hidden.  A hidden window retains
  5820.           its position in the display list, but is not seen on the screen. 
  5821.           If the window is already hidden, it is redisplayed.
  5822.           
  5823.           
  5824.           Returns
  5825.           
  5826.           BAD_WDW_HANDLE           Handle de-references to NULL.  It was
  5827.                                    probably not initialized via wn_createw,
  5828.                                    but may have been corrupted.
  5829.           
  5830.           OK                       No errors.
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.                                        - 81 -
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.           Window Pro v. 1.2                                Shareware Manual
  5870.  
  5871.  
  5872.  
  5873.           18. wn_init
  5874.           
  5875.           Summary
  5876.           
  5877.           #include "werrors.h"
  5878.           #include "Pro.h"
  5879.           
  5880.           int wn_init()
  5881.           
  5882.           
  5883.           Description
  5884.           
  5885.           Initializes various global variables.  
  5886.           
  5887.           Initializes an array of window handle variables (the global
  5888.           integer array window[].)  With source code you can set this array
  5889.           to any size you like.  Without source you are limited to 256.
  5890.           
  5891.           Determines if the video card is set in a 40 or 80 column mode and
  5892.           initializes a screen buffer of the appropriate size.  It is not
  5893.           possible to sense the 43 line mode but by setting the global
  5894.           variable ega_43line to TRUE.  It will still sense the video card
  5895.           but if it determines that it is an 80 column mode it will assume
  5896.           43 lines.
  5897.           
  5898.           Initializes a pointer to video memory (set to the video page
  5899.           which was active when wn_init was called.)  Differentiates
  5900.                                 wn_init                             
  5901.           between MONO, CGA, and EGA cards.
  5902.           
  5903.           If in BIOS or DMA screen updating mode saves the screen as it
  5904.           currently appears and uses it as a background for all windowing
  5905.           activity.
  5906.           
  5907.           If in ANSI screen updating mode initializes the character
  5908.           attributes to white on black.
  5909.           
  5910.           
  5911.           Returns
  5912.           
  5913.           OUT_OF_MEMORY            Not enough memory to initialize the
  5914.                                    screen buffers.
  5915.           
  5916.           OK                       No errors.
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.                                        - 82 -
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.           Window Pro v. 1.2                                Shareware Manual
  5938.  
  5939.  
  5940.  
  5941.           19. wn_ison*
  5942.           
  5943.           Summary
  5944.           
  5945.           #include "werrors.h"
  5946.           #include "Pro.h"
  5947.           
  5948.           int wn_isonwdw(x, y, rhandle)
  5949.           unsigned int x, y, *rhandle;
  5950.           
  5951.           
  5952.           Description
  5953.           
  5954.           Determines if the point x, y on the physical screen (the upper
  5955.                                   x  y                                  
  5956.           left corner is considered to be 1,1) is on top of a window.  If
  5957.           it is rhandle returns the window handle.
  5958.                 rhandle                           
  5959.           
  5960.           
  5961.           Returns
  5962.           
  5963.           TRUE                The physical screen point x, y is on a
  5964.                               window.
  5965.           
  5966.           FALSE               The physical screen point x, y is not on a
  5967.                               window.
  5968.           
  5969.           
  5970.           a. wn_isonhbar
  5971.           
  5972.           wn_isonhbar(handle, tile_handle, x, y)
  5973.           unsigned int handle, x, y;
  5974.           unsigned char tile_handle;
  5975.           
  5976.           Returns TRUE if the physical screen coordinate (x,y) is on the
  5977.                   TRUE                                    x y           
  5978.           horizontal bar of the tile (handle, tile_handle).
  5979.                                       handle  tile_handle  
  5980.           
  5981.           
  5982.           b. wn_isonlbar
  5983.           
  5984.           wn_isonlbar(handle, x, y)
  5985.           unsigned int handle, x, y;
  5986.           
  5987.           Returns TRUE if the physical screen coordinate (x,y) is on the
  5988.                   TRUE                                    x y           
  5989.           lower horizontal bar of the window (handle.)
  5990.                                               handle  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.                                        - 83 -
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.           Window Pro v. 1.2                                Shareware Manual
  6011.  
  6012.  
  6013.  
  6014.           c. wn_isonlelb
  6015.           
  6016.           wn_isonlelb(handle, tile_handle, x, y)
  6017.           unsigned int handle, x, y;
  6018.           unsigned char tile_handle;
  6019.           
  6020.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6021.                   TRUE                                    x y           
  6022.           left elbow of the tile (handle, tile_handle).
  6023.                                   handle  tile_handle  
  6024.           
  6025.           
  6026.           d. wn_isonllc
  6027.           
  6028.           wn_isonllc(handle, x, y)
  6029.           unsigned int handle, x, y;
  6030.           
  6031.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6032.                   TRUE                                    x y           
  6033.           lower left corner of the window (handle.)
  6034.                                            handle  
  6035.           
  6036.           
  6037.           e. wn_isonlrc
  6038.           
  6039.           wn_isonlrc(handle, x, y)
  6040.           unsigned int handle, x, y;
  6041.           
  6042.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6043.                   TRUE                                    x y           
  6044.           lower right corner of the window (handle.)
  6045.                                             handle  
  6046.           
  6047.           
  6048.           f. wn_isonnamet
  6049.           
  6050.           wn_isonnamet(handle, tile_handle, x, y)
  6051.           unsigned int handle, x, y;
  6052.           unsigned char tile_handle;
  6053.           
  6054.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6055.                   TRUE                                    x y           
  6056.           name of the tile (handle, tile_handle).
  6057.                             handle, tile_handle) 
  6058.           
  6059.           
  6060.           g. wn_isonnamew
  6061.           
  6062.           wn_isonnamew(handle, x, y)
  6063.           unsigned int handle, x, y;
  6064.           
  6065.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6066.                   TRUE                                    x y           
  6067.           name of the window (handle).
  6068.                               handle  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.  
  6080.  
  6081.                                        - 84 -
  6082.  
  6083.  
  6084.  
  6085.  
  6086.  
  6087.           Window Pro v. 1.2                                Shareware Manual
  6088.  
  6089.  
  6090.  
  6091.           h. wn_isonrelb
  6092.           
  6093.           wn_isonrelb(handle, tile_handle, x, y)
  6094.           unsigned int handle, x, y;
  6095.           unsigned char tile_handle;
  6096.           
  6097.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6098.                   TRUE                                    x y           
  6099.           right elbow the tile (handle, tile_handle).
  6100.                                 handle  tile_handle  
  6101.           
  6102.           
  6103.           i. wn_isonsbd
  6104.           
  6105.           wn_isonsbd(handle, tile_handle, x, y)
  6106.           unsigned int handle, x, y;
  6107.           unsigned char tile_handle;
  6108.           
  6109.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6110.                   TRUE                                    x y           
  6111.           down scroll bar indicator of the tile (handle, tile_handle).
  6112.                                                  handle  tile_handle  
  6113.           
  6114.           
  6115.           j. wn_isonsbl
  6116.           
  6117.           wn_isonsbl(handle, tile_handle, x, y)
  6118.           unsigned int handle, x, y;
  6119.           unsigned char tile_handle;
  6120.           
  6121.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6122.                   TRUE                                    x y           
  6123.           left scroll bar indicator of the tile (handle, tile_handle).
  6124.                                                  handle  tile_handle  
  6125.           
  6126.           
  6127.           k. wn_isonsbr
  6128.           
  6129.           wn_isonsbr(handle, tile_handle, x, y)
  6130.           unsigned int handle, x, y;
  6131.           unsigned char tile_handle;
  6132.           
  6133.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6134.                   TRUE                                    x y           
  6135.           right scroll bar indicator of the tile (handle, tile_handle).
  6136.                                                   handle  tile_handle  
  6137.           
  6138.           
  6139.           l. wn_isonsbu
  6140.           
  6141.           wn_isonsbu(handle, tile_handle, x, y)
  6142.           unsigned int handle, x, y;
  6143.           unsigned char tile_handle;
  6144.           
  6145.           Returns TRUE if the physical screen coordinate (x,y) is on the up
  6146.                   TRUE                                    x y              
  6147.           scroll bar indicator of the tile (handle, tile_handle).
  6148.                                             handle  tile_handle  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.  
  6158.                                        - 85 -
  6159.  
  6160.  
  6161.  
  6162.  
  6163.  
  6164.           Window Pro v. 1.2                                Shareware Manual
  6165.  
  6166.  
  6167.  
  6168.           m. wn_isontile
  6169.           
  6170.           wn_isontile(handle, rhandle, x, y)
  6171.           unsigned int handle, x, y;
  6172.           unsigned char *rhandle;
  6173.           
  6174.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6175.                   TRUE                                    x y           
  6176.           window (handle), and returns the value of the particular tile it
  6177.                   handle                                                  
  6178.           is on in rhandle.
  6179.                    rhandle 
  6180.           
  6181.           
  6182.           n. wn_isonubar
  6183.           
  6184.           wn_isonubar(handle, x, y)
  6185.           unsigned int handle, x, y;
  6186.           
  6187.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6188.                   TRUE                                    x y           
  6189.           upper horizontal bar of the window (handle.)
  6190.                                               handle  
  6191.           
  6192.           
  6193.           o. wn_isonulc
  6194.           
  6195.           wn_isonulc(handle, x, y)
  6196.           unsigned int handle, x, y;
  6197.           
  6198.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6199.                   TRUE                                    x y           
  6200.           upper left corner of the window (handle.)
  6201.                                            handle  
  6202.           
  6203.           
  6204.           p. wn_isonurc
  6205.           
  6206.           wn_isonurc(handle, x, y)
  6207.           unsigned int handle, x, y;
  6208.           
  6209.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6210.                   TRUE                                    x y           
  6211.           upper right corner of the window (handle.)
  6212.                                             handle  
  6213.           
  6214.           
  6215.           q. wn_isonvlbar
  6216.           
  6217.           wn_isonvlbar(handle, tile_handle, x, y)
  6218.           unsigned int handle, x, y;
  6219.           unsigned char tile_handle;
  6220.           
  6221.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6222.                   TRUE                                    x y           
  6223.           vertical left bar of the tile (handle, tile_handle).
  6224.                                          handle  tile_handle  
  6225.  
  6226.  
  6227.  
  6228.  
  6229.  
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.                                        - 86 -
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.           Window Pro v. 1.2                                Shareware Manual
  6243.  
  6244.  
  6245.  
  6246.           r. wn_isonvrbar
  6247.           
  6248.           wn_isonvrbar(handle, tile_handle, x, y)
  6249.           unsigned int handle, x, y;
  6250.           unsigned char tile_handle;
  6251.           
  6252.           Returns TRUE if the physical screen coordinate (x,y) is on the
  6253.                   TRUE                                    x y           
  6254.           vertical right bar of the tile (handle, tile_handle).
  6255.                                           handle  tile_handle  
  6256.           
  6257.           
  6258.           s. wn_isonvs
  6259.           
  6260.           int wn_isonvs(handle, tile_handle, x, y)
  6261.           unsigned int handle, *x, *y;
  6262.           unsigned char tile_handle;
  6263.           
  6264.           determines if a physical screen coordinate (x,y) is on the
  6265.                                                       x y           
  6266.           virtual screen (handle, tile_handle).  If wn_isonvs returns TRUE
  6267.                                                     wn_isonvs         TRUE
  6268.           it is and the physical coordinates (x,y) are transformed into
  6269.                                               x y                      
  6270.           virtual screen logical coordinates 
  6271.           
  6272.           
  6273.           t. wn_whereon
  6274.           
  6275.           wn_whereon(rhandle, rtile_handle, x, y)
  6276.           unsigned int *rhandle, *x, *y;
  6277.           unsigned char *tile_handle;
  6278.           
  6279.           Returns 0 if the physical coordinate (x,y) is not on any window.
  6280.           Otherwise it returns the handle of the window in rhandle and the
  6281.           handle of the tile in rtile_handle.  The return value corresponds
  6282.           to these parts of a window.
  6283.           
  6284.           1         Is on the upper left corner of a window
  6285.           2         Is on the upper right corner of a window
  6286.           3         Is on the lower right corner of a window
  6287.           4         Is on the lower left corner of a window
  6288.           5         Is on the name of a window
  6289.           6         Is on the upper horizontal bar of a window
  6290.           7         Is on the name of a tile
  6291.           8         Is on the horizontal bar of a tile
  6292.           9         Is on the vertical right bar of a tile
  6293.           10        Is on the vertical left bar of a tile
  6294.           11        Is on the scroll bar up indicator of a tile
  6295.           12        Is on the scroll bar down indicator of a tile
  6296.           13        Is on the scroll bar left indicator of a tile
  6297.           14        Is on the scroll bar right indicator of a tile
  6298.           15        Is on the left elbow of a tile
  6299.           16        Is on the right elbow of a tile
  6300.           17        Is on the virtual screen of a tile (in this case the
  6301.                     physical coordinates (x,y) are also transformed in
  6302.                     logical tile coordinates.
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.                                        - 87 -
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.           Window Pro v. 1.2                                Shareware Manual
  6315.  
  6316.  
  6317.  
  6318.           20. wn_locatevs
  6319.           
  6320.           Summary
  6321.           
  6322.           #include "werrors.h"
  6323.           #include "Pro.h"
  6324.           
  6325.           int wn_locatevs(handle, tile_handle, x, y)
  6326.           unsigned int handle;
  6327.           unsigned char tile_handle;
  6328.           int x, y;
  6329.           
  6330.           
  6331.           Description
  6332.           
  6333.           Changes the portion of the virtual screen viewed through the tile
  6334.           (handle, tile_handle.)  the 'viewport' is positioned so that the
  6335.           tile coordinate (x,y) is in the upper left corner of the
  6336.           viewport.
  6337.           
  6338.           
  6339.           Returns
  6340.           
  6341.           BAD_WDW_HANDLE      Handle de-references to NULL.  One was
  6342.                               probably not initialized via wn_createw, but
  6343.                               may have been corrupted.
  6344.           
  6345.           MODIFIED            The operation was performed but x or y had to
  6346.                               be modified to keep the viewport entirely
  6347.                               within the virtual screen.
  6348.           
  6349.           OK                  No errors detected.
  6350.  
  6351.  
  6352.  
  6353.  
  6354.  
  6355.  
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.  
  6370.  
  6371.  
  6372.  
  6373.  
  6374.  
  6375.                                        - 88 -
  6376.  
  6377.  
  6378.  
  6379.  
  6380.  
  6381.           Window Pro v. 1.2                                Shareware Manual
  6382.  
  6383.  
  6384.  
  6385.           21. wn_locatew
  6386.           
  6387.           Summary
  6388.           
  6389.           #include "werrors.h"
  6390.           #include "Pro.h"
  6391.           
  6392.           int wn_locatew(handle, x, y)
  6393.           unsigned int handle;
  6394.           signed int x, y;
  6395.           
  6396.           
  6397.           Description
  6398.           
  6399.           Moves the upper left corner of a window to the absolute position
  6400.           defined by x, y.
  6401.                      x, y 
  6402.           
  6403.           
  6404.           Returns
  6405.           
  6406.           BAD_WDW_HANDLE      Handle1 or handle2 de-references to NULL. 
  6407.                               One was probably not initialized via
  6408.                               wn_createw, but may have been corrupted.
  6409.           
  6410.           MODIFIED            Operation was performed but parameter x or y
  6411.                               had to be modified in order to keep the
  6412.                               window positioned completely on the physical
  6413.                               screen.
  6414.           
  6415.           OK                  No errors detected.
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434.  
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.                                        - 89 -
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.           Window Pro v. 1.2                                Shareware Manual
  6450.  
  6451.  
  6452.  
  6453.           22. wn_moverng
  6454.           
  6455.           Summary
  6456.           
  6457.           #include "werrors.h"
  6458.           #include "Pro.h"
  6459.           
  6460.           int wn_moverng(handle1, handle2, x, y)
  6461.           unsigned int handle1, handle2;
  6462.           signed int x, y;
  6463.           
  6464.           
  6465.           Description
  6466.           
  6467.           Moves a range of windows from their current position to the
  6468.           position y rows above if positive and below if negative and x
  6469.           rows to the right if positive and to the left if negative.
  6470.           
  6471.           The operation begins with handle1 and progresses towards the top
  6472.           of the display list until handle2 is reached or the top of the
  6473.           display list, whichever comes first.
  6474.           
  6475.           
  6476.           Returns
  6477.           
  6478.           BAD_WDW_HANDLE      Handle1 or handle2 de-references to NULL. 
  6479.                               One was probably not initialized via
  6480.                               wn_createw, but may have been corrupted.
  6481.           
  6482.           MODIFIED            Operation was performed but parameter x or y
  6483.                               had to be modified (for one or more windows)
  6484.                               in order to keep the window positioned
  6485.                               completely on the physical screen.
  6486.           
  6487.           OK                  No errors detected.
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.  
  6494.  
  6495.  
  6496.  
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.                                        - 90 -
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.           Window Pro v. 1.2                                Shareware Manual
  6517.  
  6518.  
  6519.  
  6520.           23. wn_movew
  6521.           
  6522.           Summary
  6523.           
  6524.           #include "werrors.h"
  6525.           #include "Pro.h"
  6526.           
  6527.           int wn_movew(handle, x, y)
  6528.           unsigned int handle;
  6529.           signed int x, y;
  6530.           
  6531.           
  6532.           Description
  6533.           
  6534.           Moves a window from its current position to the position y rows
  6535.           above if y is positive and below if y is negative and x rows to
  6536.           the right of its position if x is positive and to the left if
  6537.           negative.
  6538.           
  6539.           If the window is designated as the active window it is first
  6540.           unzoomed before moving it.
  6541.           
  6542.           
  6543.           Returns
  6544.           
  6545.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  6546.                               probably not initialized via wn_createw, but
  6547.                               may have been corrupted.
  6548.           
  6549.           MODIFIED            Operation was performed but parameter x or y
  6550.                               had to be modified in order to keep the
  6551.                               window positioned completely on the physical
  6552.                               screen.
  6553.           
  6554.           OK                  No errors detected.
  6555.  
  6556.  
  6557.  
  6558.  
  6559.  
  6560.  
  6561.  
  6562.  
  6563.  
  6564.  
  6565.  
  6566.  
  6567.  
  6568.  
  6569.  
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.  
  6576.  
  6577.                                        - 91 -
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.           Window Pro v. 1.2                                Shareware Manual
  6584.  
  6585.  
  6586.  
  6587.           24. wn_namet
  6588.           
  6589.           Summary
  6590.           
  6591.           #include "werrors.h"
  6592.           #include "Pro.h"
  6593.           
  6594.           int wn_namew(handle, tile_handle, new_name)
  6595.           unsigned int handle;
  6596.           unsigned char tile_handle;
  6597.           char *new_name;
  6598.           
  6599.           
  6600.           Description
  6601.           
  6602.           Changes the name of a tile to the string pointed to by new_name. 
  6603.                                                                  new_name  
  6604.           If new_name is NULL no name is displayed.  Tile names are
  6605.              new_name                                              
  6606.           displayed in the center of the border just below the tile.
  6607.           
  6608.           
  6609.           Returns
  6610.           
  6611.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  6612.                               probably not initialized via wn_createw, but
  6613.                               may have been corrupted.
  6614.           
  6615.           BAD_TILE_HANDLE     Tile_handle de-references to NULL.  It was
  6616.                               probably not initialized via wn_createt, but
  6617.                               may have been corrupted.
  6618.           
  6619.           OK                  No errors detected.
  6620.  
  6621.  
  6622.  
  6623.  
  6624.  
  6625.  
  6626.  
  6627.  
  6628.  
  6629.  
  6630.  
  6631.  
  6632.  
  6633.  
  6634.  
  6635.  
  6636.  
  6637.  
  6638.  
  6639.  
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.                                        - 92 -
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.           Window Pro v. 1.2                                Shareware Manual
  6653.  
  6654.  
  6655.  
  6656.           25. wn_namew
  6657.           
  6658.           Summary
  6659.           
  6660.           #include "werrors.h"
  6661.           #include "Pro.h"
  6662.           
  6663.           int wn_namew(handle, new_name)
  6664.           unsigned int handle;
  6665.           char *new_name;
  6666.           
  6667.           
  6668.           Description
  6669.           
  6670.           Changes the name of a window to the string pointed to by
  6671.           new_name.  If new_name is NULL no name is displayed.  Window
  6672.           new_name      new_name                                      
  6673.           names are displayed in the upper left border of a window.
  6674.           
  6675.           
  6676.           Returns
  6677.           
  6678.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  6679.                               probably not initialized via wn_createw, but
  6680.                               may have been corrupted.
  6681.           
  6682.           OK                  No errors detected.
  6683.  
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689.  
  6690.  
  6691.  
  6692.  
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.                                        - 93 -
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.           Window Pro v. 1.2                                Shareware Manual
  6721.  
  6722.  
  6723.  
  6724.           26. wn_opent
  6725.           
  6726.           Summary
  6727.           
  6728.           #include "werrors.h"
  6729.           #include "Pro.h"
  6730.           
  6731.           int wn_opent(handle, tile_handle)
  6732.           unsigned int handle;
  6733.           unsigned char tile_handle;
  6734.           
  6735.           
  6736.           Description
  6737.           
  6738.           Splits the active tile in the window (handle) into half.  Assigns
  6739.                                                 handle                     
  6740.           the lower half to the new tile (tile_handle) and the upper half
  6741.                                           tile_handle                    
  6742.           to the active tile.
  6743.           
  6744.           If any window is zoomed it is un-zoomed.
  6745.           
  6746.           If the tile being opened was already opened it is first closed,
  6747.           via a call to wn_closet.  See wn_closet for an explanation of how
  6748.                         wn_closet       wn_closet                          
  6749.           the space is reclaimed on closing.
  6750.           
  6751.           
  6752.           Returns
  6753.           
  6754.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  6755.                               probably not initialized via wn_createw, but
  6756.                               may have been corrupted.
  6757.           
  6758.           BAD_TILE_HANDLE     Tile_handle de-references to NULL.  It was
  6759.                               probably not initialized via wn_createt, but
  6760.                               may have been corrupted.
  6761.           
  6762.           NO_ACTIVE_TILE      No tile in the display is designated as
  6763.                               active.  This cannot happen if you use the
  6764.                               application level functions exclusively.  But
  6765.                               could happen if you access the window_rec
  6766.                                                              window_rec
  6767.                               directly or use the kernel functions.
  6768.           
  6769.           OK                  No errors detected.
  6770.  
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.  
  6783.  
  6784.  
  6785.                                        - 94 -
  6786.  
  6787.  
  6788.  
  6789.  
  6790.  
  6791.           Window Pro v. 1.2                                Shareware Manual
  6792.  
  6793.  
  6794.  
  6795.           27. wn_openw
  6796.           
  6797.           Summary
  6798.           
  6799.           #include "werrors.h"
  6800.           #include "Pro.h"
  6801.           
  6802.           int wn_openw(handle)
  6803.           unsigned int handle;
  6804.           
  6805.           
  6806.           Description
  6807.           
  6808.           Permanently places a window on the top of the display list and
  6809.           designates it as the active window.  If a window was previously
  6810.           active it is reinserted back into its original position in the
  6811.           display list.  If the window is already open, it is first closed
  6812.           via a call to wn_closew, and then re-opened.
  6813.           
  6814.           
  6815.           Returns
  6816.           
  6817.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  6818.                               probably not initialized via wn_createw, but
  6819.                               may have been corrupted.
  6820.           
  6821.           OK                  No errors detected.
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.  
  6841.  
  6842.  
  6843.  
  6844.  
  6845.  
  6846.  
  6847.  
  6848.  
  6849.  
  6850.  
  6851.  
  6852.                                        - 95 -
  6853.  
  6854.  
  6855.  
  6856.  
  6857.  
  6858.           Window Pro v. 1.2                                Shareware Manual
  6859.  
  6860.  
  6861.  
  6862.           28. wn_redraw
  6863.           
  6864.           Summary
  6865.           
  6866.           #include "werrors.h"
  6867.           #include "Pro.h"
  6868.           
  6869.           int wn_redraw()
  6870.           
  6871.           
  6872.           Description
  6873.           
  6874.           Redraws all of the windows on the screen.
  6875.           
  6876.           
  6877.           Returns
  6878.           
  6879.           None.
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.  
  6902.  
  6903.  
  6904.  
  6905.  
  6906.  
  6907.  
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.                                        - 96 -
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.           Window Pro v. 1.2                                Shareware Manual
  6926.  
  6927.  
  6928.  
  6929.           29. wn_restorescr
  6930.           
  6931.           Summary
  6932.           
  6933.           #include "werrors.h"
  6934.           #include "Pro.h"
  6935.           
  6936.           void wn_restorescr()
  6937.           
  6938.           
  6939.           Description
  6940.           
  6941.           This function writes the information pointed to by the global
  6942.           variable screen_buffer to the physical screen.  This is typically
  6943.                    screen buffer                                           
  6944.           used to restore a screen after some kind of pop-up utility.  If
  6945.           screen_buffer is NULL it does nothing.
  6946.           screen buffer                         
  6947.           
  6948.           
  6949.           Returns
  6950.           
  6951.           None.
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.  
  6961.  
  6962.  
  6963.  
  6964.  
  6965.  
  6966.  
  6967.  
  6968.  
  6969.  
  6970.  
  6971.  
  6972.  
  6973.  
  6974.  
  6975.  
  6976.  
  6977.  
  6978.  
  6979.  
  6980.  
  6981.  
  6982.  
  6983.  
  6984.  
  6985.  
  6986.  
  6987.  
  6988.                                        - 97 -
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.           Window Pro v. 1.2                                Shareware Manual
  6995.  
  6996.  
  6997.  
  6998.           30. wn_savescr
  6999.           
  7000.           Summary
  7001.           
  7002.           #include "werrors.h"
  7003.           #include "Pro.h"
  7004.           
  7005.           void wn_savescr()
  7006.           
  7007.           
  7008.           Description
  7009.           
  7010.           This function copies the entire physical screen to an area
  7011.           pointed to by the global variable screen_buffer.  This saved
  7012.                                             screen buffer             
  7013.           screen is always used as the backdrop for all windowing
  7014.           activity.  Anything written directly to the screen will not be
  7015.           saved unless you call wn_savescr.
  7016.                                 wn savescr 
  7017.           
  7018.           
  7019.           Returns
  7020.           
  7021.           None.
  7022.  
  7023.  
  7024.  
  7025.  
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.                                        - 98 -
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.           Window Pro v. 1.2                                Shareware Manual
  7064.  
  7065.  
  7066.  
  7067.           31. wn_scrollvs
  7068.           
  7069.           Summary
  7070.           
  7071.           #include "werrors.h"
  7072.           #include "Pro.h"
  7073.           
  7074.           int wn_scrollvs(handle, tile_handle, x, y)
  7075.           unsigned int handle;
  7076.           unsigned char tile_handle;
  7077.           int x, y;
  7078.           
  7079.           
  7080.           Description
  7081.           
  7082.           Changes the portion of the virtual screen viewed through the tile
  7083.           (handle, tile_handle.)  the 'viewport' is scrolled up(-) or
  7084.           down(+) y rows, and left(+) or right(-) x rows.
  7085.           
  7086.           
  7087.           Returns
  7088.           
  7089.           BAD_WDW_HANDLE      Handle de-references to NULL.  One was
  7090.                               probably not initialized via wn_createw, but
  7091.                               may have been corrupted.
  7092.           
  7093.           MODIFIED            The operation was performed but x or y had to
  7094.                               be modified to keep the viewport entirely
  7095.                               within the virtual screen.
  7096.           
  7097.           OK                  No errors detected.
  7098.  
  7099.  
  7100.  
  7101.  
  7102.  
  7103.  
  7104.  
  7105.  
  7106.  
  7107.  
  7108.  
  7109.  
  7110.  
  7111.  
  7112.  
  7113.  
  7114.  
  7115.  
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.                                        - 99 -
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.           Window Pro v. 1.2                                Shareware Manual
  7131.  
  7132.  
  7133.  
  7134.           32. wn_showcur
  7135.           
  7136.           Summary
  7137.           
  7138.           #include "werrors.h"
  7139.           #include "Pro.h"
  7140.           
  7141.           void wn_showcur()
  7142.           
  7143.           
  7144.           Description
  7145.           
  7146.           Changes the IBM-PC cursor to the shape defined by the global
  7147.           variables cursor_e (ending scan line) and cursor_b (beginning
  7148.                     cursor e                        cursor b           
  7149.           scan line) and sets the global variable curson_on to TRUE.
  7150.                                                   curson on    TRUE 
  7151.           
  7152.           
  7153.           Returns
  7154.           
  7155.           None.
  7156.  
  7157.  
  7158.  
  7159.  
  7160.  
  7161.  
  7162.  
  7163.  
  7164.  
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.  
  7173.  
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.                                        - 100 -
  7194.  
  7195.  
  7196.  
  7197.  
  7198.  
  7199.           Window Pro v. 1.2                                Shareware Manual
  7200.  
  7201.  
  7202.  
  7203.           33. wn_sizerng
  7204.           
  7205.           Summary
  7206.           
  7207.           #include "werrors.h"
  7208.           #include "Pro.h"
  7209.           
  7210.           int wn_sizerng(handle1, handle2, x, y)
  7211.           unsigned int handle1, handle2;
  7212.           signed int x, y;
  7213.           
  7214.           
  7215.           Description
  7216.           
  7217.           Increments the sizes of a range of windows by x columns and y
  7218.           rows.  Only the last tile is incremented row wise.  All tiles are
  7219.           incremented column wise.
  7220.           
  7221.           The operation begins with handle1 and progresses towards the top
  7222.           of the display list until handle2 is reached or the top of the
  7223.           display list, whichever comes first.
  7224.           
  7225.           If any window was zoomed it is unzoomed.
  7226.           
  7227.           
  7228.           Returns
  7229.           
  7230.           BAD_WDW_HANDLE      Handle1 or handle2 de-references to NULL. 
  7231.                               One was probably not initialized via
  7232.                               wn_createw, but may have been corrupted.
  7233.           
  7234.           MODIFIED            Operation was performed but parameter x or y
  7235.                               had to be modified (for one or more windows)
  7236.                               in order to keep the window positioned
  7237.                               completely on the physical screen.
  7238.           
  7239.           OK                  No errors detected.
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.  
  7259.  
  7260.                                        - 101 -
  7261.  
  7262.  
  7263.  
  7264.  
  7265.  
  7266.           Window Pro v. 1.2                                Shareware Manual
  7267.  
  7268.  
  7269.  
  7270.           34. wn_sizet
  7271.           
  7272.           Summary
  7273.           
  7274.           #include "werrors.h"
  7275.           #include "Pro.h"
  7276.           
  7277.           int wn_sizerng(handle, tile_handle, x, y)
  7278.           unsigned int handle;
  7279.           unsigned char tile_handle;
  7280.           signed int x, y;
  7281.           
  7282.           
  7283.           Description
  7284.           
  7285.           Increments the size of a tile (handle, tile_handle)  by x columns
  7286.           and y rows.  tiles are incremented column wise.  The designated
  7287.           tile is incremented row wise.  The tile below the designated tile
  7288.           is decreased in size.  If no tile is below the designated tile
  7289.           (i.e. if it is the last tile) the window is increased in size.
  7290.           
  7291.           This operation does not check to make sure that the resulting
  7292.           viewport stays within the virtual screen.  If the viewport
  7293.           extends beyond the virtual screen those corresponding areas in
  7294.           the tile will display 'garbage'.
  7295.           
  7296.           If any window was zoomed it is unzoomed.
  7297.           
  7298.           
  7299.           Returns
  7300.           
  7301.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  7302.                               probably not initialized via wn_createw, but
  7303.                               may have been corrupted.
  7304.           
  7305.           MODIFIED            Operation was performed but parameter x or y
  7306.                               had to be modified (for one or more windows)
  7307.                               in order to keep the window positioned
  7308.                               completely on the physical screen.
  7309.           
  7310.           OK                  No errors detected.
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.  
  7321.  
  7322.  
  7323.  
  7324.  
  7325.  
  7326.  
  7327.                                        - 102 -
  7328.  
  7329.  
  7330.  
  7331.  
  7332.  
  7333.           Window Pro v. 1.2                                Shareware Manual
  7334.  
  7335.  
  7336.  
  7337.           35. wn_suspendt
  7338.           
  7339.           Summary
  7340.           
  7341.           #include "werrors.h"
  7342.           #include "Pro.h"
  7343.           
  7344.           int wn_suspendt(handle, tile_handle)
  7345.           unsigned int handle;
  7346.           unsigned char tile_handle;
  7347.           
  7348.           
  7349.           Description
  7350.           
  7351.           Freezes a tile.  Any changes made to the tile name, or the
  7352.           position or contents of a virtual screen are not reflected on the
  7353.           physical screen.  Currently, this does not work reliably on any
  7354.           which partially obscures another window.
  7355.           
  7356.           If the tile is already 'suspended' it 'un-suspends' it and
  7357.           updates the physical screen.
  7358.           
  7359.           
  7360.           Returns
  7361.           
  7362.           BAD_WDW_HANDLE      The handle passed de-references to NULL, it
  7363.                               was probably not initialized via wn_createw,
  7364.                               but may have been corrupted.
  7365.           
  7366.           BAD_TILE_HANDLE     The tile_handle passed de-references to NULL,
  7367.                               it was probably not properly initialized via
  7368.                               a call to wn_createt, but may also have been
  7369.                               corrupted.
  7370.           
  7371.           OK                  No errors detected.
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.  
  7382.  
  7383.  
  7384.  
  7385.  
  7386.  
  7387.  
  7388.  
  7389.  
  7390.  
  7391.  
  7392.  
  7393.  
  7394.                                        - 103 -
  7395.  
  7396.  
  7397.  
  7398.  
  7399.  
  7400.           Window Pro v. 1.2                                Shareware Manual
  7401.  
  7402.  
  7403.  
  7404.           36. wn_suspendw
  7405.           
  7406.           Summary
  7407.           
  7408.           #include "werrors.h"
  7409.           #include "Pro.h"
  7410.           
  7411.           int wn_suspendw(handle)
  7412.           unsigned int handle;
  7413.           
  7414.           
  7415.           Description
  7416.           
  7417.           Freezes a window.  Any changes made to the window borders, the
  7418.           tile names, the size, position, or contents of a virtual screen
  7419.           are not reflected on the physical screen.  This does not work
  7420.           reliably on any window which partially obscures another window,
  7421.           or if a move or size operation is performed.
  7422.           
  7423.           If the window is already 'suspended' it 'un-suspends'it and
  7424.           updates the physical screen.
  7425.           
  7426.           
  7427.           Returns
  7428.           
  7429.           BAD_WDW_HANDLE      The window handle dereferences to NULL.  It
  7430.                               was most likely not initialized via
  7431.                               wn_createw or has been corrupted.
  7432.           
  7433.           OK                  No errors.
  7434.  
  7435.  
  7436.  
  7437.  
  7438.  
  7439.  
  7440.  
  7441.  
  7442.  
  7443.  
  7444.  
  7445.  
  7446.  
  7447.  
  7448.  
  7449.  
  7450.  
  7451.  
  7452.  
  7453.  
  7454.  
  7455.  
  7456.  
  7457.  
  7458.  
  7459.  
  7460.  
  7461.                                        - 104 -
  7462.  
  7463.  
  7464.  
  7465.  
  7466.  
  7467.           Window Pro v. 1.2                                Shareware Manual
  7468.  
  7469.  
  7470.  
  7471.           37. wn_swapt
  7472.           
  7473.           Summary
  7474.           
  7475.           #include "werrors.h"
  7476.           #include "Pro.h"
  7477.           
  7478.           int wn_swapt(handle1, tile_handle1, handle2, tile_handle2)
  7479.           unsigned int handle1, handle2;
  7480.           unsigned char tile_handle1, tile_handle2;
  7481.           
  7482.           
  7483.           Description
  7484.           
  7485.           Swaps the names and virtual screens of two tiles.  If any window
  7486.           is currently zoomed it is unzoomed.  Checks to make sure that the
  7487.           new viewports are completely filled by the virtual screens, if
  7488.           not it first attempts to readjust the virtual screen and then
  7489.           resizes the viewport if necessary.
  7490.           
  7491.           
  7492.           Returns
  7493.           
  7494.           BAD_WDW_HANDLE      Handle1 or handle2 de-references to NULL, one
  7495.                               was probably not initialized via wn_createw,
  7496.                               but may have been corrupted.
  7497.           
  7498.           BAD_TILE_HANDLE     Tile_handle1 or tile_handle2 de-references to
  7499.                               NULL, one was probably not properly
  7500.                               initialized via a call to wn_createt, but may
  7501.                               also have been corrupted.
  7502.           
  7503.           MODIFIED            Either a virtual screen was moved, or
  7504.                               viewport resized to keep all viewports filled
  7505.                               with virtual screen data.
  7506.           
  7507.           OK                  No errors detected.
  7508.  
  7509.  
  7510.  
  7511.  
  7512.  
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.  
  7521.  
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.                                        - 105 -
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534.           Window Pro v. 1.2                                Shareware Manual
  7535.  
  7536.  
  7537.  
  7538.           38. wn_togborder
  7539.           
  7540.           Summary
  7541.           
  7542.           #include "werrors.h"
  7543.           #include "Pro.h"
  7544.           
  7545.           int wn_togborder(handle, border_type)
  7546.           unsigned int handle;
  7547.           unsigned char border_type;
  7548.           
  7549.           
  7550.           Description
  7551.           
  7552.           Changes the border style of a window.  The styles are defined in
  7553.           "Pro.h."  The effect of each style is:
  7554.           
  7555.           UPPER_LEFT          Only the upper and left sides of the border
  7556.                               are displayed.  If the borders characters are
  7557.                               defined as a block-style character this
  7558.                               produces a shadow effect.
  7559.           
  7560.           UPPER_RIGHT         Only the upper and right sides of the border
  7561.                               are displayed.
  7562.           
  7563.           LOWER_LEFT          Only the lower and left sides of the border
  7564.                               are displayed.
  7565.           
  7566.           LOWER_RIGHT         Only the lower and right side of the border
  7567.                               are displayed.
  7568.           
  7569.           HEAD_ON             All of the border characters are displayed. 
  7570.                               This is the default.
  7571.           
  7572.           NONE                None of the border characters are displayed
  7573.                               and all tiles are increased in width by two
  7574.                               characters (taking over the border area) the
  7575.                               first tile in the window is increased in
  7576.                               height by 2 rows all others are increased in
  7577.                               height by 1 row.
  7578.           
  7579.           
  7580.           Any zoomed windows are un-zoomed.
  7581.           
  7582.           
  7583.           Returns
  7584.           
  7585.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  7586.                               probably not initialized via wn_createw, but
  7587.                               may have been corrupted.
  7588.           
  7589.           OK                  No errors detected.
  7590.  
  7591.  
  7592.  
  7593.  
  7594.  
  7595.                                        - 106 -
  7596.  
  7597.  
  7598.  
  7599.  
  7600.  
  7601.           Window Pro v. 1.2                                Shareware Manual
  7602.  
  7603.  
  7604.  
  7605.           39. wn_togbordrng
  7606.           
  7607.           Summary
  7608.           
  7609.           #include "werrors.h"
  7610.           #include "Pro.h"
  7611.           
  7612.           int wn_togbordrng(handle1, handle2, border_type)
  7613.           unsigned int handle1, handle2;
  7614.           unsigned char border_type;
  7615.           
  7616.           
  7617.           Description
  7618.           
  7619.           Identical to wn_togborder, but operates on a range of windows. 
  7620.                        wn_togborder                                      
  7621.           The operation begins at handle1 and progresses towards the top of
  7622.                                   handle1                                  
  7623.           the display list, stopping at handle2 or the top of the list,
  7624.                                         handle2                        
  7625.           whichever comes first.
  7626.           
  7627.           
  7628.           Returns
  7629.           
  7630.           BAD_WDW_HANDLE      Handle1, or handle2, de-references to NULL. 
  7631.                               One was probably not initialized via
  7632.                               wn_createw, but may have been corrupted.
  7633.           
  7634.           OK                  No errors detected.
  7635.  
  7636.  
  7637.  
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.                                        - 107 -
  7666.  
  7667.  
  7668.  
  7669.  
  7670.  
  7671.           Window Pro v. 1.2                                Shareware Manual
  7672.  
  7673.  
  7674.  
  7675.           40. wn_togscroll
  7676.           
  7677.           Summary
  7678.           
  7679.           #include "werrors.h"
  7680.           #include "Pro.h"
  7681.           
  7682.           int wn_togscroll(handle, tile_handle, scroll_bars)
  7683.           unsigned int handle;
  7684.           unsigned char tile_handle, scroll_bars;
  7685.           
  7686.           
  7687.           Description
  7688.           
  7689.           Turns the scroll bar character display on or off for a single
  7690.           tile.  If scroll_bars is TRUE they are turned on; if scroll_bars
  7691.                     scroll_bars    TRUE                        scroll_bars
  7692.           is FALSE they are turned off.
  7693.              FALSE                     
  7694.           
  7695.           If any window is zoomed it is un-zoomed.
  7696.           
  7697.           
  7698.           Returns
  7699.           
  7700.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  7701.                               probably not initialized via wn_createw, but
  7702.                               may have been corrupted.
  7703.           
  7704.           BAD_TILE_HANDLE     Tile_handle de-references to NULL.  It was
  7705.                               probably not initialized via wn_createt, but
  7706.                               may have been corrupted.
  7707.           
  7708.           OK                  No errors detected.
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.  
  7727.  
  7728.  
  7729.  
  7730.  
  7731.  
  7732.  
  7733.  
  7734.                                        - 108 -
  7735.  
  7736.  
  7737.  
  7738.  
  7739.  
  7740.           Window Pro v. 1.2                                Shareware Manual
  7741.  
  7742.  
  7743.  
  7744.           41. wn_togscrollrng
  7745.           
  7746.           Summary
  7747.           
  7748.           #include "werrors.h"
  7749.           #include "Pro.h"
  7750.           
  7751.           int wn_togscrollrng(handle1, handle2, scroll_bars)
  7752.           unsigned int handle1, handle2;
  7753.           unsigned char scroll_bars;
  7754.           
  7755.           
  7756.           Description
  7757.           
  7758.           Turns the scroll bar character display on or off for all windows
  7759.           in the range (handle1, handle2.)  If scroll_bars is TRUE they are
  7760.                         handle1  handle2       scroll_bars    TRUE         
  7761.           turned on; if scroll_bars is FALSE they are turned off.
  7762.                         scroll_bars    FALSE                     
  7763.           
  7764.           If any window is zoomed it is un-zoomed.
  7765.           
  7766.           The operation begins at handle1 and progresses towards the top of
  7767.           the display list until it reaches handle2 or the top of the
  7768.           display list.
  7769.           
  7770.           
  7771.           Returns
  7772.           
  7773.           BAD_WDW_HANDLE      Handle1 or handle2 de-references to NULL. 
  7774.                               One was probably not initialized via
  7775.                               wn_createw, but may have been corrupted.
  7776.           
  7777.           OK                  No errors detected.
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.                                        - 109 -
  7804.  
  7805.  
  7806.  
  7807.  
  7808.  
  7809.           Window Pro v. 1.2                                Shareware Manual
  7810.  
  7811.  
  7812.  
  7813.           42. wn_updatet
  7814.           
  7815.           Summary
  7816.           
  7817.           #include "werrors.h"
  7818.           #include "Pro.h"
  7819.           
  7820.           int wn_updatet(handle, tile_handle)
  7821.           unsigned int handle;
  7822.           unsigned char tile_handle;
  7823.           
  7824.           
  7825.           Description
  7826.           
  7827.           Updates the virtual screen defined by {handle, tile_handle} to
  7828.           the physical screen.  Regardless of whether or not the tile is
  7829.           suspended.  Useful for selectively updating suspended tiles.
  7830.           
  7831.           
  7832.           Returns
  7833.           
  7834.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  7835.                               probably not initialized via wn_createw, but
  7836.                               may have been corrupted.
  7837.           
  7838.           BAD_TILE_HANDLE     Tile_handle de-references to NULL.  It was
  7839.                               probably not initialized via wn_createt, but
  7840.                               may have been corrupted.
  7841.           
  7842.           NOT_DONE            Tile is designated as hidden.
  7843.           
  7844.           OK                  No errors detected.
  7845.  
  7846.  
  7847.  
  7848.  
  7849.  
  7850.  
  7851.  
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.  
  7859.  
  7860.  
  7861.  
  7862.  
  7863.  
  7864.  
  7865.  
  7866.  
  7867.  
  7868.  
  7869.  
  7870.                                        - 110 -
  7871.  
  7872.  
  7873.  
  7874.  
  7875.  
  7876.           Window Pro v. 1.2                                Shareware Manual
  7877.  
  7878.  
  7879.  
  7880.           43. wn_updatew
  7881.           
  7882.           Summary
  7883.           
  7884.           #include "werrors.h"
  7885.           #include "Pro.h"
  7886.           
  7887.           int wn_updatew(handle)
  7888.           unsigned int handle;
  7889.           
  7890.           
  7891.           Description
  7892.           
  7893.           Updates the window defined by handle to the physical screen.
  7894.                                         handle                        
  7895.           
  7896.           
  7897.           Returns
  7898.           
  7899.           BAD_WDW_HANDLE      Handle de-references to NULL.  It was
  7900.                               probably not initialized via wn_createw, but
  7901.                               may have been corrupted.
  7902.           
  7903.           NOT_DONE            window is designated as hidden, or suspended.
  7904.           
  7905.           OK                  No errors detected.
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.  
  7926.  
  7927.  
  7928.  
  7929.  
  7930.  
  7931.  
  7932.  
  7933.  
  7934.  
  7935.  
  7936.  
  7937.  
  7938.                                        - 111 -
  7939.  
  7940.  
  7941.  
  7942.  
  7943.  
  7944.           Window Pro v. 1.2                                Shareware Manual
  7945.  
  7946.  
  7947.  
  7948.           44. wn_zoomw
  7949.           
  7950.           Summary
  7951.           
  7952.           #include "werrors.h"
  7953.           #include "Pro.h"
  7954.           
  7955.           int wn_zoomw()
  7956.           
  7957.           
  7958.           Description
  7959.           
  7960.           Zooms the active window to full screen size.  A subsequent call
  7961.           to wn_zoomw will shrink it back to its original size.
  7962.           
  7963.           
  7964.           Returns
  7965.           
  7966.           NO_ACTIVE_WDW       No active window is designated or the active
  7967.                               window handle de-references to NULL.  It was
  7968.                               probably not initialized via wn_createw, but
  7969.                               may have been corrupted.
  7970.           
  7971.           NO_ACTIVE_TILE      No active tile is designated or the active
  7972.                               tile handle de-references to NULL.
  7973.           
  7974.           OK                  No errors detected.
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.  
  7991.  
  7992.  
  7993.  
  7994.  
  7995.  
  7996.  
  7997.  
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004.  
  8005.                                        - 112 -
  8006.  
  8007.  
  8008.  
  8009.  
  8010.  
  8011.           Window Pro v. 1.2                                Shareware Manual
  8012.  
  8013.  
  8014.  
  8015.           F. Global Variables and Data Structures
  8016.           
  8017.           1.  active_attr, inactive_attr
  8018.           
  8019.           When a window is activated (see wn_actw for further explanation)
  8020.                                           wn actw                         
  8021.           its border colors are set to the value of active_attr and the
  8022.                                                     active attr        
  8023.           previously active window's border colors are set to the value of
  8024.           inactive_attr.  Also, when a window is first created its border
  8025.           inactive attr                                                  
  8026.           colors are set to the value of inactive_attr.
  8027.                                          inactive attr 
  8028.           
  8029.           
  8030.           2.  active_tile_attr, inactive_tile_attr
  8031.           
  8032.           When a tile is activated its name color is set to the value of
  8033.           active_tile_attr and the previously active tile's name color is
  8034.           active tile attr                                               
  8035.           set to the value of inactive_tile_attr.
  8036.                               inactive tile attr 
  8037.           
  8038.           
  8039.           3.  active_wdw
  8040.           
  8041.           active_wdw is equal to the handle of the window designated as the
  8042.           active wdw                                                       
  8043.           active window.  See the Overview and wn_actw for additional
  8044.                                                wn actw               
  8045.           explanation regarding the significance of the active window
  8046.           designation.
  8047.           
  8048.           
  8049.           4.  ansi_fcolor_table, ansi_fcolor_table
  8050.           
  8051.           After foreground and background are converted to the values based
  8052.           on their offsets into the ibm_fcolor_table and ibm_bcolor_table,
  8053.                                     ibm fcolor table     ibm bcolor table 
  8054.           the ANSI colors are converted to their respected values by using
  8055.           the converted foreground and background colors as offsets into
  8056.           the 16 byte tables ansi_fcolor_table and ansi_bcolor_table.  This
  8057.                              ansi fcolor table     ansi bcolor table       
  8058.           is helpful for creating terminal specific versions.
  8059.           
  8060.           
  8061.           5.  balance1
  8062.           
  8063.           balance1 is incremented for every call to the WINDOW PRO memory
  8064.           balance1                                                       
  8065.           allocation function and decremented for every call to the WINDOW
  8066.           PRO free memory function.  Used in debugging to determine that no
  8067.           bits and pieces of stuff have been left around.
  8068.           
  8069.           
  8070.           6.  buf[]
  8071.           
  8072.           Initialized to point to a 1000 byte area use as working space by
  8073.           wn_printf.  If this isn't enough space set the pointer to a
  8074.           wn printf                                                  
  8075.           larger area.
  8076.           
  8077.           
  8078.  
  8079.  
  8080.  
  8081.  
  8082.  
  8083.  
  8084.                                        - 113 -
  8085.  
  8086.  
  8087.  
  8088.  
  8089.  
  8090.           Window Pro v. 1.2                                Shareware Manual
  8091.  
  8092.  
  8093.  
  8094.           7.  cursor_e, cursor_b, cursor_on
  8095.           
  8096.           WINDOW PRO hides the cursor when performing certain functions by
  8097.           changing the cursor's shape.  It restores the cursor's shape
  8098.           using cursor_e and cursor_b as the ending and beginning scan line
  8099.                 cursor e     cursor b                                      
  8100.           values.
  8101.           
  8102.           If cursor_on is FALSE the cursor is not restored automatically as
  8103.              cursor on                                                     
  8104.           described above.  cursor_on is modified by calls to wn_hidecur
  8105.                                                               wn hidecur
  8106.           and wn_showcur.
  8107.               wn showcur 
  8108.           
  8109.           
  8110.           8.  cursor_position, change_color
  8111.           
  8112.           position_cursor is a printf-type string constant that is used to
  8113.           position the cursor when method = ANSI.  Upon initialization it
  8114.           is set to this:
  8115.           
  8116.                position_cursor = "\033[%d;%dH"
  8117.           
  8118.           If you want to change it you can do it at any time.  However, if
  8119.           using the ANSI method and the above is not the cirrect string for
  8120.           your terminal you should change it before calling wn_init.  The
  8121.           first %d will correspond the x coordinate and the second to the y
  8122.           coordinate.
  8123.           
  8124.           change_color is a printf-type string constant that is used to
  8125.           change the the color of the next character to be printed when
  8126.           method = ANSI.  Upon initialization it is set to this
  8127.           
  8128.                change_color = "\033[%d;%dm"
  8129.           
  8130.           You can change it at any time.  However, if using the ANSI method
  8131.           and the above is not the correct string for your terminal you
  8132.           should modify it before calling wn_init.  The first %d
  8133.           corresponds to the foreground color and the second to the
  8134.           background color.
  8135.           
  8136.           
  8137.           9.  default_box, box0, box1, box2, box3, box4, box
  8138.           
  8139.           default_box is a char pointer to an array of 13 chars.  The array
  8140.           default box                                                      
  8141.           is described in greater detail at wn_togbord.  When a window is
  8142.                                             wn togbord                   
  8143.           initially created it is assigned the box characters pointed to by
  8144.           default_box.
  8145.           default box 
  8146.           
  8147.           box0, box1, box2, box3 and box4 are various styles of box
  8148.           box0  box1  box2  box3     box4                          
  8149.           characters.  default_box is initially set equal to box0.
  8150.                        default box                                
  8151.           
  8152.           box is used only at the kernel level.
  8153.           box                                  
  8154.           
  8155.           
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.                                        - 114 -
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.           Window Pro v. 1.2                                Shareware Manual
  8168.  
  8169.  
  8170.  
  8171.           10. ega_mline
  8172.           
  8173.           If this global variable is TRUE before calling wn_init.  And
  8174.           wn_init determines that it is in an 80 column text mode.  It will
  8175.           assume that the display has ega_mlines lines.  Otherwise the
  8176.           display is assumed to have 25 lines.
  8177.           
  8178.           
  8179.           11. error_flag
  8180.           
  8181.           If TRUE the WINDOW PRO error handler is invoked on detecting an
  8182.           error.  Otherwise error values are returned to the calling
  8183.           function.
  8184.           
  8185.           
  8186.           12. first_wdw, last_wdw
  8187.           
  8188.           first_wdw is the first window in the display and designates the
  8189.           first wdw                                                      
  8190.           window on the bottom.
  8191.           
  8192.           last_wdw is the last window in the display list and designated
  8193.           last wdw                                                      
  8194.           the window on the top.
  8195.           
  8196.           
  8197.           13. frozen
  8198.           
  8199.           If TRUE indicates that all screen output is re-routed to the area
  8200.           pointed to by alt_scr.
  8201.                         alt scr 
  8202.           
  8203.           
  8204.           14. ibm_fcolor_table, ibm_bcolor_table
  8205.           
  8206.           These 16 byte tables correspond to the colors in the file
  8207.           colors.h.  All functions requesting a foreground and background
  8208.           color use the foreground and background values as offsets into
  8209.           these tables (where they get the value they actually use.)  You
  8210.           can then easily make programs which modify colors by allowing the
  8211.           user to modify these tables.
  8212.           
  8213.           This can be useful to map colors into other video modes that
  8214.           don't support color, like the monochrome display, or some CGA
  8215.           cards and monitors don't display some colors clearly (you can
  8216.           just use this table to map those colors to ones that do.)
  8217.           
  8218.           
  8219.           15. method
  8220.           
  8221.           method can be set to DMA, BIOS, or ANSI.  See the overview for a
  8222.           method               DMA  BIOS     ANSI                         
  8223.           discussion of the various screen update methods.  method is
  8224.                                                             method   
  8225.           initialized to DMA, you can change it during run time to any of
  8226.                          DMA                                             
  8227.           the 3 supported methods.  If a particular method is not supported
  8228.           by your machine you should make sure that it is not set to that
  8229.           value before calling wn_init.
  8230.                                wn init 
  8231.           
  8232.  
  8233.  
  8234.  
  8235.                                        - 115 -
  8236.  
  8237.  
  8238.  
  8239.  
  8240.  
  8241.           Window Pro v. 1.2                                Shareware Manual
  8242.  
  8243.  
  8244.  
  8245.           16. oldx, oldy, oldb, olde
  8246.           
  8247.           On calling wn_init, oldx and oldy are set to the current cursor
  8248.                      wn init  oldx     oldy                              
  8249.           position and oldb and olde are set to the starting and ending
  8250.                        oldb     olde                                   
  8251.           scan line values.  You can use this to restore the cursor to its
  8252.           original state on exiting your application.
  8253.           
  8254.           
  8255.           17. overlay
  8256.           
  8257.           This item is a pointer of type blkrec and holds an image of what
  8258.                                          blkrec                           
  8259.           is behind the active window (this is why operations on active
  8260.           windows is sometimes faster -- because we don't rebuild the whole
  8261.           screen, and conversely why operations on background windows are
  8262.           sometimes slower.)
  8263.           
  8264.           
  8265.           18. physical_columns, physical_rows
  8266.           
  8267.           physical_columns indicates the number of columns on the physical
  8268.           physical columns                                                
  8269.           screen.  physical_rows indicates the number of rows on the
  8270.                    physical rows                                    
  8271.           physical screen.
  8272.           
  8273.           
  8274.           19. primary_scr, alt_scr, curr_scr
  8275.           
  8276.           primary_scr is a pointer to real video ram area -- it is only
  8277.           primary scr                                                  
  8278.           important if using the DMA screen update method.
  8279.           
  8280.           alt_scr is a pointer to an area of the same size as video ram --
  8281.           alt scr                                                         
  8282.           we can build complex screens there and then dump them very fast
  8283.           to real video ram.  This is the area where WINDOW PRO sends its
  8284.           output when the screen is frozen (See frozen, wn_freeze, and
  8285.                                                 frozen  wn freeze     
  8286.           wn_defrost for further explanation.)
  8287.           wn defrost                          
  8288.           
  8289.           curr_scr points to where WINDOW PRO is currently sending output. 
  8290.           curr scr                                                         
  8291.           It is generally set to primary_scr if the system is not frozen
  8292.                                  primary scr                            
  8293.           and to alt_scr if it is.
  8294.                  alt scr          
  8295.           
  8296.           
  8297.           20. screen_buffer
  8298.           
  8299.           Points to the location where the windows background screen is
  8300.           saved.  See wn_savescr and wn_restorescr for further explanation.
  8301.                       wn savescr     wn restorescr                         
  8302.           
  8303.           
  8304.           21. scroll_bars_on
  8305.           
  8306.           When a tile is created its scroll bars indicator is set to the
  8307.           value of scroll_bars_on.
  8308.                    scroll bars on 
  8309.           
  8310.           
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.                                        - 116 -
  8317.  
  8318.  
  8319.  
  8320.  
  8321.  
  8322.           Window Pro v. 1.2                                Shareware Manual
  8323.  
  8324.  
  8325.  
  8326.           22. tab_expansion
  8327.           
  8328.           tab_expansion indicates at what column position tab stops are
  8329.           located.  This is used by vs_printf and vs_format for tab
  8330.           expansion.  For example, a tab_expansion setting of 8 would
  8331.           position tab stops at column 8, 16, 24, and so on.  If
  8332.           tab_expansion is set to zero or is larger than the current
  8333.           virtual screen there will be unpredictable results.
  8334.           
  8335.           tab_expansion is set at 10, by default.
  8336.           
  8337.           
  8338.           23. vpage
  8339.           
  8340.           Equal to the video page active on calling wn_init.
  8341.                                                     wn init 
  8342.           
  8343.           
  8344.           24. window[]
  8345.           
  8346.           An array of pointers to window_rec.  The handles used to refer to
  8347.           windows are actually offsets into this array.  Although WINDOW
  8348.           PRO allows a theoretically unlimited number of windows.  The
  8349.           actual maximum is determined at compilation time so that
  8350.           sufficient space is allocated for this array (This may change in
  8351.           the future -- perhaps some kind of dynamic allocation where you
  8352.           can decide the maximum at run-time.)
  8353.           
  8354.           
  8355.           25. zoomed
  8356.           
  8357.           If TRUE indicates that the window currently designated as active
  8358.           is also zoomed.  See wn_zoomw for further explanation.
  8359.                                wn zoomw                         
  8360.           
  8361.           
  8362.           26. zoomed_tile
  8363.           
  8364.           Only the last tile in the zoomed window is effected by zooming so
  8365.           this item holds the original values for the last tile of a zoomed
  8366.           window (for the same reasons as explained in zoomed_wdw.)
  8367.                                                        zoomed wdw  
  8368.           
  8369.           
  8370.           27. zoomed_wdw
  8371.           
  8372.           zoomed_wdw is a window_rec which holds a copy of the  zoomed
  8373.           zoomed wdw      window rec                                  
  8374.           window -- so we can reset the zoomed window back to its original
  8375.           state when we unzoom it.
  8376.  
  8377.  
  8378.  
  8379.  
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.  
  8387.                                        - 117 -
  8388.  
  8389.  
  8390.  
  8391.  
  8392.  
  8393.           Window Pro v. 1.2                                Shareware Manual
  8394.  
  8395.  
  8396.  
  8397.           28. wdw_rec
  8398.           
  8399.           /* window record layout */
  8400.           typedef struct {
  8401.                unsigned int physical_x, physical_y, suspend, hide, border,
  8402.                     forward, backward, first_tile, last_tile, active_tile;
  8403.           
  8404.                int port_columns, port_rows;
  8405.           
  8406.                unsigned char  *wdw_name, border_color, *border_chars;
  8407.                tile_rec *tiles[MAX_TILES + 1];
  8408.           
  8409.           } wdw_rec;
  8410.           
  8411.           physical_x, physical_y   the upper left corner of the window is
  8412.                                    positioned on this physical screen
  8413.                                    coordinate.
  8414.           
  8415.           suspend                  if this is true most operations on the
  8416.                                    window will not be reflected on the
  8417.                                    virtual screen.
  8418.           
  8419.           hide                     if this is true the window is not
  8420.                                    displayed on the physical screen.
  8421.           
  8422.           border                   defines the border style (see
  8423.                                    wn_togborer for additional explanation.)
  8424.           
  8425.           forward                  handle of the window underneath this
  8426.                                    window.
  8427.           
  8428.           backward                 handle of the window on top of this
  8429.                                    window.
  8430.           
  8431.           first_tile               tile handle of the tile displayed at the
  8432.                                    top of the window.
  8433.           
  8434.           last_tile                tile handle of the tile displayed at the
  8435.                                    bottom of the window.
  8436.           
  8437.           active_tile              tile handle of the active tile in this
  8438.                                    window.
  8439.           
  8440.           port_columns, port_rows  inner dimensions of the window.
  8441.           
  8442.           wdw_name                 pointer to the name of the window.
  8443.           
  8444.           border_color             attribute value of the window borders.
  8445.           
  8446.           border_chars             pointer to a 13 byte array of border
  8447.                                    characters. (See wn_chgborder for
  8448.                                    additional explanation.)
  8449.           
  8450.  
  8451.  
  8452.  
  8453.  
  8454.                                        - 118 -
  8455.  
  8456.  
  8457.  
  8458.  
  8459.  
  8460.           Window Pro v. 1.2                                Shareware Manual
  8461.  
  8462.  
  8463.  
  8464.           tiles                    array of tile pointers to the tiles
  8465.                                    contained by this window.  The shareware
  8466.                                    version sets this to a maximum of 10. 
  8467.                                    With source code you can reserve
  8468.                                    whatever amount of space you require.
  8469.           
  8470.           
  8471.           29. tile_rec
  8472.           
  8473.           /* tile record */
  8474.           typedef struct {
  8475.                char *virtual_screen, *tile_name, border_color;
  8476.                unsigned char forward, backward, scroll_bars;
  8477.                int suspend, hide, port_rows, vs_rows, vs_columns,
  8478.                     cursor_x, cursor_y, virtual_x, virtual_y, offset_y;
  8479.           } tile_rec;
  8480.           
  8481.           virtual_screen           pointer to the tile's virtual screen.
  8482.           
  8483.           tile_name                pointer to the tile's name
  8484.           
  8485.           border_color             attribute value for the tile's name
  8486.           
  8487.           forward                  pointer to the tile displayed below this
  8488.                                    tile.
  8489.           
  8490.           backward                 pointer to the tile displayed above this
  8491.                                    tile.
  8492.           
  8493.           scroll_bars              if true the scroll bars are displayed
  8494.                                    for this tile.
  8495.           
  8496.           suspend                  if true most operations on the tile will
  8497.                                    not be seen on the physical screen.
  8498.           
  8499.           hide                     if true the tile is not currently
  8500.                                    displayed in its window.
  8501.           
  8502.           port_rows, port_columns  the inner dimensions of the tile (if
  8503.                                    displayed.)
  8504.           
  8505.           vs_rows, vs_columns      the dimensions of the tile's virtual
  8506.                                    screen.
  8507.           
  8508.           cursor_x, cursor_y       the location of the tile's cursor.
  8509.           
  8510.           virtual_x, virtual_y     the upper left corner of the tile's
  8511.                                    viewport displays this virtual screen
  8512.                                    coordinate.
  8513.           
  8514.           offset_y                 the tile is displayed this many rows
  8515.                                    from the top of the window.
  8516.           
  8517.           
  8518.  
  8519.  
  8520.  
  8521.                                        - 119 -
  8522.  
  8523.  
  8524.  
  8525.  
  8526.  
  8527.           Window Pro v. 1.2                                Shareware Manual
  8528.  
  8529.  
  8530.  
  8531.           30. blkrec
  8532.           
  8533.           /* block record */
  8534.           typedef struct {
  8535.                unsigned int x, y, rows, columns;
  8536.                char *buffer;
  8537.           } blkrec;
  8538.           
  8539.           The active window keeps a copy of the image underneath it in this form.
  8540.           
  8541.           x,y            the physical screen coordinate where the image is located.
  8542.           
  8543.           rows, columns  the dimensions of the image.
  8544.           
  8545.           buffer         a pointer to the image.
  8546.  
  8547.  
  8548.  
  8549.  
  8550.  
  8551.  
  8552.  
  8553.  
  8554.  
  8555.  
  8556.  
  8557.  
  8558.  
  8559.  
  8560.  
  8561.  
  8562.  
  8563.  
  8564.  
  8565.  
  8566.  
  8567.  
  8568.  
  8569.  
  8570.  
  8571.  
  8572.  
  8573.  
  8574.  
  8575.  
  8576.  
  8577.  
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.  
  8585.  
  8586.  
  8587.  
  8588.                                        - 120 -
  8589.  
  8590.  
  8591.  
  8592.  
  8593.  
  8594.           Window Pro v. 1.2                                Shareware Manual
  8595.  
  8596.  
  8597.  
  8598.           G. Forthcoming Enhancements
  8599.           
  8600.           Several enhancements are in the works for The WINDOW PRO.
  8601.           
  8602.            .  Small, medium, and compact model support,
  8603.            
  8604.            .  Support for the Lattice C compiler,
  8605.            
  8606.            .  Copy a window,
  8607.            
  8608.            .  Copy a virtual screen,
  8609.            
  8610.            .  Upgraded support for zoom and suspend features,
  8611.            
  8612.            .  More processor independent timing (certain functions, like
  8613.               kb_mouseclicks use processor dependent timing,) and
  8614.            
  8615.            .  vs_printf for Microsoft C ver 4.
  8616.            
  8617.            .  graphics-based virtual screens.
  8618.            
  8619.            .  more range functions (e.g. range delete, range open, range
  8620.               close, etc.)
  8621.            
  8622.            .  built-in support for invoking ega fonts (35 line, 43 line, 50
  8623.               line, etc.)
  8624.            
  8625.            .  Simplification of the application programmer interface.  We
  8626.               have received several comments regarding the complexity of
  8627.               the functions.  While most functions work as expected and do
  8628.               much more than any other similar product there are two
  8629.               problems which user feedback points out:
  8630.            
  8631.                 .. There are a lot of arguments for some functions.  We
  8632.                    intend to add some additional defaults to the window and
  8633.                    tile structures and create functions which will use
  8634.                    those defaults, as alternatives to the functions which
  8635.                    let you specify all of the options, for example, we may
  8636.                    add default background and foreground colors for the
  8637.                    virtual screens, and supply an alternative set of
  8638.                    functions or macros which will use the defaults rather
  8639.                    than require you to pass them as arguments on each
  8640.                    call.  All, of the existing functions will remain in
  8641.                    their current form, these will only be enhancements.
  8642.             
  8643.                 .. There is some inconsistency in the use of row, column or
  8644.                    column, row designations -- these will be cleared up,
  8645.                    but again the original functions will remain intact.
  8646.  
  8647.  
  8648.  
  8649.  
  8650.  
  8651.  
  8652.  
  8653.  
  8654.  
  8655.                                        - 121 -
  8656.  
  8657.  
  8658.  
  8659.  
  8660.  
  8661.           Window Pro v. 1.2                                Shareware Manual
  8662.  
  8663.  
  8664.  
  8665.           H. Other Seabreeze Products
  8666.           
  8667.           Seabreeze Software also distributes and supports these products.
  8668.           
  8669.           Dialog Box Maker              C-code for making and running
  8670.                                         several types of dialog boxes.
  8671.           
  8672.           Menu Maker                    C-code for making and running  a
  8673.                                         pull-down menu system
  8674.           Pop-up Programmable 
  8675.             Financial Calculator        C-code.  An excellent lesson in
  8676.                                         using The WINDOW PRO shareware
  8677.                                         library.
  8678.           
  8679.           Desktop Shell                 C-code for creating a desktop like
  8680.                                         environment for a program.
  8681.  
  8682.  
  8683.  
  8684.  
  8685.  
  8686.  
  8687.  
  8688.  
  8689.  
  8690.  
  8691.  
  8692.  
  8693.  
  8694.  
  8695.  
  8696.  
  8697.  
  8698.  
  8699.  
  8700.  
  8701.  
  8702.  
  8703.  
  8704.  
  8705.  
  8706.  
  8707.  
  8708.  
  8709.  
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.  
  8719.  
  8720.  
  8721.  
  8722.                                        - 122 -
  8723.  
  8724.  
  8725.  
  8726.