-
-
Notifications
You must be signed in to change notification settings - Fork 140
Fix incompatibility with JDK, code inconsistencies and upgrade to C++17 #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
620a601
6a8ab66
bdad5b1
c1ff224
d546c22
767ceea
d324ffc
5b3632c
ff08957
8852def
51995f5
dce26db
a6d1c50
4b0c712
9b8838b
a99fa5e
abe849c
ee9ba51
0ebe459
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,3 @@ enc_temp_folder/ | |
build/ | ||
cmake-build-* | ||
CMakeLists.txt.user | ||
|
||
# CLion | ||
.idea/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// MIT License | ||
// | ||
// Copyright (C) 2016-2025 WinToast - Mohammed Boujemaoui <mohabouje@gmail.com> | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
#ifndef IWINTOASTHANDLER_H | ||
#define IWINTOASTHANDLER_H | ||
|
||
#include <cstdint> | ||
|
||
#include "Platform.h" | ||
|
||
namespace WinToastLib { | ||
using namespace ABI::Windows::UI::Notifications; | ||
|
||
struct IWinToastHandler { | ||
enum class DismissalReason : int32_t { | ||
UserCanceled = ToastDismissalReason_UserCanceled, | ||
ApplicationHidden = ToastDismissalReason_ApplicationHidden, | ||
TimedOut = ToastDismissalReason_TimedOut | ||
}; | ||
|
||
virtual ~IWinToastHandler() = default; | ||
virtual void toastActivated() const = 0; | ||
virtual void toastActivated(int actionIndex) const = 0; | ||
virtual void toastActivated(std::wstring response) const = 0; | ||
virtual void toastDismissed(DismissalReason state) const = 0; | ||
virtual void toastFailed() const = 0; | ||
}; | ||
} | ||
|
||
#endif //IWINTOASTHANDLER_H | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All new files are missing final newlines. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name of this file is too generic. Ideally, WinToast headers would be in a |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// MIT License | ||
// | ||
// Copyright (C) 2016-2025 WinToast - Mohammed Boujemaoui <mohabouje@gmail.com> | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
#ifndef PLATFORM_H | ||
#define PLATFORM_H | ||
|
||
#ifndef WIN32_LEAN_AND_MEAN | ||
#define WIN32_LEAN_AND_MEAN | ||
#endif //WIN32_LEAN_AND_MEAN | ||
|
||
#include <Windows.h> | ||
#include <wrl/event.h> | ||
#include <windows.ui.notifications.h> | ||
#include <roapi.h> | ||
|
||
namespace WinToastLib { | ||
using namespace Microsoft::WRL; | ||
using namespace ABI::Windows::Data::Xml::Dom; | ||
using namespace ABI::Windows::Foundation; | ||
using namespace ABI::Windows::UI::Notifications; | ||
using namespace Windows::Foundation; | ||
} | ||
Comment on lines
+30
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, if one includes WinToast, they shouldn't need to include Windows libraries. |
||
|
||
#endif //PLATFORM_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globs for source files are discouraged. See CMake docs: