home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / window / ultrawin / uw_help1.hlp < prev    next >
Encoding:
Text File  |  1992-01-26  |  28.1 KB  |  667 lines

  1. `co(4,7);────────────────────────── /// Structures/Globals ──────────────────────────`color();
  2.  
  3.  ┌──────────────────────────────────────────────────────────────────────────┐    
  4.  │                  `keyword(RECT,/// RECT);                                                         `keyword(WINDOW,/// WINDOW);                                                     │
  5.  │                  `keyword(EVENT,/// EVENT);                                                      `keyword(M_RESET,/// M_RESET);                                               │
  6.  │                  `keyword(M_LOC,/// M_LOC);                                                      `keyword(M_MOVE,/// M_MOVE);                                                  │
  7.  │                  `keyword(PRINT,/// PRINT);                                                      `keyword(MENU,/// MENU);                                                      │
  8.  │                  `keyword(Video Globals,/// Video Globals);                                      `keyword(Event Globals,/// Event Globals);                                      │
  9.  │                  `keyword(Default Attributes,/// Default Attributes);                             `keyword(Cursor Globals,/// Cursor Globals);                                    │
  10.  │                  `keyword(DesqView Globals,/// DesqView Globals);                                 `keyword(Manager Globals,/// Manager Globals);                                 │
  11.  │                  `keyword(Function Globals,/// Function Globals);                                 `keyword(Printer Globals,/// Printer Globals);                                 │
  12.  │                  `keyword(Timer Globals,/// Timer Globals);                                    `keyword(Graphics Globals,/// Graphics Globals);                                 │
  13.  │                  `keyword(EGA/VGA Globals,/// EGA/VGA Globals);                                                                                                   │
  14.  └──────────────────────────────────────────────────────────────────────────┘
  15.  
  16.       These are the structures and global variables that are used in the
  17.     UltraWin library.  The structures defined are used for windowing, mouse
  18.     and printer support.  The globals are used for screen and video,
  19.     Desqview/Windows compatibility, graphics, timer and sound control,
  20.     background processing, dynamically queued RAM-based or disk-based
  21.     printing, and the window manager.  Include the UW.H file for access to the
  22.     structures, and the UW_GLOBX.H file for access to the globals.
  23.  
  24. `co(10,1);/// RECT`co();
  25. `co(11,1);  typedef struct rect_struct
  26.     {
  27.         int x_min, x_max, y_min, y_max;
  28.     } RECT;`co();
  29.  
  30.       This structure is used for general screen and window area definition,
  31.     and is used internally by the WINDOW structure.  We supply several useful
  32.     rectangle functions you may wish to utilize in your own code.  Refer to
  33.   the `keyword(Rectangle Functions,[uw_help4.hlp]/// Rectangle Functions); section for more information.
  34.  
  35. `co(10,1);/// WINDOW`co();
  36. `co(11,1);  typedef struct w_struct
  37.     {
  38.         struct w_struct *next;                 /* next window in linked list        */
  39.         struct w_struct *previous;         /* previous window in list             */
  40.         RECT                        pane;                  /* the window rectangle                    */
  41.         RECT                        old_pane;          /* for full size toggle                    */
  42.         int                         rows;                  /* save buffer rows and columns    */
  43.         int                         cols;
  44.         int                         csr_x;                 /* the "soft" cursor location    */
  45.         int                         csr_y;
  46.         int                         att;                     /* the window's attribute        */
  47.         int                         bdr_att;             /* the window's border attribute */
  48.         int                         bdr_style;         /* the border style                            */
  49.         int                         name_loc;          /* CENTERED, LEFTJUST, RIGHTJUST */
  50.         char                        *name;                 /* pointer to window name                */
  51.         char                        *save;                 /* pointer to save buffer area     */
  52.         char                        *buff;                 /* pointer to write buffer area    */
  53.         char                        *mask;                 /* pointer to window buffer mask */
  54.  
  55.         uchar                     *tabs;                 /* tabs stops                                        */
  56.         int                         reg_s,reg_e;     /* scroll region start and end     */
  57.  
  58.         unsigned                w_wrap        : 1; /* word wrap on/off                            */
  59.         unsigned                hidden        : 1; /* 1 if window hidden                        */
  60.         unsigned                overlapped: 1; /* 1 if window overlapped                */
  61.         unsigned                csr_adv     : 1; /* advance the cursor                        */
  62.         unsigned                csr_on        : 1; /* does flashing cursor track?     */
  63.         unsigned                inside        : 1; /* 1 if bordered and inside            */
  64.         unsigned                mask_on     : 1; /* 1 if window mask is active        */
  65.         unsigned                cr_lf         : 1; /* 1 if cr translated to cr/lf     */
  66.         unsigned                full_size : 1; /* 1 if window full sized                */
  67.         unsigned                popup         : 1; /* 1 if window is popup                    */
  68.         unsigned                scroll        : 1; /* 1 if window auto-scrolls            */
  69.         unsigned                bs_clear    : 1; /* 1 if backspace is destructive */
  70.         unsigned                eol_wrap    : 1; /* 1 if cursor wraps at end of ln*/
  71.         unsigned                unused        : 3; /* some spare bits               */
  72.         void            *user_ptr;     /* user expansion pointer                */
  73.         uchar           user_exp[4];   /* user expansion space                  */
  74.         void            *sys_ptr;         /* system expansion pointer            */
  75.         uchar           sys_exp[4];      /* system expansion space              */
  76.     } WINDOW;`co();
  77.  
  78.         This structure is used by the UltraWin library for all window
  79.     operations.  The structure is used internally by the library, so the
  80.     information above is mainly shown to satisfy any curiosity.
  81.  
  82.     Starting with version 2.00 of UltraWin, the tabs for the window get
  83.     allocated on window creation.  The tabs are now as large as the width of
  84.     the window, saving space over the 132 bytes used by previous versions. You
  85.     will notice that starting with 2.00 both user-defined and system pointers
  86.     and expansion areas have been added.  Please do not access the system
  87.     additions as we will be using these in future versions.
  88.  
  89.       It is recommended that these structure elements be accessed by the
  90.     functions provided, where available, and not directly.    This allows us to
  91.     change and enhance the package in the future while maintaining
  92.     compatibility with your code.  The notable exceptions are the w_wrap,
  93.     inside, csr_adv and scroll bitfields.  You may set these directly to turn
  94.     on or off the particular characteristic of the window.  For example, to
  95.     turn off the scrolling for a window pointed to by wnp, use wnp->scroll =
  96.     OFF.  To make the window coordinates start on the border of the window and
  97.     not inside the border, use wnp->inside = OFF;
  98.  
  99. `co(10,1);/// EVENT`co();
  100. `co(11,1);  typedef struct event_struct
  101.     {
  102.         char        is_mouse;
  103.         int         key;
  104.         int         mod;
  105.         int         m_x, m_y;
  106.         char        m_count, m_button;
  107.     } EVENT;`co();
  108.  
  109.         This structure is used by the global variable "Event", which is used by
  110.     wait_event and event_pending to return information.
  111.     
  112.       The "is_mouse" member is used as a boolean to indicate if the event was
  113.     a keyboard event (is_mouse=0) or a mouse event (is_mouse=1).
  114.     
  115.       The "key" member will contain the key value, and the member "mod" will
  116.     contain bit settings to indicate if a key combination was used. This
  117.     includes the left and right shift combinations, Ctrl or Alt combinations,
  118.     and whether Scroll Lock, Num Lock, or Caps Lock are set (see UW_KEYS.H for
  119.     defines).
  120.     
  121.       The "m_x" and "m_y" members will contain the x,y coordinate (from
  122.     0..V_cols-1 for x, 0..V_rows-1 for y) of the mouse event, "m_count" will
  123.     contain the number of presses, and "m_button" has the define for the
  124.     button pressed (LB, MB, or RB).
  125.  
  126. `co(10,1);/// M_RESET`co();
  127. `co(11,1);  typedef struct reset_struct
  128.     {
  129.         int exists;
  130.         int n_buttons;
  131.     } M_RESET;`co();
  132.  
  133.       This structure is used internally by the init_mouse and end_mouse
  134.     functions. It is used when starting or ending the program, and when first
  135.     called returns if the mouse is available.  The function init_mouse uses
  136.     this structure to set the global Mouse_exists boolean variable.
  137.  
  138. `co(10,1);/// M_LOC`co();
  139. `co(11,1);  typedef struct loc_struct
  140.     {
  141.         int button_status;
  142.         int count;
  143.         int col;
  144.         int row;
  145.     } M_LOC;`co();
  146.     
  147.       This structure is used by m_pos, m_pressed, and m_released, as well as
  148.     internally by event_pending.  If you want to handle the mouse yourself,
  149.     bypassing UltraWin's event handling capability, use the m_pos, m_pressed
  150.     and m_released functions to get mouse pressed and coordinate information
  151.     using a variable of type M_LOC.
  152.  
  153. `co(10,1);/// M_MOVE`co();
  154. `co(11,1);  typedef struct move_struct
  155.     {
  156.         int h_count;
  157.         int v_count;
  158.     } M_MOVE;`co();
  159.  
  160.       This structure is used only by the m_motion function, which reports the
  161.     net movement of the mouse cursor between m_motion calls.
  162.  
  163. `co(10,1);/// MENU`co();
  164. `co(11,1);  typedef struct menu_struct
  165.     {
  166.         WINDOW        *wnp;                                          /* the window for output            */
  167.         uchar            direction;                              /* menu direction, vt or hz   */
  168.         uchar            num_entries;                          /* number of entries in menu    */
  169.         uchar            csr_att;                                  /* the cursor attribute                */
  170.         uchar            first_att;                              /* the first letter attribute    */
  171.         int                csr_pos;                                  /* current cursor position        */
  172.         char            first_pos[M_MAX_ENTRIES]; /* first letter position      */
  173.         int             id[M_MAX_ENTRIES];              /* id value for each entry        */
  174.         uchar            x[M_MAX_ENTRIES];                  /* x location for each entry    */
  175.         char            *entry[M_MAX_ENTRIES];      /* array of char pointers            */
  176.     } MENU;`co();
  177.     
  178.         This structure is used internally by the UltraWin menuing functions. The
  179.     function `keyword(menu_create,[uw_help4.hlp]/// menu_create); sets up the window, direction, and attribute members,
  180.     while `keyword(item_add,[uw_help4.hlp]/// item_add); sets the entry string, id, first position for the hot key,
  181.     the x position (used when the menu is horizontal) and increments
  182.     num_entries.  Once the menu has been constructed with menu_create and
  183.     item_add, you may modify the structure directly to change colors, first
  184.     positions for hot keys, or an id or menu string on the fly.
  185.  
  186.         For example, to change the third entry of the menu pointed to by mnp to
  187.     the words "Load File" with the 'F' character as the hot key with an id
  188.     of 32, use:
  189.     
  190.     mnp->first_pos[2] = 5;                                /* first letter in "File"            */
  191.     mnp->id[2] = 32;                                            /* the new id                                    */
  192.     mnp->entry[2] = "Load File";                    /* the new string                            */
  193.  
  194. `co(10,1);/// PRINT`co();
  195. `co(11,1);  typedef struct printer
  196.   {
  197.       int   active;                                  /* set to 1 if printer init'd/active    */
  198.       int   halt;                   /* set to 1 to temporarily stop printer */
  199.       int   prt_dev;                /* file handle for printer device                */
  200.       char  device[81];             /* name of printer device               */
  201.       int   prt_buff[2];                      /* file handles for printer buffer            */
  202.       char  buffer[81];             /* name of printer buffer               */
  203.       int   cr_cnt;                 /* number of carriage returns to send   */
  204.       int   lf_cnt;                     /* number of line feeds to send         */
  205.       int   block_mode;                          /* allows faster output on block devices*/
  206.  
  207.     long  max_que_size;                      /* maximum size of print que                      */
  208.       long  init_que_size;                  /* initial size of print que                        */
  209.         long  curr_que_size;                  /* current size of print que                        */
  210.         long  read;                                      /* print que read  index                */
  211.         long  write;                  /* print que write index                */
  212.         long  cnt;                    /* print que cnt (number of bytes in q) */
  213.  
  214.         uchar *que;                          /* pointer to print que data            */
  215.         uchar *xlat;                  /* pointer to translation table                    */
  216.         int   xlat_flag;              /* translation flag                                            */
  217. } PRINT;`co();
  218.  
  219.       This structure is used by the print routines in UW_PRINT.C.  For further
  220.     information, see `keyword(Print Support,[uw_help6.hlp]/// Print Support);.
  221.  
  222. `co(10,1);/// Video Globals`co();
  223. `co(11,1);    uchar far *Screen;`co();
  224.     
  225.       This is a far pointer to the video display area.    It's value will depend
  226.     on if you are using a monochrome or color display, and whether a control
  227.     program like Windows or Desqview is being used.  You may modify this
  228.     variable to redirect output anywhere in memory, but be careful to use an
  229.     area you are sure is safe.
  230.  
  231. `co(11,1);    int V_mode;`co();
  232.     
  233.       This is an integer that contains the text mode that was used before the
  234.     call to init_video or force_video.    This is saved in V_mode and is used in
  235.     the call to end_video to restore the original mode.
  236.  
  237. `co(11,1);    uchar V_cols, V_rows;`co();
  238.  
  239.         These two variables contain the number of columns and rows available on
  240.     the text screen, and are set by the init_video and force_video functions.
  241.     The video screen is therefore defined as 0..V_cols-1 and 0..V_rows-1.
  242.  
  243. `co(10,1);/// Event Globals`co();
  244. `co(11,1);    EVENT Event;`co();
  245.     
  246.         This global variable is used by the event_pending and wait_event
  247.     functions to pass back information about the type of event as well as
  248.     mouse/keyboard information.
  249.  
  250. `co(11,1);    int Mouse_exists;`co();
  251.     
  252.       This global variable is set by the init_mouse function to either TRUE
  253.     (1) or FALSE (0) depending on whether a Microsoft or compatible mouse is
  254.     connected.
  255.  
  256. `co(10,1);/// Default Attributes`co();
  257. `co(11,1);    uchar Dflt_att, Dflt_bdr_att;`co();
  258.     
  259.         These attributes are used to set the default window colors when
  260.     wn_create is called.    If you do not use the wn_color and wn_bdr_color
  261.     macros to set the window colors, you will get these default attributes.
  262.  
  263. `co(10,1);/// Cursor Globals`co();
  264. `co(11,1);  int Csr_visible;`co();
  265.     
  266.         This boolean is either TRUE (1) or FALSE (0) depending on whether the
  267.     hardware cursor is visible.
  268.  
  269. `co(11,1);    int Csr_in_use;`co();
  270.  
  271.         This boolean is either TRUE (1) or FALSE (0) depending on whether the
  272.     hardware cursor is being used.    The window input routines wn_gets and
  273.     wn_gets_ll set this variable to TRUE while the cursor is being used, then
  274.     set it back to FALSE when finished.
  275.  
  276. `co(10,1);/// DesqView Globals`co();
  277. `co(11,1);  int DV_seg, DV_off, DV_flag, DV_upd;`co();
  278.  
  279.         These are integers that are used to maintain DesqView compatibility.
  280.     They are used internal to the library.
  281.  
  282. `co(10,1);/// Manager Globals`co();
  283. `co(11,1);    WINDOW *First_window, *Last_window`co();
  284.  
  285.         These are pointers to the first and last windows in the window manager's
  286.     linked list.  These are NULL on startup, and are set by the add_window and
  287.     remove_window functions as windows are added to the manager.  You can use
  288.     these to determine the top window (Last_window) or the bottom window
  289.     (First_window) at any time when using the manager.
  290.  
  291. `co(11,1);  int Num_windows`co();
  292.  
  293.     This is a count of the number of windows in the window manager.  It is 0
  294.     on startup, and increments for every add_window call.
  295.  
  296.  
  297. `co(10,1);/// Function Globals`co();
  298. `co(11,1);    int (*Idle_func)() `co();
  299.  
  300.       This is the function that UltraWin calls when it is idle, waiting for an
  301.     event.  You may set your own idle function by calling set_idle_func with
  302.     the name of your function.  To take advantage of the background printing
  303.     capability of UltraWin you could call set_idle_func with the function
  304.     name print_in_background.
  305.  
  306. `co(11,1);    int (*Vld_func)() `co();
  307.  
  308.       This is a function pointer to the wn_gets_ll string entry validation
  309.     routine.  It is useful when you want to perform extra error checking
  310.     on a particular field (as in a valid date).  Refer to `keyword(Data Entry,[uw_help4.hlp]/// Data Entry);
  311.     for more information.
  312.  
  313. `co(11,1);  int (*Gets_hook_func)() `co();
  314.  
  315.         This is a function pointer to the new wn_gets_ll hook.  It is set with
  316.     the set_gets_hook function, and is called from within wn_gets_ll.  With
  317.     this function you can customize wn_gets_ll "on the fly."  The function is
  318.     called on entry, before exiting and on every keystroke.  You can modify
  319.     the passed string, mask and template dynamically, as well as return your
  320.     own key values.  This gives you the ability to customize string entry in
  321.     virtually any way imaginable!  Again refer to `keyword(Data Entry,[uw_help4.hlp]/// Data Entry); for more
  322.     information.
  323.  
  324. `co(10,1);/// Printer Globals`co();
  325. `co(11,1);    PRINT *Printers[MAX_PRINTERS]`co();
  326.  
  327.       This is an array of MAX_PRINTERS (4) pointers to PRINT structures for
  328.     use in UltraWin's powerful print queue routines.  Refer to `keyword(Print Support,[uw_help6.hlp]/// Print Support);
  329.     for more information.
  330.  
  331. `co(10,1);/// Timer Globals`co();
  332. `co(11,1);    int Uw_timers[4]`co();
  333.  
  334.       These are four user timers, which count down toward zero every timer tick
  335.     from the value you set.  For example, if you call init_clock with a value
  336.     of 0x3333, then to set a one second count-down timer, just use
  337.     Uw_timer[1] = 91; and after 91 ticks (one second) this second member of
  338.     the array will reach zero.  This occurs even when you are executing your
  339.     own code as it is modified during the timer interrupt.
  340.  
  341. `co(11,1);    int Sys_timers[2], int Sound_timer`co();
  342.  
  343.       These are timers used internally for system timers and the tone
  344.     function.  Access the Uw_timers rather than these for your own use.
  345.   
  346. `co(11,1);    int Sound_on`co();
  347.  
  348.       This is a boolean variable that is 1 if the PC speaker is currently
  349.     sounding a tone, or 0 if it is off.  This variable is used internally by
  350.     tone.
  351.   
  352. `co(11,1);    int Tics`co();
  353.  
  354.       This is an unsigned long which counts the number of timer ticks since
  355.     the call to init_clock.  With init_clock(0x3333), Tics will increment 91
  356.     times every second.  You may access this variable in your own program for
  357.     timing, or reset it to 0 if you want a "count up" timer.
  358.  
  359. `co(10,1);/// Graphics Globals`co();
  360. `co(11,1);    int Graphics`co();
  361.  
  362.       This is a boolean flag set by init_uw_graphics.  When the graphics flag
  363.     is set, all UltraWin output goes through g_ch.  Please refer to
  364.   `keyword(Graphics Support,[uw_help5.hlp]/// Graphics Support); for a complete discussion of using UltraWin in
  365.     graphic modes.
  366.  
  367. `co(11,1);    int G_opt`co();
  368.  
  369.       This is a boolean flag which specifies whether output optimization
  370.     should be performed in g_ch.  If this flag is set, UltraWin checks the
  371.     contents of each cell to see if output is necessary before performing the
  372.     output.  This can result in a very substantial increase in speed.  Again
  373.     refer to `keyword(Graphics Support,[uw_help5.hlp]/// Graphics Support); for more information.
  374.  
  375. `co(10,1);/// EGA/VGA Globals`co();
  376. `co(11,1);    int Ega`co();
  377.  
  378.       This is a boolean which is set to 1 when an EGA board is detected by
  379.     init_video.  A VGA board will cause a value of 0.
  380.  
  381. `co(11,1);    int Vga`co();
  382.  
  383.       This is a boolean which is set to 1 when a VGA board is detected by
  384.     init_video.  An EGA only board will cause a value of 0.
  385.  
  386. `co(11,1);    int EgaVga`co();
  387.  
  388.       This is a boolean which is set to 1 when a board capable of either EGA
  389.     or VGA is detected by init_video.
  390.     
  391.     For more information about EGA/VGA support, see `keyword(Font/EGA Control,[uw_help5.hlp]/// Font/EGA Control);
  392.  
  393. `co(4,7);────────────────────────── /// Video Initialization ──────────────────────────`co();
  394.  
  395. ┌──────────────────────────────────────────────────────────────────────────┐    
  396. │                 `keyword(init_video,/// init_video);                       `keyword(force_video,/// force_video);                       │
  397. │                 `keyword(end_video,/// end_video);                          `keyword(set_vid_addr,/// set_vid_addr);                      │ 
  398. └──────────────────────────────────────────────────────────────────────────┘
  399.  
  400.         These functions allow you to initialize the text screen to a specific
  401.     mode, and return back to the mode in use before the initialization.
  402.     Initialization of the text screen is the first step that should be taken
  403.     in a C program that utilizes the UltraWin library.
  404.     
  405.         The UltraWin library supports 80x25 Monochrome and Color modes, as well
  406.     as the 80x43 EGA color and 80x50 VGA color mode.  Higher resolution text
  407.     screens that some of the new VGA cards can produce are also supported.
  408.  
  409. `co(10,1);/// init_video`co();   `keyword(source,[UW_VID.C]~init_video);
  410.     Initializes the text screen to a specific mode, specified not by mode
  411.     number, but by number of columns and rows.  The video mode that best
  412.     matches the number of columns and rows passed will be selected.  The
  413.     function will set the two global variables V_cols and V_rows to the actual
  414.     number that are available.  This allows the user to specify an 80x50
  415.     screen, and have init_video set the closest text mode to this size that
  416.     your video card will accomodate.
  417.  
  418. Prototype:
  419.     void init_video(int cols, int rows);
  420.  
  421. Parameters:
  422. `co(11,1);    int cols, int rows`co();
  423.         The number of columns and rows desired for the screen.
  424.  
  425. Usage:
  426.     init_video( 80, 50 );
  427.  
  428. `co(10,1);/// force_video`co();   `keyword(source,[UW_VID.C]~force_video);
  429.     This function is similar to init_video, except the text bios mode number
  430.     is passed as well as the number of columns and rows.  This allows one of
  431.     the non-standard VGA modes (specific to your VGA card) to be set.
  432.  
  433. Prototype:
  434.     void force_video( int force_mode, int cols, int rows );
  435.  
  436. Parameters:
  437. `co(11,1);    int force_mode`co();
  438.         The actual mode number listed in the manual for your video board.
  439. `co(11,1);    int cols, int rows`co();
  440.         The number of columns and rows desired for the screen.
  441.  
  442. Usage:
  443.     force_video( 0x60, 132, 60 );
  444.  
  445. `co(10,1);/// end_video`co();   `keyword(source,[UW_VID.C]~end_video);
  446.     Restores the video mode in use before the call to init_video.  Call this
  447.     function just before you exit your program.
  448.  
  449. Prototype:
  450.     void end_video();
  451.  
  452. Parameters:
  453.     None.
  454.  
  455. Usage:
  456.     end_video();
  457.  
  458. `co(10,1);/// set_vid_addr`co();   `keyword(source,[UW_VID.C]~set_vid_addr);
  459.     This routine overrides the default video address and sets it to the
  460.     desired segment and offset.
  461.  
  462. Prototype:
  463.     void set_vid_addr( int segment, int offset );
  464.  
  465. Parameters:
  466. `co(11,1);    int segment, offset`co();
  467.         The desired segment and offset for your new video address.
  468.  
  469. Usage:
  470. `co(11,1);    uchar far *old_screen;`co();
  471.     ...
  472.     old_screen = Screen;
  473.     set_vid_addr( 0xB000, 0x8000 );
  474.     ...
  475.     Screen = old_screen;
  476.  
  477. `co(4,7);───────────────────────────── /// Window Basics ──────────────────────────────`co();
  478.  
  479. ┌──────────────────────────────────────────────────────────────────────────┐    
  480. │               `keyword(wn_create,/// wn_create);                     `keyword(wn_set,/// wn_set);                       │
  481. │               `keyword(wn_clear,/// wn_clear);                      `keyword(wn_border,/// wn_border);                    │
  482. │               `keyword(wn_move,/// wn_move);                       `keyword(set_mask,/// set_mask);                     │
  483. │               `keyword(clear_mask,/// clear_mask);                    `keyword(wn_destroy,/// wn_destroy);                   │
  484. └──────────────────────────────────────────────────────────────────────────┘
  485.  
  486.         These are the functions used for basic window creation, destruction, and
  487.     placement on the text screen.  There are special functions that allow you
  488.     to "mask off" sections of a window so that output does not occur to that
  489.     area, as well as restoring what was behind a window when it was created.
  490.  
  491. `co(10,1);/// wn_create`co();   `keyword(source,[UW_WN.C]~wn_create);
  492.         Creates a window with the size determined by the upper left and lower
  493.     right coordinates passed by integer.  Several border styles can be used,
  494.     as well as a mode for saving what is behind the window, to be restored on
  495.     window destruction.    Please note that wn_create does not allocate the
  496.     window for you.  You must declare your windows as either locals or
  497.     globals, passing the address of the window to wn_create, or as pointers
  498.     returned from malloc or calloc.
  499.     
  500. Prototype:
  501.     void wn_create( int x_min, int y_min, int x_max, int y_max, int bdr,
  502.                                     int mode, WINDOW *wnp );
  503.  
  504. Parameters:
  505. `co(11,1);    int x_min, int y_min, int x_max, int y_max`co();
  506.         The coordinates of the upper left and lower right corners of the window
  507.         to create.  These range from 0,0 (upper left corner of the screen) to
  508.         the max number of columns and rows minus one (lower right corner of the
  509.         screen).
  510. `co(11,1);    int bdr`co();
  511.         The border style to use, namely one of the defines NO_BDR, SGL_BDR,
  512.         DBL_BDR, SLD_BDR, or DUAL_BDR.
  513. `co(11,1);    int mode`co();
  514.         The popup mode, can be either WN_NORMAL or WN_POPUP.    Normal windows
  515.         when destroyed do not restore what is behind them, while popup windows
  516.         do.  Normal windows therefore use less memory.
  517. `co(11,1);    WINDOW *wnp`co();
  518.         A pointer to the window.    Can be the address of a global variable of
  519.         type WINDOW, or a pointer that has been allocated with malloc or calloc.
  520.         The wn_create function will initialize the contents of the window for
  521.         you, so all that is necessary is to pass it to this function.
  522.  
  523. Usage:
  524.     WINDOW *wnp;
  525.     ...
  526.     wn_create( 0, 0, 79, 24, SGL_BDR, POPUP, wnp );
  527.  
  528. `co(10,1);/// wn_set`co();   `keyword(source,[UW_WN.C]~wn_set);
  529.         Sets the window on the screen, saving the contents of what is behind the
  530.     window if it was defined as WN_POPUP when created with wn_create.
  531.  
  532. Prototype:
  533.     void wn_set( WINDOW *wnp );
  534.  
  535. Parameters:
  536. `co(11,1);    WINDOW *wnp`co();
  537.         A pointer to the window, or address of a WINDOW variable.
  538.  
  539. Usage:
  540.     WINDOW *wnp;
  541.     ...
  542.     wn_set( wnp );
  543.  
  544. `co(10,1);/// wn_clear`co();   `keyword(source,[UW_WN.C]~wn_clear);
  545.         Clears the contents of a window, excluding the border, if present.  The
  546.     window must be first created with wn_create, then set on the video screen
  547.     with wn_set.
  548.  
  549. Prototype:
  550.     void wn_clear( WINDOW *wnp );
  551.  
  552. Parameters:
  553. `co(11,1);    WINDOW *wnp`co();
  554.         A pointer to the window.
  555.  
  556. Usage:
  557.     WINDOW *wnp;
  558.     ...
  559.     wn_clear( wnp );
  560.  
  561. `co(10,1);/// wn_border`co();   `keyword(source,[UW_BDR.C]~wn_border);
  562.         Draws the border to the window, if the window border exists (call
  563.     wn_create with something besides NO_BDR, or set the bdr_style field of the
  564.     window to one of the border defines). Use this function to redraw the
  565.     border.
  566.  
  567. Prototype:
  568.     void wn_border( WINDOW *wnp );
  569.  
  570. Parameters:
  571. `co(11,1);    WINDOW *wnp`co();
  572.         A pointer to the window.
  573.  
  574. Usage:
  575.     WINDOW *wnp;
  576.     ...
  577.     wn_border( wnp );
  578.  
  579. `co(10,1);/// wn_move`co();   `keyword(source,[UW_WN.C]~wn_move);
  580.         Takes a window that has been placed on the video screen with wn_set, and
  581.     moves it to a new location.    Please note that the background will be
  582.     restored for you when the window is moved if you create the window with
  583.     the WN_POPUP value as the mode parameter to wn_create.
  584.  
  585. Prototype:
  586.     wn_move( int col, int row, WINDOW *wnp );
  587.  
  588. Parameters:
  589. `co(11,1);    int col, row`co();
  590.         The column and row where the window is to be moved.  This location is
  591.         where the upper left hand corner of the window will be placed.
  592. `co(11,1);  WINDOW *wnp`co();
  593.         A pointer to the window to move.
  594.  
  595. Usage:
  596.     WINDOW *wnp;
  597.     ...
  598.     wn_move( 3, 7, wnp );
  599.  
  600. `co(10,1);/// set_mask`co();   `keyword(source,[UW_MASK.C]~set_mask);
  601.     Checks to see if the second window (top) overlaps the first window
  602.     (bottom), and masks off (for output) the area that overlaps. Call this
  603.     function when a window is added on top of another window.  If the windows
  604.     are not overlapped, then no masking is necessary, and the mask is not
  605.     performed.    Masking the bottom window prevents output to the region of the
  606.     bottom window overlapped, giving the appearance that the window updates
  607.     "in the background".  Call set_mask on a window for each window that is to
  608.     be displayed "on top" of it.  You do not need to use this function when
  609.     using the window manager, as it takes care of all masking when a window is
  610.     added or removed!
  611.  
  612. Prototype:
  613.     void set_mask( int mode, WINDOW *wnp1, WINDOW *wnp2 );
  614.  
  615. Parameters:
  616. `co(11,1);    int mode`co();
  617.         A value 1 (ON) or 0 (OFF) to indicate if the mask is to be added
  618.         or removed.
  619. `co(11,1);    WINDOW *wnp1`co();
  620.         The window for which the mask is to be set (the bottom window).
  621. `co(11,1);    WINDOW *wnp2`co();
  622.         The window used to set the mask of the bottom window. (the top window).
  623.  
  624. Usage:
  625.     WINDOW bottom_win, top_win;
  626.     ...
  627.     set_mask(ON, &bottom_win, &top_win);
  628.     set_mask(OFF, &bottom_win, &top_win);
  629.  
  630. `co(10,1);/// clear_mask`co();   `keyword(source,[UW_MASK.C]~clear_mask);
  631.         Clears the mask for the window passed.    All areas of the window will
  632.     change when the window is refreshed, or when any information is written to
  633.     the window, the window scrolls, etc. The window manager will clear any
  634.     masks necessary when you add or delete windows.
  635.  
  636. Prototype:
  637.     void clear_mask( WINDOW *wnp );
  638.  
  639. Parameters:
  640. `co(11,1);    WINDOW *wnp1`co();
  641.         A pointer to type WINDOW that specifies the window to clear.
  642.  
  643. Usage:
  644.     WINDOW win;
  645.     ...
  646.     clear_mask( &win );
  647.  
  648. `co(10,1);/// wn_destroy`co();   `keyword(source,[UW_WN.C]~wn_destroy);
  649.         Restores what was behind the window before wn_create (if it was defined
  650.     using WN_POPUP), and deallocates memory used by the window. Be sure you
  651.     destroy any temporary window that you have created with wn_create, or you
  652.     will consume valuable memory.  This is also good practice at the end of
  653.     your program, before calling end_video and returning to DOS.
  654.  
  655. Prototype:
  656.     void wn_destroy( WINDOW *wnp );
  657.  
  658. Parameters:
  659. `co(11,1);    WINDOW *wnp`co();
  660.         A pointer to the window, or address of a WINDOW variable.
  661.  
  662. Usage:
  663.     WINDOW *wnp;
  664.     ...
  665.     wn_destroy( wnp );
  666.  
  667.