Persistent user preferences for alerts, Do Not Disturb and the speaker.
More...
Persistent user preferences for alerts, Do Not Disturb and the speaker.
Preferences live in the notifpref settings file. Setters update the cached value and write it through to the file.
◆ DndNotificationMode
Whether notifications are displayed while Do Not Disturb is active.
| Enumerator |
|---|
| DndNotificationModeHide | Notifications are not shown.
|
| DndNotificationModeShow | Notifications are shown (default).
|
◆ FirstUseSource
"First use" dialogs whose completion is remembered.
| Enumerator |
|---|
| FirstUseSourceManualDNDActionMenu | Manual DND toggled from a notification action menu.
|
| FirstUseSourceManualDNDSettingsMenu | Manual DND toggled from the settings menu.
|
| FirstUseSourceSmartDND | Calendar-aware (smart) DND enabled.
|
| FirstUseSourceDismiss | Dismiss action used.
|
◆ MuteBitfield
Days of the week on which an app is muted.
Bit n is set to mute on tm_wday n (bit 0 is Sunday, bit 6 Saturday).
| Enumerator |
|---|
| MuteBitfield_None | Never muted.
|
| MuteBitfield_Always | Muted every day.
|
| MuteBitfield_Weekdays | Muted Monday to Friday.
|
| MuteBitfield_Weekends | Muted Saturday and Sunday.
|
◆ alerts_preferences_check_and_set_first_use_complete()
| bool alerts_preferences_check_and_set_first_use_complete |
( |
FirstUseSource |
source | ) |
|
Check whether a "first use" dialog has been shown, and mark it as shown.
- Parameters
-
- Returns
- true if the dialog had already been shown, false if this is the first time.
◆ alerts_preferences_dnd_get_auto_dismiss()
| bool alerts_preferences_dnd_get_auto_dismiss |
( |
void |
| ) |
|
Get whether notifications auto-dismiss while DND is active.
- Returns
- true if auto-dismiss is allowed during DND.
◆ alerts_preferences_dnd_get_motion_backlight()
| bool alerts_preferences_dnd_get_motion_backlight |
( |
void |
| ) |
|
Get whether motion turns on the backlight while DND is active.
- Returns
- true if the motion backlight is allowed.
◆ alerts_preferences_dnd_get_mute_speaker()
| bool alerts_preferences_dnd_get_mute_speaker |
( |
void |
| ) |
|
Get whether the speaker is muted while DND is active.
- Returns
- true if the speaker is muted during DND.
◆ alerts_preferences_dnd_get_show_notifications()
Get whether notifications are displayed while DND is active.
- Returns
- Display mode.
◆ alerts_preferences_dnd_get_touch_backlight()
| bool alerts_preferences_dnd_get_touch_backlight |
( |
void |
| ) |
|
Get whether tap and double tap gestures turn on the backlight while DND is active.
- Returns
- true if the touch backlight is allowed.
◆ alerts_preferences_dnd_set_auto_dismiss()
| void alerts_preferences_dnd_set_auto_dismiss |
( |
bool |
enable | ) |
|
Set whether notifications auto-dismiss while DND is active.
- Parameters
-
| enable | true to allow auto-dismiss during DND, false to keep notifications on screen (default). |
◆ alerts_preferences_dnd_set_motion_backlight()
| void alerts_preferences_dnd_set_motion_backlight |
( |
bool |
enable | ) |
|
Set whether motion turns on the backlight while DND is active.
- Parameters
-
| enable | true to allow the motion backlight (default), false to suppress it. |
◆ alerts_preferences_dnd_set_mute_speaker()
| void alerts_preferences_dnd_set_mute_speaker |
( |
bool |
enable | ) |
|
Set whether the speaker is muted while DND is active.
- Parameters
-
| enable | true to mute the speaker during DND, false to allow audio (default). |
◆ alerts_preferences_dnd_set_show_notifications()
Set whether notifications are displayed while DND is active.
- Parameters
-
◆ alerts_preferences_dnd_set_touch_backlight()
| void alerts_preferences_dnd_set_touch_backlight |
( |
bool |
enable | ) |
|
Set whether tap and double tap gestures turn on the backlight while DND is active.
- Parameters
-
| enable | true to allow the touch backlight (default), false to suppress it. |
◆ alerts_preferences_get_speaker_muted()
| bool alerts_preferences_get_speaker_muted |
( |
void |
| ) |
|
Get the always-on speaker mute.
- Returns
- true if the speaker is muted.
◆ alerts_preferences_get_speaker_volume()
| uint8_t alerts_preferences_get_speaker_volume |
( |
void |
| ) |
|
Get the system-wide speaker volume cap.
- Returns
- Volume cap, 0 to 100. Defaults to 100.
◆ alerts_preferences_set_speaker_muted()
| void alerts_preferences_set_speaker_muted |
( |
bool |
muted | ) |
|
Set the always-on speaker mute, which silences the speaker regardless of DND.
- Parameters
-
| muted | true to mute the speaker, false to allow audio (default). |
◆ alerts_preferences_set_speaker_volume()
| void alerts_preferences_set_speaker_volume |
( |
uint8_t |
volume | ) |
|
Set the system-wide speaker volume cap.
Per-playback volumes are scaled by this value before being applied to the audio hardware.
- Parameters
-
| volume | Volume cap, 0 to 100. Larger values are clamped to 100. |