1 /* This file is part of TCD 2.0. 2 tcd.h - Header file for Curses interface. 3 4 Copyright (C) 1997-98 Tim P. Gerla <timg@rrv.net> 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 20 Tim P. Gerla 21 RR 1, Box 40 22 Climax, MN 56523 23 timg@rrv.net 24 */ 25 26 #ifndef TCD_TCD_H 27 #define TCD_TCD_H 28 29 #define PACKAGE_STRING "etcd 1.0.0" 30 31 #include <SDL/SDL.h> 32 33 #define lengthof(m_arr) (sizeof(m_arr) / sizeof((m_arr)[0])) 34 35 typedef enum { 36 PLAY_METHOD_FIRST, 37 REPEAT_CD = PLAY_METHOD_FIRST, 38 REPEAT_TRK, 39 NORMAL, 40 PLAY_METHOD_LAST = NORMAL 41 } PlayMethod; 42 43 struct cd_track { 44 char name[256]; 45 char extra_data[256]; 46 }; 47 48 struct cd_info { 49 struct cd_track trk[SDL_MAX_TRACKS]; 50 char disc_title[256]; 51 char extra_data[256]; 52 int modified; 53 }; 54 55 struct tcd_state { 56 volatile int quit_requested; 57 58 PlayMethod play_method; 59 60 struct cd_info cd_info; 61 SDL_CD *cdrom; 62 unsigned long current_discid; 63 }; 64 65 #define C_BLACK COLOR_PAIR(0) 66 #define C_RED COLOR_PAIR(1) 67 #define C_GREEN COLOR_PAIR(2) 68 #define C_YELLOW COLOR_PAIR(3) 69 #define C_BLUE COLOR_PAIR(4) 70 #define C_MAGENTA COLOR_PAIR(5) 71 #define C_CYAN COLOR_PAIR(6) 72 #define C_WHITE COLOR_PAIR(7) 73 74 #endif /* TCD_TCD_H */ 75