/[classpath]/classpath/native/jni/qt-peer/mainqtthread.cpp
ViewVC logotype

Diff of /classpath/native/jni/qt-peer/mainqtthread.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.1 by gnu_andrew, Tue Aug 16 16:22:39 2005 UTC revision 1.2.2.2 by gnu_andrew, Sat Sep 10 15:32:03 2005 UTC
# Line 35  this exception to your version of the li Line 35  this exception to your version of the li
35  obligated to do so.  If you do not wish to do so, delete this  obligated to do so.  If you do not wish to do so, delete this
36  exception statement from your version. */  exception statement from your version. */
37    
38    #include <assert.h>
39  #include <jni.h>  #include <jni.h>
40  #include <QApplication>  #include <QApplication>
41  #include <QThread>  #include <QThread>
# Line 44  exception statement from your version. * Line 45  exception statement from your version. *
45  MainThreadInterface *mainThread;  MainThreadInterface *mainThread;
46  QApplication *qApplication;  QApplication *qApplication;
47    
48    #if defined(Q_WS_X11)
49    extern void qt_x11_set_global_double_buffer( bool );
50    #endif
51    
52  /**  /**
53   * Starts up a QApplication   * Starts up a QApplication
54   */   */
55  JNIEXPORT jlong JNICALL Java_gnu_java_awt_peer_qt_MainQtThread_init  JNIEXPORT jlong JNICALL Java_gnu_java_awt_peer_qt_MainQtThread_init
56  (JNIEnv *env, jobject obj, jstring theme)  (JNIEnv *env, jobject obj, jstring theme, jboolean doublebuffer)
57  {  {
58    int *argc;    int *argc;
59    char **argv;    char **argv;
# Line 87  JNIEXPORT jlong JNICALL Java_gnu_java_aw Line 92  JNIEXPORT jlong JNICALL Java_gnu_java_aw
92    jfieldID nofid = env->GetFieldID( cls, "mainThreadInterface", "J" );    jfieldID nofid = env->GetFieldID( cls, "mainThreadInterface", "J" );
93    env->SetLongField( obj, nofid, (jlong)mainThread );    env->SetLongField( obj, nofid, (jlong)mainThread );
94    
95    #if defined(Q_WS_X11)
96      // turn off double-buffering.
97      qt_x11_set_global_double_buffer( (doublebuffer == JNI_TRUE) );
98    #endif
99    
100    return (jlong)qtApp;    return (jlong)qtApp;
101  }  }
102    

Legend:
Removed from v.1.2.2.1  
changed lines
  Added in v.1.2.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26