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

Diff of /classpath/native/jni/qt-peer/qtwindowpeer.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:04 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 <QWidget>  #include <QWidget>
40  #include <qstyle.h>  #include <qstyle.h>
41  #include <gnu_java_awt_peer_qt_QtWindowPeer.h>  #include <gnu_java_awt_peer_qt_QtWindowPeer.h>
42  #include "qtcomponent.h"  #include "qtcomponent.h"
43    #include "keybindings.h"
44  #include "qtstrings.h"  #include "qtstrings.h"
45  #include "containers.h"  #include "containers.h"
46  #include "mainthreadinterface.h"  #include "mainthreadinterface.h"
47    
48    /*
49     * Our QMainWindow subclass
50     */
51    class MyWindow : public QWidget
52    {
53    public:
54      MyWindow(JNIEnv *env, jobject obj) : QWidget(0, (Qt::Window | Qt::FramelessWindowHint))
55      {
56        setup(env, obj);
57      }
58    
59      ~MyWindow()
60      {
61        destroy();
62      }
63    
64    #define I_KNOW_WHAT_IM_DOING
65    #define PARENT QWidget
66    #include "eventmethods.h"
67    };
68    
69    
70  class RaiseLower : public AWTEvent {  class RaiseLower : public AWTEvent {
71        
72   private:   private:
# Line 91  class FrameTitleEvent : public AWTEvent Line 115  class FrameTitleEvent : public AWTEvent
115  JNIEXPORT void JNICALL Java_gnu_java_awt_peer_qt_QtWindowPeer_init  JNIEXPORT void JNICALL Java_gnu_java_awt_peer_qt_QtWindowPeer_init
116  (JNIEnv *env, jobject obj)  (JNIEnv *env, jobject obj)
117  {  {
118    QWidget *window = new QWidget(0, (Qt::Window | Qt::FramelessWindowHint) );    QWidget *window = new MyWindow(env, obj);
119    assert( window );    assert( window );
120    //  Qt::WStyle_StaysOnTop    //  Qt::WStyle_StaysOnTop
121    setNativeObject( env, obj, window );    setNativeObject( env, obj, window );
122  }  }
123    
124  /*  /*
  * Destructor  
  */  
 JNIEXPORT void JNICALL Java_gnu_java_awt_peer_qt_QtWindowPeer_destroy  
 (JNIEnv *env, jobject obj)  
 {  
   QWidget *window = (QWidget *) getNativeObject( env, obj );  
   assert( window );  
   
   setNativeObject(env, obj, NULL);  
   delete window;  
 }  
   
 /*  
125   * Lower the window.   * Lower the window.
126   */   */
127  JNIEXPORT void JNICALL Java_gnu_java_awt_peer_qt_QtWindowPeer_toBack  JNIEXPORT void JNICALL Java_gnu_java_awt_peer_qt_QtWindowPeer_toBack

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