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

Technical Reference: Base Operating System and Extensions, Volume 2

mvwin Subroutine

Purpose

Moves a window or subwindow to the specified coordinates.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>

int mvwin
(WINDOW *win,
int y,
int x);

Description

The mvwin subroutine moves the specified window so that its origin is at position (y, x). If the move causes any portion of the window to extend past any edge of the screen, the function fails and the window is not moved.

Parameters

*win  
x  
y  

Return Values

Upon successful completion, the mvwin subroutine returns OK. Otherwise, it returns ERR.

Examples

  1. To move the user-defined window my_window from its present location to the upper left corner of the terminal, enter:

    WINDOW *my_window;
    mvwin(my_window, 0, 0);
  2. To move the user-defined window my_window from its present location to the coordinates y = 20, x = 10, enter:

    WINDOW *my_window;
    mvwin(my_window, 20, 10);

Related Information

The derwin (derwin, newwin, or subwin Subroutine) subroutine, doupdate (doupdate, refresh, wnoutrefresh, or wrefresh Subroutines) subroutine, is_linetouched (is_linetouched, is_wintouched, touchline, touchwin, untouchwin, or wtouchin Subroutine) subroutine.

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

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

Manipulating Window Data with Curses in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

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