xref: /freebsd/contrib/ncurses/progs/reset_cmd.h (revision 21817992b3314c908ab50f0bb88d2ee750b9c4ac)
1aae38d10SBaptiste Daroussin /****************************************************************************
2*21817992SBaptiste Daroussin  * Copyright 2020-2021,2024 Thomas E. Dickey                                *
3e1865124SBaptiste Daroussin  * Copyright 2016 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*21817992SBaptiste Daroussin  * $Id: reset_cmd.h,v 1.11 2024/04/08 17:29:34 tom Exp $
36aae38d10SBaptiste Daroussin  *
37aae38d10SBaptiste Daroussin  * Utility functions for resetting terminal.
38aae38d10SBaptiste Daroussin  */
39aae38d10SBaptiste Daroussin #ifndef RESET_CMD_H
40aae38d10SBaptiste Daroussin #define RESET_CMD_H 1
41aae38d10SBaptiste Daroussin /* *INDENT-OFF* */
42aae38d10SBaptiste Daroussin 
43aae38d10SBaptiste Daroussin #define USE_LIBTINFO
44aae38d10SBaptiste Daroussin #define __INTERNAL_CAPS_VISIBLE	/* we need to see has_hardware_tabs */
45aae38d10SBaptiste Daroussin #include <progs.priv.h>
46aae38d10SBaptiste Daroussin 
47aae38d10SBaptiste Daroussin #undef CTRL
48aae38d10SBaptiste Daroussin #define CTRL(x)	((x) & 0x1f)
49aae38d10SBaptiste Daroussin 
50aae38d10SBaptiste Daroussin extern bool send_init_strings(int /* fd */, TTY * /* old_settings */);
51aae38d10SBaptiste Daroussin extern void print_tty_chars(TTY * /* old_settings */, TTY * /* new_settings */);
52aae38d10SBaptiste Daroussin extern void reset_flush(void);
53aae38d10SBaptiste Daroussin extern void reset_start(FILE * /* fp */, bool /* is_reset */, bool /* is_init */ );
54*21817992SBaptiste Daroussin extern void reset_tty_settings(int /* fd */, TTY * /* tty_settings */, int /* noset */);
55aae38d10SBaptiste Daroussin extern void set_control_chars(TTY * /* tty_settings */, int /* erase */, int /* intr */, int /* kill */);
56aae38d10SBaptiste Daroussin extern void set_conversions(TTY * /* tty_settings */);
57aae38d10SBaptiste Daroussin 
58aae38d10SBaptiste Daroussin #if HAVE_SIZECHANGE
59*21817992SBaptiste Daroussin extern void set_window_size(int /* fd */, NCURSES_INT2 * /* high */, NCURSES_INT2 * /* wide */);
60aae38d10SBaptiste Daroussin #endif
61aae38d10SBaptiste Daroussin 
62aae38d10SBaptiste Daroussin extern const char *_nc_progname;
63aae38d10SBaptiste Daroussin 
64aae38d10SBaptiste Daroussin /* *INDENT-ON* */
65aae38d10SBaptiste Daroussin 
66aae38d10SBaptiste Daroussin #endif /* RESET_CMD_H */
67