Remove tabs.
[kugel-rb.git] / apps / radio / radio.h
blob76615e39e763713b195842aa6a93d3b7e82642c3
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2003 Linus Nielsen Feltzing
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef RADIO_H
22 #define RADIO_H
24 #ifndef FMRADIO_H
25 #include "fmradio.h"
26 #endif
27 #include "screen_access.h"
28 #include "bmp.h"
30 enum {
31 RADIO_SCAN_MODE = 0,
32 RADIO_PRESET_MODE,
35 #if CONFIG_TUNER
36 void radio_load_presets(char *filename);
37 void radio_save_presets(void);
38 void radio_init(void) INIT_ATTR;
39 void radio_screen(void);
40 void radio_start(void);
41 void radio_pause(void);
42 void radio_stop(void);
43 bool radio_hardware_present(void);
44 bool in_radio_screen(void);
46 bool radio_scan_mode(void); /* true for scan mode, false for preset mode */
47 bool radio_is_stereo(void);
48 int radio_current_frequency(void);
49 int radio_current_preset(void);
50 int radio_preset_count(void);
51 const struct fmstation *radio_get_preset(int preset);
53 /* callbacks for the radio settings */
54 void set_radio_region(int region);
55 void toggle_mono_mode(bool mono);
57 #define MAX_FMPRESET_LEN 27
59 struct fmstation
61 int frequency; /* In Hz */
62 char name[MAX_FMPRESET_LEN+1];
64 const char* radio_get_preset_name(int preset);
65 void presets_draw_markers(struct screen *screen, int x, int y, int w, int h);
67 #ifdef HAVE_ALBUMART
68 void radioart_init(bool entering_screen);
69 int radio_get_art_hid(struct dim *requested_dim);
70 #endif
72 void next_station(int direction);
75 enum fms_exiting {
76 FMS_EXIT,
77 FMS_ENTER
80 /* only radio.c should be using these! */
81 int fms_do_button_loop(bool update_screen);
82 struct gui_wps *fms_get(enum screen_type screen);
83 void fms_fix_displays(enum fms_exiting toggle_state);
85 #endif /* CONFIG_TUNER */
87 #endif /* RADIO_H */