-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Windows Jump Lists support in AWT (#943)
This PR adds Windows Jump Lists support to AWT and fixes compilation on Visual Studio 2022.
- Loading branch information
1 parent
576deeb
commit c4db278
Showing
7 changed files
with
719 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <string> | ||
#include <jni.h> | ||
|
||
template<typename T> | ||
T inline fromJavaPointer(jlong ptr) { return reinterpret_cast<T>(static_cast<uintptr_t>(ptr)); } | ||
|
||
template<typename T> | ||
jlong inline toJavaPointer(T ptr) { return static_cast<jlong>(reinterpret_cast<uintptr_t>(ptr)); } | ||
|
||
std::wstring inline toStdString(JNIEnv *env, jstring jstr) { | ||
const jchar* jchars = env->GetStringCritical(jstr, NULL); | ||
std::wstring wstr = reinterpret_cast<const wchar_t*>(jchars); | ||
env->ReleaseStringCritical(jstr, jchars); | ||
return wstr; | ||
} |
Oops, something went wrong.