home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
PRO2.ZIP
/
REF.TXT
< prev
next >
Wrap
Text File
|
1988-12-10
|
212KB
|
8,647 lines
The WindowPro
* * * * * Reference Manual * * * * *
by Kenneth Stott
version 1.5
Seabreeze Software
397 Dal-Rich Village
Suite 169
Richardson, Texas 75080
(214) 437-2729
Copyright (c) 1986-1988 by Kenneth Stott
All Rights Reserved
The WindowPro shareware diskette, containing a copy of this
manual, may be freely copied and shared. But, printed copies of
this document may not be copied by any method without the express
written permission of Seabreeze Software.
WindowPro v. 1.5 Reference Manual
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Keyboard and Mouse Functions . . . . . . . . . . . . . . 5
2.1 kb_convertcoord . . . . . . . . . . . . . . . . . . 6
2.2 kb_getshift . . . . . . . . . . . . . . . . . . . . 6
2.3 kb_getxc . . . . . . . . . . . . . . . . . . . . . 7
2.4 kb_hidemouse . . . . . . . . . . . . . . . . . . . 8
2.5 kb_ismouse . . . . . . . . . . . . . . . . . . . . 9
2.6 kb_mouseclicks . . . . . . . . . . . . . . . . . . 10
2.7 kb_mousemickeys . . . . . . . . . . . . . . . . . . 11
2.8 kb_mousemotion . . . . . . . . . . . . . . . . . . 12
2.9 kb_mousepressed . . . . . . . . . . . . . . . . . . 13
2.10 kb_mousereleased . . . . . . . . . . . . . . . . . 14
2.11 kb_mousestatus . . . . . . . . . . . . . . . . . . 15
2.12 kb_putmouse . . . . . . . . . . . . . . . . . . . . 16
2.13 kb_resetmouse . . . . . . . . . . . . . . . . . . . 17
2.14 kb_setgraphicsicon . . . . . . . . . . . . . . . . 18
2.15 kb_setmousexrange . . . . . . . . . . . . . . . . . 19
2.16 kb_setmouseyrange . . . . . . . . . . . . . . . . . 20
2.17 kb_settextcursor . . . . . . . . . . . . . . . . . 21
2.18 kb_showmouse . . . . . . . . . . . . . . . . . . . 22
3 Video Functions . . . . . . . . . . . . . . . . . . . . . 23
3.1 v_curshape . . . . . . . . . . . . . . . . . . . . 23
3.2 v_cursor_report . . . . . . . . . . . . . . . . . . 24
3.3 v_getchar . . . . . . . . . . . . . . . . . . . . . 25
3.4 v_getmode . . . . . . . . . . . . . . . . . . . . . 26
3.5 v_getpage . . . . . . . . . . . . . . . . . . . . . 27
3.6 v_getwidth . . . . . . . . . . . . . . . . . . . . 28
3.7 v_gotoxy . . . . . . . . . . . . . . . . . . . . . 29
3.8 v_putchar . . . . . . . . . . . . . . . . . . . . . 30
3.9 v_setega25 . . . . . . . . . . . . . . . . . . . . 31
3.10 v_setega43 . . . . . . . . . . . . . . . . . . . . 32
3.11 v_setmode . . . . . . . . . . . . . . . . . . . . . 33
4 Virtual Screen Functions . . . . . . . . . . . . . . . . 34
4.1 vs_clr* . . . . . . . . . . . . . . . . . . . . . . 34
4.2 vs_delcolumn . . . . . . . . . . . . . . . . . . . 36
4.3 vs_delrow . . . . . . . . . . . . . . . . . . . . . 37
4.4 vs_drawbox . . . . . . . . . . . . . . . . . . . . 38
4.5 vs_fillattr . . . . . . . . . . . . . . . . . . . . 39
4.6 vs_fillchar . . . . . . . . . . . . . . . . . . . . 40
4.7 vs_format . . . . . . . . . . . . . . . . . . . . . 41
4.8 vs_gets . . . . . . . . . . . . . . . . . . . . . . 42
4.9 vs_inscolumn . . . . . . . . . . . . . . . . . . . 43
4.10 vs_insrow . . . . . . . . . . . . . . . . . . . . . 44
4.11 vs_locatecur . . . . . . . . . . . . . . . . . . . 45
4.12 vs_printf . . . . . . . . . . . . . . . . . . . . . 46
4.13 vs_putatrs . . . . . . . . . . . . . . . . . . . . 49
4.14 vs_putc . . . . . . . . . . . . . . . . . . . . . . 47
4.15 vs_puts . . . . . . . . . . . . . . . . . . . . . . 48
4.16 vs_putscenter . . . . . . . . . . . . . . . . . . . 50
5 Window and Tile Functions . . . . . . . . . . . . . . . . 51
5.1 wn_actt . . . . . . . . . . . . . . . . . . . . . . 51
5.2 wn_actw . . . . . . . . . . . . . . . . . . . . . . 52
5.3 wn_bordrng . . . . . . . . . . . . . . . . . . . . 53
5.4 wn_chgbord . . . . . . . . . . . . . . . . . . . . 54
- Table of Contents 1 -
WindowPro v. 1.5 Reference Manual
5.5 wn_chgcolor . . . . . . . . . . . . . . . . . . . . 55
5.6 wn_closerng . . . . . . . . . . . . . . . . . . . . 56
5.7 wn_closet . . . . . . . . . . . . . . . . . . . . . 57
5.8 wn_closew . . . . . . . . . . . . . . . . . . . . . 58
5.9 wn_copyt . . . . . . . . . . . . . . . . . . . . . 59
5.10 wn_copyw . . . . . . . . . . . . . . . . . . . . . 60
5.11 wn_createt . . . . . . . . . . . . . . . . . . . . 61
5.12 wn_createw . . . . . . . . . . . . . . . . . . . . 62
5.13 wn_defrost . . . . . . . . . . . . . . . . . . . . 64
5.14 wn_deletet . . . . . . . . . . . . . . . . . . . . 65
5.15 wn_delrng . . . . . . . . . . . . . . . . . . . . . 66
5.16 wn_delw . . . . . . . . . . . . . . . . . . . . . . 67
5.17 wn_draww . . . . . . . . . . . . . . . . . . . . . 68
5.18 wn_edlin . . . . . . . . . . . . . . . . . . . . . 69
5.19 wn_flybox . . . . . . . . . . . . . . . . . . . . . 71
5.20 wn_freeze . . . . . . . . . . . . . . . . . . . . . 72
5.21 wn_hidecur . . . . . . . . . . . . . . . . . . . . 73
5.22 wn_hidew . . . . . . . . . . . . . . . . . . . . . 74
5.23 wn_init . . . . . . . . . . . . . . . . . . . . . . 75
5.24 wn_ison* . . . . . . . . . . . . . . . . . . . . . 76
5.25 wn_locatetwabs . . . . . . . . . . . . . . . . . . 82
5.26 wn_locatetwrel . . . . . . . . . . . . . . . . . . 83
5.27 wn_locatevs . . . . . . . . . . . . . . . . . . . . 84
5.28 wn_locatew . . . . . . . . . . . . . . . . . . . . 85
5.29 wn_moverng . . . . . . . . . . . . . . . . . . . . 86
5.30 wn_movetwabs . . . . . . . . . . . . . . . . . . . 87
5.31 wn_movetwrel . . . . . . . . . . . . . . . . . . . 88
5.32 wn_movew . . . . . . . . . . . . . . . . . . . . . 89
5.33 wn_namet . . . . . . . . . . . . . . . . . . . . . 90
5.34 wn_namew . . . . . . . . . . . . . . . . . . . . . 91
5.35 wn_openabst . . . . . . . . . . . . . . . . . . . . 92
5.36 wn_openrelt . . . . . . . . . . . . . . . . . . . . 93
5.37 wn_opent . . . . . . . . . . . . . . . . . . . . . 94
5.38 wn_openw . . . . . . . . . . . . . . . . . . . . . 95
5.39 wn_putslist . . . . . . . . . . . . . . . . . . . . 96
5.40 wn_redraw . . . . . . . . . . . . . . . . . . . . . 97
5.41 wn_restorescr . . . . . . . . . . . . . . . . . . . 98
5.42 wn_savescr . . . . . . . . . . . . . . . . . . . . 99
5.43 wn_scrollvs . . . . . . . . . . . . . . . . . . . . 100
5.44 wn_showcur . . . . . . . . . . . . . . . . . . . . 101
5.45 wn_sizerng . . . . . . . . . . . . . . . . . . . . 102
5.46 wn_sizet . . . . . . . . . . . . . . . . . . . . . 103
5.47 wn_suspendt . . . . . . . . . . . . . . . . . . . . 104
5.48 wn_suspendw . . . . . . . . . . . . . . . . . . . . 105
5.49 wn_swapt . . . . . . . . . . . . . . . . . . . . . 106
5.50 wn_swapt2 . . . . . . . . . . . . . . . . . . . . . 107
5.51 wn_sync_tw_to_vs . . . . . . . . . . . . . . . . . 108
5.52 wn_sync_vs_to_tw . . . . . . . . . . . . . . . . . 109
5.53 wn_togborder . . . . . . . . . . . . . . . . . . . 110
5.54 wn_togbordrng . . . . . . . . . . . . . . . . . . . 111
5.55 wn_togscroll . . . . . . . . . . . . . . . . . . . 112
5.56 wn_togscrollallt . . . . . . . . . . . . . . . . . 113
5.57 wn_togscrollrng . . . . . . . . . . . . . . . . . . 114
5.58 wn_togthumb . . . . . . . . . . . . . . . . . . . . 115
- Table of Contents 2 -
WindowPro v. 1.5 Reference Manual
5.59 wn_updatet . . . . . . . . . . . . . . . . . . . . 116
5.60 wn_updatew . . . . . . . . . . . . . . . . . . . . 117
5.61 wn_zoomw . . . . . . . . . . . . . . . . . . . . . 118
6 Global Variables and Data Structures . . . . . . . . . . 119
6.1 active_attr, inactive_attr . . . . . . . . . . . . 119
6.2 active_tile_attr, inactive_tile_attr . . . . . . . 119
6.3 active_wdw . . . . . . . . . . . . . . . . . . . . 119
6.4 ansi_fcolor_table, ansi_fcolor_table . . . . . . . 119
6.5 balance1 . . . . . . . . . . . . . . . . . . . . . 119
6.6 blkrec . . . . . . . . . . . . . . . . . . . . . . 119
6.7 buf[] . . . . . . . . . . . . . . . . . . . . . . . 120
6.8 cursor_e, cursor_b, cursor_on . . . . . . . . . . . 120
6.9 cursor_position, change_color . . . . . . . . . . . 120
6.10 default_box, box0, box1, box2, box3, box4 . . . . . 121
6.11 ega_mline . . . . . . . . . . . . . . . . . . . . . 121
6.12 error_flag . . . . . . . . . . . . . . . . . . . . 121
6.13 first_wdw, last_wdw . . . . . . . . . . . . . . . . 121
6.14 frozen . . . . . . . . . . . . . . . . . . . . . . 121
6.15 ibm_fcolor_table, ibm_bcolor_table . . . . . . . . 121
6.16 justify . . . . . . . . . . . . . . . . . . . . . . 125
6.17 justify_tile . . . . . . . . . . . . . . . . . . . 125
6.18 method . . . . . . . . . . . . . . . . . . . . . . 122
6.19 mouse_installed . . . . . . . . . . . . . . . . . . 122
6.20 oldx, oldy, oldb, olde . . . . . . . . . . . . . . 122
6.21 overlay . . . . . . . . . . . . . . . . . . . . . . 122
6.22 physical_columns, physical_rows . . . . . . . . . . 122
6.23 primary_scr, alt_scr, curr_scr . . . . . . . . . . 123
6.24 screen_buffer . . . . . . . . . . . . . . . . . . . 123
6.25 scroll_bars_on . . . . . . . . . . . . . . . . . . 123
6.26 tab_expansion . . . . . . . . . . . . . . . . . . . 123
6.27 thumbwheels_on . . . . . . . . . . . . . . . . . . 123
6.28 tile_rec . . . . . . . . . . . . . . . . . . . . . 123
6.29 vpage . . . . . . . . . . . . . . . . . . . . . . . 125
6.30 wdw[] . . . . . . . . . . . . . . . . . . . . . . . 127
6.31 wdw_rec . . . . . . . . . . . . . . . . . . . . . . 126
6.32 zoomed . . . . . . . . . . . . . . . . . . . . . . 127
6.33 zoomed_tile . . . . . . . . . . . . . . . . . . . . 127
6.34 zoomed_wdw . . . . . . . . . . . . . . . . . . . . 127
- Table of Contents 3 -
WindowPro v. 1.5 Reference Manual
1 Overview
WindowPro classifies its functions into five groupings:
. Windows (and tiles)
. Virtual screens
. Video
. Kernel
. Keyboard and mouse
The kernel functions are not documented in the shareware manual.
You really shouldn't use them until you have gained considerable
experience with WindowPro. They can be useful for tweaking a bit
of extra speed, or reducing code size.
The windows and tile functions deal with changing the window
sizes, positions on the physical screen, border characters,
border styles, etc.
The virtual screen functions manipulate the virtual screens.
They allow you to print to a virtual screen, erase areas, etc.
The video functions let you change cursor shapes, sense video
cards, set video modes, for IBM-PC and compatibles.
The mouse and keyboard functions provide extended keyboard
support (so you can, for example, distinguish between the grey
and white '+' key) and functions for reporting on mouse activity,
limiting where it can roam, etc.
The following is a laundry list of the types of functions you can
find in each general area. It is not a complete list but it will
give you a feel for where you might find functions and helps
demonstrate the breadth of functionality encompassed by The
WindowPro.
WINDOWS AND TILES:
INITIALIZE WindowPro -- initializes various variables and
allocates memory for various structures.
CREATE a window -- sets up a window in memory and defines a
virtual screen.
OPEN a window -- puts a previously created window on top of
the display list.
CLOSE a window -- removes a window from the display list.
DELETE a window -- removes a window from memory.
HIDE a window -- suppresses the display of a window, but
keeps its position in the display list.
- 1 -
WindowPro v. 1.5 Reference Manual
ACTIVATE a window -- temporarily places a window on top of
the display list, any previously active window is reinserted
into its original location in the display list.
MOVE a window -- changes the position of a window on the
physical screen relative to its current position.
LOCATE a window -- changes the position of a window on the
physical screen to an absolute position.
BORDERS -- Each window can have its own unique border
characters, decided by you. This is useful for
distinguishing between different types of windows on the
screen, for example menus, dialog boxes, and editing
windows. You can also determine a border style such as
NORMAL, BORDERLESS, or SHADED. Shaded borders provide you
with several types of shadow effects. You can determine the
color of the border characters.
SIZE a window -- changes the size of a window relative to
its current position.
RANGE -- virtually every function has a range oriented
version. This allows you to define groups of windows and
then move or size them as a group. This is really handy
when developing applications where an object on the screen
is made up of a several overlapping windows, for example a
pop-up calculator might be programmed in this way.
NAME a window -- a window can be given a name which is
displayed in its borders.
SUSPEND a window -- operations performed on a suspended
window are not displayed on the screen (the window is
frozen.) When the window is un-suspended the result of all
the operations performed are "flashed" on the screen at
once.
FREEZE and DEFROST the system -- If the entire system is
"frozen" absolutely no operation is reflected on the
screen. "defrosting" the screen "flashes" all of the
changes on he screen at once.
ZOOM a window -- the active window can be temporarily
increased in size, and then un-zoomed back to its original
size.
CREATE a tile -- sets up additional virtual screens
associated with a window in memory.
OPEN a tile -- inserts a tile below the currently active
tile in a window.
- 2 -
WindowPro v. 1.5 Reference Manual
CLOSE a tile -- removes a tile from the tile display list.
DELETE a tile -- removes a tile from memory.
SIZE a tile -- changes the size of tile relative to its
current size.
THUMBWHEELS -- thumbwheels are the center part of scroll
bars. The WindowPro did not support these until version
1.31. Thumbwheels can illustrate the relative position of
the viewport within a document, spreadsheet, virtual screen,
etc. Functions are included to move the thumbwheels, sense
them with the mouse, synchronize the thumbwheels to the same
relative position as the virtual screen within the viewport,
and to synchronize the viewport to the relative positions of
the thumbwheels.
NAME a tile -- a tile can be given a name which is displayed
in its borders.
SUSPEND a tile -- similar to suspending a window described
above.
VIRTUAL SCREEN FUNCTIONS:
PRINTF -- you can output to any virtual screen using a
windows-type printf which operates pretty much like regular
old printf, except that you can define background and
foreground attributes.
GETS -- you can collect input inside of windows using a
windows-type gets. It is similar to regular gets but allows
for the definition of character colors, and scrolling
methods.
FILL -- you can fill any defined region in a virtual screen
with a character and attribute (great for erasing parts of
virtual screens)or with just an attribute (works well for
highlighting and dehighlighting words, etc.)
CURSOR -- Every virtual screen has its own cursor position.
You can move it to any position you like.
SCROLL -- Because a virtual screen may actually be larger
than the window that displays it you can define what part of
the virtual screen is displayed in the window/tile. This
can be used to create scrolling effects.
VIDEO FUNCTIONS:
CURSOR SHAPE -- you can define the shape of the cursor.
- 3 -
WindowPro v. 1.5 Reference Manual
CURSOR LOCATION -- moves the cursor to any location on the
screen.
PUTC -- output a character and attribute to any location on
the screen.
SAVE/RESTORE SCREEN -- you can save any screen and use it as
a backdrop behind your windows display. This is useful for
creating background screens, or in pop-up programs which
need to restore the screen to its state prior to be
"popped-up."
KEYBOARD and MOUSE FUNCTIONS:
EXTENDED KEYBOARD GETCH -- returns a full integer value
giving a scan code and ascii value. This will let you
distinguish between say the grey + and the white + key.
MOUSE EXISTENCE -- tells you if a MICROSOFT compatible mouse
is installed.
MOUSE STATUS -- tells you if a button was pressed and where
the mouse is on the screen.
MOUSE MOTION -- tells you how far the mouse has traveled and
in what direction since you last checked its motion
indicators.
MOUSE PRESSED/RELEASED -- tells you is button was pressed or
released and where the mouse was located at the time of the
event.
MOUSE CLICKS -- reports on typical macro-type mouse events
typically used in a mouse interface, e.g. clicks,
double-clicks, releases, and presses.
MOUSE CURSOR -- you can control the style of the mouse
cursor and turn it on and off at will.
- 4 -
WindowPro v. 1.5 Reference Manual
2 Keyboard and Mouse Functions
- 5 -
WindowPro v. 1.5 Reference Manual
2.1 kb_convertcoord
Summary
#include "keyboard.h"
void kb_convertcoords(x, y)
int *x, *y;
Description
Converts mouse coordinates to physical_screen coordinates.
2.2 kb_getshift
Summary
#include "keyboard.h"
unsigned kb_getshift(void)
Description
Returns an integer where each bit returns the following
information:
15 Insert; active=1; inactive=0
14 Caps Lock; active=1; inactive=0
13 Num Lock; active=1; inactive=0
12 Scroll Lock; active=1; inactive=0
11 Alt Shift; active=1; inactive=0
10 Ctrl Shift; active=1; inactive=0
9 Normal Left Shift; active=1; inactive=0
8 Normal Right Shift; active=1; inactive=0
7 Ins; depressed=1
6 Caps Lock; depressed=1
5 Num Lock; depressed=1
4 Scroll Lock; depressed=1
3 Hold State Active=1
2 PC Jr keyboard click active=1
1 Not Used
0 Not Used
- 6 -
WindowPro v. 1.5 Reference Manual
2.3 kb_getxc
Summary
#include "keyboard.h"
unsigned kb_getxc(void)
Description
Returns a single unsignedeger where the upper byte is the scan
code (see the IBM technical reference manual -- each physical key
has a scan code assigned) and the lower byte is the ascii code (0
if no ascii code.)
- 7 -
WindowPro v. 1.5 Reference Manual
2.4 kb_hidemouse
Summary
#include "mouse.h"
void kb_hidemouse(void)
Description
Turns off the mouse cursor.
Returns
None.
- 8 -
WindowPro v. 1.5 Reference Manual
2.5 kb_ismouse
Summary
#include "mouse.h"
int kb_ismouse(void)
Description
Returns TRUE if a Microsoft compatible mouse is installed,
otherwise it returns FALSE. Resets the mouse internal registers.
- 9 -
WindowPro v. 1.5 Reference Manual
2.6 kb_mouseclicks
Summary
#include "mouse.h"
void kb_mouseclicks(button, timeout, x, y)
int button, timeout, *x, *y;
Description
kb_mouseclicks can interpret things like clicks, double-clicks,
presses and releases. On calling kb_mouseclicks you pass it the
button of interest in 'button' and a timeout value in 'timeout.'
button = 1, left
button = 2, right
button = 3, both
The timeout value represents the number of times that the PC will
generate a clock tick interrupt (about 18 times per second)
without kb_mouseclicks sensing button activity -- triggering a
return to the calling function.
If there are any keys in the buffer or if any keys put in the
keyboard buffer during kb_mouseclicks, kb_mouseclicks will
terminate early and not report on any interim mouse events. This
works pretty well in practice because typically you'll want to
stick kb_mouseclicks in the main command loop. If every call to
kb_mouseclicks results in a wait for timeout then keyboard entry
slows down considerably.
the mouse cursor location as of the last button event is returned
in x, y.
Returns
DOUBLECLICK interpreted a double-click
CLICK interpreted a click
PRESS interpreted a button press
HOLDING user continues to hold a button after a
reported button press
RELEASE interpreted a button release
UNKNOWN no activity, or unknown activity
- 10 -
WindowPro v. 1.5 Reference Manual
2.7 kb_mousemickeys
Summary
#include "mouse.h"
void kb_mousemickeys(x, y)
int x, y;
Description
Allows you to reset the mouse sensitivity. The default vertical
ratio is about one pixel for every 2 mickeys, the horizontal
ratio is 1 to 1. Set x to the desired number of mickeys per 8 x
pixels for horizontal movement, and y for vertical movement. y
Returns
None.
- 11 -
WindowPro v. 1.5 Reference Manual
2.8 kb_mousemotion
Summary
#include "mouse.h"
void kb_mousemotion(xcounter, ycounter)
int *xcounter, *ycounter;
Description
Keeps a raw tally of mouse motion measured in mickeys (there are
about 200 mickeys to the inch) since the last call. There
doesn't seem to be a lot of use for this. However, it is
documented in the Microsoft Mouse Programmers Reference Manual
and for the sake of completeness it is available to you.
Returns
None.
- 12 -
WindowPro v. 1.5 Reference Manual
2.9 kb_mousepressed
Summary
#include "mouse.h"
void kb_mousepressed(m1, m2, m3, m4)
int *m1, *m2, *m3, *m4;
Description
Set m1 to the value of the button of interest (1=left, 2=right,
3=both). The function returns in m1 the current state of the
buttons. In m2 it indicates the number of times the buttons
(indicated in m1 on input) have been pressed since the last call
to this function. m3 (x coordinate) and m4 (y coordinate)
indicate the position of the mouse cursor on the last press.
Returns
None.
- 13 -
WindowPro v. 1.5 Reference Manual
2.10 kb_mousereleased
Summary
#include "mouse.h"
void kb_mousereleased(m1, m2, m3, m4)
int *m1, *m2, *m3, *m4;
Description
Operates identically to kb_mousepressed, but for releases. kb mousepressed
Returns
None.
- 14 -
WindowPro v. 1.5 Reference Manual
2.11 kb_mousestatus
Summary
#include "mouse.h"
void kb_mousestatus(m2, m3, m4)
int *m2, *m3, *m4;
Description
The status of the mouse buttons is returned in m2: 1 if the left
button is pressed, 2 if the right button is pressed and 3 if both
buttons are pressed.
The current mouse cursor x position is returned in m3, in the
range 0 to 640. The current mouse cursor y position is returned
in m4, in the range 0 to 200. It is up to you to convert these
to character positions. Remember the physical screen coordinate
system starts with 1,1 not 0,0.
Returns
None.
- 15 -
WindowPro v. 1.5 Reference Manual
2.12 kb_putmouse
Summary
#include "mouse.h"
void kb_putmouse(x, y)
int x, y;
Description
Places the mouse cursor at the location specified by x, y. See x y
kb_mousestatus for an explanation of the mouse cursor coordinate kb mousestatus
system.
Returns
None.
- 16 -
WindowPro v. 1.5 Reference Manual
2.13 kb_resetmouse
Summary
#include "mouse.h"
void kb_resetmouse(void)
Description
Resets various internal registers, cursor positions, etc.
Returns
None.
- 17 -
WindowPro v. 1.5 Reference Manual
2.14 kb_setgraphicsicon
Summary
#include "mouse.h"
void kb_setgraphicsicon()
Read the MICROSOFT MOUSE PROGRAMMERS MANUAL. Applicable to
WindowPro only when using the IBM PC graphics mode (available
under The WindowPro, but requires use of the BIOS screen update
method.)
- 18 -
WindowPro v. 1.5 Reference Manual
2.15 kb_setmousexrange
Summary
#include "mouse.h"
void kb_setmousexrange(min, max)
int min, max;
Description
Limits the columns in which the mouse cursor can roam. See
kb_mousestatus for an explanation of the mouse coordinate system. kb mousestatus
Returns
None.
- 19 -
WindowPro v. 1.5 Reference Manual
2.16 kb_setmouseyrange
Summary
#include "mouse.h"
void kb_setmouseyrange(min, max)
int min, max;
Description
Limits the rows in which the mouse cursor can roam. See
kb_mousestatus for an explanation of the mouse coordinate system. kb mousestatus
Returns
None.
- 20 -
WindowPro v. 1.5 Reference Manual
2.17 kb_settextcursor
Summary
#include "mouse.h"
void kb_settextcursor(cursor_type, start, stop)
int cursor_type, start, stop;
Description
Set cursor_type to 0 to select the software cursor and set
cursor_type to 1 to select the hardware text cursor. The
software cursor is the default setting. If the hardware cursor
is selected start, stop represent the beginning and ending scan start stop
lines for the cursor shape.
Returns
None.
- 21 -
WindowPro v. 1.5 Reference Manual
2.18 kb_showmouse
Summary
#include "mouse.h"
void kb_showmouse(void)
Description
Turns on the mouse cursor.
Returns
None.
- 22 -
WindowPro v. 1.5 Reference Manual
3 Video Functions
3.1 v_curshape
Summary
#include "werrors.h"
#include "video.h"
void v_curshape(start, end)
char start, end;
Description
Changes the shape of an IBM-PC cursor where start is the start
beginning scan line and end is the ending scan line. end
Returns
None
- 23 -
WindowPro v. 1.5 Reference Manual
3.2 v_cursor_report
Summary
#include "video.h"
int v_cursor_report(x, y, b, e)
unsigned *x, *y, *b, *e;
Description
Returns the cursor column in x, the cursor row in y, the starting
scan line in b, and the ending scan line in e. Under DOS, the
global variable vpage must be set to the correct video page
number. This is done automatically in wn_init. But you can also
obtain the current video page via v_getpage.
Returns
None.
- 24 -
WindowPro v. 1.5 Reference Manual
3.3 v_getchar
Summary
#include "werrors.h"
#include "video.h"
int v_getchar(x, y)
int x, y;
Description
Uses the IBM-PC BIOS (under DOS) or Vio call (under OS/2) to read
the character at the coordinate x,y, where the upper left corner
of the screen is 1,1.
Returns
Returns the value of the character in the low byte and the
attribute value in the high byte.
- 25 -
WindowPro v. 1.5 Reference Manual
3.4 v_getmode
Summary
#include "werrors.h"
#include "video.h"
int v_getmode(void)
Description
Returns the video mode of an IBM-PC or compatible. The video
modes are defined in vidmodes.h Under OS/2 attemps to translate
the OS/2 video mode definitions to the modes defined in
vidmodes.h
- 26 -
WindowPro v. 1.5 Reference Manual
3.5 v_getpage
Summary
#include "werrors.h"
#include "video.h"
int v_getpage(void)
Description
Returns the current video page. Always returns 0 under OS/2.
- 27 -
WindowPro v. 1.5 Reference Manual
3.6 v_getwidth
Summary
#include "werrors.h"
#include "video.h"
int v_getwidth(void)
Description
Returns the width in characters for the current video mode.
- 28 -
WindowPro v. 1.5 Reference Manual
3.7 v_gotoxy
Summary
#include "werrors.h"
#include "video.h"
void v_gotoxy(x, y)
int x, y;
Description
Positions the hardware cursor at location x,y where the upper
left corner of the screen is 0,0. If the global variable method method
= ANSI it uses the ANSI method of repositioning the hardware ANSI
cursor. Otherwise it uses the IBM-PC BIOS (under DOS) or Vio
call (under OS/2) method.
Returns
None
- 29 -
WindowPro v. 1.5 Reference Manual
3.8 v_putchar
Summary
#include "werrors.h"
#include "video.h"
int v_putchar(x, y, character, attribute)
int x, y;
char character, attribute;
Description
Puts a character on the physical screen at the coordinate (x,y)
where (1,1) is the upper left corner of the screen. No range
checking is performed. Uses IBM-PC specific BIOS calls under DOS
or Vio calls under OS/2.
Returns
None
- 30 -
WindowPro v. 1.5 Reference Manual
3.9 v_setega25
Summary
#include "video.h"
void v_setega25(void)
Description
Changes an EGA screen to 25 line mode.
Returns
None
- 31 -
WindowPro v. 1.5 Reference Manual
3.10 v_setega43
Summary
#include "video.h"
void v_setega43(void)
Description
Changes an EGA screen to 43 line mode.
Returns
None
- 32 -
WindowPro v. 1.5 Reference Manual
3.11 v_setmode
Summary
#include "werrors.h"
#include "video.h"
int v_setmode(vid_mode)
char vid_mode;
Description
Sets the video mode of an IBM-PC or compatible. The video modes
are defined in vidmodes.h
Returns
BAD_PARAMS vid_mode was not one the modes defined in vid_mode
"vidmodes.h."
OK No errors.
- 33 -
WindowPro v. 1.5 Reference Manual
4 Virtual Screen Functions
4.1 vs_clr*
4.1.1 vs_clrvs
#include "werrors.h"
#include "vs.h"
int vs_clrvs(handle, tile_handle, foreground, background)
unsigned handle;
unsigned char tile_handle, foreground, background;
Erases an entire virtual screen defined by (handle,
tile_handle.) The resulting screen is blank and of color
foreground, background.
See fill_char for return values. fill char
4.1.2 vs_clrbol
#include "werrors.h"
#include "vs.h"
int vs_clrbol(handle, tile_handle, foreground, background)
unsigned handle;
unsigned char tile_handle, foreground, background;
Erases from the tile's logical cursor position to the beginning
of the line, erased portion has the color of foreground, foreground
background. background
See fill_char for return values. fill char
4.1.3 vs_clreol
#include "werrors.h"
#include "vs.h"
int vs_clreol(handle, tile_handle, foreground, background)
unsigned handle;
unsigned char tile_handle, foreground, background;
Erases from the tile's logical cursor position to the end of the
line, erased portion has the color of foreground, background. foreground background
See fill_char for return values. fill char
- 34 -
WindowPro v. 1.5 Reference Manual
4.1.4 vs_clrtoend
#include "werrors.h"
#include "vs.h"
int vs_clrtoend(handle, tile_handle, foreground, background)
unsigned handle;
unsigned char tile_handle, foreground, background;
Erases from the tile's logical cursor position to the end of the
virtual screen, erased portion has the color of foreground, foreground
background. background
See fill_char for return values. fill char
- 35 -
WindowPro v. 1.5 Reference Manual
4.2 vs_delcolumn
Summary
#include "werrors.h"
#include "vs.h"
int vs_delcolumn(handle, tile_handle, x1, y1, x2, y2,
vs_columns, foreground, background)
unsigned handle;
unsigned char tile_handle, foreground, background;
int x1, y1, x2, y2, vs_columns;
Description
(x1,y1) and (x2,y2) define the upper left and lower right corners
of a rectangular region in a virtual screen (handle,
tile_handle.) The function deletes vs_columns columns on the
left side of this rectangle and scrolls all rows to the left,
inserting blank columns on the right side of the region. The new
columns have the color defined by foreground, background.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
BAD_PARAMS x1,y1 & x2,y2 did not represent an upper left
and lower right coordinate or were not within
the virtual screen.
OK No errors detected.
- 36 -
WindowPro v. 1.5 Reference Manual
4.3 vs_delrow
Summary
#include "werrors.h"
#include "vs.h"
int vs_delrow(handle, tile_handle, x1, y1, x2, y2, vs_rows,
foreground, background)
unsigned handle;
unsigned char tile_handle, foreground, background;
int x1, y1, x2, y2, vs_rows;
Description
(x1,y1) and (x2,y2) define the upper left and lower right corners
of a rectangular region in a virtual screen (handle,
tile_handle.) The function deletes vs_rows rows from the top of
the rectangle and scrolls all rows up, inserting blank rows at
the bottom of the region. The new rows have the color defined by
foreground, background.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
BAD_PARAMS x1,y1 & x2,y2 did not represent an upper left
and lower right coordinate or were not within
the virtual screen.
OK No errors detected.
- 37 -
WindowPro v. 1.5 Reference Manual
4.4 vs_drawbox
Summary
#include "werrors.h"
#include "vs.h"
void vs_drawbox(handle, tile_handle, x, y, rows, columns,
shading, boxchars,foreground, background)
unsigned handle;
unsigned char tile_handle;
int x, y, rows, columns;
char shading;
unsigned char *boxchars, foreground, background;
Description
Draws a box on a virtual screen {handle, tile_handle}. The upper handle tile handle
left hand corner of the box is located at x,y. The inner x y
dimensions of the box are row, column. The box uses the shading row column
styles and box drawing characters discussed at wn_create, defined
by shading and and boxchars. The box has the color foreground, shading boxchars foreground
background. background
Returns
None.
- 38 -
WindowPro v. 1.5 Reference Manual
4.5 vs_fillattr
Summary
#include "werrors.h"
#include "vs.h"
int vs_fillattr(handle, tile_handle, x1, y1, x2, y2, foreground,
background)
unsigned handle;
unsigned char tile_handle, foreground, background;
int x1, y1, x2, y2;
Description
(x1,y1) and (x2,y2) define the upper left and lower right corners
of a rectangular region in a virtual screen (handle,
tile_handle.) The function changes the color of all characters
in the region to foreground, background.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
BAD_PARAMS x1,y1 & x2,y2 did not represent an upper left
and lower right coordinate or were not within
the virtual screen.
OK No errors detected.
- 39 -
WindowPro v. 1.5 Reference Manual
4.6 vs_fillchar
Summary
#include "werrors.h"
#include "vs.h"
int vs_fillchar(handle, tile_handle, x1, y1, x2, y2, character,
foreground, background)
unsigned handle;
unsigned char tile_handle, character, foreground, background;
int x1, y1, x2, y2;
Description
(x1,y1) and (x2,y2) define the upper left and lower right corners x1,y1 x2 y2
of a rectangular region in a virtual screen (handle,
tile_handle.) The function fills the region with the character
'character' and the color (foreground, background.) character (foreground, background.)
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
BAD_PARAMS x1,y1 & x2,y2 did not represent an upper left
and lower right coordinate or were not within
the virtual screen.
OK No errors detected.
- 40 -
WindowPro v. 1.5 Reference Manual
4.7 vs_format
Summary
#include "werrors.h"
#include "vs.h"
int vs_format(handle, tile_handle, foreground, background,
string)
unsigned handle;
unsigned char tile_handle, foreground, background;
char *string;
Description
Prints a string to the virtual screen defined by {handle, handle
tile_handle}, with the video attributes of foreground and tile_handle foreground
background. TABS are expanded, CR/LF is interpreted, long lines background
automatically wrap to the beginning of the the next line, and the
virtual screen automatically scrolls on reaching the bottom of
the virtual screen.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it
was probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL,
it was probably not properly initialized via
a call to wn_createt, but may also have been
corrupted.
OK No errors detected.
- 41 -
WindowPro v. 1.5 Reference Manual
4.8 vs_gets
Summary
#include "werrors.h"
#include "vs.h"
int vs_gets(handle, tile_handle, scroll, bufstr, foreground,
background, maxlen)
unsigned handle;
unsigned char tile_handle, foreground, background;
char scroll, *buffer;
int maxlen;
Description
Retrieves a string from the keyboard. The string is stored at
bufstr and may have a maximum length of maxlen. The initial bufstr maxlen
cursor position is determined by the tile's {handle, tile_handle}
logical cursor position. If scroll is TRUE the virtual screen scroll
will scroll left or right to keep the cursor on the physical
screen. If scroll is FALSE, the user can continue to input (when
the cursor advances beyond the the displayed area of the virtual
screen) but the results of his typing are not seen on the
physical screen.
Tabs are not expanded. Hitting the end of the virtual screen
automatically wraps the cursor around to the beginning of the
next line. Terminate wn_gets with a carriage return. Backspace wn_gets
deletes the character to the left of the cursor and pulls the
cursor back one position.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it
was probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL,
it was probably not properly initialized via
a call to wn_createt, but may also have been
corrupted.
OK No errors detected.
- 42 -
WindowPro v. 1.5 Reference Manual
4.9 vs_inscolumn
Summary
#include "werrors.h"
#include "vs.h"
int vs_inscolumn(handle, tile_handle, x1, y1, x2, y2, vs_columns,
foreground, background)
unsigned handle;
unsigned char tile_handle, foreground, background;
int x1, y1, x2, y2, vs_columns;
Description
(x1,y1) and (x2,y2) define the upper left and lower right corners
of a rectangular region in a virtual screen (handle,
tile_handle.) The function inserts vs_columns columns on the
left side of this rectangle and scrolls all rows to the right,
overwriting the rightmost rows in the rectangle. The new rows
have the color defined by foreground, background.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
BAD_PARAMS x1,y1 & x2,y2 did not represent an upper left
and lower right coordinate or were not within
the virtual screen.
OK No errors detected.
- 43 -
WindowPro v. 1.5 Reference Manual
4.10 vs_insrow
Summary
#include "werrors.h"
#include "vs.h"
int vs_insrow(handle, tile_handle, x1, y1, x2, y2, vs_rows,
foreground, background)
unsigned handle;
unsigned char tile_handle, foreground, background;
int x1, y1, x2, y2, vs_rows;
Description
(x1,y1) and (x2,y2) define the upper left and lower right corners
of a rectangular region in a virtual screen (handle,
tile_handle.) The function inserts vs_rows rows at the top of
the rectangle and scrolls the lines below down, overwriting the
bottom lines in the rectangle. The new lines have the color
defined by foreground, background.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
BAD_PARAMS x1,y1 & x2,y2 did not represent an upper left
and lower right coordinate or were not within
the virtual screen.
OK No errors detected.
- 44 -
WindowPro v. 1.5 Reference Manual
4.11 vs_locatecur
Summary
#include "werrors.h"
#include "vs.h"
int vs_locatecur(handle, tile_handle, x, y)
unsigned handle, x, y;
char tile_handle, ch;
Description
Positions the tile's (handle, tile_handle) logical cursor at handle tile handle
coordinate x,y. x,y
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it
was probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL,
it was probably not properly initialized via
a call to wn_createt, but may also have been
corrupted.
BAD_PARAMS x, y is not within the virtual screen. x, y
OK No errors detected.
- 45 -
WindowPro v. 1.5 Reference Manual
4.12 vs_printf
Summary
#include "werrors.h"
#include "vs.h"
int vs_printf(handle, tile_handle, foreground, background,
format,...)
unsigned handle;
unsigned char tile_handle, foreground, background;
char *format;
Description
Prints a 'printf-type' formatted string to the virtual screen
defined by the {handle, tile_handle}, with the video attributes handle tile_handle
of foreground and background. The function accepts variable foreground background
arguments similar to the standard printf function.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it
was probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL,
it was probably not properly initialized via
a call to wn_createt, but may also have been
corrupted.
OK No errors detected.
- 46 -
WindowPro v. 1.5 Reference Manual
4.13 vs_putatrs
Summary
#include "werrors.h"
#include "vs.h"
int vs_putattrs(handle, tile_handle, bcolumn, brow, len, out_str)
unsigned handle, bcolumn, brow, len;
unsigned char tile_handle;
screen_char far *out_str;
Description
Outputs an attributed string pointed to by out_str on the virtual out_str
screen (handle, tile_handle) starting at the coordinate (bcolumn, handle, tile_handle bcolumn
brow) and in the colors designated by foreground and background. brow foreground background
No checking is done to make sure that the string doesn't extend
beyond the end of the virtual screen and it does not expand tabs
or interpret carriage returns. If the string is less than len it len
is clipped on the right side. If it is greater than len it is len
padded with spaces on the right side. All characters 1 to 255
are output as defined in the IBM extended character set.
Note: an attributed string is an array of structures of type
screen_char.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
OUT_OF_MEMORY Could not allocate sufficient working space.
Try breaking the string into smaller pieces.
NULL_POINTER out_str is a null pointer. out_str
OK No errors detected.
- 47 -
WindowPro v. 1.5 Reference Manual
4.14 vs_putc
Summary
#include "werrors.h"
#include "vs.h"
int vs_putc(handle, tile_handle, column, row, foreground,
background, ch)
unsigned handle, column, row, foreground, background;
unsigned char tile_handle, ch;
Description
Outputs a character {ch} to the virtual screen defined by ch
{handle, tile_handle} at the position {column, row} with handle, tile_handle column, row
attributes of {foreground, background}. The upper left foreground, background
coordinate of a virtual screen is column 1, row 1.
Note that this function has no effect on the physical screen if
the tile or window is suspended or hidden, or if the point on the
virtual screen is obscured on the physical screen.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it
was probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL,
it was probably not properly initialized via
a call to wn_createt, but may also have been
corrupted.
BAD_PARAMS The column or row is not within the virtual column row
screen.
OK No errors detected.
- 48 -
WindowPro v. 1.5 Reference Manual
4.15 vs_puts
Summary
#include "werrors.h"
#include "vs.h"
int vs_puts(handle, tile_handle, bcolumn, brow, maxlen,
foreground, background, pass)
unsigned handle, bcolumn, brow, maxlen;
unsigned char tile_handle, foreground, background, *pass;
Description
Outputs the string pointed to by pass on the virtual screen pass
(handle, tile_handle) starting at the coordinate (bcolumn, brow) handle, tile_handle bcolumn brow
and in the colors designated by foreground and background. No foreground background
checking is done to make sure that the string doesn't extend
beyond the end of the virtual screen and it does not expand tabs
or interpret carriage returns. If the string is longer than
maxlen it is clipped if it is less than maxlen it is padded with maxlen maxlen
spaces on the right side. All characters 1 to 255 are output as
defined in the IBM extended character set.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
OUT_OF_MEMORY Could not allocate sufficient working space.
Try breaking the string into smaller pieces.
NULL_POINTER Pass is a null pointer. Pass
OK No errors detected.
- 49 -
WindowPro v. 1.5 Reference Manual
4.16 vs_putscenter
Summary
#include "vs.h"
#include "werrors.h"
int vs_putscenter(handle, tile_handle, string, fg, bg, row)
unsigned handle;
unsigned char tile_handle, fg, bg;
int row;
char *string;
Description
Outputs the string pointed to by string to the virtual screen
indicated by handle, tile_handle. The string is centered on the
line indicated by parameter row. The string is displayed with
the attributes fg, bg. If the string is longer than the virtual
screen is wide the string is truncated.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it handle
was probably not initialized via wn_createw, wn createw
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL, tile handle
it was probably not properly initialized via
a call to wn_createt, but may also have been wn createt
corrupted.
OUT_OF_MEMORY Could not allocate sufficient working space.
Try breaking the string into smaller pieces.
NULL_POINTER Pass is a null pointer. Pass
OK No errors detected.
- 50 -
WindowPro v. 1.5 Reference Manual
5 Window and Tile Functions
5.1 wn_actt
Summary
#include "werrors.h"
#include "pro.h"
int wn_actt(handle, tile_handle)
unsigned handle;
unsigned char tile_handle;
Description
Designates a tile as the active tile. If another tile is already
designated as the active tile, it is un-designated. If the tile
is not open it is first opened via a call to wn_opent. See wn_opent
wn_opent for further explanation. The color of the name of the wn_opent
newly active tile is changed to the value of the global variable
active_tile_attr. The color of the name of the previously active active_tile_attr
tile is changed to the value of the global variable
inactive_tile_attr. inactive_tile_attr
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It
was probably not initialized via
wn_createt, but may have been corrupted.
OK No errors.
- 51 -
WindowPro v. 1.5 Reference Manual
5.2 wn_actw
Summary
#include "werrors.h"
#include "pro.h"
int wn_actw(handle)
unsigned handle;
Description
Designates a window as the active window. The active window is
temporarily placed on top of the display list. If the window is
not currently displayed it is first opened via a call to
wn_openw. See wn_openw for further explanation. The previously wn_openw wn_openw
active window is reinserted back into the display list at its
original position. The border color of the previously active
window is set to the value of the global variable inactive_attr. inactive_attr
The border color of the newly active window is set to the value
of the global variable active_attr. active_attr
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw,
but may have been corrupted.
OK No errors.
- 52 -
WindowPro v. 1.5 Reference Manual
5.3 wn_bordrng
Summary
#include "werrors.h"
#include "pro.h"
int wn_bordrng(handle1, handle2, borders)
unsigned handle1, handle2;
char *borders;
Description
Changes the border characters for a range of windows to an array
of 13 border characters pointed to by borders. See wn_chgbord borders
for an explanation of the border characters.
The operation begins with handle1 and progresses towards the top
of the display until it reaches handle2 or the top of the display
list.
Returns
BAD_WDW_HANDLE Handle1 or handle2 de-references to NULL. Handle1 handle2
One was probably not initialized via
wn_createw, but may have been corrupted.
NULL_POINTER Borders is NULL. Borders
OK No errors detected.
- 53 -
WindowPro v. 1.5 Reference Manual
5.4 wn_chgbord
Summary
#include "werrors.h"
#include "pro.h"
int wn_chgbord(handle, borders)
unsigned handle;
char *borders;
Description
Changes the border characters for a window to an array of 13
border characters pointed to by borders. borders
Each element of the array is interpreted as follows:
0 upper left corner
1 upper right corner
2 lower right corner
3 lower left corner
4 horizontal bar (top and bottom of window)
5 vertical bar
6 left side of window name delimiter
7 right side of window name delimiter
8 left side of tile name delimiter
9 right side of tile name delimiter
10 horizontal bar (middle bar -- the one that divides tiles)
11 left elbow
12 right elbow
Predefined in the global variables are five border styles box0,
box1, box2, box3 and box4. The global variable default_box is
automatically assigned to a window when it is created.
default_box is initialized to box0 for starters.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was Handle
probably not initialized via wn_createw, but
may have been corrupted.
NULL_POINTER Borders is NULL. Borders
OK No errors detected.
- 54 -
WindowPro v. 1.5 Reference Manual
5.5 wn_chgcolor
Summary
#include "werrors.h"
#include "colors.h"
#include "pro.h"
int wn_chgcolor(handle, foreground, background)
unsigned handle;
unsigned char foreground, background;
Description
Changes the color of the border of the window (handle) to handle
foreground, background. foreground background
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
OK No errors detected.
- 55 -
WindowPro v. 1.5 Reference Manual
5.6 wn_closerng
Summary
#include "werrors.h"
#include "pro.h"
int wn_closerng(handle1, handle2)
unsigned handle1, handle2;
Description
Closes a range of windows. See wn_closew for additional wn_closew
information.
Returns
BAD_WDW_HANDLE handle1 or handle2 de-references to
NULL. It was probably not initialized
via wn_createw, but may have been
corrupted.
OK No errors.
- 56 -
WindowPro v. 1.5 Reference Manual
5.7 wn_closet
Summary
#include "werrors.h"
#include "pro.h"
int wn_closet(handle, tile_handle)
unsigned handle;
unsigned char tile_handle;
Description
Closes a displayed tile. The space is always taken by the tile
above, or in the case of the first tile by the tile below. If the
tile being closed was also designated as the active tile, the
last tile in the window is designated as the active tile.
This function does not delete the tile from memory. It is still
a valid tile handle and you may perform all operations on its
virtual screen. You can redisplay the tile via the wn_opent wn_opent
function.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It
was probably not initialized via
wn_createt, but may have been corrupted.
CANT_CLOSE_LAST_TILE Every window must have at least one
tile. So, you can't close the last
remaining tile.
OK No errors.
- 57 -
WindowPro v. 1.5 Reference Manual
5.8 wn_closew
Summary
#include "werrors.h"
#include "pro.h"
int wn_closew(handle)
unsigned handle;
Description
Closes a displayed window, i.e. removes it from the display list.
This function does not delete the window from memory. It is
still a valid window handle and you may perform all operations on
its virtual screen. You may redisplay it via the wn_openw wn_openw
function.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw,
but may have been corrupted.
OK No errors.
- 58 -
WindowPro v. 1.5 Reference Manual
5.9 wn_copyt
5.9.1 Summary
#include "pro.h"
#include "werrors.h"
int wn_copyt(handle, tile_handle, thandle)
unsigned handle, thandle;
unsigned char tile_handle;
5.9.2 Description
Make a copy of the tile and virtual screen associated with
handle, tile_handle and associates it with the window referred to
by handle. Returning the copy's tile handle.
5.9.3 Returns
BAD_WDW_HANDLE handle or thandle is not a valid window
handle (dereferences to NULL.)
BAD_TILE_HANDLE tile_handle is not a valid tile handle
(dereferences to NULL.)
MAXIMUM_TILES thandle has the maximum number of tiles
associated with it. Try deleting
unnecessary tiles in thandle and then
call wn_copyt again.
OUT_OF_MEMORY There was insufficient memory available
to create the tile structures.
>= 0 and < MAXIMUM_TILES a valid tile was created.
- 59 -
WindowPro v. 1.5 Reference Manual
5.10 wn_copyw
Summary
#include "pro.h"
#include "werrors.h"
int wn_copyw(handle)
unsigned handle;
Description
Copies the window and all of its tiles and virtual screens.
Returns a handle to the copy of the original window.
Returns
MAXIMUM_WINDOWS Too many windows have been created. Try
deleting some unused windows and then call
wn_copyw again.
OUT_OF_MEMORY There was insufficient memory to allocate the
new window structures.
- 60 -
WindowPro v. 1.5 Reference Manual
5.11 wn_createt
Summary
#include "werrors.h"
#include "pro.h"
int wn_createt(handle, tile_name, vs_columns, vs_rows, virtual_x,
virtual_y)
unsigned handle, vs_columns, vs_rows, virtual_x, virtual_y;
char *tile_name;
Description
Creates a new tile. Sets up a tile record, allocates memory for
a virtual screen, etc. The logical cursor is placed at location
1,1. The virtual screen is vs_columns wide and vs_rows high. vs_columns vs_rows
The viewport (whose actual size is not defined until the tile is
opened) is placed over the virtual screen at coordinate
virtual_x, virtual_y. The tile name is defined by tile_name. virtual_x, virtual_y tile_name
The tile name is displayed below the tile centered in the
border. If tile_name is NULL nothing is display. tile_name NULL
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_PARAMS Virtual_x,virtual_y is not in the range
defined by vs_columns, vs_rows.
OUT_OF_MEMORY Could not allocate memory for the various
data structures required to set up a tile.
You might try reducing the size of the
virtual screen.
MAXIMUM_TILES Exceeded the maximum number of tile handles
allocated for this window. Try deleting some
unused tiles.
new handle Any value greater than or equal to 0
represents a valid tile handle. Several
functions use tile_handles to refer to
virtual screens, etc.
- 61 -
WindowPro v. 1.5 Reference Manual
5.12 wn_createw
Summary
#include "werrors.h"
#include "pro.h"
int wn_createw(vs_rows, vs_columns, physical_x, physical_y,
virtual_x, virtual_y, port_rows, port_columns, suspend,
border, wdw_name, tile_name)
unsigned vs_rows, vs_columns, physical_x, physical_y, virtual_x,
virtual_y, port_rows, port_columns, suspend, border;
char *wdw_name, *tile_name;
Description
Creates a window record and virtual screen. It simply sets up
the information in memory it does not insert the window into the
display list. See wn_actw and wn_openw for additional wn actw wn openw
information.
The window is created with a single tile. The tile_handle for tile handle
the first tile in a new window is always 0.
The upper left corner of the window is located at the physical
coordinates (physical_x, physical_y). The window has inner
dimensions of port_rows rows and port_columns columns. It has a
border style of border (see wn_chgbord for additional
information.) You can optionally suspend the window upon
creation by setting suspend to FALSE otherwise set suspend to
TRUE (see wn_suspendw for additional information.) The border
characters are set to the global variable default_box (see
wn_togbord for additional information.) The virtual screen for
the first tile in the window as dimensions of vs_rows by
vs_columns. The viewport is positioned over the virtual screen
so that the logical coordinate virtual_x, virtual_y is in the
upper left hand corner. The logical cursor is initialized to the
logical coordinate 1,1. The border color is set to the value of
the global variable inactive_attr. The scroll bars are on if the
global variable scroll_bars_on is TRUE.
Returns
OUT_OF_MEMORY Not enough memory to initialize the
window structures. Try using a smaller
virtual screen.
MAXIMUM_WINDOWS There are no more window handles left to
allocate. Try deleting some unused
windows.
- 62 -
WindowPro v. 1.5 Reference Manual
new handle any value equal to or greater than 0 and
less than MAX_WINDOWS is a valid window
handle.
- 63 -
WindowPro v. 1.5 Reference Manual
5.13 wn_defrost
Summary
#include "werrors.h"
#include "pro.h"
void wn_defrost(lx, ly, hx, hy)
unsigned lx, ly, hx, hy;
Description
Unfreezes the screen, see wn_freeze for further explanation. wn freeze
When the screen is unfrozen the rectangular area represented by
the upper left physical screen coordinate lx,ly and the lower
right physical screen coordinate hx,hy are updated. To update
the entire screen you would 1,1,physical_columns,physical_rows,
for example.
Returns
None.
- 64 -
WindowPro v. 1.5 Reference Manual
5.14 wn_deletet
Summary
#include "werrors.h"
#include "pro.h"
int wn_deletet(handle, tile_handle)
unsigned handle;
unsigned char tile_handle;
Description
Deletes a displayed tile, removing it from memory forever and
ever. If the tile is not closed it first closes it via a call to
wn_closet. See wn_closet for additional information. wn_closet wn_closet
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It
was probably not initialized via
wn_createt, but may have been corrupted.
CANT_CLOSE_LAST_TILE Every window must have at least one
tile. So, you can't close the last
remaining tile.
OK No errors.
- 65 -
WindowPro v. 1.5 Reference Manual
5.15 wn_delrng
Summary
#include "werrors.h"
#include "pro.h"
int wn_delrng(handle1, handle2)
unsigned handle1, handle2;
Description
Deletes a range of windows, removing it from memory forever and
ever. If the window is not closed it first closes it via a call
to wn_closew. See wn_closew for additional information. wn_closew wn_closew
Returns
BAD_WDW_HANDLE handle1 or handle2 de-references to
NULL. It was probably not initialized
via wn_createw, but may have been
corrupted.
OK No errors.
- 66 -
WindowPro v. 1.5 Reference Manual
5.16 wn_delw
Summary
#include "werrors.h"
#include "pro.h"
int wn_delw(handle)
unsigned handle;
Description
Deletes a displayed window, removing it from memory forever and
ever. If the window is not closed it first closes it via a call
to wn_closew. See wn_closew for additional information. wn_closew wn_closew
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw,
but may have been corrupted.
OK No errors.
- 67 -
WindowPro v. 1.5 Reference Manual
5.17 wn_draww
Summary
#include "werrors.h"
#include "pro.h"
int wn_draww(handle)
unsigned handle;
Description
Redraws the window on the physical screen.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw,
but may have been corrupted.
NOT_DONE Window was designated as hidden.
OK No errors.
- 68 -
WindowPro v. 1.5 Reference Manual
5.18 wn_edlin
Summary
#include "pro.h"
#include "xcodes.h"
int wn_edlin(handle, tile_handle, txt, start_char, maxdisplen,
maxactlen, cursor, x, y, fg, bg, cmds)
unsigned handle;
unsigned char tile_handle, fg, bg;
char **txt, start_char;
int maxdisplen, maxactlen, cursor, x, y, *cmds;
int default_ed_cmds[19] = {XENTER, XMINUS, XRIGHT, XLEFT,
XCTRLRIGHT, XCTRLLEFT, XHOME, XEND, XESC, XDELETE,
XBACKSPACE, XPLUS, -2 , -3, -1, -1, -1, -1, -1};
Description
A tile-oriented line editor, has word right, word left, home,
end, delete char functions, etc.
txt A pointer to a pointer to a dynamically
allocated string. If the editing is accepted
the previous the memory used by this string
is automatically freed and the string pointer
is set to the edited string.
start_char If the user is replacing the current string,
you can supply the first letter of the string
via this parameter, i.e. if an alpha
character indicates to replace the current
string you can sense the alpha char in your
application and then pass it along to
wn_edlin.
maxdisplen number of columns in the edit area.
maxactlen Number of maximum characters in a response.
cursor position of the cursor on starting wn_edlin.
0 is the first character in the string.
Generally used if you click on something with
a mouse and then want to edit that "thing"
starting at the position of the mouse cursor.
x, y logical coordinates of the start of the edit
area.
- 69 -
WindowPro v. 1.5 Reference Manual
fg, bg the attribute to use on the characters while
editing the string.
default_ed_cmds Set this pointer to an array of extended
keyboard codes (see explanation at kb_getxc,)
where the position in the array relates to
the following operations:
0 Confirm
1 Ascend
2 Character Right
3 Character Left
4 Word Right
5 Word Left
6 Home
7 End
8 Abort
9 Delete current character
10 Delete character to the left
11 Descend
12 Used internally, must be a -2
13 Used internally, must be a -3
14 Exit with specail code 1
15 Exit with special code 2
16 Exit with special code 3
17 Exit with special code 4
18 Exit with special code 5
Returns
1 User aborted, edited string is freed, and
pointer to original string is returned.
2 User confirmed, returns pointer to the edited
string and the original string is freed.
3 User ascended, edited string is freed, and
poitner to original string is returned.
4 User descended, returns pointer to edited
string, and the original string is freed.
5 User clicked the mouse outside of the edlin
editing area, returns pointer to edited
string and original string is freed.
10-14 User pressed the key attached to special
operations 1-5 (For application programmer
defined commands, like MENU, etc.) Returns
pointer to the edited string and frees the
original string.
- 70 -
WindowPro v. 1.5 Reference Manual
5.19 wn_flybox
Summary
#include "werrors.h"
#include "pro.h"
void wn_flybox(bx, by, br, bc, ex, ey, er, ec, granularity,
speed, boxchars, foreground, background)
int bx, by, br, bc, ex, ey, er, ec;
unsigned granularity, speed;
char *boxchars;
unsigned char foreground, background;
Description
Draws boxes and erases them. Use this function to give the
illusion of exploding/imploding boxes, or (a la Framework) boxes
which emerge from a point on the screen.
The first box drawn places its upper left corner at the physical
coordinate (bx, by) and has inner dimensions of br rows and bc bx by br bc
columns and has the color foreground, background. This box is foreground background
left on the screen for the duration of 'speed' IBM-PC clock tick 'speed
interrupts (about 18 per second.) This box is then erased.
'granularity' additional boxes will each be drawn and erased in 'granularity
the same manner, with each progressing incrementally towards the
ending dimensions (ex, ey, er, ec). ex ey er ec
No error checking is performed on the validity of the box
dimensions. If the dimensions are outside of the physical screen
it will cause unpredictable side effects.
Returns
None.
- 71 -
WindowPro v. 1.5 Reference Manual
5.20 wn_freeze
Summary
#include "werrors.h"
#include "pro.h"
void wn_freeze(void)
Description
Freezes the entire screen. No windows or virtual screen commands
are displayed on the physical screen. A call to wn_defrost will wn defrost
update the screen for any commands executed since the call to
wn_freeze. wn freeze
Returns
None.
- 72 -
WindowPro v. 1.5 Reference Manual
5.21 wn_hidecur
Summary
#include "werrors.h"
#include "pro.h"
void wn_hidecur(void)
Description
Changes the IBM-PC cursor to a non-viewable shape, and sets the
global variable cursor_on to FALSE. cursor on FALSE
Returns
None.
- 73 -
WindowPro v. 1.5 Reference Manual
5.22 wn_hidew
Summary
#include "werrors.h"
#include "pro.h"
int wn_hidew(handle)
unsigned handle;
Description
Designates a displayed window as hidden. A hidden window retains
its position in the display list, but is not seen on the screen.
If the window is already hidden, it is redisplayed.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw,
but may have been corrupted.
OK No errors.
- 74 -
WindowPro v. 1.5 Reference Manual
5.23 wn_init
Summary
#include "werrors.h"
#include "pro.h"
int wn_init(void)
Description
Initializes various global variables.
Initializes an array of window handle variables (the global
integer array window[].) With source code you can set this array
to any size you like. Without source you are limited to 256.
Determines if the video card is set in a 40 or 80 column mode and
initializes a screen buffer of the appropriate size. It is not
possible to sense the 43 line mode but by setting the global
variable ega_mlines to 43. It will still sense the video card
but if it determines that it is an 80 column mode it will assume
it to be of ega_mlines rows.
Initializes a pointer to video memory (set to the video page
which was active when wn_init was called.) Differentiates wn_init
between MONO, CGA, and EGA cards.
If in BIOS or DMA screen updating mode saves the screen as it
currently appears and uses it as a background for all windowing
activity.
If in ANSI screen updating mode initializes the character
attributes to white on black.
Returns
OUT_OF_MEMORY Not enough memory to initialize the
screen buffers.
OK No errors.
- 75 -
WindowPro v. 1.5 Reference Manual
5.24 wn_ison*
Summary
#include "werrors.h"
#include "pro.h"
int wn_isonwdw(x, y, rhandle)
unsigned x, y, *rhandle;
Description
Determines if the point x, y on the physical screen (the upper x y
left corner is considered to be 1,1) is on top of a window. If
it is rhandle returns the window handle. rhandle
Returns
TRUE The physical screen point x, y is on a
window.
FALSE The physical screen point x, y is not on a
window.
5.24.1 wn_isonhbar
wn_isonhbar(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
horizontal bar of the tile (handle, tile_handle). handle tile_handle
5.24.2 wn_isonlbar
wn_isonlbar(handle, x, y)
unsigned handle, x, y;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
lower horizontal bar of the window (handle.) handle
- 76 -
WindowPro v. 1.5 Reference Manual
5.24.3 wn_isonlelb
wn_isonlelb(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
left elbow of the tile (handle, tile_handle). handle tile_handle
5.24.4 wn_isonllc
wn_isonllc(handle, x, y)
unsigned handle, x, y;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
lower left corner of the window (handle.) handle
5.24.5 wn_isonlrc
wn_isonlrc(handle, x, y)
unsigned handle, x, y;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
lower right corner of the window (handle.) handle
5.24.6 wn_isonnamet
wn_isonnamet(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
name of the tile (handle, tile_handle). handle, tile_handle)
5.24.7 wn_isonnamew
wn_isonnamew(handle, x, y)
unsigned handle, x, y;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
name of the window (handle). handle
- 77 -
WindowPro v. 1.5 Reference Manual
5.24.8 wn_isonrelb
wn_isonrelb(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
right elbow the tile (handle, tile_handle). handle tile_handle
5.24.9 wn_isonsbd
wn_isonsbd(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
down scroll bar indicator of the tile (handle, tile_handle). handle tile_handle
5.24.10 wn_isonsbl
wn_isonsbl(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
left scroll bar indicator of the tile (handle, tile_handle). handle tile_handle
5.24.11 wn_isonsbr
wn_isonsbr(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
right scroll bar indicator of the tile (handle, tile_handle). handle tile_handle
5.24.12 wn_isonsbu
wn_isonsbu(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the up TRUE x y
scroll bar indicator of the tile (handle, tile_handle). handle tile_handle
- 78 -
WindowPro v. 1.5 Reference Manual
5.24.13 wn_isontile
wn_isontile(handle, rhandle, x, y)
unsigned handle, x, y;
unsigned char *rhandle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
window (handle), and returns the value of the particular tile it handle
is on in rhandle. rhandle
5.24.14 wn_isonubar
wn_isonubar(handle, x, y)
unsigned handle, x, y;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
upper horizontal bar of the window (handle.) handle
5.24.15 wn_isonulc
wn_isonulc(handle, x, y)
unsigned handle, x, y;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
upper left corner of the window (handle.) handle
5.24.16 wn_isonurc
wn_isonurc(handle, x, y)
unsigned handle, x, y;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
upper right corner of the window (handle.) handle
5.24.17 wn_isonvlbar
wn_isonvlbar(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
vertical left bar of the tile (handle, tile_handle). handle tile_handle
- 79 -
WindowPro v. 1.5 Reference Manual
5.24.18 wn_isonvrbar
wn_isonvrbar(handle, tile_handle, x, y)
unsigned handle, x, y;
unsigned char tile_handle;
Returns TRUE if the physical screen coordinate (x,y) is on the TRUE x y
vertical right bar of the tile (handle, tile_handle). handle tile_handle
5.24.19 wn_isonvs
int wn_isonvs(handle, tile_handle, x, y)
unsigned handle, *x, *y;
unsigned char tile_handle;
determines if a physical screen coordinate (x,y) is on the x y
virtual screen (handle, tile_handle). If wn_isonvs returns TRUE wn_isonvs TRUE
it is and the physical coordinates (x,y) are transformed into x y
virtual screen logical coordinates
5.24.20 wn_isonvtw
int wn_isonvvtw(handle, tile_handle, x, y)
unsigned handle, *x, *y;
unsigned char tile_handle;
determines if a physical screen coordinate (x,y) is on the x y
vertical thumbwheel of the tile (handle, tile_handle).
5.24.21 wn_isonhtw
int wn_isonvvtw(handle, tile_handle, x, y)
unsigned handle, *x, *y;
unsigned char tile_handle;
determines if a physical screen coordinate (x,y) is on the x y
horizontal thumbwheel of the tile (handle, tile_handle).
- 80 -
WindowPro v. 1.5 Reference Manual
5.24.22 wn_whereon
wn_whereon(rhandle, rtile_handle, x, y)
unsigned *rhandle, *x, *y;
unsigned char *tile_handle;
Returns 0 if the physical coordinate (x,y) is not on any window.
Otherwise it returns the handle of the window in rhandle and the
handle of the tile in rtile_handle. The return value corresponds
to these parts of a window.
1 Is on the upper left corner of a window
2 Is on the upper right corner of a window
3 Is on the lower right corner of a window
4 Is on the lower left corner of a window
5 Is on the name of a window
6 Is on the upper horizontal bar of a window
7 Is on the name of a tile
8 Is on the horizontal bar of a tile
9 Is on the vertical right bar of a tile
10 Is on the vertical left bar of a tile
11 Is on the scroll bar up indicator of a tile
12 Is on the scroll bar down indicator of a tile
13 Is on the scroll bar left indicator of a tile
14 Is on the scroll bar right indicator of a tile
15 Is on the left elbow of a tile
16 Is on the right elbow of a tile
17 Is on the virtual screen of a tile (in this case the
physical coordinates (x,y) are also transformed in
logical tile coordinates.
18 Is on the vertical thumbwheel of a tile.
19 Is on the horizontal thumbwheel of a tile.
- 81 -
WindowPro v. 1.5 Reference Manual
5.25 wn_locatetwabs
Summary
#include "werrors.h"
#include "pro.h"
int wn_locatetwabs(handle, tile_handle, x, y)
unsigned handle;
unsigned char tile_handle;
unsigned x, y;
Description
Moves the horizontal and/or vertical thumbwheels to the character
positions at x (for horizontal) character columns and y (for
vertical) character rows. The first position is the 0th
position. The maximum x position is port_columns - 2. The
maximum y position is port_rows - 2.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 82 -
WindowPro v. 1.5 Reference Manual
5.26 wn_locatetwrel
Summary
#include "werrors.h"
#include "pro.h"
int wn_locatetwrel(handle, tile_handle, x, y)
unsigned handle;
unsigned char tile_handle;
float x, y;
Description
Moves the horizontal and/or vertical thumbwheels to the character
positions at x percentage (for horizontal) character columns and
y percentage (for vertical) character rows. The minimum
percentage position is 0 and the maximum is 1.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 83 -
WindowPro v. 1.5 Reference Manual
5.27 wn_locatevs
Summary
#include "werrors.h"
#include "pro.h"
int wn_locatevs(handle, tile_handle, x, y)
unsigned handle;
unsigned char tile_handle;
int x, y;
Description
Changes the portion of the virtual screen viewed through the tile
(handle, tile_handle.) the 'viewport' is positioned so that the
tile coordinate (x,y) is in the upper left corner of the
viewport.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. One was
probably not initialized via wn_createw, but
may have been corrupted.
MODIFIED The operation was performed but x or y had to
be modified to keep the viewport entirely
within the virtual screen.
OK No errors detected.
- 84 -
WindowPro v. 1.5 Reference Manual
5.28 wn_locatew
Summary
#include "werrors.h"
#include "pro.h"
int wn_locatew(handle, x, y)
unsigned handle;
signed int x, y;
Description
Moves the upper left corner of a window to the absolute position
defined by x, y. x, y
Returns
BAD_WDW_HANDLE Handle1 or handle2 de-references to NULL.
One was probably not initialized via
wn_createw, but may have been corrupted.
MODIFIED Operation was performed but parameter x or y
had to be modified in order to keep the
window positioned completely on the physical
screen.
OK No errors detected.
- 85 -
WindowPro v. 1.5 Reference Manual
5.29 wn_moverng
Summary
#include "werrors.h"
#include "pro.h"
int wn_moverng(handle1, handle2, x, y)
unsigned handle1, handle2;
signed int x, y;
Description
Moves a range of windows from their current position to the
position y rows above if positive and below if negative and x
rows to the right if positive and to the left if negative.
The operation begins with handle1 and progresses towards the top
of the display list until handle2 is reached or the top of the
display list, whichever comes first.
Returns
BAD_WDW_HANDLE Handle1 or handle2 de-references to NULL.
One was probably not initialized via
wn_createw, but may have been corrupted.
MODIFIED Operation was performed but parameter x or y
had to be modified (for one or more windows)
in order to keep the window positioned
completely on the physical screen.
OK No errors detected.
- 86 -
WindowPro v. 1.5 Reference Manual
5.30 wn_movetwabs
Summary
#include "werrors.h"
#include "pro.h"
int wn_movetwabs(handle, tile_handle, x, y)
unsigned handle;
unsigned char tile_handle;
signed int x, y;
Description
Moves the horizontal and/or vertical thumbwheels, x (for
horizontal) absolute character columns left (-) or right (+), and
y (for vertical) absolute character rows up (-) or down (+).
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 87 -
WindowPro v. 1.5 Reference Manual
5.31 wn_movetwrel
Summary
#include "werrors.h"
#include "pro.h"
int wn_movetwrel(handle, tile_handle, x, y)
unsigned handle;
unsigned char tile_handle;
float x, y;
Description
Moves the horizontal and/or vertical thumbwheels, x percentage
(for horizontal) character columns left (-) or right (+), and y
percentage (for vertical) character rows up (-) or down (+).
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 88 -
WindowPro v. 1.5 Reference Manual
5.32 wn_movew
Summary
#include "werrors.h"
#include "pro.h"
int wn_movew(handle, x, y)
unsigned handle;
signed int x, y;
Description
Moves a window from its current position to the position y rows
above if y is positive and below if y is negative and x rows to
the right of its position if x is positive and to the left if
negative.
If the window is designated as the active window it is first
unzoomed before moving it.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
MODIFIED Operation was performed but parameter x or y
had to be modified in order to keep the
window positioned completely on the physical
screen.
OK No errors detected.
- 89 -
WindowPro v. 1.5 Reference Manual
5.33 wn_namet
Summary
#include "werrors.h"
#include "pro.h"
int wn_namew(handle, tile_handle, new_name)
unsigned handle;
unsigned char tile_handle;
char *new_name;
Description
Changes the name of a tile to the string pointed to by new_name. new_name
If new_name is NULL no name is displayed. Tile names are new_name
displayed in the center of the border just below the tile.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 90 -
WindowPro v. 1.5 Reference Manual
5.34 wn_namew
Summary
#include "werrors.h"
#include "pro.h"
int wn_namew(handle, new_name)
unsigned handle;
char *new_name;
Description
Changes the name of a window to the string pointed to by
new_name. If new_name is NULL no name is displayed. Window new_name new_name
names are displayed in the upper left border of a window.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
OK No errors detected.
- 91 -
WindowPro v. 1.5 Reference Manual
5.35 wn_openabst
Summary
#include "werrors.h"
#include "pro.h"
int wn_openabst(handle, tile_handle, rows)
unsigned handle, rows;
unsigned char tile_handle;
Description
Splits the active tile in the window (handle) into two pieces. handle
Assigns the lower half to the new tile (tile_handle) and the tile_handle
upper half to the active tile. The new tile has has rows number
of rows.
If any window is zoomed it is un-zoomed.
If the tile being opened was already opened it is first closed,
via a call to wn_closet. See wn_closet for an explanation of how wn_closet wn_closet
the space is reclaimed on closing.
Returns
BAD_WDW_HANDLE handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
NO_ACTIVE_TILE No tile in the display is designated as
active. This cannot happen if you use the
application level functions exclusively. But
could happen if you access the window_rec window_rec
directly or use the kernel functions.
NO_SPACE The active_tile was less than rows + 2 rows
high.
OK No errors detected.
- 92 -
WindowPro v. 1.5 Reference Manual
5.36 wn_openrelt
Summary
#include "werrors.h"
#include "pro.h"
int wn_openrelt(handle, tile_handle, rows)
unsigned handle;
unsigned char tile_handle;
double rows;
Description
Splits the active tile in the window (handle) into half. Assigns handle
the lower half to the new tile (tile_handle) and the upper half tile_handle
to the active tile. The new tile gets rows percent of the active
tile's rows.
If any window is zoomed it is un-zoomed.
If the tile being opened was already opened it is first closed,
via a call to wn_closet. See wn_closet for an explanation of how wn_closet wn_closet
the space is reclaimed on closing.
Returns
BAD_WDW_HANDLE handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
NO_ACTIVE_TILE No tile in the display is designated as
active. This cannot happen if you use the
application level functions exclusively. But
could happen if you access the window_rec window_rec
directly or use the kernel functions.
NO_SPACE The active tile had less than 3 rows
available.
OK No errors detected.
- 93 -
WindowPro v. 1.5 Reference Manual
5.37 wn_opent
Summary
#include "werrors.h"
#include "pro.h"
int wn_opent(handle, tile_handle)
unsigned handle;
unsigned char tile_handle;
Description
Splits the active tile in the window (handle) into half. Assigns handle
the lower half to the new tile (tile_handle) and the upper half tile_handle
to the active tile.
If any window is zoomed it is un-zoomed.
If the tile being opened was already opened it is first closed,
via a call to wn_closet. See wn_closet for an explanation of how wn_closet wn_closet
the space is reclaimed on closing.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
NO_ACTIVE_TILE No tile in the display is designated as
active. This cannot happen if you use the
application level functions exclusively. But
could happen if you access the window_rec window_rec
directly or use the kernel functions.
NO_SPACE The active tile was less than 3 rows high.
OK No errors detected.
- 94 -
WindowPro v. 1.5 Reference Manual
5.38 wn_openw
Summary
#include "werrors.h"
#include "pro.h"
int wn_openw(handle)
unsigned handle;
Description
Permanently places a window on the top of the display list and
designates it as the active window. If a window was previously
active it is reinserted back into its original position in the
display list. If the window is already open, it is first closed
via a call to wn_closew, and then re-opened.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
OK No errors detected.
- 95 -
WindowPro v. 1.5 Reference Manual
5.39 wn_putslist
Summary
#include "pro.h"
#include "werrors.h"
int wn_putslist(strings, fg, bg, row, column, borders, namew, namet)
unsigned char fg, bg;
char *strings[], *namew, *namet;
int row, column, borders;
Description
Determines the width and length required for a virtual screen
which will hold the strings pointed to by the NULL terminated
list of strings, strings. Creates a window with a virtual screen
of the same size and a viewport of the same size and then outputs
the strings to the virtual screen (tabs, CR/LF, and backspaces
are not interpreted.) Returns the handle of the new window.
Returns
OUT_OF_MEMORY Not enough memory to initialize the
window structures. Try using a smaller
virtual screen.
MAXIMUM_WINDOWS There are no more window handles left to
allocate. Try deleting some unused
windows.
new handle any value equal to or greater than 0 and
less than MAX_WINDOWS is a valid window
handle.
- 96 -
WindowPro v. 1.5 Reference Manual
5.40 wn_redraw
Summary
#include "werrors.h"
#include "pro.h"
int wn_redraw(void)
Description
Redraws all of the windows on the screen.
Returns
None.
- 97 -
WindowPro v. 1.5 Reference Manual
5.41 wn_restorescr
Summary
#include "werrors.h"
#include "pro.h"
void wn_restorescr(void)
Description
This function writes the information pointed to by the global
variable screen_buffer to the physical screen. This is typically screen buffer
used to restore a screen after some kind of pop-up utility. If
screen_buffer is NULL it does nothing. screen buffer
Returns
None.
- 98 -
WindowPro v. 1.5 Reference Manual
5.42 wn_savescr
Summary
#include "werrors.h"
#include "pro.h"
void wn_savescr(void)
Description
This function copies the entire physical screen to an area
pointed to by the global variable screen_buffer. This saved screen buffer
screen is always used as the backdrop for all windowing
activity. Anything written directly to the screen will not be
saved unless you call wn_savescr. This function does nothing wn savescr
under the ANSI method.
Returns
None.
- 99 -
WindowPro v. 1.5 Reference Manual
5.43 wn_scrollvs
Summary
#include "werrors.h"
#include "pro.h"
int wn_scrollvs(handle, tile_handle, x, y)
unsigned handle;
unsigned char tile_handle;
int x, y;
Description
Changes the portion of the virtual screen viewed through the tile
(handle, tile_handle.) the 'viewport' is scrolled up(-) or
down(+) y rows, and left(+) or right(-) x rows.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. One was
probably not initialized via wn_createw, but
may have been corrupted.
MODIFIED The operation was performed but x or y had to
be modified to keep the viewport entirely
within the virtual screen.
OK No errors detected.
- 100 -
WindowPro v. 1.5 Reference Manual
5.44 wn_showcur
Summary
#include "werrors.h"
#include "pro.h"
void wn_showcur(void)
Description
Changes the IBM-PC cursor to the shape defined by the global
variables cursor_e (ending scan line) and cursor_b (beginning cursor e cursor b
scan line) and sets the global variable curson_on to TRUE. curson on TRUE
Returns
None.
- 101 -
WindowPro v. 1.5 Reference Manual
5.45 wn_sizerng
Summary
#include "werrors.h"
#include "pro.h"
int wn_sizerng(handle1, handle2, x, y)
unsigned handle1, handle2;
signed int x, y;
Description
Increments the sizes of a range of windows by x columns and y
rows. Only the last tile is incremented row wise. All tiles are
incremented column wise.
The operation begins with handle1 and progresses towards the top
of the display list until handle2 is reached or the top of the
display list, whichever comes first.
If any window was zoomed it is unzoomed.
Returns
BAD_WDW_HANDLE Handle1 or handle2 de-references to NULL.
One was probably not initialized via
wn_createw, but may have been corrupted.
MODIFIED Operation was performed but parameter x or y
had to be modified (for one or more windows)
in order to keep the window positioned
completely on the physical screen.
OK No errors detected.
- 102 -
WindowPro v. 1.5 Reference Manual
5.46 wn_sizet
Summary
#include "werrors.h"
#include "pro.h"
int wn_sizerng(handle, tile_handle, x, y)
unsigned handle;
unsigned char tile_handle;
signed int x, y;
Description
Increments the size of a tile (handle, tile_handle) by x columns
and y rows. tiles are incremented column wise. The designated
tile is incremented row wise. The tile below the designated tile
is decreased in size. If no tile is below the designated tile
(i.e. if it is the last tile) the window is increased in size.
This operation does not check to make sure that the resulting
viewport stays within the virtual screen. If the viewport
extends beyond the virtual screen those corresponding areas in
the tile will display 'garbage'.
If any window was zoomed it is unzoomed.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
MODIFIED Operation was performed but parameter x or y
had to be modified (for one or more windows)
in order to keep the window positioned
completely on the physical screen.
OK No errors detected.
- 103 -
WindowPro v. 1.5 Reference Manual
5.47 wn_suspendt
Summary
#include "werrors.h"
#include "pro.h"
int wn_suspendt(handle, tile_handle)
unsigned handle;
unsigned char tile_handle;
Description
Freezes a tile. Any changes made to the tile name, or the
position or contents of a virtual screen are not reflected on the
physical screen. Currently, this does not work reliably on any
which partially obscures another window.
If the tile is already 'suspended' it 'un-suspends' it and
updates the physical screen.
Returns
BAD_WDW_HANDLE The handle passed de-references to NULL, it
was probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE The tile_handle passed de-references to NULL,
it was probably not properly initialized via
a call to wn_createt, but may also have been
corrupted.
OK No errors detected.
- 104 -
WindowPro v. 1.5 Reference Manual
5.48 wn_suspendw
Summary
#include "werrors.h"
#include "pro.h"
int wn_suspendw(handle)
unsigned handle;
Description
Freezes a window. Any changes made to the window borders, the
tile names, the size, position, or contents of a virtual screen
are not reflected on the physical screen. This does not work
reliably on any window which partially obscures another window,
or if a move or size operation is performed.
If the window is already 'suspended' it 'un-suspends'it and
updates the physical screen.
Returns
BAD_WDW_HANDLE The window handle dereferences to NULL. It
was most likely not initialized via
wn_createw or has been corrupted.
OK No errors.
- 105 -
WindowPro v. 1.5 Reference Manual
5.49 wn_swapt
Summary
#include "werrors.h"
#include "pro.h"
int wn_swapt(handle1, tile_handle1, handle2, tile_handle2)
unsigned handle1, handle2;
unsigned char tile_handle1, tile_handle2;
Description
Swaps the names and virtual screens of two tiles. If any window
is currently zoomed it is unzoomed. Checks to make sure that the
new viewports are completely filled by the virtual screens, if
not it first attempts to readjust the virtual screen and then
resizes the viewport if necessary.
Returns
BAD_WDW_HANDLE Handle1 or handle2 de-references to NULL, one
was probably not initialized via wn_createw,
but may have been corrupted.
BAD_TILE_HANDLE Tile_handle1 or tile_handle2 de-references to
NULL, one was probably not properly
initialized via a call to wn_createt, but may
also have been corrupted.
MODIFIED Either a virtual screen was moved, or
viewport resized to keep all viewports filled
with virtual screen data.
OK No errors detected.
- 106 -
WindowPro v. 1.5 Reference Manual
5.50 wn_swapt2
Summary
#include "werrors.h"
#include "pro.h"
int wn_swapt2(handle, tile_handle1, tile_handle2)
unsigned handle;
unsigned char tile_handle1, tile_handle2;
Description
Swaps the positions of the tile_handle1 and tile_handle2 in the
window's display list.
Returns
BAD_WDW_HANDLE handle de-references to NULL, it was probably
not initialized via wn_createw, but may have
been corrupted.
BAD_TILE_HANDLE tile_handle1 or tile_handle2 de-references to
NULL, one was probably not properly
initialized via a call to wn_createt, but may
also have been corrupted.
OK No errors detected.
- 107 -
WindowPro v. 1.5 Reference Manual
5.51 wn_sync_tw_to_vs
Summary
#include "werrors.h"
#include "pro.h"
int wn_sync_tw_to_vs(handle, tile_handle)
unsigned handle;
unsigned char tile_handle;
Description
Positions the thumbwheels to equate to the same relative position
as the virtual screen within the viewport.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 108 -
WindowPro v. 1.5 Reference Manual
5.52 wn_sync_vs_to_tw
Summary
#include "werrors.h"
#include "pro.h"
int wn_sync_vs_to_tw(handle, tile_handle)
unsigned handle;
unsigned char tile_handle;
Description
Positions the virtual screen to equate to the same relative
position as the thumbwheels.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 109 -
WindowPro v. 1.5 Reference Manual
5.53 wn_togborder
Summary
#include "werrors.h"
#include "pro.h"
int wn_togborder(handle, border_type)
unsigned handle;
unsigned char border_type;
Description
Changes the border style of a window. The styles are defined in
"pro.h" The effect of each style is:
UPPER_LEFT Only the upper and left sides of the border
are displayed. If the borders characters are
defined as a block-style character this
produces a shadow effect.
UPPER_RIGHT Only the upper and right sides of the border
are displayed.
LOWER_LEFT Only the lower and left sides of the border
are displayed.
LOWER_RIGHT Only the lower and right side of the border
are displayed.
HEAD_ON All of the border characters are displayed.
This is the default.
NONE None of the border characters are displayed
and all tiles are increased in width by two
characters (taking over the border area) the
first tile in the window is increased in
height by 2 rows all others are increased in
height by 1 row.
Any zoomed windows are un-zoomed.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
OK No errors detected.
- 110 -
WindowPro v. 1.5 Reference Manual
5.54 wn_togbordrng
Summary
#include "werrors.h"
#include "pro.h"
int wn_togbordrng(handle1, handle2, border_type)
unsigned handle1, handle2;
unsigned char border_type;
Description
Identical to wn_togborder, but operates on a range of windows. wn_togborder
The operation begins at handle1 and progresses towards the top of handle1
the display list, stopping at handle2 or the top of the list, handle2
whichever comes first.
Returns
BAD_WDW_HANDLE Handle1, or handle2, de-references to NULL.
One was probably not initialized via
wn_createw, but may have been corrupted.
OK No errors detected.
- 111 -
WindowPro v. 1.5 Reference Manual
5.55 wn_togscroll
Summary
#include "werrors.h"
#include "pro.h"
int wn_togscroll(handle, tile_handle, scroll_bars)
unsigned handle;
unsigned char tile_handle, scroll_bars;
Description
Turns the scroll bar character display on or off for a single
tile. The legal values NO_BARS, BOTH_BARS, VERTICAL_BAR, and
HORIZONTAL_BAR are defined in PRO.H.
If any window is zoomed it is un-zoomed.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 112 -
WindowPro v. 1.5 Reference Manual
5.56 wn_togscrollallt
Summary
#include "werrors.h"
#include "pro.h"
int wn_togscrollallt(handle, scroll_bars)
unsigned handle;
unsigned char scroll_bars;
Description
Turns the scroll bar character display on or off for all tiles in
the window (handle) If scroll_bars is TRUE they are turned on; handle scroll_bars TRUE
if scroll_bars is FALSE they are turned off. scroll_bars FALSE
If any window is zoomed it is un-zoomed.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
OK No errors detected.
- 113 -
WindowPro v. 1.5 Reference Manual
5.57 wn_togscrollrng
Summary
#include "werrors.h"
#include "pro.h"
int wn_togscrollrng(handle1, handle2, scroll_bars)
unsigned handle1, handle2;
unsigned char scroll_bars;
Description
Turns the scroll bar character display on or off for all windows
in the range (handle1, handle2.) If scroll_bars is TRUE they are handle1 handle2 scroll_bars TRUE
turned on; if scroll_bars is FALSE they are turned off. scroll_bars FALSE
If any window is zoomed it is un-zoomed.
The operation begins at handle1 and progresses towards the top of
the display list until it reaches handle2 or the top of the
display list.
Returns
BAD_WDW_HANDLE Handle1 or handle2 de-references to NULL.
One was probably not initialized via
wn_createw, but may have been corrupted.
OK No errors detected.
- 114 -
WindowPro v. 1.5 Reference Manual
5.58 wn_togthumb
Summary
#include "werrors.h"
#include "pro.h"
int wn_togthumb(handle, tile_handle, thumbwheels)
unsigned handle;
unsigned char tile_handle, thumbwheels;
Description
Turns the thumbwheel character display on or off for a single
tile. The legal values NO_BARS, BOTH_BARS, VERTICAL_BAR, and
HORIZONTAL_BAR are defined in PRO.H.
If any window is zoomed it is un-zoomed.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
OK No errors detected.
- 115 -
WindowPro v. 1.5 Reference Manual
5.59 wn_updatet
Summary
#include "werrors.h"
#include "pro.h"
int wn_updatet(handle, tile_handle)
unsigned handle;
unsigned char tile_handle;
Description
Updates the virtual screen defined by {handle, tile_handle} to
the physical screen. Regardless of whether or not the tile is
suspended. Useful for selectively updating suspended tiles.
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
BAD_TILE_HANDLE Tile_handle de-references to NULL. It was
probably not initialized via wn_createt, but
may have been corrupted.
NOT_DONE Tile is designated as hidden.
OK No errors detected.
- 116 -
WindowPro v. 1.5 Reference Manual
5.60 wn_updatew
Summary
#include "werrors.h"
#include "pro.h"
int wn_updatew(handle)
unsigned handle;
Description
Updates the window defined by handle to the physical screen. handle
Returns
BAD_WDW_HANDLE Handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
NOT_DONE window is designated as hidden, or suspended.
OK No errors detected.
- 117 -
WindowPro v. 1.5 Reference Manual
5.61 wn_zoomw
Summary
#include "werrors.h"
#include "pro.h"
int wn_zoomw(void)
Description
Zooms the active window to full screen size. A subsequent call
to wn_zoomw will shrink it back to its original size.
Returns
NO_ACTIVE_WDW No active window is designated or the active
window handle de-references to NULL. It was
probably not initialized via wn_createw, but
may have been corrupted.
NO_ACTIVE_TILE No active tile is designated or the active
tile handle de-references to NULL.
OK No errors detected.
- 118 -
WindowPro v. 1.5 Reference Manual
6 Global Variables and Data Structures
6.1 active_attr, inactive_attr
When a window is activated (see wn_actw for further explanation) wn actw
its border colors are set to the value of active_attr and the active attr
previously active window's border colors are set to the value of
inactive_attr. Also, when a window is first created its border inactive attr
colors are set to the value of inactive_attr. inactive attr
6.2 active_tile_attr, inactive_tile_attr
When a tile is activated its name color is set to the value of
active_tile_attr and the previously active tile's name color is active tile attr
set to the value of inactive_tile_attr. inactive tile attr
6.3 active_wdw
active_wdw is equal to the handle of the window designated as the active wdw
active window. See the Overview and wn_actw for additional wn actw
explanation regarding the significance of the active window
designation.
6.4 ansi_fcolor_table, ansi_fcolor_table
After foreground and background are converted to the values based
on their offsets into the ibm_fcolor_table and ibm_bcolor_table, ibm fcolor table ibm bcolor table
the ANSI colors are converted to their respected values by using
the converted foreground and background colors as offsets into
the 16 element char * arrays ansi_fcolor_table and ansi fcolor table
ansi_bcolor_table. These strings are then used to change the ansi bcolor table
default output color of the terminal. This is helpful for
creating terminal specific versions.
6.5 balance1
balance1 is incremented for every call to the WindowPro memory balance1
allocation function and decremented for every call to the
WindowPro free memory function. Used in debugging to determine
that no bits and pieces of stuff have been left around.
6.6 blkrec
typedef struct {
unsigned x, y, rows, columns;
char far *buffer;
} blkrec;
- 119 -
WindowPro v. 1.5 Reference Manual
The active window keeps a copy of the image underneath it in this
form.
x,y the physical screen coordinate where the image is
located.
rows, columns the dimensions of the image.
buffer a pointer to the image.
6.7 buf[]
Initialized to point to a 1000 byte area use as working space by
wn_printf. If this isn't enough space set the pointer to a wn printf
larger area.
6.8 cursor_e, cursor_b, cursor_on
WindowPro hides the cursor when performing certain functions by
changing the cursor's shape. It restores the cursor's shape
using cursor_e and cursor_b as the ending and beginning scan line cursor e cursor b
values.
If cursor_on is FALSE the cursor is not restored automatically as cursor on
described above. cursor_on is modified by calls to wn_hidecur wn hidecur
and wn_showcur. wn showcur
6.9 cursor_position, change_color
position_cursor is a printf-type string constant that is used to
position the cursor when method = ANSI. Upon initialization it
is set to this:
position_cursor = "\033[%d;%dH"
If you want to change it you can do it at any time. However, if
using the ANSI method and the above is not the correct string for
your terminal you should change it before calling wn_init. The
first %d must correspond the x coordinate and the second to the y
coordinate.
change_color is a printf-type string constant that is used to
change the the color of the next character to be printed when
method = ANSI. Upon initialization it is set to this
change_color = "\033[%s;%sm"
- 120 -
WindowPro v. 1.5 Reference Manual
You can change it at any time. However, if using the ANSI method
and the above is not the correct string for your terminal you
should modify it before calling wn_init. The first %s
corresponds to the foreground color string and the second to the
background color.
6.10 default_box, box0, box1, box2, box3, box4
default_box is a char pointer to an array of 13 chars. The array default box
is described in greater detail at wn_togbord. When a window is wn togbord
initially created it is assigned the box characters pointed to by
default_box. default box
box0, box1, box2, box3 and box4 are various styles of box box0 box1 box2 box3 box4
characters. default_box is initially set equal to box0. default box
6.11 ega_mline
If this global variable is not 0 before calling wn_init. And
wn_init determines that it is in an 80 column text mode. It will
assume that the display has ega_mlines lines. Otherwise the
display is assumed to have 25 lines.
6.12 error_flag
If TRUE the WindowPro error handler is invoked on detecting an
error. Otherwise error values are returned to the calling
function.
6.13 first_wdw, last_wdw
first_wdw is the first window in the display and designates the first wdw
window on the bottom.
last_wdw is the last window in the display list and designated last wdw
the window on the top.
6.14 frozen
If TRUE indicates that all screen output is re-routed to the area
pointed to by alt_scr. alt scr
6.15 ibm_fcolor_table, ibm_bcolor_table
These 16 byte tables correspond to the colors in the file
colors.h. All functions requesting a foreground and background
color use the foreground and background values as offsets into
- 121 -
WindowPro v. 1.5 Reference Manual
these tables (where they get the value they actually use.) You
can then easily make programs which modify colors by allowing the
user to modify these tables.
This can be useful to map colors into other video modes that
don't support color, like the monochrome display, or some CGA
cards and monitors don't display some colors clearly (you can
just use this table to map those colors to ones that do.)
6.16 justify
This global variable can be set to LEFT_JUSTIFY, RIGHT_JUSTIFY,
or CENTER_JUSTIFY. These values are defined in PRO.H. This
variable is used to initialize the window_rec member "justify"
when the data structure is created via wn_createw.
6.17 justify_tile
This global variable can be set to LEFT_JUSTIFY, RIGHT_JUSTIFY,
or CENTER_JUSTIFY. These values are defined in PRO.H. This
variable is used to initialize the tile_rec member "justify" when
the data structure is created via wn_createt.
6.18 method
method can be set to DMA, BIOS, or ANSI. See the overview for a method DMA BIOS ANSI
discussion of the various screen update methods. method is method
initialized to DMA, you can change it during run time to any of DMA
the 3 supported methods. If a particular method is not supported
by your machine you should make sure that it is not set to that
value before calling wn_init. wn init
6.19 mouse_installed
wn_init sets mouse_installed to TRUE if a Microsoft compatible
mouse and hardware are available. Otherwise mouse_installed is
set to FALSE.
6.20 oldx, oldy, oldb, olde
On calling wn_init, oldx and oldy are set to the current cursor wn init oldx oldy
position and oldb and olde are set to the starting and ending oldb olde
scan line values. You can use this to restore the cursor to its
original state on exiting your application.
- 122 -
WindowPro v. 1.5 Reference Manual
6.21 overlay
This item is a far pointer of type blkrec and holds an image of blkrec
what is behind the active window (this is why operations on
active windows are sometimes faster -- because we don't rebuild
the whole screen, and conversely why operations on background
windows are sometimes slower.)
6.22 physical_columns, physical_rows
physical_columns indicates the number of columns on the physical physical columns
screen. physical_rows indicates the number of rows on the physical rows
physical screen.
6.23 primary_scr, alt_scr, curr_scr
primary_scr is a far pointer to real video ram area -- it is only primary scr
important if using the DMA screen update method.
alt_scr is a far pointer to an area of the same size as video ram alt scr
-- we can build complex screens there and then dump them very
fast to real video ram. This is the area where WindowPro sends
its output when the screen is frozen (See frozen, wn_freeze, and frozen wn freeze
wn_defrost for further explanation.) wn defrost
curr_scr points to where WindowPro is currently sending output. curr scr
It is generally set to primary_scr if the system is not frozen primary scr
and to alt_scr if it is. alt scr
6.24 screen_buffer
a far pointer to where the windows background screen is saved.
See wn_savescr and wn_restorescr for further explanation. wn savescr wn restorescr
6.25 scroll_bars_on
When a tile is created its scroll bars indicator is set to the
value of scroll_bars_on. The legal values NO_BARS, BOTH_BARS, scroll bars on
VERTICAL_BAR, and HORIZONTAL_BAR are defined in PRO.H.
6.26 tab_expansion
tab_expansion indicates at what column position tab stops are
located. This is used by vs_printf and vs_format for tab
expansion. For example, a tab_expansion setting of 8 would
position tab stops at column 8, 16, 24, and so on. If
tab_expansion is set to zero or is larger than the current
virtual screen there will be unpredictable results.
- 123 -
WindowPro v. 1.5 Reference Manual
tab_expansion is set at 10, by default.
6.27 thumbwheels_on
When a tile is created its thumbwheels indicator is set to the
value of thumbwheels_on. The legal values NO_BARS, BOTH_BARS, thumbwheels on
VERTICAL_BAR, and HORIZONTAL_BAR are defined in PRO.H.
6.28 tile_rec
/* tile record */
typedef struct {
char far *virtual_screen, *tile_name, border_color;
unsigned char forward, backward, scroll_bars, thumbwheels;
int suspend, hide, port_rows, vs_rows, vs_columns,
cursor_x, cursor_y, virtual_x, virtual_y, offset_y;
float vertical_thumb, horizontal_thumb;
char justify;
void *resource;
} tile_rec;
virtual_screen pointer to the tile's virtual screen.
tile_name pointer to the tile's name
border_color attribute value for the tile's name
forward pointer to the tile displayed below this
tile.
backward pointer to the tile displayed above this
tile.
scroll_bars if true the scroll bars are displayed
for this tile.
suspend if true most operations on the tile will
not be seen on the physical screen.
hide if true the tile is not currently
displayed in its window.
port_rows, port_columns the inner dimensions of the tile (if
displayed.)
vs_rows, vs_columns the dimensions of the tile's virtual
screen.
cursor_x, cursor_y the location of the tile's cursor.
- 124 -
WindowPro v. 1.5 Reference Manual
virtual_x, virtual_y the upper left corner of the tile's
viewport displays this virtual screen
coordinate.
offset_y the tile is displayed this many rows
from the top of the window.
horizontal_thumb,
vertical_thumb indicates the relative position of the
thumbwheels within their respective
display areas.
thumbwheels indicates which thumbwheel displays are
turned on. Legal values are BOTH_BARS,
NO_BARS, VERTICAL_BAR, and
HORIZONTAL_BAR.
justify Set this value to LEFT_JUSTIFY,
RIGHT_JUSTIFY, or CENTER_JUSTIFY to
determine where to locate the tile title
in the tile border. This value is
initialized when a tile is created to
the value of the global variable
justify_tile. justify_tile
resource This void pointer is set aside for
applications program use. Typically you
would point to a structure which
contained information regarding the
context of the current tile. Upon
activating the tile you can use this
information to return the program to its
state prior to exiting that tile.
6.29 vpage
Equal to the video page active on calling wn_init. wn init
6.30 wdw[]
An array of far pointers to window_rec. The handles used to
refer to windows are actually offsets into this array. Although
WindowPro allows a theoretically unlimited number of windows.
The actual maximum is determined at compilation time so that
sufficient space is allocated for this array (This may change in
the future -- perhaps some kind of dynamic allocation where you
can decide the maximum at run-time -- or a linked list.....)
- 125 -
WindowPro v. 1.5 Reference Manual
6.31 wdw_rec
typedef struct {
unsigned physical_x, physical_y, suspend, hide, border,
forward, backward, first_tile, last_tile, active_tile;
int port_columns, port_rows;
unsigned char *wdw_name, border_color, *border_chars;
tile_rec far *tiles[MAX_TILES + 1];
char justify;
void *resource;
} wdw_rec;
physical_x, physical_y the upper left corner of the window is
positioned on this physical screen
coordinate.
suspend if this is > 0 operations on the window
will not be reflected on the virtual
screen.
hide if this is true the window is not
displayed on the physical screen.
border defines the border style (see
wn_togborer for additional explanation.)
forward handle of the window underneath this
window.
backward handle of the window on top of this
window.
first_tile tile handle of the tile displayed at the
top of the window.
last_tile tile handle of the tile displayed at the
bottom of the window.
active_tile tile handle of the active tile in this
window.
port_columns, port_rows inner dimensions of the window.
wdw_name pointer to the name of the window.
border_color attribute value of the window borders.
border_chars pointer to a 13 byte array of border
characters. (See wn_chgborder for
additional explanation.)
- 126 -
WindowPro v. 1.5 Reference Manual
tiles array of far pointers to the tiles
contained by this window. The shareware
version sets this to a maximum of 10.
With source code you can reserve
whatever amount of space you require.
justify Set this value to LEFT_JUSTIFY,
RIGHT_JUSTIFY, or CENTER_JUSTIFY to
determine where to locate the window
title in the window border. This value
is initialized when a window is created
to the value of the global variable
justify. justify
resource This void pointer is set aside for
applications program use. Typically you
would point to a structure which
contained information regarding the
context of the current window. Upon
activating the window you can use this
information to return the program to its
state prior to exiting that window.
6.32 zoomed
If TRUE indicates that the window currently designated as active
is also zoomed. See wn_zoomw for further explanation. wn zoomw
6.33 zoomed_tile
Only the last tile in the zoomed window is effected by zooming so
this item holds the original values for the last tile of a zoomed
window (for the same reasons as explained in zoomed_wdw.) zoomed wdw
6.34 zoomed_wdw
zoomed_wdw is a window_rec which holds a copy of the zoomed zoomed wdw window rec
window -- so we can reset the zoomed window back to its original
state when we unzoom it.
- 127 -