Debian Codegraph @

upstream/debian-trixie/man3/move.3ncurses

raw
1 .\"***************************************************************************
2 .\" Copyright 2018-2024,2025 Thomas E. Dickey *
3 .\" Copyright 1998-2010,2017 Free Software Foundation, Inc. *
4 .\" *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a *
6 .\" copy of this software and associated documentation files (the *
7 .\" "Software"), to deal in the Software without restriction, including *
8 .\" without limitation the rights to use, copy, modify, merge, publish, *
9 .\" distribute, distribute with modifications, sublicense, and/or sell *
10 .\" copies of the Software, and to permit persons to whom the Software is *
11 .\" furnished to do so, subject to the following conditions: *
12 .\" *
13 .\" The above copyright notice and this permission notice shall be included *
14 .\" in all copies or substantial portions of the Software. *
15 .\" *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23 .\" *
24 .\" Except as contained in this notice, the name(s) of the above copyright *
25 .\" holders shall not be used in advertising or otherwise to promote the *
26 .\" sale, use or other dealings in this Software without prior written *
27 .\" authorization. *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: curs_move.3x,v 1.57 2025/02/01 22:50:42 tom Exp $
31 .TH move 3NCURSES 2025-02-01 "ncurses 6.5" "Library calls"
32 .ie \n(.g \{\
33 .ds `` \(lq
34 .ds '' \(rq
35 .\}
36 .el \{\
37 .ie t .ds `` ``
38 .el .ds `` ""
39 .ie t .ds '' ''
40 .el .ds '' ""
41 .\}
42 .SH NAME
43 \fB\%move\fP,
44 \fB\%wmove\fP \-
45 move cursor in a \fIcurses\fR window
46 .SH SYNOPSIS
47 .nf
48 \fB#include <curses.h>
49 .PP
50 \fBint move(int \fIy\fP, int \fIx\fP);
51 \fBint wmove(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP);
52 .fi
53 .SH DESCRIPTION
54 .B \%wmove
55 relocates the cursor associated with the
56 .I curses
57 window
58 .I win
59 to line
60 .I y
61 and column
62 .IR x .
63 The terminal's cursor does not move until \fB\%refresh\fP(3NCURSES) is called.
64 The position
65 .RI ( y ,
66 .IR x )
67 is relative to the upper left-hand corner of the window,
68 which has coordinates
69 (0,\ 0).
70 \fB\%ncurses\fP(3NCURSES) describes the
71 .B \%move
72 variant of this function.
73 .SH RETURN VALUE
74 These functions return
75 .B OK
76 on success and
77 .B ERR
78 on failure.
79 .PP
80 They fail if the position
81 .RI ( y ,
82 .IR x )
83 is outside the window boundaries.
84 .PP
85 In
86 .IR \%ncurses ,
87 .B \%wmove
88 fails if
89 .I win
90 is
91 .IR NULL .
92 .SH NOTES
93 .B \%move
94 may be implemented as a macro.
95 .SH PORTABILITY
96 X/Open Curses Issue\ 4 describes these functions.
97 It specifies no error conditions for them.
98 .PP
99 SVr4 describes a successful return value only as
100 \*(``an integer value other than
101 .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 503
102 .SH HISTORY
103 4BSD (1980)
104 introduced these functions.
105 .SH SEE ALSO
106 \fB\%ncurses\fP(3NCURSES),
107 \fB\%refresh\fP(3NCURSES)