blob: 408983aa106c3296be0e711c1372095dd49ea9c2 [file] [log] [blame]
Kevin Ferrare93b2f9f2007-08-04 03:01:46 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: jackpot.c 14034 2007-07-28 05:42:55Z kevin $
9 *
Nicolas Pennequin357ffb32008-05-05 10:32:46 +000010 * Copyright (C) 2007 Copyright Kévin Ferrare based on Zakk Roberts's work
Kevin Ferrare93b2f9f2007-08-04 03:01:46 +000011 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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.
Kevin Ferrare93b2f9f2007-08-04 03:01:46 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef _CLOCK_SETTINGS_
23#define _CLOCK_SETTINGS_
24#include "plugin.h"
25
26enum date_format{
27 NONE,
28 ENGLISH,
29 EUROPEAN,
30 JAPANESE,
31};
32
33enum hour_format{
34 H24,
35 H12
36};
37
38enum clock_modes{
39 ANALOG,
40 DIGITAL,
41 BINARY,
42 NB_CLOCK_MODES
43};
44
45enum backlight_handling{
46 ALWAS_OFF,
47 ROCKBOX_SETTING,
48 ALWAYS_ON
49};
50
51
52struct general_settings{
53 int hour_format;/* 0:24h, 1:12h*/
54 int date_format;
55 bool show_counter;
56 bool save_settings;
57 bool idle_poweroff;
58 int backlight;
59};
60
61struct analog_settings{
62 bool show_date;
63 bool show_seconds;
64 bool show_border;
65};
66
67struct digital_settings{
68 int show_seconds;
69 int blinkcolon;
70};
71
72struct clock_settings{
73 int mode; /* clock mode */
74 int skin[NB_CLOCK_MODES];/* how does each mode looks like */
75 struct general_settings general;
76 struct analog_settings analog;
77 struct digital_settings digital;
78};
79
80extern struct clock_settings clock_settings;
81
82/* settings are saved to this location */
Robert Kukla40718262008-03-17 22:27:25 +000083#define settings_filename PLUGIN_APPS_DIR "/.clock_settings"
Kevin Ferrare93b2f9f2007-08-04 03:01:46 +000084
85void clock_settings_skin_next(struct clock_settings* settings);
86void clock_settings_skin_previous(struct clock_settings* settings);
87void apply_backlight_setting(int backlight_setting);
88void clock_settings_reset(struct clock_settings* settings);
89void load_settings(void);
90void save_settings(void);
91void save_settings_wo_gui(void);
92
93#endif /* _CLOCK_SETTINGS_ */