Skip to content

Commit

Permalink
Fixing broken examples as the custom handler has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
mohabouje authored Jan 13, 2025
1 parent 0baa2d0 commit f693b8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/console-example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class CustomHandler : public IWinToastHandler {
exit(16 + actionIndex);
}

void toastActivated(const char* response) const {
std::wcout << L"The user clicked on action #" << response << std::endl;
}

void toastDismissed(WinToastDismissalReason state) const {
switch (state) {
case UserCanceled:
Expand Down
5 changes: 5 additions & 0 deletions examples/qt-gui-example/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,14 @@ class CustomHandler : public IWinToastHandler {
std::wcout << L"The user clicked on button #" << actionIndex << L" in this toast" << std::endl;
}

void toastActivated(const char* response) const {
std::wcout << L"The user clicked on action #" << response << std::endl;
}

void toastFailed() const {
std::wcout << L"Error showing current toast" << std::endl;
}

void toastDismissed(WinToastDismissalReason state) const {
switch (state) {
case UserCanceled:
Expand Down

0 comments on commit f693b8e

Please sign in to comment.