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