diff options
author | Rüdiger Timm <rt@openoffice.org> | 2007-07-05 07:06:56 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2007-07-05 07:06:56 +0000 |
commit | 81ebc5c34982fe2e86dfd30b851ae96f52b97aad (patch) | |
tree | 39bc5ba6d4e1d294c4c44e9b0a8cb5b9d504c62f /sj2/source | |
parent | f84d70d7573d13b6191c8198f57338e2729cde04 (diff) |
INTEGRATION: CWS aquavcl01 (1.26.12); FILE MERGED
2007/04/11 07:51:18 pjanik 1.26.12.5: RESYNC: (1.27-1.28); FILE MERGED
2006/12/31 13:48:09 mox 1.26.12.4: Issue number: #i72385#
Apply a better guess at jave interface for quartz.
Mimicking the solution in canvas/source/java/aqua/WindowAdapter.java
2006/12/30 19:40:11 pjanik 1.26.12.3: #i72385#: Add Quartz/AQUA specific part.
2006/07/19 08:12:23 pjanik 1.26.12.2: RESYNC: (1.26-1.27); FILE MERGED
2006/01/31 01:00:22 fheckl 1.26.12.1: Allowing a full aqua build
Diffstat (limited to 'sj2/source')
-rw-r--r-- | sj2/source/jscpp/sjapplet_impl.cxx | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/sj2/source/jscpp/sjapplet_impl.cxx b/sj2/source/jscpp/sjapplet_impl.cxx index c0b0aec9d911..e1acc04853c8 100644 --- a/sj2/source/jscpp/sjapplet_impl.cxx +++ b/sj2/source/jscpp/sjapplet_impl.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sjapplet_impl.cxx,v $ * - * $Revision: 1.28 $ + * $Revision: 1.29 $ * - * last change: $Author: obo $ $Date: 2007-03-12 10:46:39 $ + * last change: $Author: rt $ $Date: 2007-07-05 08:06:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -58,7 +58,7 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "jvmaccess/classpath.hxx" -#ifdef UNX +#if defined(UNX) && !defined(QUARTZ) #define Time xlib_time #define Window xlib_window #define Font xlib_font @@ -116,7 +116,7 @@ static void throwException() throw(com::sun::star::uno::RuntimeException) #endif #ifdef SOLAR_JAVA -#ifdef UNX +#if defined (UNX) && !defined(QUARTZ) struct EmbeddedWindow { jobject _joWindow; @@ -189,7 +189,7 @@ EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) #endif } -#else +#else // UNX && !QUARTZ struct EmbeddedWindow { jobject _joWindow; @@ -211,6 +211,22 @@ pEnv->CallVoidMethod(joFrame, jmFrame_rinit, (jint)pEnvData->hWnd); testJava _joWindow = pEnv->NewGlobalRef(joFrame); } +#elif defined QUARTZ +EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) throw(com::sun::star::uno::RuntimeException) +{ + /* The WNT code (above) that this code derives from, may be using quite old + ways of interacting with native windows. More modern approaches seems to + point towards JAWT_* and com.apple.eawt */ + +jclass jcFrame = pEnv->FindClass("apple/awt/CEmbeddedFrame"); testJavaException(pEnv); +jmethodID jmFrame_rinit = pEnv->GetMethodID(jcFrame, "<init>", "(I)V"); testJavaException(pEnv); + +jobject joFrame = pEnv->AllocObject(jcFrame); testJavaException(pEnv); +pEnv->CallVoidMethod(joFrame, jmFrame_rinit, (jint)pEnvData->rWindow); testJavaException(pEnv); + +_joWindow = pEnv->NewGlobalRef(joFrame); +} + #else EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) throw(com::sun::star::uno::RuntimeException) @@ -225,7 +241,7 @@ _joWindow = pEnv->NewGlobalRef(joFrame); #endif -#endif +#endif // UNX && !QUARTZ void EmbeddedWindow::dispose(JNIEnv * pEnv) { |