Rebase to SVN, and do a bit of cleanup as well as minor fixes.
[kugel-rb.git] / apps / plugins / clock / clock_settings.h
blob0765ec93615fe385732c2a0e402b93d86ff65504
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 Copyright Kévin Ferrare based on Zakk Roberts's work
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 ****************************************************************************/
22 #ifndef _CLOCK_SETTINGS_
23 #define _CLOCK_SETTINGS_
24 #include "plugin.h"
26 enum date_format{
27 NONE,
28 ENGLISH,
29 EUROPEAN,
30 JAPANESE,
33 enum hour_format{
34 H24,
35 H12
38 enum clock_modes{
39 ANALOG,
40 DIGITAL,
41 BINARY,
42 NB_CLOCK_MODES
45 enum backlight_handling{
46 ALWAS_OFF,
47 ROCKBOX_SETTING,
48 ALWAYS_ON
52 struct 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;
61 struct analog_settings{
62 bool show_date;
63 bool show_seconds;
64 bool show_border;
67 struct digital_settings{
68 int show_seconds;
69 int blinkcolon;
72 struct 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;
80 extern struct clock_settings clock_settings;
82 /* settings are saved to this location */
83 #define settings_filename PLUGIN_APPS_DIR "/.clock_settings"
85 void clock_settings_skin_next(struct clock_settings* settings);
86 void clock_settings_skin_previous(struct clock_settings* settings);
87 void apply_backlight_setting(int backlight_setting);
88 void clock_settings_reset(struct clock_settings* settings);
89 void load_settings(void);
90 void save_settings(void);
91 void save_settings_wo_gui(void);
93 #endif /* _CLOCK_SETTINGS_ */