]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_legacy.3x.html
ncurses 6.2 - patch 20210619
[ncurses.git] / doc / html / man / curs_legacy.3x.html
1 <!--
2   ****************************************************************************
3   * Copyright 2019,2020 Thomas E. Dickey                                     *
4   * Copyright 2007-2015,2017 Free Software Foundation, Inc.                  *
5   *                                                                          *
6   * Permission is hereby granted, free of charge, to any person obtaining a  *
7   * copy of this software and associated documentation files (the            *
8   * "Software"), to deal in the Software without restriction, including      *
9   * without limitation the rights to use, copy, modify, merge, publish,      *
10   * distribute, distribute with modifications, sublicense, and/or sell       *
11   * copies of the Software, and to permit persons to whom the Software is    *
12   * furnished to do so, subject to the following conditions:                 *
13   *                                                                          *
14   * The above copyright notice and this permission notice shall be included  *
15   * in all copies or substantial portions of the Software.                   *
16   *                                                                          *
17   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24   *                                                                          *
25   * Except as contained in this notice, the name(s) of the above copyright   *
26   * holders shall not be used in advertising or otherwise to promote the     *
27   * sale, use or other dealings in this Software without prior written       *
28   * authorization.                                                           *
29   ****************************************************************************
30   * @Id: curs_legacy.3x,v 1.12 2020/10/18 00:16:04 tom Exp @
31 -->
32 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
33 <HTML>
34 <HEAD>
35 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
36 <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
37 <TITLE>curs_legacy 3X</TITLE>
38 <link rel="author" href="mailto:bug-ncurses@gnu.org">
39 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
40 </HEAD>
41 <BODY>
42 <H1 class="no-header">curs_legacy 3X</H1>
43 <PRE>
44 <B><A HREF="curs_legacy.3X.html">curs_legacy(3X)</A></B>                                                <B><A HREF="curs_legacy.3X.html">curs_legacy(3X)</A></B>
45
46
47
48
49 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
50        curs_legacy - get <B>curses</B> cursor and window coordinates, attributes
51
52
53 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
54        <B>#include</B> <B>&lt;curses.h&gt;</B>
55
56        <B>int</B> <B>getattrs(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
57
58        <B>int</B> <B>getbegx(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
59        <B>int</B> <B>getbegy(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
60
61        <B>int</B> <B>getcurx(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
62        <B>int</B> <B>getcury(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
63
64        <B>int</B> <B>getmaxx(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
65        <B>int</B> <B>getmaxy(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
66
67        <B>int</B> <B>getparx(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
68        <B>int</B> <B>getpary(const</B> <B>WINDOW</B> <B>*</B><I>win</I><B>);</B>
69
70
71 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
72        These  legacy  functions  are  simpler  to  use  than the X/Open Curses
73        functions:
74
75        <B>o</B>   The <B>getattrs</B> function returns the same attribute data as <B>wattr_get</B>.
76
77            However, <B>getattrs</B> returns an integer  (actually  a  <B>chtype</B>),  while
78            <B>wattr_get</B>  returns  the current color pair in a separate parameter.
79            In the wide-character library configuration, color  pairs  may  not
80            fit into a <B>chtype</B>, so <B>wattr_get</B> is the only way to obtain the color
81            information.
82
83            Because <B>getattrs</B> returns the attributes in a single  parameter,  it
84            would  not  be possible for an application to distinguish that from
85            <B>ERR</B> (a <I>-1</I>).  If the window  parameter  is  null,  <B>getattrs</B>  returns
86            <B>A_NORMAL</B> (zero).
87
88        <B>o</B>   The <B>getbegy</B> and <B>getbegx</B> functions return the same data as <B>getbegyx</B>.
89
90        <B>o</B>   The <B>getcury</B> and <B>getcurx</B> functions return the same data as <B>getyx</B>.
91
92        <B>o</B>   The <B>getmaxy</B> and <B>getmaxx</B> functions return the same data as <B>getmaxyx</B>.
93
94        <B>o</B>   The <B>getpary</B> and <B>getparx</B> functions return the same data as <B>getparyx</B>.
95
96
97 </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
98        Except  as  noted,  these  functions  return  an integer, or <B>ERR</B> if the
99        window parameter is null.
100
101
102 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
103        All of these interfaces are provided  as  macros  and  functions.   The
104        macros   are   suppressed   (and  only  the  functions  provided)  when
105        <B>NCURSES_OPAQUE</B> is defined.  The standard forms such as  <B>getyx</B>  must  be
106        implemented  as  macros,  and  (in  this implementation) are defined in
107        terms of the functions described here, to avoid  reliance  on  internal
108        details of the WINDOW structure.
109
110
111 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
112        These   functions  were  supported  on  Version  7,  BSD  or  System  V
113        implementations.  None of  those  implementations  checked  the  window
114        parameter.
115
116        The  <B>getattrs</B>  function  and  macro  are  defined  to return a (signed)
117        integer  for  compatibility  with  those  implementations  although  an
118        unsigned type would have been more appropriate.
119
120
121 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
122        <B><A HREF="curses.3X.html">curses(3X)</A></B>, <B><A HREF="curs_getyx.3X.html">curs_getyx(3X)</A></B>, <B><A HREF="curs_opaque.3X.html">curs_opaque(3X)</A></B>
123
124
125
126                                                                <B><A HREF="curs_legacy.3X.html">curs_legacy(3X)</A></B>
127 </PRE>
128 <div class="nav">
129 <ul>
130 <li><a href="#h2-NAME">NAME</a></li>
131 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
132 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
133 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
134 <li><a href="#h2-NOTES">NOTES</a></li>
135 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
136 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
137 </ul>
138 </div>
139 </BODY>
140 </HTML>