mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Native Libraries:
- made C methods `static` (similar to `private` in Java) to avoid that they are added (exported) to shared library symbol table - macOS and Linux: added `-fvisibility=hidden` to compiler options to mark C methods hidden by default
This commit is contained in:
@@ -93,6 +93,15 @@ tasks {
|
||||
into( nativesDir )
|
||||
rename( "flatlaf-natives-windows.dll", libraryName )
|
||||
}
|
||||
|
||||
/*dump
|
||||
val dumpbin = "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/dumpbin.exe"
|
||||
val dll = linkedFile.asFile.get()
|
||||
val dllDir = dll.parent
|
||||
exec { commandLine( dumpbin, "/all", "/rawdata:none", "/out:$dllDir/objdump.txt", dll ) }
|
||||
exec { commandLine( dumpbin, "/all", "/out:$dllDir/full-contents.txt", dll ) }
|
||||
exec { commandLine( dumpbin, "/disasm", "/out:$dllDir/disassemble.txt", dll ) }
|
||||
dump*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
|
||||
// declare exported methods
|
||||
HWND getWindowHandle( JNIEnv* env, jobject window );
|
||||
|
||||
//---- JNI methods ------------------------------------------------------------
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
* @since 3.6
|
||||
*/
|
||||
|
||||
// see FlatWndProc.cpp
|
||||
HWND getWindowHandle( JNIEnv* env, jobject window );
|
||||
// declare external methods
|
||||
extern HWND getWindowHandle( JNIEnv* env, jobject window );
|
||||
|
||||
//---- class AutoReleasePtr ---------------------------------------------------
|
||||
|
||||
@@ -147,12 +147,12 @@ public:
|
||||
#define isOptionSet( option ) ((optionsSet & com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_ ## option) != 0)
|
||||
#define CHECK_HRESULT( code ) { if( (code) != S_OK ) return NULL; }
|
||||
|
||||
jobjectArray newJavaStringArray( JNIEnv* env, jsize count ) {
|
||||
static jobjectArray newJavaStringArray( JNIEnv* env, jsize count ) {
|
||||
jclass stringClass = env->FindClass( "java/lang/String" );
|
||||
return env->NewObjectArray( count, stringClass, NULL );
|
||||
}
|
||||
|
||||
jstring newJavaString( JNIEnv* env, LPWSTR str ) {
|
||||
static jstring newJavaString( JNIEnv* env, LPWSTR str ) {
|
||||
return env->NewString( reinterpret_cast<jchar*>( str ), static_cast<jsize>( wcslen( str ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
|
||||
// see FlatWndProc.cpp
|
||||
HWND getWindowHandle( JNIEnv* env, jobject window );
|
||||
// declare external methods
|
||||
extern HWND getWindowHandle( JNIEnv* env, jobject window );
|
||||
|
||||
//---- Utility ----------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user