1.\" $NetBSD: curses_touch.3,v 1.3 2003/04/16 13:35:01 wiz Exp $ 2.\" 3.\" Copyright (c) 2002 4.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) 5.\" 6.\" This code is donated to the NetBSD Foundation by the Author. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 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 18.\" permission. 19.\" 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 30.\" SUCH DAMAGE. 31.\" 32.\" 33.Dd August 12, 2002 34.Dt CURSES_TOUCH 3 35.Os 36.Sh NAME 37.Nm curses_touch , 38.Nm touchline , 39.Nm touchoverlap , 40.Nm touchwin , 41.Nm untouchwin , 42.Nm wtouchln , 43.Nm is_linetouched , 44.Nm is_wintouched 45.Nd curses window modification routines 46.Sh LIBRARY 47.Lb libcurses 48.Sh SYNOPSIS 49.In curses.h 50.Ft int 51.Fn touchline "WINDOW *win" "int row" "int start" "int end" 52.Ft int 53.Fn touchoverlap "WINDOW *win1" "WINDOW *win2" 54.Ft int 55.Fn touchwin "WINDOW *win" 56.Ft int 57.Fn untouchwin "WINDOW *win" 58.Ft int 59.Fn wtouchln "WINDOW *win" "int line" "int n" "boolf changed" 60.Ft bool 61.Fn is_linetouched "WINDOW *win" "int line" 62.Ft bool 63.Fn is_wintouched "WINDOW *win" 64.Sh DESCRIPTION 65These functions mark lines and windows as modified and check the modification 66status of lines and windows. 67.Pp 68The 69.Fn touchline 70function marks the characters from 71.Fa start 72to 73.Fa end 74on row 75.Fa row 76in window 77.Fa win 78as having been modified. 79These characters will be synced to the terminal on the next call to 80.Fn wrefresh . 81.Pp 82The 83.Fn touchoverlap 84function marks the portion of 85.Fa win2 86that overlaps 87.Fa win1 88as being modified. 89.Pp 90The 91.Fn touchwin 92function marks the entire window 93.Fa win 94as having been modified. 95Conversely, 96the 97.Fn untouchwin 98function marks the window 99.Fa win 100as being unmodified, so that any changes made to that window will 101not be synced to the terminal during a 102.Fn wrefresh . 103.Pp 104The 105.Fn wtouchln 106function performs one of two operations on 107.Fa n 108lines starting at 109.Fa line 110in the given window. 111If 112.Fa changed 113is 1 then the given line range is marked as being modified, if 114.Fa changed 115is 0 then the given line range is set to being unmodified. 116.Pp 117The 118.Fn is_linetouched 119function returns 120.Dv TRUE 121if 122.Fa line 123in window 124.Fa win 125has been modified since the last refresh was done, othereise 126.Dv FALSE 127is returned. 128.Pp 129.Fn is_wintouched 130returns 131.Dv TRUE 132if the window 133.Fa win 134has been modified since the last refresh, otherwise 135.Dv FALSE 136is returned. 137.Sh RETURN VALUES 138Functions returning pointers will return 139.Dv NULL 140if an error is detected. 141The functions that return an int will return one of the following 142values: 143.Pp 144.Bl -tag -width ERR -compact 145.It Er OK 146The function completed successfully. 147.It Er ERR 148An error occurred in the function. 149.El 150.Sh SEE ALSO 151.Xr curses_refresh 3 152.Sh STANDARDS 153The 154.Nx 155Curses library complies with the X/Open Curses specification, part of the 156Single Unix Specification. 157.Sh HISTORY 158The Curses package appeared in 159.Bx 4.0 . 160