A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 Copyright Kévin Ferrare based on Zakk Roberts's work
11 *
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.
16 *
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 clock_modes{
34 ANALOG,
35 DIGITAL,
36 BINARY,
37 NB_CLOCK_MODES
38};
39
40enum backlight_handling{
41 ALWAS_OFF,
42 ROCKBOX_SETTING,
43 ALWAYS_ON
44};
45
46
47struct general_settings{
48 int date_format;
49 bool save_settings;
50 bool idle_poweroff;
51 int backlight;
52};
53
54struct analog_settings{
55 bool show_date;
56 bool show_seconds;
57 bool show_border;
58};
59
60struct digital_settings{
61 int show_seconds;
62 int blinkcolon;
63};
64
65struct clock_settings{
66 int mode; /* clock mode */
67 int skin[NB_CLOCK_MODES];/* how does each mode looks like */
68 struct general_settings general;
69 struct analog_settings analog;
70 struct digital_settings digital;
71};
72
73extern struct clock_settings clock_settings;
74extern bool show_counter;
75
76/* settings are saved to this location */
77#define settings_filename PLUGIN_APPS_DIR "/.clock_settings"
78
79void clock_settings_skin_next(struct clock_settings* settings);
80void clock_settings_skin_previous(struct clock_settings* settings);
81void apply_backlight_setting(int backlight_setting);
82void clock_settings_reset(struct clock_settings* settings);
83void load_settings(void);
84void save_settings(void);
85void save_settings_wo_gui(void);
86
87#endif /* _CLOCK_SETTINGS_ */