Updates the terminal and curscr (current screen) to reflect changes made to a pad.
Curses Library (libcurses.a)
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.
Item | Description |
---|---|
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. |
Item | Description |
---|---|
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. |
WINDOW *my_pad;
prefresh(my_pad, 0, 0, 20, 10, 30, 25);
WINDOW *my_pad1; *my_pad2; pnoutrefresh(my_pad1, 0, 0, 20, 10, 30, 25);
pnoutrefresh(my_pad2, 0, 0, 0, 0, 10, 5);
doupdate();