diff options
Diffstat (limited to 'apps/plugins/clock/clock_settings.h')
-rw-r--r-- | apps/plugins/clock/clock_settings.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/apps/plugins/clock/clock_settings.h b/apps/plugins/clock/clock_settings.h new file mode 100644 index 0000000000..fadf3d5e63 --- /dev/null +++ b/apps/plugins/clock/clock_settings.h | |||
@@ -0,0 +1,91 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id: jackpot.c 14034 2007-07-28 05:42:55Z kevin $ | ||
9 | * | ||
10 | * Copyright (C) 2007 Copyright Kévin Ferrare based on Zakk Roberts's work | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef _CLOCK_SETTINGS_ | ||
21 | #define _CLOCK_SETTINGS_ | ||
22 | #include "plugin.h" | ||
23 | |||
24 | enum date_format{ | ||
25 | NONE, | ||
26 | ENGLISH, | ||
27 | EUROPEAN, | ||
28 | JAPANESE, | ||
29 | }; | ||
30 | |||
31 | enum hour_format{ | ||
32 | H24, | ||
33 | H12 | ||
34 | }; | ||
35 | |||
36 | enum clock_modes{ | ||
37 | ANALOG, | ||
38 | DIGITAL, | ||
39 | BINARY, | ||
40 | NB_CLOCK_MODES | ||
41 | }; | ||
42 | |||
43 | enum backlight_handling{ | ||
44 | ALWAS_OFF, | ||
45 | ROCKBOX_SETTING, | ||
46 | ALWAYS_ON | ||
47 | }; | ||
48 | |||
49 | |||
50 | struct general_settings{ | ||
51 | int hour_format;/* 0:24h, 1:12h*/ | ||
52 | int date_format; | ||
53 | bool show_counter; | ||
54 | bool save_settings; | ||
55 | bool idle_poweroff; | ||
56 | int backlight; | ||
57 | }; | ||
58 | |||
59 | struct analog_settings{ | ||
60 | bool show_date; | ||
61 | bool show_seconds; | ||
62 | bool show_border; | ||
63 | }; | ||
64 | |||
65 | struct digital_settings{ | ||
66 | int show_seconds; | ||
67 | int blinkcolon; | ||
68 | }; | ||
69 | |||
70 | struct clock_settings{ | ||
71 | int mode; /* clock mode */ | ||
72 | int skin[NB_CLOCK_MODES];/* how does each mode looks like */ | ||
73 | struct general_settings general; | ||
74 | struct analog_settings analog; | ||
75 | struct digital_settings digital; | ||
76 | }; | ||
77 | |||
78 | extern struct clock_settings clock_settings; | ||
79 | |||
80 | /* settings are saved to this location */ | ||
81 | #define settings_filename "/.rockbox/rocks/.clock_settings" | ||
82 | |||
83 | void clock_settings_skin_next(struct clock_settings* settings); | ||
84 | void clock_settings_skin_previous(struct clock_settings* settings); | ||
85 | void apply_backlight_setting(int backlight_setting); | ||
86 | void clock_settings_reset(struct clock_settings* settings); | ||
87 | void load_settings(void); | ||
88 | void save_settings(void); | ||
89 | void save_settings_wo_gui(void); | ||
90 | |||
91 | #endif /* _CLOCK_SETTINGS_ */ | ||