home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-11-30 | 203.9 KB | 8,383 lines |
-
-
-
-
-
-
- The WINDOW PRO
- by Kenneth Stott
- version 1.2
-
-
-
-
-
-
-
-
-
-
- Seabreeze Software
- 66 Krebs Rd.
- Plainsboro, New Jersey 08536
-
- (609-275-8715)
-
-
-
-
-
-
-
-
- Copyright (c) 1986, 1987 by Kenneth Stott
- All Rights Reserved
-
-
-
-
-
-
-
-
-
- The WINDOW PRO 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ---------------- The WINDOW PRO registration form ---------------
-
- Mailing Address
-
- Name :___________________________________________________
- Company Name :___________________________________________________
- Position :___________________________________________________
- Street :___________________________________________________
- ___________________________________________________
- City :_________________ State :__ Zip Code :__________
- Country :___________________________________________________
- Compuserve # :___________________________________________________
-
-
- Demographics
-
- Age :__
- Sex :__
-
- Computer System
-
- Manufacturer :___________________________________________________
- Model :___________________________________________________
- RAM :___________________________________________________
-
- Disk Media 5 1/4" 360K __ 5 1/4" 1.2mb __
- 3 1/2" 720K __ 3 1/2" 1.4mb __
- Hard Disk
- Capacity :___________________________________________________
- Video Adapter:___________________________________________________
- Monitor :___________________________________________________
-
-
- How did you hear about WINDOW PRO? ______________________________
- _________________________________________________________________
- _________________________________________________________________
- _________________________________________________________________
-
- Desired Support Level (check one)
-
- __ $15, The WINDOW PRO shareware diskette
- __ $50, registered WINDOW PRO shareware library user
- __ $75, registered WINDOW PRO source code user (non-commercial)
- __ $150, registered WINDOW PRO source code user (commercial)
-
- Include a check for the amount corresponding to the desired level
- of service. Make the check payable to, Seabreeze Software.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- I. Introduction . . . . . . . . . . . . . . . . . . . . . 1
- II. Technical Notes . . . . . . . . . . . . . . . . . . . 2
- III. Shareware . . . . . . . . . . . . . . . . . . . . . . 4
- IV. Registration . . . . . . . . . . . . . . . . . . . . . 5
- V. Support Details . . . . . . . . . . . . . . . . . . . 7
- VI. Diskette . . . . . . . . . . . . . . . . . . . . . . . 8
- VII. Installation . . . . . . . . . . . . . . . . . . . . . 9
- VIII. Compiling and linking the demo . . . . . . . . . . . . 10
- IX. Overview . . . . . . . . . . . . . . . . . . . . . . . 11
- X. Glossary . . . . . . . . . . . . . . . . . . . . . . . 12
- XI. Tutorial . . . . . . . . . . . . . . . . . . . . . . . 15
- XII. Reference . . . . . . . . . . . . . . . . . . . . . . 20
- A. Overview . . . . . . . . . . . . . . . . . . . . . . . 20
- B. Keyboard and Mouse Functions . . . . . . . . . . . . . 24
- 1. kb_getshift . . . . . . . . . . . . . . . . . . . 24
- 2. kb_getxc . . . . . . . . . . . . . . . . . . . . . 25
- 3. kb_hidemouse . . . . . . . . . . . . . . . . . . . 26
- 4. kb_ismouse . . . . . . . . . . . . . . . . . . . . 27
- 5. kb_mouseclicks . . . . . . . . . . . . . . . . . . 28
- 6. kb_mousemickeys . . . . . . . . . . . . . . . . . 29
- 7. kb_mousemotion . . . . . . . . . . . . . . . . . . 30
- 8. kb_mousepressed . . . . . . . . . . . . . . . . . 31
- 9. kb_mousereleased . . . . . . . . . . . . . . . . . 32
- 10. kb_mousestatus . . . . . . . . . . . . . . . . . . 33
- 11. kb_putmouse . . . . . . . . . . . . . . . . . . . 34
- 12. kb_resetmouse . . . . . . . . . . . . . . . . . . 35
- 13. kb_setgraphicsicon . . . . . . . . . . . . . . . . 36
- 14. kb_setmousexrange . . . . . . . . . . . . . . . . 37
- 15. kb_setmouseyrange . . . . . . . . . . . . . . . . 38
- 16. kb_settextcursor . . . . . . . . . . . . . . . . . 39
- 17. kb_showmouse . . . . . . . . . . . . . . . . . . . 40
- C. Video Functions . . . . . . . . . . . . . . . . . . . 41
- 1. v_curshape . . . . . . . . . . . . . . . . . . . . 41
- 2. v_cursor_report . . . . . . . . . . . . . . . . . . 42
- 3. v_getchar . . . . . . . . . . . . . . . . . . . . . 43
- 4. v_getmode . . . . . . . . . . . . . . . . . . . . . 44
- 5. v_getpage . . . . . . . . . . . . . . . . . . . . . 45
- 6. v_getwidth . . . . . . . . . . . . . . . . . . . . 46
- 7. v_gotoxy . . . . . . . . . . . . . . . . . . . . . 47
- 8. v_putchar . . . . . . . . . . . . . . . . . . . . . 48
- 9. v_setmode . . . . . . . . . . . . . . . . . . . . . 49
- D. Virtual Screen Functions . . . . . . . . . . . . . . . 50
- 1. vs_clr* . . . . . . . . . . . . . . . . . . . . . 50
- 2. vs_delcolumn . . . . . . . . . . . . . . . . . . . 52
- 3. vs_delrow . . . . . . . . . . . . . . . . . . . . 53
- 4. vs_fillattr . . . . . . . . . . . . . . . . . . . 54
- 5. vs_fillchar . . . . . . . . . . . . . . . . . . . 55
- 6. vs_format . . . . . . . . . . . . . . . . . . . . 56
- 7. vs_gets . . . . . . . . . . . . . . . . . . . . . 57
- 8. vs_inscolumn . . . . . . . . . . . . . . . . . . . 58
- 9. vs_insrow . . . . . . . . . . . . . . . . . . . . 59
- 10. vs_locatecur . . . . . . . . . . . . . . . . . . . 60
- 11. vs_printf . . . . . . . . . . . . . . . . . . . . 61
- 12. vs_putc . . . . . . . . . . . . . . . . . . . . . 62
-
-
-
- - index 1 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 13. vs_puts . . . . . . . . . . . . . . . . . . . . . 62
- E. Window and Tile Functions . . . . . . . . . . . . . . 64
- 1. wn_actt . . . . . . . . . . . . . . . . . . . . . 64
- 2. wn_actw . . . . . . . . . . . . . . . . . . . . . 65
- 3. wn_bordrng . . . . . . . . . . . . . . . . . . . . 66
- 4. wn_chgbord . . . . . . . . . . . . . . . . . . . . 67
- 5. wn_chgcolor . . . . . . . . . . . . . . . . . . . 68
- 6. wn_closet . . . . . . . . . . . . . . . . . . . . 69
- 7. wn_closew . . . . . . . . . . . . . . . . . . . . 70
- 8. wn_createt . . . . . . . . . . . . . . . . . . . . 71
- 9. wn_createw . . . . . . . . . . . . . . . . . . . . 72
- 10. wn_defrost . . . . . . . . . . . . . . . . . . . . 74
- 11. wn_deletet . . . . . . . . . . . . . . . . . . . . 75
- 12. wn_delw . . . . . . . . . . . . . . . . . . . . . 76
- 13. wn_draww . . . . . . . . . . . . . . . . . . . . . 77
- 14. wn_flybox . . . . . . . . . . . . . . . . . . . . 78
- 15. wn_freeze . . . . . . . . . . . . . . . . . . . . 79
- 16. wn_hidecur . . . . . . . . . . . . . . . . . . . . 80
- 17. wn_hidew . . . . . . . . . . . . . . . . . . . . . 81
- 18. wn_init . . . . . . . . . . . . . . . . . . . . . 82
- 19. wn_ison* . . . . . . . . . . . . . . . . . . . . . 83
- 20. wn_locatevs . . . . . . . . . . . . . . . . . . . 88
- 21. wn_locatew . . . . . . . . . . . . . . . . . . . . 89
- 22. wn_moverng . . . . . . . . . . . . . . . . . . . . 90
- 23. wn_movew . . . . . . . . . . . . . . . . . . . . . 91
- 24. wn_namet . . . . . . . . . . . . . . . . . . . . . 92
- 25. wn_namew . . . . . . . . . . . . . . . . . . . . . 93
- 26. wn_opent . . . . . . . . . . . . . . . . . . . . . 94
- 27. wn_openw . . . . . . . . . . . . . . . . . . . . . 95
- 28. wn_redraw . . . . . . . . . . . . . . . . . . . . 96
- 29. wn_restorescr . . . . . . . . . . . . . . . . . . 97
- 30. wn_savescr . . . . . . . . . . . . . . . . . . . . 98
- 31. wn_scrollvs . . . . . . . . . . . . . . . . . . . 99
- 32. wn_showcur . . . . . . . . . . . . . . . . . . . . 100
- 33. wn_sizerng . . . . . . . . . . . . . . . . . . . . 101
- 34. wn_sizet . . . . . . . . . . . . . . . . . . . . . 102
- 35. wn_suspendt . . . . . . . . . . . . . . . . . . . 103
- 36. wn_suspendw . . . . . . . . . . . . . . . . . . . 104
- 37. wn_swapt . . . . . . . . . . . . . . . . . . . . . 105
- 38. wn_togborder . . . . . . . . . . . . . . . . . . . 106
- 39. wn_togbordrng . . . . . . . . . . . . . . . . . . 107
- 40. wn_togscroll . . . . . . . . . . . . . . . . . . . 108
- 41. wn_togscrollrng . . . . . . . . . . . . . . . . . 109
- 42. wn_updatet . . . . . . . . . . . . . . . . . . . . 110
- 43. wn_updatew . . . . . . . . . . . . . . . . . . . . 111
- 44. wn_zoomw . . . . . . . . . . . . . . . . . . . . . 112
- F. Global Variables and Data Structures . . . . . . . . . 113
- 1. active_attr, inactive_attr . . . . . . . . . . . . 113
- 2. active_tile_attr, inactive_tile_attr . . . . . . . 113
- 3. active_wdw . . . . . . . . . . . . . . . . . . . . 113
- 4. ansi_fcolor_table, ansi_fcolor_table . . . . . . . 113
- 5. balance1 . . . . . . . . . . . . . . . . . . . . . 113
- 6. buf[] . . . . . . . . . . . . . . . . . . . . . . 113
- 7. cursor_e, cursor_b, cursor_on . . . . . . . . . . 114
-
-
-
- - index 2 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 8. cursor_position, change_color . . . . . . . . . . 114
- 9. default_box, box0, box1, box2, box3, box4, box . . 114
- 10. ega_mline . . . . . . . . . . . . . . . . . . . . 115
- 11. error_flag . . . . . . . . . . . . . . . . . . . . 115
- 12. first_wdw, last_wdw . . . . . . . . . . . . . . . 115
- 13. frozen . . . . . . . . . . . . . . . . . . . . . . 115
- 14. ibm_fcolor_table, ibm_bcolor_table . . . . . . . . 115
- 15. method . . . . . . . . . . . . . . . . . . . . . . 115
- 16. oldx, oldy, oldb, olde . . . . . . . . . . . . . . 116
- 17. overlay . . . . . . . . . . . . . . . . . . . . . 116
- 18. physical_columns, physical_rows . . . . . . . . . 116
- 19. primary_scr, alt_scr, curr_scr . . . . . . . . . . 116
- 20. screen_buffer . . . . . . . . . . . . . . . . . . 116
- 21. scroll_bars_on . . . . . . . . . . . . . . . . . . 116
- 22. tab_expansion . . . . . . . . . . . . . . . . . . 117
- 23. vpage . . . . . . . . . . . . . . . . . . . . . . 117
- 24. window[] . . . . . . . . . . . . . . . . . . . . . 117
- 25. zoomed . . . . . . . . . . . . . . . . . . . . . . 117
- 26. zoomed_tile . . . . . . . . . . . . . . . . . . . 117
- 27. zoomed_wdw . . . . . . . . . . . . . . . . . . . . 117
- 28. wdw_rec . . . . . . . . . . . . . . . . . . . . . 118
- 29. tile_rec . . . . . . . . . . . . . . . . . . . . . 119
- 30. blkrec . . . . . . . . . . . . . . . . . . . . . . 120
- G. Forthcoming Enhancements . . . . . . . . . . . . . . . 121
- H. Other Seabreeze Products . . . . . . . . . . . . . . . 122
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - index 3 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- I. Introduction
-
- WINDOW PRO is one of the most comprehensive, compact, and easiest
- to use screen control libraries available for "C" language
- development of applications and systems software.
-
- . WINDOW PRO lets you easily create programs that look and
- feel like Framework, Lotus, dBase III, and other
- top-sellers. Dialog boxes, context-sensitive help, pop-up
- and pull-down menus are a snap to implement.
-
- . Your programs will be able to drag, zoom, split, hide, and
- scroll windows fast, flicker-free, and without snow.
-
- . Sensing video cards, setting video modes, and cursor control
- are simple straight-forward operations.
-
- . WINDOW PRO is compiler and machine independent. You can use
- the same applications interface for your VAX, IBM PC, or
- APPLE II.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 1 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- II. Technical Notes
-
- . Compatibility - Seabreeze Software currently supports WINDOW
- PRO under MS-DOS running on the IBM-PC/XT/AT and
- compatibles. It works with CGA, MDA, and EGA cards in black
- and white or color and operates in 40 X 25, 80 X 25, and 80
- X 43 modes. It also supports the multi-page capabilities of
- the CGA and EGA video cards. WINDOW PRO includes a large
- model version of its library, in a Borland Turbo C version
- and a Microsoft C 4.0 version. (Turbo-C huge model is
- available by mail.)
-
- . Limitations - The number of windows on the screen is
- algorithmically unlimited. Your compiler or hardware may
- limit the number of windows.
-
- . Error handling - WINDOW PRO has extensive error handling
- capabilities. The centralized error handling feature can be
- switched on or off during run-time via a function call.
- With the feature disabled WINDOW PRO functions return
- extensive error handling information for customized error
- handling.
-
- . Machine independence - WINDOW PRO use three methods of
- screen updating:
-
- .. Direct memory access ("DMA") - Usable on IBM PC/XT/AT
- and compatibles. This is the fastest and most
- efficient method.
-
- .. IBM PC BIOS method ("BIOS") - Considered well-behaved
- by programs such as DESQVIEW, and MICROSOFT WINDOWS.
-
- .. Direct cursor positioning ("ANSI") - Requires a
- terminal that can position the cursor at a coordinate
- on the screen. This is by default setup for an ANSI
- type terminal, but can be modified at run-time for
- others.
-
- In all modes no assumptions are made about screen size,
- video memory locations, etc. But you are provided with
- several functions for sensing and setting video modes on an
- IBM-PC.
-
- . Compiler independence - WINDOW PRO coding adheres to the
- current proposed ANSI standard. Although we are in the
- process of testing WINDOW PRO with several compilers we can
- only recommend Borland Turbo C and Microsoft C version 4.
-
- For now, If you would like to use another compiler, you will
- have to purchase the source code (see registration, next
- section.) WINDOW PRO uses the following functions from the
-
-
-
-
-
- - 2 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- compilers' libraries. Your compiler will need to support
- these functions, or you will need to provide suitable
- substitutes, to make use of the WINDOW PRO source code:
-
- . far malloc, far free. An absolute must, although you
- might try your hand at changing the source code to
- support small model. (If your compiler doesn't support
- large model.) We're still working on the small model
- version.
-
- . vsprintf. Necessary for the wprintf feature.
-
- . int86. Necessary for sensing the video card, setting
- the video mode, setting the cursor size and position,
- and other IBM PC specific functions.
-
- . getch. Necessary for WINDOW PRO's wgets function.
-
- . putchar. Necessary for ANSI mode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 3 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- III. Shareware
-
- Seabreeze Software distributes WINDOW PRO under the shareware
- marketing concept. Because WINDOW PRO is shareware you can
- freely copy and share the WINDOW PRO shareware diskette with its
- programs and manual. You can also obtain it from Seabreeze
- Software for $15 (the cost of the diskette, postage, and
- handling.) In fact, we hope you do help us by sharing unmodified
- copies of the WINDOW PRO shareware diskette with other
- programmers.
-
- You may incorporate WINDOW PRO into your programs and distribute
- those programs absolutely royalty free. You may not however
- sell, or give away, the WINDOW PRO source code -- even if you
- purchase the right to use it (see registration section.)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 4 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- IV. Registration
-
- Shareware is software which can be freely copied and
- distributed. It is copyrighted software which the author
- encourages people to copy and share with others.
-
- You can register with Seabreeze Software for three levels of
- support:
-
- . For $50 you receive
-
- . A serialized diskette containing all the latest libraries
- for all supported compilers and memory models.
-
- . Single user telephone support (BBS, Compuserve, and
- voice.) See next section for details.
-
- . Free updates for one year.
-
- . For $75 you receive
-
- . the above,
- . one hundred pages of liberally commented documented
- source code (on diskette,) and
- . a Kernel Functions Reference Manual.
-
- This support-level is usable for non-commercial
- programs. Non-commercial programs are those created for
- limited user (less than 100 users) installations (as
- typically might be found in a small consulting situation
- or a small corporate software development setting,) for
- unlimited shareware or freeware distribution.
-
- . For $150 you receive
-
- . the above, plus
- . the right to use WINDOW PRO in commercial applications.
-
- . Call for details regarding multiple user-support, consulting
- services, and customizations.
-
-
- Seabreeze Software retains the following rights:
-
- . If you purchase the source code you may not distribute it
- except as part of an application program. In other words,
- you can't resell the source in its current or modified form
- in a way that competes with the original product.
-
- . If you provide the WINDOW PRO source code to a purchaser of
- your applications software you must leave the remarks in the
- source code indicating that the original copyright is held by
- Seabreeze Software. If you rewrite portions of WINDOW PRO
-
-
-
-
- - 5 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- you may point out the modifications made by yourself but you
- are still legally obligated to leave the original copyright
- notice in the source code.
-
- . Seabreeze Software may modify its pricing and distribution
- policies at any time without notification. This does not
- imply that we will not honor our contractual obligations. But
- that we reserve the right to not contract for the above
- services at the above prices, i.e. we are not bound by 'old'
- advertising.
-
- The registration form is at the back of this manual.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 6 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- V. Support Details
-
- Support is provided under three methods.
-
- . Commercial E-mail. Send mail to Kenneth Stott, Compuserve
- ID# 72330, 705
-
- . Public E-mail. Leave messages to Kenneth Stott at the
- "Second Opinion" BBS, 412-826-0822. Kenneth Stott, The
- WINDOW PRO, and Seabreeze Software are in no way affiliated
- with "The Second Opinion" BBS or Bob Rakov, "The Second
- Opinion" BBS sysop. (He just happens to run a first-class
- BBS.)
-
- . Voice. You may leave voice messages (answering machine) at
- 609-275-8715, Monday through Friday, 9 a.m. to 5 p.m. Eastern
- Time.
-
- Technical support is available to registered users only, you must
- leave your license agreement number, your name, and instructions
- for answering the question (like - "please answer via Compuserve
- E-mail ID# XXXXX, XXX." or "Please call me at XXX-XXX-XXXX for
- verbal consultation.") Give as many details as possible.
- Answers will generally be received within 24 hours or less,
- Monday through Friday.
-
- Seabreeze Software will respond to general questions from
- unregistered users, like "I have version X.XX, what is the latest
- version?" or "What is the current price for support level X?" We
- cannot respond to technical questions from unregistered users.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 7 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- VI. Diskette
-
- The shareware diskette should contain the following files:
-
- Read.me Any last minute corrections, additions, etc.
- Pkxarc.exe Unarchives Pro.arc
- Pro.arc Contains the manual and libraries
-
- Pro.arc contains:
-
- Demo.c Source code for the WINDOW PRO demo program
- Demo.exe The WINDOW PRO demo program
- Demo.prj Project file for Borland Turbo C
- Mscpro.bat Microsoft C ver 4 compiler and linker driver
- batch file
- Tcpro.bat Turbo C compiler driver and linker driver
- batch file (TCC.EXE and TLINK.EXE)
- Pro.h Type checking include files
- Vs.h "
- Video.h "
- Keyboard.h "
- Mouse.h "
- Colors.h Color defintion macros for IBM-PC
- Werrors.h Error handler definitions
- Vidmodes.h Video mode definition macros for IBM-PC
- Xglobals.h Global declarations
- tcpower.lib Turbo C large model WINDOW PRO library
- mscpower.lib Microsoft C ver 4 large model WINDOW PRO
- library
- Tutor1.c Source and turbo project file for tutorial
- number 1.
- Tutor1.prj "
- Tutor2.c Source and turbo project file for tutorial
- number 2.
- Tutor2.prj "
- Tutor3.c Source and turbo project file for tutorial
- number 3.
- Tutor3.prj "
- Tutor4.c Source and turbo project file for tutorial
- number 4.
- Tutor4.prj "
- Tutor5.c Source and turbo project file for tutorial
- number 5.
- Tutor5.prj "
-
- Note: BBS operators may repackage The WINDOW PRO files to
- optimize on-line time. If you received your files via a BBS
- please make sure you have all of The WINDOW PRO shareware files.
-
-
-
-
-
-
-
-
-
- - 8 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- VII. Installation
-
- 1. Backup your shareware diskette.
-
- 2. Type "pkxarc Pro" at the dos prompt. Pkxarc will unarc
- Pro.arc into the current default directory. You can run
- pkxarc.exe from another directory, and unarc Pro.arc located
- on another drive or directory by preceding each with a drive
- and directory specification, for example
-
-
- C:\Pro>a:pkxarc a:Pro
-
- will run pkxarc from the a: drive and unarc Pro.arc located
- on the a: drive into the c: drive and into a sub-directory
- called Pro.
-
- 3. Copy the library file (extension of ".lib") to the diskette
- or sub-directory you usually use with your C compiler. The
- lib files should be in the same sub-directory as your C
- runtime libraries.
-
- 4. Copy the compiler/linker driver batch file that corresponds
- to your compiler to
-
- PRO.BAT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 9 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- VIII. Compiling and linking the demo
-
- Compile the demo by typing
-
- PRO DEMO
-
- at the dos prompt.
-
- Note: The compiler/linker batch files assume that you have
- installed the your compiler as suggested by your compiler's
- manual. If you are using Turbo-C it assumes that the
- sub-directories LIB and INCLUDE are child directories of the
- default directory. If you are using MSC it assumes that the BIN
- sub-directory is in your PATH, and that the environment variables
- LIB and INCLUDE are properly set.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 10 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- IX. Overview
-
- WINDOW PRO is a virtual screen manager. Instead of working with
- a single screen like a traditional program, you can define
- hundreds of screens. And with simple commands, like vs_gets and
- vs_printf, you send output to any virtual screen. You can
- display parts of a virtual screen on the physical screen through
- a window.
-
- Windows may overlap one another so that some windows will obscure
- others. A collection of overlapping windows on a screen could
- like this.
-
-
- +--------------------+
- | |
- | window #1 |
- | |
- | |-------------+
- | | |
- | | |
- | | |
- | | |
- | | |
- +--------------------+ |
- | | |
- | | window #2 |
- | | |
- | | |
- | +-------------------+
- | |
- | window #3 |
- | |
- +----------------------+
-
- Because all WINDOW PRO operation modes can be decided at
- runtime. You can support several MS-DOS supported machines with
- one executable file. Creating programs with fancy terminal
- installations is very simple, or for the IBM PC world, creating
- programs that automatically sense, or set, video modes, sense
- display adapters, etc. is quite easy.
-
- WINDOW PRO provides mouse support. Mice and windows are a team.
- So we have provided extensive and sophisticated support for
- MICROSOFT MOUSE compatible devices.
-
- WINDOW PRO, for all of its added features just doesn't take much
- space. If you use just the basic functions you will only add
- about 20K of code to your application. If you use all of the
- features you will add about 60K. (Depends on you compiler.)
-
-
-
-
-
-
-
- - 11 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- X. Glossary
-
- . Physical screen - the physical screen is your computer or
- terminal screen. Unlike a virtual screen it is limited in
- size to whatever modes your computer or terminal supports.
-
- . Virtual screen - WINDOW PRO allows you to create an
- unlimited number of virtual screens. Instead of sending
- output to the physical screen, you send output to the
- virtual screen of your choice. WINDOW PRO will update the
- physical screen only if there is a window onto the virtual
- screen displayed on the physical screen. Virtual screens are
- not limited in size. A virtual screen does not have to have
- an open window on the physical screen, i.e. a program can
- update a virtual screen without affecting the physical
- screen.
-
- . Window - a window allows you to show part of a virtual
- screen on the physical screen. WINDOW PRO lets you open a
- window and place it anywhere on the physical screen.
- Windows can be moved or resized through simple function
- calls. Windows may overlap on the physical screen.
-
- You can control the overlapping of windows in several ways.
- If you need to see a window which is partially or completely
- obscured you can 'activate' the window, which will bring it
- temporarily to the top of the physical screen. You put the
- the 'active' window back into its original position by
- 'deactivating' it. A window may be brought to the top
- permanently by 'opening' it. You remove a window from the
- physical screen by 'closing' it.
-
- . Handle - when a window is created WINDOW PRO returns an
- internal name - a handle - by which the window can be
- referred to.
-
- . Viewport - The rectangular region of a virtual screen
- displayed within a window.
-
- . Border - the area of the window which surrounds the viewport
- is called the border. You can specify the border characters
- and can select from several types of display styles to
- create shadowing effects.
-
- . Freezing or Suspending - A physical screen, virtual screen,
- or window may be frozen or suspended. If an item is frozen
- the results of any actions performed on it are not updated
- to the physical screen. Defrosting the item flashes the
- results of all the operations subsequent to the freeze to
- the physical screen. (Suspending is identical to freezing
- but is a toggle. Unlike suspend, every call to freeze must
- be matched by the same number of defrosts to un-freeze the
- item.)
-
-
-
-
- - 12 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- . Display List - WINDOW PRO uses the display list to keep
- track of the windows which have been opened on the physical
- screen, and the order in which they are shown. The display
- list is used to make sure that the windows on the physical
- screen are stacked up in the right order when the physical
- screen is redrawn. You can reorder the list through various
- function calls. Although you will never deal with this list
- directly it is referred to often in the WINDOW PRO functions
- reference.
-
- . Hiding a window - if a window is hidden it retains its
- position in the display list, but it is not displayed on the
- physical screen. (Some useful effects can be programmed by
- hiding and unhiding windows.)
-
- . Tiles - a tile is a subdivision of a window. This is very
- similar to the old split screen approach used by many word
- processors and spreadsheets, and looks something like this:
-
-
- +--------------------+
- | |
- | window #1 |
- | tile #1 |
- | |-------------+
- |--------------------| |
- | | |
- | window #1 | |
- | tile #2 | |
- | | |
- +--------------------+ |
- | | |
- |window #3| window #2 |
- | tile #1 | tile #1 |
- | | |
- | +-------------------+
- |----------------------|
- | window #3 |
- | tile #2 |
- +----------------------+
-
- Many WINDOW PRO functions which are available at window
- level are also available at tile level. All operations
- applied to the window will affect its tiles. If the window
- is hidden, then all the tiles are hidden. If the window is
- made bigger, then the size of the tiles is adjusted too.
- Each window has a tile display list (similar to the window
- display list,) which controls how tiles are displayed within
- the window.
-
- The advantage of tiles is that you can display several
- virtual screens in a single window. This is useful when
- creating segmented pull down menus, or in creating window
- based editors. For example, a text editor might use one
-
-
-
- - 13 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- tile for editing text, and a second to display formatting
- information. There are lots of uses for this feature, and
- you will not find it anywhere else.
-
- Tiles are also referred to by 'handles.' A single virtual
- screen is always associated with a tile.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 14 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- XI. Tutorial
-
- The easiest way to understand WINDOW PRO is to study some code
- which employs the WINDOW PRO library. I've included a few simple
- examples to show you how to get started. The following
- illustration is also found in TUTOR1.C. You can compile and link
- TUTOR1 by typing
-
- PRO TUTOR1
-
- at the dos prompt.
-
- There are five tutorials in all, TUTOR1 to TUTOR5. I suggest
- that you run through each in order by first printing the source
- code, compiling and linking the source, running the executable,
- and simultaneously tracing through the source code to see how the
- various screen effects were performed. There are numerous
- getch() statements sprinkled through each tutor?.c file to help
- slow down the action. The TUTOR source code is liberally
- commented. You should not have a great deal of trouble comparing
- the code to the screen action.
-
- Lets put a window on the screen and type the words 'WINDOW PRO'
- inside of it.
-
-
- /*
- * We'll need this for type checking on the windows functions
- */
- #include "pro.h"
-
-
- /*
- * You've got to have this. It will setup the WINDOW PRO global
- * variables.
- */
- #include "xglobals.h"
-
-
- /*
- * We'll need this for type checking on the virtual screen
- * functions
- */
- #include "vs.h"
-
-
- /*
- * This is really handy, it defines the IBM-PC colors
- */
- #include "colors.h"
-
-
- int main()
- {
-
-
-
- - 15 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
-
- /*
- * We'll use this to store the window and tile handle
- * returned when we create a window.
- */
- unsigned int window_handle;
-
- /*
- * Initialize WINDOW PRO. If you don't do this -- forget
- * it, everything blows up.
- */
- wn_init();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 16 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
-
- /*
- * Create a window and get a handle back.
-
- * The window's virtual screen will be 25 rows by 80
- * columns,
- */
-
- window_handle = wn_createw(25, 80,
-
- /*
- * The upper left corner of the window will be located at the
- * physical screen coordinates of (2,3); second column and
- * third row.
- */
-
- 2, 3,
-
- /*
- * The upper left corner of the window will map to the
- * virtual screen coordinate (1,1); first column and
- * first row.
- */
-
- 1, 1,
-
- /*
- * The inner dimensions of the window will be 5,10;
- * 5 rows by 10 columns.
- */
-
- 5, 10,
-
- */
- * The window will not be suspended, i.e. all output
- * to the virtual screen will be immediately displayed
- * on the physical screen.
- */
-
- FALSE,
-
- */
- * We won't use any shadowing effects.
- */
-
- HEAD_ON,
-
- /*
- * Nor will we assign a name to the tile or window.
- */
-
- NULL, NULL);
-
-
-
-
-
- - 17 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- /*
- * More simply put:
- * wn_createw(25,80,2,3,1,1,5,10,FALSE,HEAD_ON,NULL,NULL);
- */
-
-
- */
- * Here comes the confusing part:
- * All windows, even those that aren't divided into tiles
- * have tiles. You really should think of windows as a
- * way of grouping tiles together. In the above case
- * When we created the window, we also created a tile, and
- * a virtual screen. The first tile created in a new
- * window always has a handle of 0 and every virtual
- * screen is associated with a tile. We always
- * reference a virtual screen by a pair of handles:
- * A window handle (pointing to a group of tiles), and
- * a tile handle. In the window we just created the window
- * has a handle of 'window_handle', the tile has a handle
- * of 0, and we reference the virtual screen using
- * {window_handle, 0}.
- */
-
- /*
- * Now let's put something in the virtual screen
- *
- */
-
- /*
- * first we reference the virtual screen
- */
-
- vs_puts(window_handle, 0,
-
- /*
- * Then we say where we want the string put (column, row).
- */
-
- 1, 1,
-
- /*
- * Now we indicate the maximum length of the string to output
- */
-
- 10,
-
- /* Now the foreground and background color of the string.
- * Note, if the string is shorter than the maximum length
- * The function pads spaces to the end.
- */
-
- WHITE, BLUE,
-
- /*
-
-
-
- - 18 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- * And finally, the string to output.
- */
-
- "WINDOW PRO");
-
- /*
- * More simply put:
- * vs_puts(window_handle,0,1,1,10,WHITE,BLUE,"WINDOW PRO");
- */
-
- /*
- * However, before anything happens on the screen we need to
- * open it.
- */
-
- wn_openw(window_handle);
-
- /*
- * That's it:
-
- ***********************************************************
- * { *
- * wn_init(); *
- * *
- * window_handle = *
- * wn_createw(25,80,2,3,1,1,5,10,FALSE,HEAD_ON,NULL,NULL); *
- * *
- * vs_puts(window_handle,0,1,1,10,WHITE,BLUE, *
- * "WINDOW PRO"); *
- * *
- * wn_openw(window_handle); *
- * } *
- ***********************************************************
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 19 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- XII. Reference
-
- A. Overview
-
- WINDOW PRO 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 WINDOW PRO. 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 WINDOW
- PRO.
-
-
- WINDOWS AND TILES:
-
- INITIALIZE WINDOW PRO -- 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.
-
-
-
-
- - 20 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- HIDE a window -- suppresses the display of a window, but
- keeps its position in the display list.
-
- 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.
-
-
-
-
-
- - 21 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- OPEN a tile -- inserts a tile below the currently active
- tile in a window.
-
- 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.
-
- 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.
-
- CURSOR LOCATION -- moves the cursor to any location on the
- screen.
-
- PUTC -- output a character and attribute to any location on
- the screen.
-
-
-
-
-
- - 22 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 23 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- B. Keyboard and Mouse Functions
-
- 1. kb_getshift
-
- Summary
-
- #include "keyboard.h"
-
- unsigned int v_getshift();
-
-
- 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 24 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 2. kb_getxc
-
- Summary
-
- #include "keyboard.h"
-
- unsigned int kb_getshift();
-
-
- Description
-
- Returns a single unsigned integer 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.)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 25 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 3. kb_hidemouse
-
- Summary
-
- #include "mouse.h"
-
- void kb_hidemouse()
-
-
- Description
-
- Turns off the mouse cursor.
-
-
- Returns
-
- None.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 26 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 4. kb_ismouse
-
- Summary
-
- #include "mouse.h"
-
- int kb_ismouse()
-
-
- Description
-
- Returns TRUE if a Microsoft compatible mouse is installed,
- otherwise it returns FALSE. Resets the mouse internal registers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 27 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 5. 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 iterations that
- kb_mouseclicks will make through its main loop without sensing
- button activity -- triggering a return to the calling function.
- Although this number is processor dependent there doesn't seem to
- be a noticeable difference between a PC and an 8mhz AT. Until we
- make it processor independent you might consider reading the BIOS
- for the machine type and estimating a good number that way, or
- you might choose a good median number and let the user adjust
- it. Anyway, 150 - 400 seems to be a good figure.
-
- Also, 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
-
-
-
-
-
-
- - 28 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 6. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 29 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 7. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 30 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 8. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 31 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 9. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 32 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 10. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 33 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 11. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 34 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 12. kb_resetmouse
-
- Summary
-
- #include "mouse.h"
-
- void kb_resetmouse()
-
-
- Description
-
- Resets various internal registers, cursor positions, etc.
-
-
- Returns
-
- None.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 35 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 13. kb_setgraphicsicon
-
- Summary
-
- #include "mouse.h"
-
- void kb_setgraphicsicon()
-
-
- Read the MICROSOFT MOUSE PROGRAMMERS MANUAL. Applicable to
- WINDOW PRO only when using the IBM PC graphics mode (available
- under The WINDOW PRO, but requires use of the BIOS screen update
- method.)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 36 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 14. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 37 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 15. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 38 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 16. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 39 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 17. kb_showmouse
-
- Summary
-
- #include "mouse.h"
-
- void kb_showmouse()
-
-
- Description
-
- Turns on the mouse cursor.
-
-
- Returns
-
- None.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 40 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- C. Video Functions
-
- 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 41 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 2. v_cursor_report
-
- Summary
-
- #include "video.h"
-
- int v_cursor_report(x, y, b, e);
- unsigned int *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. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 42 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 3. v_getchar
-
- Summary
-
- #include "werrors.h"
- #include "video.h"
-
- int v_getchar(x, y);
- int x, y;
-
-
- Description
-
- Uses the IBM-PC BIOS 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 43 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 4. v_getmode
-
- Summary
-
- #include "werrors.h"
- #include "video.h"
-
- int v_getmode();
-
-
- Description
-
- Returns the video mode of an IBM-PC or compatible. The video
- modes are defined in vidmodes.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 44 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 5. v_getpage
-
- Summary
-
- #include "werrors.h"
- #include "video.h"
-
- int v_getpage();
-
-
- Description
-
- Returns the current video page.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 45 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 6. v_getwidth
-
- Summary
-
- #include "werrors.h"
- #include "video.h"
-
- int v_getwidth();
-
-
- Description
-
- Returns the width in characters for the current video mode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 46 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 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 method.
-
-
- Returns
-
- None
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 47 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 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.
-
-
- Returns
-
- None
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 48 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 9. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 49 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- D. Virtual Screen Functions
-
- 1. vs_clr*
-
- a. vs_clrvs
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_clrvs(handle, tile_handle, foreground, background)
- unsigned int 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
-
-
- b. vs_clrbol
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_clrbol(handle, tile_handle, foreground, background)
- unsigned int 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
-
-
- c. vs_clreol
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_clreol(handle, tile_handle, foreground, background)
- unsigned int 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
-
-
- d. vs_clrtoend
-
- #include "werrors.h"
-
-
-
- - 50 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- #include "vs.h"
-
- int vs_clrtoend(handle, tile_handle, foreground, background)
- unsigned int 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 51 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 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 int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 52 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 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 int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 53 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 4. vs_fillattr
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_fillattr(handle, tile_handle, x1, y1, x2, y2, foreground,
- background)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 54 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 5. vs_fillchar
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_fillchar(handle, tile_handle, x1, y1, x2, y2, character,
- foreground, background)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 55 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 6. vs_format
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_format(handle, tile_handle, foreground, background,
- string)
-
- unsigned int handle;
- unsigned char tile_handle, foreground, background;
- char *string;
-
-
- Description
-
- This function is an alternative to the vs_printf function which
- is available only under the Borland WINDOW PRO Library. Prints a
- string to the virtual screen defined by {handle, tile_handle},
- handle tile_handle
- with the video attributes of foreground and background. TABS are
- foreground background
- expanded, CR/LF is interpreted, long lines 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 56 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 7. vs_gets
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_gets(handle, tile_handle, scroll, bufstr, foreground,
- background, maxlen)
- unsigned int 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. Otherwise, the user can continue to input but the
- results of his typing are not seen on the physical screen (when
- the cursor advances beyond the the displayed area of the virtual
- 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.
-
-
-
-
-
-
-
-
-
-
-
- - 57 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 8. vs_inscolumn
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_inscolumn(handle, tile_handle, x1, y1, x2, y2, vs_columns,
- foreground, background)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 58 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 9. vs_insrow
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_insrow(handle, tile_handle, x1, y1, x2, y2, vs_rows,
- foreground, background)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 59 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 10. vs_locatecur
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_locatecur(handle, tile_handle, x, y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 60 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 11. vs_printf
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_printf(handle, tile_handle, foreground, background,
- format,...)
-
- unsigned int handle;
- unsigned char tile_handle, foreground, background;
- char *format;
-
-
- Description
-
- This function is only available under the Borland Library.
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 61 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 12. vs_putc
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_putc(handle, tile_handle, column, row, foreground,
- background, ch)
- unsigned int 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.
-
-
- 13. vs_puts
-
- Summary
-
- #include "werrors.h"
- #include "vs.h"
-
- int vs_puts(handle, tile_handle, bcolumn, brow, maxlen,
- foreground, background, pass)
- unsigned int handle, bcolumn, brow, maxlen;
- unsigned char tile_handle, foreground, background, *pass;
-
-
-
-
- - 62 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 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. 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 63 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- E. Window and Tile Functions
-
- 1. wn_actt
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_actt(handle, tile_handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 64 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 2. wn_actw
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_actw(handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 65 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 3. wn_bordrng
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_bordrng(handle1, handle2, borders)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 66 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 4. wn_chgbord
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_chgbord(handle, borders)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
- - 67 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 5. wn_chgcolor
-
- Summary
-
- #include "werrors.h"
- #include "colors.h"
- #include "Pro.h"
-
- int wn_chgcolor(handle, foreground, background)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 68 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 6. wn_closet
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_closet(handle, tile_handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 69 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 7. wn_closew
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_closew(handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 70 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 8. wn_createt
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_createt(handle, tile_name, vs_columns, vs_rows,
- virtual_x, virtual_y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
- - 71 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 9. 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 int 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.
-
-
-
-
- - 72 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- new handle any value equal to or greater than 0 and
- less than MAX_WINDOWS is a valid window
- handle.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 73 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 10. wn_defrost
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- void wn_defrost()
-
-
- Description
-
- See wn_freeze.
- wn freeze
-
-
- Returns
-
- None.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 74 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 11. wn_deletet
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_deletet(handle, tile_handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 75 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 12. wn_delw
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_delw(handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 76 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 13. wn_draww
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_draww(handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 77 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 14. 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 int 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 a for-loop of 'speed'
- 'speed
- repetitions. This box is then erased. 'granularity' additional
- 'granularity
- boxes will each be drawn and erased in the same manner, with each
- progressing incrementally towards the ending dimensions (ex, ey,
- ex ey
- er, ec).
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 78 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 15. wn_freeze
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- void wn_freeze()
-
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 79 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 16. wn_hidecur
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- void wn_hidecur()
-
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 80 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 17. wn_hidew
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_hidew(handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 81 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 18. wn_init
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_init()
-
-
- 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_43line to TRUE. It will still sense the video card
- but if it determines that it is an 80 column mode it will assume
- 43 lines.
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 82 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 19. wn_ison*
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_isonwdw(x, y, rhandle)
- unsigned int 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.
-
-
- a. wn_isonhbar
-
- wn_isonhbar(handle, tile_handle, x, y)
- unsigned int 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
-
-
- b. wn_isonlbar
-
- wn_isonlbar(handle, x, y)
- unsigned int 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
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 83 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- c. wn_isonlelb
-
- wn_isonlelb(handle, tile_handle, x, y)
- unsigned int 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
-
-
- d. wn_isonllc
-
- wn_isonllc(handle, x, y)
- unsigned int 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
-
-
- e. wn_isonlrc
-
- wn_isonlrc(handle, x, y)
- unsigned int 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
-
-
- f. wn_isonnamet
-
- wn_isonnamet(handle, tile_handle, x, y)
- unsigned int 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)
-
-
- g. wn_isonnamew
-
- wn_isonnamew(handle, x, y)
- unsigned int handle, x, y;
-
- Returns TRUE if the physical screen coordinate (x,y) is on the
- TRUE x y
- name of the window (handle).
- handle
-
-
-
-
-
-
-
-
-
-
-
-
- - 84 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- h. wn_isonrelb
-
- wn_isonrelb(handle, tile_handle, x, y)
- unsigned int 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
-
-
- i. wn_isonsbd
-
- wn_isonsbd(handle, tile_handle, x, y)
- unsigned int 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
-
-
- j. wn_isonsbl
-
- wn_isonsbl(handle, tile_handle, x, y)
- unsigned int 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
-
-
- k. wn_isonsbr
-
- wn_isonsbr(handle, tile_handle, x, y)
- unsigned int 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
-
-
- l. wn_isonsbu
-
- wn_isonsbu(handle, tile_handle, x, y)
- unsigned int 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
-
-
-
-
-
-
-
-
-
- - 85 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- m. wn_isontile
-
- wn_isontile(handle, rhandle, x, y)
- unsigned int 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
-
-
- n. wn_isonubar
-
- wn_isonubar(handle, x, y)
- unsigned int 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
-
-
- o. wn_isonulc
-
- wn_isonulc(handle, x, y)
- unsigned int 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
-
-
- p. wn_isonurc
-
- wn_isonurc(handle, x, y)
- unsigned int 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
-
-
- q. wn_isonvlbar
-
- wn_isonvlbar(handle, tile_handle, x, y)
- unsigned int 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
-
-
-
-
-
-
-
-
-
-
-
- - 86 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- r. wn_isonvrbar
-
- wn_isonvrbar(handle, tile_handle, x, y)
- unsigned int 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
-
-
- s. wn_isonvs
-
- int wn_isonvs(handle, tile_handle, x, y)
- unsigned int 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
-
-
- t. wn_whereon
-
- wn_whereon(rhandle, rtile_handle, x, y)
- unsigned int *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.
-
-
-
-
-
- - 87 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 20. wn_locatevs
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_locatevs(handle, tile_handle, x, y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 88 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 21. wn_locatew
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_locatew(handle, x, y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 89 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 22. wn_moverng
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_moverng(handle1, handle2, x, y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 90 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 23. wn_movew
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_movew(handle, x, y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 91 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 24. wn_namet
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_namew(handle, tile_handle, new_name)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 92 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 25. wn_namew
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_namew(handle, new_name)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 93 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 26. wn_opent
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_opent(handle, tile_handle)
- unsigned int 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.
-
- OK No errors detected.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 94 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 27. wn_openw
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_openw(handle)
- unsigned int 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 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 28. wn_redraw
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_redraw()
-
-
- Description
-
- Redraws all of the windows on the screen.
-
-
- Returns
-
- None.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 96 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 29. wn_restorescr
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- void wn_restorescr()
-
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 97 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 30. wn_savescr
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- void wn_savescr()
-
-
- 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.
- wn savescr
-
-
- Returns
-
- None.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 98 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 31. wn_scrollvs
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_scrollvs(handle, tile_handle, x, y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 99 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 32. wn_showcur
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- void wn_showcur()
-
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 100 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 33. wn_sizerng
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_sizerng(handle1, handle2, x, y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 101 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 34. wn_sizet
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_sizerng(handle, tile_handle, x, y)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 102 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 35. wn_suspendt
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_suspendt(handle, tile_handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 103 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 36. wn_suspendw
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_suspendw(handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 104 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 37. wn_swapt
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_swapt(handle1, tile_handle1, handle2, tile_handle2)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 105 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 38. wn_togborder
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_togborder(handle, border_type)
- unsigned int 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.
-
-
-
-
-
- - 106 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 39. wn_togbordrng
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_togbordrng(handle1, handle2, border_type)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 107 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 40. wn_togscroll
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_togscroll(handle, tile_handle, scroll_bars)
- unsigned int handle;
- unsigned char tile_handle, scroll_bars;
-
-
- Description
-
- Turns the scroll bar character display on or off for a single
- tile. If scroll_bars is TRUE they are turned on; if scroll_bars
- scroll_bars TRUE scroll_bars
- is FALSE they are turned off.
- 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.
-
- 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 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 41. wn_togscrollrng
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_togscrollrng(handle1, handle2, scroll_bars)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 109 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 42. wn_updatet
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_updatet(handle, tile_handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 110 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 43. wn_updatew
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_updatew(handle)
- unsigned int 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 111 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 44. wn_zoomw
-
- Summary
-
- #include "werrors.h"
- #include "Pro.h"
-
- int wn_zoomw()
-
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 112 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- F. Global Variables and Data Structures
-
- 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
-
-
- 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
-
-
- 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.
-
-
- 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 byte tables ansi_fcolor_table and ansi_bcolor_table. This
- ansi fcolor table ansi bcolor table
- is helpful for creating terminal specific versions.
-
-
- 5. balance1
-
- balance1 is incremented for every call to the WINDOW PRO memory
- balance1
- allocation function and decremented for every call to the WINDOW
- PRO free memory function. Used in debugging to determine that no
- bits and pieces of stuff have been left around.
-
-
- 6. 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.
-
-
-
-
-
-
-
-
- - 113 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 7. cursor_e, cursor_b, cursor_on
-
- WINDOW PRO 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
-
-
- 8. 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 cirrect string for
- your terminal you should change it before calling wn_init. The
- first %d will 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[%d;%dm"
-
- 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 %d
- corresponds to the foreground color and the second to the
- background color.
-
-
- 9. default_box, box0, box1, box2, box3, box4, box
-
- 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
-
- box is used only at the kernel level.
- box
-
-
-
-
-
-
-
- - 114 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 10. ega_mline
-
- If this global variable is TRUE 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.
-
-
- 11. error_flag
-
- If TRUE the WINDOW PRO error handler is invoked on detecting an
- error. Otherwise error values are returned to the calling
- function.
-
-
- 12. 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.
-
-
- 13. frozen
-
- If TRUE indicates that all screen output is re-routed to the area
- pointed to by alt_scr.
- alt scr
-
-
- 14. 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
- 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.)
-
-
- 15. 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
-
-
-
-
- - 115 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 16. 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.
-
-
- 17. overlay
-
- This item is a pointer of type blkrec and holds an image of what
- blkrec
- is behind the active window (this is why operations on active
- windows is sometimes faster -- because we don't rebuild the whole
- screen, and conversely why operations on background windows are
- sometimes slower.)
-
-
- 18. 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.
-
-
- 19. primary_scr, alt_scr, curr_scr
-
- primary_scr is a pointer to real video ram area -- it is only
- primary scr
- important if using the DMA screen update method.
-
- alt_scr is a 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 WINDOW PRO 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 WINDOW PRO 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
-
-
- 20. screen_buffer
-
- Points to the location where the windows background screen is
- saved. See wn_savescr and wn_restorescr for further explanation.
- wn savescr wn restorescr
-
-
- 21. scroll_bars_on
-
- When a tile is created its scroll bars indicator is set to the
- value of scroll_bars_on.
- scroll bars on
-
-
-
-
-
-
-
- - 116 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 22. 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.
-
- tab_expansion is set at 10, by default.
-
-
- 23. vpage
-
- Equal to the video page active on calling wn_init.
- wn init
-
-
- 24. window[]
-
- An array of pointers to window_rec. The handles used to refer to
- windows are actually offsets into this array. Although WINDOW
- PRO 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.)
-
-
- 25. zoomed
-
- If TRUE indicates that the window currently designated as active
- is also zoomed. See wn_zoomw for further explanation.
- wn zoomw
-
-
- 26. 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
-
-
- 27. 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.
-
-
-
-
-
-
-
-
-
-
-
- - 117 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 28. wdw_rec
-
- /* window record layout */
- typedef struct {
- unsigned int 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 *tiles[MAX_TILES + 1];
-
- } wdw_rec;
-
- physical_x, physical_y the upper left corner of the window is
- positioned on this physical screen
- coordinate.
-
- suspend if this is true most 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.)
-
-
-
-
-
- - 118 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- tiles array of tile 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.
-
-
- 29. tile_rec
-
- /* tile record */
- typedef struct {
- char *virtual_screen, *tile_name, border_color;
- unsigned char forward, backward, scroll_bars;
- int suspend, hide, port_rows, vs_rows, vs_columns,
- cursor_x, cursor_y, virtual_x, virtual_y, offset_y;
- } 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.
-
- 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.
-
-
-
-
-
- - 119 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- 30. blkrec
-
- /* block record */
- typedef struct {
- unsigned int x, y, rows, columns;
- char *buffer;
- } blkrec;
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 120 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- G. Forthcoming Enhancements
-
- Several enhancements are in the works for The WINDOW PRO.
-
- . Small, medium, and compact model support,
-
- . Support for the Lattice C compiler,
-
- . Copy a window,
-
- . Copy a virtual screen,
-
- . Upgraded support for zoom and suspend features,
-
- . More processor independent timing (certain functions, like
- kb_mouseclicks use processor dependent timing,) and
-
- . vs_printf for Microsoft C ver 4.
-
- . graphics-based virtual screens.
-
- . more range functions (e.g. range delete, range open, range
- close, etc.)
-
- . built-in support for invoking ega fonts (35 line, 43 line, 50
- line, etc.)
-
- . Simplification of the application programmer interface. We
- have received several comments regarding the complexity of
- the functions. While most functions work as expected and do
- much more than any other similar product there are two
- problems which user feedback points out:
-
- .. There are a lot of arguments for some functions. We
- intend to add some additional defaults to the window and
- tile structures and create functions which will use
- those defaults, as alternatives to the functions which
- let you specify all of the options, for example, we may
- add default background and foreground colors for the
- virtual screens, and supply an alternative set of
- functions or macros which will use the defaults rather
- than require you to pass them as arguments on each
- call. All, of the existing functions will remain in
- their current form, these will only be enhancements.
-
- .. There is some inconsistency in the use of row, column or
- column, row designations -- these will be cleared up,
- but again the original functions will remain intact.
-
-
-
-
-
-
-
-
-
- - 121 -
-
-
-
-
-
- Window Pro v. 1.2 Shareware Manual
-
-
-
- H. Other Seabreeze Products
-
- Seabreeze Software also distributes and supports these products.
-
- Dialog Box Maker C-code for making and running
- several types of dialog boxes.
-
- Menu Maker C-code for making and running a
- pull-down menu system
- Pop-up Programmable
- Financial Calculator C-code. An excellent lesson in
- using The WINDOW PRO shareware
- library.
-
- Desktop Shell C-code for creating a desktop like
- environment for a program.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 122 -
-
-
-