Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
alarmclock.H
Go to the documentation of this file.
1/*
2 * This file is part of the Home2L project.
3 *
4 * (C) 2015-2021 Gundolf Kiefer
5 *
6 * Home2L is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Home2L is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Home2L. If not, see <https://www.gnu.org/licenses/>.
18 *
19 */
20
21
22#ifndef _ALARMCLOCK_
23#define _ALARMCLOCK_
24
25#include "ui_base.H"
26
27
49};
50
51static inline bool AlarmClockStateIsAlarm (TAlarmClockState state) { return state >= acsAlarmPreRinging; }
54
55
61
62
65void AlarmClockEnableDisable (bool enable);
69
70
73void AlarmClockSetButton (class CButton *btn);
81void AlarmClockHandlePushed (bool enableOff, bool longPush);
88
89
94
95
98
99
100#endif // _ALARMCLOCK_
Push-button widget.
Definition: ui_widgets.H:214
void AlarmClockDone()
Shutdown the alarm clock.
void AlarmClockInit()
Initialize the alarm clock.
void AlarmClockSetButton(class CButton *btn)
Define a main button. Its surface is set to indicate the alarm state.
TAlarmClockState
Definition: alarmclock.H:41
TAlarmClockState AlarmClockGetState()
Get the current alarm clock state.
void AlarmClockSnooze()
"Snooze" button of the alarm clock.
void AlarmClockEnableDisable(bool enable)
Enable/disable alarm clock as a whole.
void AlarmClockHandlePushed(bool enableOff, bool longPush)
Handle a push on (one of) the alarm clock button(s) in the interface.
void AlarmClockRunSetDialog()
Run the setup screen to edit alarm times.
void AlarmClockOff()
"Off" button of the alarm clock => go to standby state.
@ acsSnooze
in snooze state
Definition: alarmclock.H:44
@ acsAlarmRinging
alarm with internal bell (music player failed)
Definition: alarmclock.H:48
@ acsAlarmMusicOk
alarm with music player on (for sure)
Definition: alarmclock.H:47
@ acsAlarmMusicTrying
alarm with music player on (hopefully soon [again])
Definition: alarmclock.H:46
@ acsStandby
in standby state (wakeup time may be set, but is in the future)
Definition: alarmclock.H:43
@ acsDisabled
completely off
Definition: alarmclock.H:42
@ acsAlarmPreRinging
ringing internally initially, before starting the music player
Definition: alarmclock.H:45