comparison dw.hpp @ 2916:fe43f8667d3d

C++: Implement Notification class, and enable dwtestoo code that relied on it.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 28 Dec 2022 03:28:31 +0000
parents 8af64b6d75a9
children 77e5d6743013
comparison
equal deleted inserted replaced
2915:0cde119fc945 2916:fe43f8667d3d
1577 delete this; 1577 delete this;
1578 return FALSE; 1578 return FALSE;
1579 } 1579 }
1580 }; 1580 };
1581 1581
1582 class Notification final : public Clickable
1583 {
1584 public:
1585 // Constructors
1586 Notification(const char *title, const char *imagepath, const char *description) { SetHWND(dw_notification_new(title, imagepath, description)); }
1587 Notification(const char *title, const char *imagepath) { SetHWND(dw_notification_new(title, imagepath, NULL)); }
1588 Notification(const char *title) { SetHWND(dw_notification_new(title, NULL, NULL)); }
1589
1590 // User functions
1591 int Send() { int retval = dw_notification_send(hwnd); delete this; return retval; }
1592 };
1593
1582 class App 1594 class App
1583 { 1595 {
1584 protected: 1596 protected:
1585 App() { } 1597 App() { }
1586 static App *_app; 1598 static App *_app;