1curs_legacy(3X) curs_legacy(3X)
2
3
4
6 curs_legacy - get curses cursor and window coordinates, attributes
7
9 #include <curses.h>
10
11 int getattrs(const WINDOW *win);
12
13 int getbegx(const WINDOW *win);
14 int getbegy(const WINDOW *win);
15
16 int getcurx(const WINDOW *win);
17 int getcury(const WINDOW *win);
18
19 int getmaxx(const WINDOW *win);
20 int getmaxy(const WINDOW *win);
21
22 int getparx(const WINDOW *win);
23 int getpary(const WINDOW *win);
24
26 These legacy functions are simpler to use than the X/Open Curses func‐
27 tions:
28
29 • The getattrs function returns the same attribute data as wattr_get.
30
31 However, getattrs returns an integer (actually a chtype), while
32 wattr_get returns the current color pair in a separate parameter.
33 In the wide-character library configuration, color pairs may not
34 fit into a chtype, so wattr_get is the only way to obtain the color
35 information.
36
37 Because getattrs returns the attributes in a single parameter, it
38 would not be possible for an application to distinguish that from
39 ERR (a -1). If the window parameter is null, getattrs returns
40 A_NORMAL (zero).
41
42 • The getbegy and getbegx functions return the same data as getbegyx.
43
44 • The getcury and getcurx functions return the same data as getyx.
45
46 • The getmaxy and getmaxx functions return the same data as getmaxyx.
47
48 • The getpary and getparx functions return the same data as getparyx.
49
51 Except as noted, these functions return an integer, or ERR if the win‐
52 dow parameter is null.
53
55 All of these interfaces are provided as macros and functions. The
56 macros are suppressed (and only the functions provided) when
57 NCURSES_OPAQUE is defined. The standard forms such as getyx must be
58 implemented as macros, and (in this implementation) are defined in
59 terms of the functions described here, to avoid reliance on internal
60 details of the WINDOW structure.
61
63 These functions were supported on Version 7, BSD or System V implemen‐
64 tations. None of those implementations checked the window parameter.
65
66 The getattrs function and macro are defined to return a (signed) inte‐
67 ger for compatibility with those implementations although an unsigned
68 type would have been more appropriate.
69
71 curses(3X), curs_getyx(3X), curs_opaque(3X)
72
73
74
75 curs_legacy(3X)