home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PRO2.ZIP / REF.TXT < prev    next >
Text File  |  1988-12-10  |  212KB  |  8,647 lines

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