1curs_getyx(3CURSES) Curses Library Functions curs_getyx(3CURSES)
2
3
4
6 curs_getyx, getyx, getparyx, getbegyx, getmaxyx - get curses cursor and
7 window coordinates
8
10 cc [ flag ... ] file ... -lcurses [ library ... ]
11 #include <curses.h>
12
13 void getyx(WINDOW *win, int y, int x);
14
15
16 void getparyx(WINDOW *win, int y, int x);
17
18
19 void getbegyx(WINDOW *win, int y, int x);
20
21
22 void getmaxyx(WINDOW *win, int y, int x);
23
24
26 With the getyx() macro, the cursor position of the window is placed in
27 the two integer variables y and x.
28
29
30 With the getparyx() macro, if win is a subwindow, the beginning coordi‐
31 nates of the subwindow relative to the parent window are placed into
32 two integer variables, y and x. Otherwise, −1 is placed into y and x.
33
34
35 Like getyx() , the getbegyx() and getmaxyx() macros store the current
36 beginning coordinates and size of the specified window.
37
39 The return values of these macros are undefined (that is, they should
40 not be used as the right-hand side of assignment statements).
41
43 See attributes(5) for descriptions of the following attributes:
44
45
46
47
48 ┌─────────────────────────────┬─────────────────────────────┐
49 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
50 ├─────────────────────────────┼─────────────────────────────┤
51 │MT-Level │Unsafe │
52 └─────────────────────────────┴─────────────────────────────┘
53
55 curses(3CURSES), attributes(5)
56
58 The header <curses.h> automatically includes the headers <stdio.h> and
59 <unctrl.h>.
60
61
62 Note that all of these interfaces are macros and that ``&'' is not nec‐
63 essary before the variables y and x.
64
65
66
67SunOS 5.11 31 Dec 1996 curs_getyx(3CURSES)