mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-15 16:27:13 -06:00
macOS native:
- removed `FlatNativeMacLibrary.getWindowPtr()` because it is too dangerous to use `windowPtr` (which is `NSWindow*`) in Java (using invalid window pointer would crash app) - made `getNSWindow()` 20x faster - catch exceptions in `getNSWindow()` - digitally signed dylibs
This commit is contained in:
@@ -23,9 +23,9 @@
|
||||
*/
|
||||
|
||||
|
||||
// from JNFJNI.h
|
||||
// from jlong_md.h
|
||||
#ifndef jlong_to_ptr
|
||||
#define jlong_to_ptr(a) ((void *)(uintptr_t)(a))
|
||||
#define jlong_to_ptr(a) ((void*)(a))
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,3 +39,6 @@
|
||||
[ex name], [ex reason], [ex userInfo], [ex callStackSymbols] ); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
jfieldID getFieldID( JNIEnv *env, const char* className, const char* fieldName, const char* fieldSignature );
|
||||
|
||||
@@ -7,21 +7,13 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: com_formdev_flatlaf_ui_FlatNativeMacLibrary
|
||||
* Method: getWindowPtr
|
||||
* Signature: (Ljava/awt/Window;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_getWindowPtr
|
||||
(JNIEnv *, jclass, jobject);
|
||||
|
||||
/*
|
||||
* Class: com_formdev_flatlaf_ui_FlatNativeMacLibrary
|
||||
* Method: setWindowRoundedBorder
|
||||
* Signature: (JFFI)V
|
||||
* Signature: (Ljava/awt/Window;FFI)Z
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_setWindowRoundedBorder
|
||||
(JNIEnv *, jclass, jlong, jfloat, jfloat, jint);
|
||||
JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_setWindowRoundedBorder
|
||||
(JNIEnv *, jclass, jobject, jfloat, jfloat, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user