1 /* ncmpc
2 * (c) 2004 by Kalle Wallin <kaw@linux.se>
3 * Copyright (C) 2008 Max Kellermann <max@duempel.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
19 #include "ncu.h"
20 #include "colors.h"
22 void
23 ncu_init(void)
24 {
25 /* initialize the curses library */
26 initscr();
28 /* initialize color support */
29 colors_start();
31 /* tell curses not to do NL->CR/NL on output */
32 nonl();
34 /* use raw mode (ignore interrupt,quit,suspend, and flow control ) */
35 #ifdef ENABLE_RAW_MODE
36 // raw();
37 #endif
39 /* don't echo input */
40 noecho();
42 /* set cursor invisible */
43 curs_set(0);
45 /* enable extra keys */
46 keypad(stdscr, TRUE);
48 /* initialize mouse support */
49 #ifdef HAVE_GETMOUSE
50 if (options.enable_mouse)
51 mousemask(ALL_MOUSE_EVENTS, NULL);
52 #endif
53 }
55 void
56 ncu_deinit(void)
57 {
58 endwin();
59 }