xref: /freebsd/contrib/ncurses/progs/tty_settings.h (revision aae38d10b4eebf81c0942947e8b83a9bb8651d88)
1*aae38d10SBaptiste Daroussin /****************************************************************************
2*aae38d10SBaptiste Daroussin  * Copyright (c) 2016,2017 Free Software Foundation, Inc.                   *
3*aae38d10SBaptiste Daroussin  *                                                                          *
4*aae38d10SBaptiste Daroussin  * Permission is hereby granted, free of charge, to any person obtaining a  *
5*aae38d10SBaptiste Daroussin  * copy of this software and associated documentation files (the            *
6*aae38d10SBaptiste Daroussin  * "Software"), to deal in the Software without restriction, including      *
7*aae38d10SBaptiste Daroussin  * without limitation the rights to use, copy, modify, merge, publish,      *
8*aae38d10SBaptiste Daroussin  * distribute, distribute with modifications, sublicense, and/or sell       *
9*aae38d10SBaptiste Daroussin  * copies of the Software, and to permit persons to whom the Software is    *
10*aae38d10SBaptiste Daroussin  * furnished to do so, subject to the following conditions:                 *
11*aae38d10SBaptiste Daroussin  *                                                                          *
12*aae38d10SBaptiste Daroussin  * The above copyright notice and this permission notice shall be included  *
13*aae38d10SBaptiste Daroussin  * in all copies or substantial portions of the Software.                   *
14*aae38d10SBaptiste Daroussin  *                                                                          *
15*aae38d10SBaptiste Daroussin  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16*aae38d10SBaptiste Daroussin  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17*aae38d10SBaptiste Daroussin  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18*aae38d10SBaptiste Daroussin  * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19*aae38d10SBaptiste Daroussin  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20*aae38d10SBaptiste Daroussin  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21*aae38d10SBaptiste Daroussin  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22*aae38d10SBaptiste Daroussin  *                                                                          *
23*aae38d10SBaptiste Daroussin  * Except as contained in this notice, the name(s) of the above copyright   *
24*aae38d10SBaptiste Daroussin  * holders shall not be used in advertising or otherwise to promote the     *
25*aae38d10SBaptiste Daroussin  * sale, use or other dealings in this Software without prior written       *
26*aae38d10SBaptiste Daroussin  * authorization.                                                           *
27*aae38d10SBaptiste Daroussin  ****************************************************************************/
28*aae38d10SBaptiste Daroussin 
29*aae38d10SBaptiste Daroussin /****************************************************************************
30*aae38d10SBaptiste Daroussin  *  Author: Thomas E Dickey                                                 *
31*aae38d10SBaptiste Daroussin  ****************************************************************************/
32*aae38d10SBaptiste Daroussin 
33*aae38d10SBaptiste Daroussin /*
34*aae38d10SBaptiste Daroussin  * $Id: tty_settings.h,v 1.2 2017/10/07 19:11:31 tom Exp $
35*aae38d10SBaptiste Daroussin  *
36*aae38d10SBaptiste Daroussin  * Utility functions for saving/restoring terminal settings.
37*aae38d10SBaptiste Daroussin  */
38*aae38d10SBaptiste Daroussin #ifndef TTY_SETTINGS_H
39*aae38d10SBaptiste Daroussin #define TTY_SETTINGS_H 1
40*aae38d10SBaptiste Daroussin /* *INDENT-OFF* */
41*aae38d10SBaptiste Daroussin 
42*aae38d10SBaptiste Daroussin #include <progs.priv.h>
43*aae38d10SBaptiste Daroussin 
44*aae38d10SBaptiste Daroussin extern int save_tty_settings(TTY * /* tty_settings */, bool /* need_tty */ );
45*aae38d10SBaptiste Daroussin extern void restore_tty_settings(void);
46*aae38d10SBaptiste Daroussin extern void update_tty_settings(TTY * /* old_settings */, TTY * /* new_settings */ );
47*aae38d10SBaptiste Daroussin 
48*aae38d10SBaptiste Daroussin /* *INDENT-ON* */
49*aae38d10SBaptiste Daroussin 
50*aae38d10SBaptiste Daroussin #endif /* TTY_SETTINGS_H */
51