summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Notifications.h
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-01-24 16:22:39 (GMT)
committerJean-François Milants <jf@codingfield.com>2021-01-24 16:22:39 (GMT)
commit219bafb01ac11a2dc0591d37f00e1acc6d478b54 (patch)
treee0f0a1db0c060f36770aa7369b4f4f6e57141d01 /src/displayapp/screens/Notifications.h
parent6d76dbc9117693cc611ba106d696222580dbdc95 (diff)
Handle call notification the same way than other notifications.
Display the call notifications in the Notification app, with buttons to accept/reject the call.
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
-rw-r--r--src/displayapp/screens/Notifications.h46
1 files changed, 28 insertions, 18 deletions
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h
index f5c6a86..4305c79 100644
--- a/src/displayapp/screens/Notifications.h
+++ b/src/displayapp/screens/Notifications.h
@@ -19,26 +19,36 @@ namespace Pinetime {
bool OnButtonPushed() override;
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
+ class NotificationItem {
+ public:
+ NotificationItem(const char* title, const char* msg, uint8_t notifNr, Controllers::NotificationManager::Categories, uint8_t notifNb, Modes mode, Pinetime::Controllers::AlertNotificationService& alertNotificationService);
+ ~NotificationItem();
+ bool Refresh() {return false;}
+ void OnAcceptIncomingCall(lv_event_t event);
+ void OnRejectIncomingCall(lv_event_t event);
+
private:
- bool running = true;
+ uint8_t notifNr = 0;
+ uint8_t notifNb = 0;
+ char pageText[4];
- class NotificationItem {
- public:
- NotificationItem(const char* title, const char* msg, uint8_t notifNr, uint8_t notifNb, Modes mode);
- ~NotificationItem();
- bool Refresh() {return false;}
-
- private:
- uint8_t notifNr = 0;
- uint8_t notifNb = 0;
- char pageText[4];
-
- lv_obj_t* container1;
- lv_obj_t* t1;
- lv_obj_t* l1;
- lv_obj_t* bottomPlaceholder;
- Modes mode;
- };
+ lv_obj_t* container1;
+ lv_obj_t* t1;
+ lv_obj_t* l1;
+ lv_obj_t* l2;
+ lv_obj_t* bt_accept;
+ lv_obj_t* bt_reject;
+ lv_obj_t* label_accept;
+ lv_obj_t* label_reject;
+ lv_obj_t* bottomPlaceholder;
+ Modes mode;
+ Pinetime::Controllers::AlertNotificationService& alertNotificationService;
+
+
+ };
+
+ private:
+ bool running = true;
struct NotificationData {
const char* title;