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

Technical Reference: Base Operating System and Extensions , Volume 2


prefresh or pnoutrefresh Subroutine

Purpose

Updates the terminal and curscr (current screen) to reflect changes made to a pad.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>


prefresh(Pad, PY, PX, TTY, TTX, TBY, TBX)
WINDOW * Pad;
int PY, PX, TTY;
int TTX, TBY, TBX;

pnoutrefresh(Pad, PY, PX, TTY, TTX, TBY, TBX)
WINDOW *Pad;
int PY, PX, TTY;
int TTX, TBY, TBX;

Description

The prefresh and pnoutrefresh subroutines are similar to the wrefresh (refresh or wrefresh Subroutine) and wnoutrefresh (doupdate, refresh, wnoutrefresh, or wrefresh Subroutines) subroutines. They are different in that pads, instead of windows, are involved, and additional parameters are necessary to indicate what part of the pad and screen are involved.

The PX and PY parameters specify the upper left corner, in the pad, of the rectangle to be displayed. The TTX, TTY, TBX, and TBY parameters specify the edges, on the screen, for the rectangle to be displayed in. The lower right corner of the rectangle to be displayed is calculated from the screen coordinates, since both rectangle and pad must be the same size. Both rectangles must be entirely contained within their respective structures.

The prefresh subroutine copies the specified portion of the pad to the physical screen. if you wish to output several pads at once, call pnoutrefresh for each pad and then issue one call to doupdate. This updates the physical screen once.

Parameters


Pad Specifies the pad to be refreshed.
PX (Pad's x-coordinate) Specifies the upper-left column coordinate, in the pad, of the rectangle to be displayed.
PY (Pad's y-coordinate) Specifies the upper-left row coordinate, in the pad, of the rectangle to be displayed.


TBX (Terminal's Bottom x-coordinate) Specifies the lower-right column coordinate, on the terminal, for the pad to be displayed in.
TBY (Terminal's Bottom y-coordinate) Specifies the lower-right row coordinate, on the terminal, for the pad to be displayed in.
TTX (Terminal's Top x-coordinate) Specifies the upper-left column coordinate, on the terminal, for the pad to be displayed in.
TTY (Terminal's Top Y coordinate) Specifies the upper-left row coordinate, on the terminal, for the pad to be displayed in.

Examples

  1. To update the user-defined my_pad pad from the upper-left corner of the pad on the terminal with the upper-left corner at the coordinates Y=20, X=10 and the lower-right corner at the coordinates Y=30, X=25 enter

    WINDOW *my_pad;
    prefresh(my_pad, 0, 0, 20, 10, 30, 25);
    
  2. To update the user-defined my_pad1 and my_pad2 pads and output them both to the terminal in one burst of output, enter:

    WINDOW *my_pad1; *my_pad2; pnoutrefresh(my_pad1, 0, 0, 20, 10, 30, 25);
    pnoutrefresh(my_pad2, 0, 0, 0, 0, 10, 5);
    doupdate();
    

Implementation Specifics

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

Related Information

Curses Overview for Programming in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

List of Curses Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

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 ]