[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


overlay or overwrite Subroutine

Purpose

Copies one window on top of another.

Library

Curses Library (libcurses.a)

Syntax

WINDOW *dstwin);

int overwrite(const WINDOW *srcwin,
WINDOW *dstwin);

Description

The overlay and overwrite subroutines overlay srcwin on top of dstwin. The scrwin and dstwin arguments need not be the same size; only text where the two windows overlap is copied.

The overwrite subroutine copies characters as though a sequence of win_wch and wadd_wch subroutines were performed with the destination window's attributes and background attributes cleared.

The overlay subroutine does the same thing, except that, whenever a character to be copied is the background character of the source window. the overlay subroutine does not copy the character but merely moves the destination cursor the width of the source background character.

If any portion of the overlaying window border is not the first column of a multi-column character then all the column positions will be replaced with the background character and rendition before the overlay is done. If the default background character is a multi-column character when this occurs, then these subroutines fail.

Parameters


srcwin  
deswin  

Return Values

Upon successful completion. these subroutines return OK. Otherwise, they return ERR.

Examples

  1. To copy my_window on top of other_window, excluding spaces, use:

    WINDOW *my_window, *other_window;
    overlay(my_window, other_window);
    
  2. To copy my_window on top of other_window, including spaces, use:

    WINDOW *my_window, *other_window;
    overwrite(my_window, other_window);
    

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The copywin (copywin Subroutine) subroutine.

Curses Overview for Programming, List of Curses Subroutines, Manipulating Window Data with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]