|
PebbleOS
|
Alert masks and settings accessors used by the settings UI. More...
Enumerations | |
| enum | AlertMask { AlertMaskAllOff = 0 , AlertMaskPhoneCalls = NotificationPhoneCall , AlertMaskOther = NotificationOther , AlertMaskAllOnLegacy = NotificationMobile | NotificationPhoneCall | NotificationOther , AlertMaskAllOn } |
| Set of alert types that may alert the user, a bitmask of NotificationType. More... | |
Functions | |
| bool | alerts_get_vibrate (void) |
| Get whether notifications vibrate. | |
| AlertMask | alerts_get_mask (void) |
| Get the alert mask. | |
| AlertMask | alerts_get_dnd_mask (void) |
| Get the Do Not Disturb mask. | |
| uint32_t | alerts_get_notification_window_timeout_ms (void) |
| Get the notification window timeout. | |
| void | alerts_set_vibrate (bool enable) |
| Set whether notifications vibrate. | |
| void | alerts_set_mask (AlertMask mask) |
| Set the alert mask. | |
| void | alerts_set_dnd_mask (AlertMask mask) |
| Set the Do Not Disturb mask. | |
| void | alerts_set_notification_window_timeout_ms (uint32_t timeout_ms) |
| Set the notification window timeout. | |
| void | alerts_init (void) |
| Initialize the alerts service. | |
Alert masks and settings accessors used by the settings UI.
The getters and setters forward to Alert preferences; setters persist the value.
| enum AlertMask |
Set of alert types that may alert the user, a bitmask of NotificationType.
| AlertMask alerts_get_dnd_mask | ( | void | ) |
Get the Do Not Disturb mask.
| AlertMask alerts_get_mask | ( | void | ) |
Get the alert mask.
| uint32_t alerts_get_notification_window_timeout_ms | ( | void | ) |
Get the notification window timeout.
| bool alerts_get_vibrate | ( | void | ) |
Get whether notifications vibrate.
| void alerts_init | ( | void | ) |
Initialize the alerts service.
Loads the alert preferences and initializes Do Not Disturb and the vibration intensity.
| void alerts_set_dnd_mask | ( | AlertMask | mask | ) |
Set the Do Not Disturb mask.
| mask | Alert types that may still vibrate or light the backlight while DND is active. |
| void alerts_set_mask | ( | AlertMask | mask | ) |
Set the alert mask.
| mask | Alert types that may alert the user. |
| void alerts_set_notification_window_timeout_ms | ( | uint32_t | timeout_ms | ) |
Set the notification window timeout.
| timeout_ms | Timeout in milliseconds, or NOTIF_WINDOW_TIMEOUT_INFINITE. |
| void alerts_set_vibrate | ( | bool | enable | ) |
Set whether notifications vibrate.
| enable | true to vibrate. |