1curs_getyx(3X)                                                  curs_getyx(3X)
2
3
4

NAME

6       getyx,  getparyx,  getbegyx,  getmaxyx  -  get curses cursor and window
7       coordinates
8

SYNOPSIS

10       #include <curses.h>
11
12       void getyx(WINDOW *win, int y, int x);
13       void getparyx(WINDOW *win, int y, int x);
14       void getbegyx(WINDOW *win, int y, int x);
15       void getmaxyx(WINDOW *win, int y, int x);
16

DESCRIPTION

18       The getyx macro places the current cursor position of the given  window
19       in the two integer variables y and x.
20
21       If  win is a subwindow, the getparyx macro places the beginning coordi‐
22       nates of the subwindow relative to the parent window into  two  integer
23       variables y and x.  Otherwise, -1 is placed into y and x.
24
25       Like  getyx,  the getbegyx and getmaxyx macros store the current begin‐
26       ning coordinates and size of the specified window.
27

RETURN VALUE

29       The return values of these macros are undefined (i.e., they should  not
30       be used as the right-hand side of assignment statements).
31

NOTES

33       All  of these interfaces are macros.  A "&" is not necessary before the
34       variables y and x.
35

PORTABILITY

37       The getyx, getparyx, getbegyx and getmaxyx macros are described in  the
38       XSI Curses standard, Issue 4.
39
40       This  implementation also provides functions getbegx, getbegy, getcurx,
41       getcury, getmaxx, getmaxy, getparx and getpary for  compatibility  with
42       older versions of curses.
43
44       Although X/Open Curses does not address this, many implementations pro‐
45       vide members of the WINDOW structure containing values corresponding to
46       these  macros.   For best portability, do not rely on using the data in
47       WINDOW, since some implementations make WINDOW  opaque  (do  not  allow
48       direct use of its members).
49
50       Besides the problem of opaque structures, the data stored in like-named
51       members may not have like-values  in  different  implementations.   For
52       example,  the  WINDOW._maxx and WINDOW._maxy values in ncurses have (at
53       least since release 1.8.1) differed by one from some other  implementa‐
54       tions.  The difference is hidden by means of the macro getmaxyx.
55

SEE ALSO

57       curses(3X), curs_legacy(3X), curs_opaque(3X)
58
59
60
61                                                                curs_getyx(3X)
Impressum