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

Technical Reference: Base Operating System and Extensions, Volume 2

getmaxyx Subroutine

Purpose

Returns the size of a window.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>


getmaxyx( Window, Y, X);
WINDOW *Window;
int Y, X;

Description

The getmaxyx subroutine returns the size of a window. The size is returned as the number of rows and columns in the window. The values are stored in integers Y and X.

Parameters

Window Identifies the window whose size to get.
Y Contains the number of rows in the window.
X Contains the number of columns in the window.

Example

To obtain the size of the my_win window, use:

WINDOW *my_win;

int y,x;
getmaxyx(my_win, y, x);

Integers y and x will contain the size of the window.

Related Information

Controlling the Cursor with Curses in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

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.

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