1 .\" $NetBSD: curses_cursor.3,v 1.5 2004/07/23 13:38:48 wiz Exp $
4 .\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
6 .\" This code is donated to the NetBSD Foundation by the Author.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. The name of the Author may not be used to endorse or promote
17 .\" products derived from this software without specific prior written
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 .Nd curses cursor and window location and positioning routines
59 .Fn getcury "WINDOW *win"
61 .Fn getcurx "WINDOW *win"
63 .Fn getyx "WINDOW *win" "int y" "int x"
65 .Fn getbegy "WINDOW *win"
67 .Fn getbegx "WINDOW *win"
69 .Fn getbegyx "WINDOW *win" "int y" "int x"
71 .Fn getmaxy "WINDOW *win"
73 .Fn getmaxx "WINDOW *win"
75 .Fn getmaxyx "WINDOW *win" "int y" "int x"
77 .Fn getpary "WINDOW *win"
79 .Fn getparx "WINDOW *win"
81 .Fn getparyx "WINDOW *win" "int y" "int x"
83 .Fn move "int y" "int x"
85 .Fn wmove "WINDOW *win" "int y" "int x"
87 .Fn mvcur "int oldy" "int oldx" "int y" "int x"
89 These functions and macros locate and position cursors and windows.
95 functions get the current row and column positions, respectively, of the cursor in
100 macro sets the values of
104 to the current row and column positions of the cursor in the window
107 The origin row and columns of a window
110 determined by calling the
114 functions, respectively, and the maximum row and column for the window can be
115 found by calling the functions
124 macros set the values of
128 to the origin and maximum row and column positions, respectively, for the window
135 functions return the row and column position of the given subwindow relative to
143 to the origin of the subwindow relative to the window's parent.
147 function positions the cursor on the current window at the position given by
150 The cursor position is not changed on the screen until the next
155 function is the same as the
157 function, excepting that the cursor is moved in the window specified by
169 define the previous cursor position for terminals that do not support
170 absolute cursor motions.
171 The curses library may optimise the cursor motion based on these values.
174 succeeds then the curses internal structures are updated with the new
175 position of the cursor.
176 If the destination arguments for
178 exceed the terminal bounds an error will be returned and the cursor
179 position will be unchanged.
181 Functions returning pointers will return
183 if an error is detected.
184 The functions that return an int will return one of the following
187 .Bl -tag -width ERR -compact
189 The function completed successfully.
191 An error occurred in the function.
198 Curses library complies with the X/Open Curses specification, part of
199 the Single Unix Specification.
210 functions are extensions.
212 The Curses package appeared in