1 /* $Aumix: aumix/src/curses.h,v 1.8 2003/10/09 23:24:14 trevor Exp $ 2 * copyright (c) 1993, 1996-2002 the authors--see AUTHORS file 3 * 4 * This file is part of aumix. 5 * 6 * Aumix is free software; you can redistribute it and/or modify it under the 7 * terms of the GNU General Public License as published by the Free Software 8 * Foundation; either version 2 of the License, or (at your option) any later 9 * version. 10 * 11 * Aumix is distributed in the hope that it will be useful, but WITHOUT ANY 12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along with 16 * aumix; if not, write to the Free Software Foundation, Inc., 59 Temple Place, 17 * Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20 #ifndef AUMIX_CURSES_H 21 #define AUMIX_CURSES_H 22 #if HAVE_CURSES 23 #include <signal.h> /* updates only needed in interactive modes */ 24 #define XOFFSET 0 /* blank columns to leave at the left */ 25 #define YOFFSET 0 /* blank lines to leave at the top */ 26 #if HAVE_NCURSES_H 27 #include <ncurses.h> 28 #else 29 #include <curses.h> 30 #endif /* HAVE_NCURSES_H */ 31 #ifndef CTRL 32 #define CTRL(x) ((x) & 0x1F) 33 #endif /* CTRL */ 34 /* 35 * Says curs_color(3x): "the 0 color pair is wired to white on black and 36 * cannot be changed". 37 */ 38 enum { 39 NULL_PAIR, 40 ACTIVE_COLOR, 41 AXIS_COLOR, 42 HANDLE_COLOR, 43 HOTKEY_COLOR, 44 MENU_COLOR, 45 PLAY_COLOR, 46 RECORD_COLOR, 47 TRACK_COLOR 48 }; 49 static char *LANGUAGES[] = {"ca", "de", "el", "en", "es", "fr", "gl", "it", 50 "nl", "pl", "pt_BR", "ru", "sv", "uk"}; 51 /* 52 * Set to the length of the longest printable text in the 53 * ncurses menu, plus one for a blank space at the right. 54 */ 55 static int MENUSIZES[] = { 56 8, /* ca */ 57 11, /* de */ 58 6, /* el */ 59 6, /* en */ 60 7, /* es */ 61 10, /* fr */ 62 7, /* gl */ 63 7, /* it */ 64 9, /* nl */ 65 7, /* pl */ 66 9, /* pt_BR */ 67 6, /* ru */ 68 10, /* sv */ 69 6, /* uk */ 70 }; 71 72 /* These numbers are equal to the length of the longest channel name. */ 73 static int LABELSIZES[] = { 74 13, /* ca */ 75 12, /* de */ 76 14, /* el */ 77 8, /* en */ 78 8, /* es */ 79 9, /* fr */ 80 8, /* gl */ 81 8, /* it */ 82 8, /* nl */ 83 8, /* pl */ 84 12, /* pt_BR */ 85 13, /* ru */ 86 9, /* sv */ 87 8, /* uk */ 88 }; 89 #define ARROW_WIDTH 1 /* width of selection arrow */ 90 #define R_P_WIDTH 1 /* width of record/play indicator */ 91 int level_increment, balance_increment, menu_width, level_width, label_width, balance_width, levelbalmode; 92 int (*Wgetch) (WINDOW * win); 93 #define Getch() (*Wgetch)(stdscr) 94 void WakeUpCurses(void); 95 void InitScreenCurses(void); 96 void PlaceCursor(void); 97 void HighlightLabelCurses(void); 98 void KeysBoxCurses(void); 99 void ShowMutingCurses(void); 100 void SetDefaultColors(void); 101 void InitCurses(void); 102 int InitColors(char *scheme); 103 void Inter(void); 104 void DrawLevelBalModeCurses(int dev, int mode); 105 void DrawLevelCurses(int dev); 106 void EraseLevelCurses(int dev); 107 void RedrawBalanceCurses(int dev); 108 void DrawRecordPlayCurses(int dev); 109 void CloseScreenCurses(void); 110 void StartMouse(void); 111 #endif /* HAVE_CURSES */ 112 #endif /* AUMIX_CURSES_H */ 113