1 #ifndef radio_h 2 #define radio_h 3 4 #define APPNAME "xmradio" 5 #define APPCLASS "XMradio" 6 #define APPTITLE "xmradio" 7 #define APPVERSION "1.2" 8 9 #define SAMPLEFMT AFMT_S16_LE 10 #define SAMPLENUMCH 0 11 #define SAMPLESPEED 11025 12 // #define SAMPLESPEED 22050 13 #define REFRESHRATE 25 14 15 #define MINFREQ 8750 16 #define MAXFREQ 10800 17 //#define MINFREQ 0 18 //#define MAXFREQ 90000 19 #define FREQSTEP 5 20 21 #define UP 1 22 #define DOWN -1 23 24 typedef struct 25 { 26 char **name; 27 int *freq; 28 int *def; 29 int cnt; 30 } Stations; 31 32 /* station list */ 33 extern Stations station; 34 extern const char *global_station_name; 35 36 typedef struct 37 { 38 int *pos; /* positions in station.freq */ 39 int cnt; 40 } StationButtons; 41 42 /* station button list */ 43 extern StationButtons station_buttons; 44 45 #define BUF_SIZE 8192 46 signed short audio_buffer[BUF_SIZE]; 47 48 typedef struct 49 { 50 int format, stereo, speed, bufsize, bps; 51 void (*func)(); 52 } sampleStruct; 53 54 int SetMute(int on); 55 int SetFrequency(int); 56 int SampleStart(sampleStruct *ss); 57 int SampleEnd(); 58 Boolean Sample(); 59 void SkinToWidgets(Widget w, Pixmap skin); 60 void AddTooltipsToWidgets(); 61 void UpdateTitle(); 62 void SortStationList(); 63 void MakeStationButtonWidgets(int realize); 64 void GeneratePopupMenu(int realize); 65 void SaveRCFile(); 66 void SeekChannel(int direction); 67 void lcdDisconnectCB(const char *reason); 68 void version_check(int result, char *description); 69 void version_enable_button(int onoff); 70 71 Display *dpy; 72 GC gc; 73 Widget toplevel; 74 Cursor workingCursor; 75 Pixmap icon_pm, icon_pm_mask; 76 Pixel fg; 77 int debug; 78 79 extern const char *global_station_name; 80 int frequency; 81 82 #ifdef HAS_XPM 83 Pixmap skin; 84 #endif 85 86 #endif /* radio_h */ 87