Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
|
Interacting with the integrated alarm clock.
Alarm clock state ... | |
enum | TAlarmClockState { acsDisabled = 0 , acsStandby , acsSnooze , acsAlarmPreRinging , acsAlarmMusicTrying , acsAlarmMusicOk , acsAlarmRinging } |
static bool | AlarmClockStateIsAlarm (TAlarmClockState state) |
TAlarmClockState | AlarmClockGetState () |
Get the current alarm clock state. | |
Init/done ... | |
void | AlarmClockInit () |
Initialize the alarm clock. | |
void | AlarmClockDone () |
Shutdown the alarm clock. | |
High-level actions / UI integration ... | |
void | AlarmClockSetButton (class CButton *btn) |
Define a main button. Its surface is set to indicate the alarm state. More... | |
void | AlarmClockHandlePushed (bool enableOff, bool longPush) |
Handle a push on (one of) the alarm clock button(s) in the interface. More... | |
Setup dialog ... | |
void | AlarmClockRunSetDialog () |
Run the setup screen to edit alarm times. | |
enum TAlarmClockState |
Definition at line 41 of file alarmclock.H.
void AlarmClockSetButton | ( | class CButton * | btn | ) |
Define a main button. Its surface is set to indicate the alarm state.
When pushed in a non-alarm state, the setup dialog is run. When pushed during an alarm, the alarm is snoozed on a short pushed and switched off on a long push. The push behaviour is identical to calling 'AlarmClockHandlePushed' with 'enableOff = true'.
void AlarmClockHandlePushed | ( | bool | enableOff, |
bool | longPush | ||
) |
Handle a push on (one of) the alarm clock button(s) in the interface.
In off/standby state, a push opens the setup dialog. If allowed ('enableOff == true'), a long push switches off alarm during alarm. Any other push during alarm will put the alarm into snooze mode.