1curs_legacy(3X)                                                curs_legacy(3X)
2
3
4

NAME

6       curs_legacy - get curses cursor and window coordinates, attributes
7

SYNOPSIS

9       #include <curses.h>
10
11       int getattrs(WINDOW *win);
12       int getbegx(WINDOW *win);
13       int getbegy(WINDOW *win);
14       int getcurx(WINDOW *win);
15       int getcury(WINDOW *win);
16       int getmaxx(WINDOW *win);
17       int getmaxy(WINDOW *win);
18       int getparx(WINDOW *win);
19       int getpary(WINDOW *win);
20

DESCRIPTION

22       These  legacy functions are simpler to use than the X/Open Curses func‐
23       tions:
24
25       ·   The getattrs function returns the same attribute data as wattr_get.
26
27           However, getattrs returns an integer  (actually  a  chtype),  while
28           wattr_get  returns  the current color pair in a separate parameter.
29           In the wide-character library configuration, color  pairs  may  not
30           fit into a chtype, so wattr_get is the only way to obtain the color
31           information.
32
33           Because getattrs returns the attributes in a single  parameter,  it
34           would  not  be possible for an application to distinguish that from
35           ERR (a -1).  If the window  parameter  is  null,  getattrs  returns
36           A_NORMAL (zero).
37
38       ·   The getbegy and getbegx functions return the same data as getbegyx.
39
40       ·   The getcury and getcurx functions return the same data as getyx.
41
42       ·   The getmaxy and getmaxx functions return the same data as getmaxyx.
43
44       ·   The getpary and getparx functions return the same data as getparyx.
45

RETURN VALUE

47       Except  as noted, these functions return an integer, or ERR if the win‐
48       dow parameter is null.
49

NOTES

51       All of these interfaces are provided  as  macros  and  functions.   The
52       macros   are   suppressed   (and  only  the  functions  provided)  when
53       NCURSES_OPAQUE is defined.  The standard forms such as  getyx  must  be
54       implemented  as  macros,  and  (in  this implementation) are defined in
55       terms of the functions described here, to avoid  reliance  on  internal
56       details of the WINDOW structure.
57

PORTABILITY

59       These  functions were supported on Version 7, BSD or System V implemen‐
60       tations.  None of those implementations checked the window parameter.
61
62       The getattrs function and macro are defined to return a (signed)  inte‐
63       ger  for  compatibility with those implementations although an unsigned
64       type would have been more appropriate.
65

SEE ALSO

67       curses(3X), curs_getyx(3X), curs_opaque(3X)
68
69
70
71                                                               curs_legacy(3X)
Impressum