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

Technical Reference: Base Operating System and Extensions, Volume 2

getsyx Subroutine

Purpose

Retrieves the current coordinates of the virtual screen cursor.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>


getsyx(Y, X)
int * Y, * X;

Description

The getsyx subroutine retrieves the current coordinates of the virtual screen cursor and stores them in the location specified by Y and X. The current coordinates are those where the cursor was placed after the last call to the wnoutrefresh, pnoutrefresh, or wrefresh, subroutine. If the leaveok subroutine was TRUE for the last window refreshed, then the getsyx subroutine returns -1 for both X and Y.

If lines have been removed from the top of the screen using the ripoffline subroutine, Y and X include these lines. Y and X should only be used as arguments for the setsyx subroutine.

The getsyx subroutine, along with the setsyx subroutine, is meant to be used by a user-defined function that manipulates curses windows but wants the position of the cursor to remain the same. Such a function would do the following:

Parameters

X Points to the current row position of the virtual screen cursor. A value of -1 indicates the leaveok subroutine was TRUE for the last window refreshed.
Y Points to the current column position of the virtual screen cursor. A value of -1 indicates the leaveok subroutine was TRUE for the last window refreshed.

Related Information

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

Controlling the Cursor with Curses 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 ]