Debian Codegraph @

upstream/debian-unstable/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.63 2025/04/05 22:08:55 tom Exp $
31 .TH move 3NCURSES 2025-04-05 "ncurses 6.6" "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 .
43 .de bP
44 .ie n .IP \(bu 4
45 .el .IP \(bu 2
46 ..
47 .SH NAME
48 \fB\%move\fP,
49 \fB\%wmove\fP \-
50 move cursor in a \fIcurses\fR window
51 .SH SYNOPSIS
52 .nf
53 \fB#include <curses.h>
54 .PP
55 \fBint move(int \fIy\fP, int \fIx\fP);
56 \fBint wmove(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP);
57 .fi
58 .SH DESCRIPTION
59 .B \%wmove
60 relocates the cursor associated with the
61 .I curses
62 window
63 .I win
64 to line
65 .I y
66 and column
67 .IR x .
68 The terminal's cursor does not move until \fB\%refresh\fP(3NCURSES) is called.
69 The position
70 .RI ( y ,
71 .IR x )
72 is relative to the upper left-hand corner of the window,
73 which has coordinates
74 (0,\ 0).
75 .B move
76 similarly moves the cursor in the
77 .B \%stdscr
78 window.
79 .SH RETURN VALUE
80 These functions return
81 .B OK
82 on success and
83 .B ERR
84 on failure.
85 In
86 .IR \%ncurses ,
87 these functions fail if
88 .bP
89 the
90 .I curses
91 screen has not been initialized,
92 .bP
93 (for
94 .BR \%wmove ")"
95 .I win
96 is a null pointer,
97 or
98 .bP
99 the position
100 .RI ( y ,
101 .IR x )
102 is outside the window boundaries.
103 .SH NOTES
104 .B \%move
105 may be implemented as a macro.
106 .SH PORTABILITY
107 X/Open Curses Issue\ 4 describes these functions.
108 It specifies no error conditions for them.
109 .PP
110 SVr4 describes a successful return value only as
111 \*(``an integer value other than
112 .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 503
113 .SH HISTORY
114 4BSD (1980)
115 introduced these functions.
116 .SH SEE ALSO
117 \fB\%ncurses\fP(3NCURSES),
118 \fB\%refresh\fP(3NCURSES)