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

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

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

revision 1.3 by smarothy, Tue Aug 16 23:22:09 2005 UTC revision 1.4 by smarothy, Sun Aug 21 00:19:49 2005 UTC
# Line 37  exception statement from your version. * Line 37  exception statement from your version. *
37    
38  #include <assert.h>  #include <assert.h>
39  #include <QApplication>  #include <QApplication>
40    #include <QIcon>
41  #include <QMainWindow>  #include <QMainWindow>
42  #include <QMenuBar>  #include <QMenuBar>
43    #include <QPixmap>
44  #include <QToolBar>  #include <QToolBar>
45  #include <QThread>  #include <QThread>
46  #include <gnu_java_awt_peer_qt_QtFramePeer.h>  #include <gnu_java_awt_peer_qt_QtFramePeer.h>
47  #include "qtcomponent.h"  #include "qtcomponent.h"
48  #include "qtstrings.h"  #include "qtstrings.h"
49    #include "qtimage.h"
50  #include "containers.h"  #include "containers.h"
51  #include "keybindings.h"  #include "keybindings.h"
52  #include "mainthreadinterface.h"  #include "mainthreadinterface.h"
# Line 160  JNIEXPORT void JNICALL Java_gnu_java_awt Line 163  JNIEXPORT void JNICALL Java_gnu_java_awt
163  }  }
164    
165  /**  /**
166     * Sets the icon image.
167     */
168    JNIEXPORT void JNICALL Java_gnu_java_awt_peer_qt_QtFramePeer_setIcon
169    (JNIEnv *env, jobject obj, jobject image)
170    {
171      QMainWindow *frame = (QMainWindow *) getNativeObject( env, obj );
172      assert( frame );
173    
174      QIcon *i;
175      if( image == NULL )
176        {
177          // remove icon
178          i = new QIcon();
179        }
180      else
181        {
182          // set icon
183          QImage *img = getQtImage( env, image );
184          assert( img );
185          i = new QIcon( QPixmap::fromImage( *img ) );
186        }
187      frame->setWindowIcon( *i );
188      delete i;
189    }
190    
191    /**
192   * Returns the menu bar height for insets.   * Returns the menu bar height for insets.
193   */   */
194  JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_qt_QtFramePeer_menuBarHeight  JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_qt_QtFramePeer_menuBarHeight
# Line 197  JNIEXPORT void JNICALL Java_gnu_java_awt Line 226  JNIEXPORT void JNICALL Java_gnu_java_awt
226    mainThread->postEventToMain( new FrameMenuEvent( frame, menubar ) );    mainThread->postEventToMain( new FrameMenuEvent( frame, menubar ) );
227  }  }
228    
229    /**
230     * Set the bounds of the maximized frame
231     */
232    JNIEXPORT void JNICALL Java_gnu_java_awt_peer_qt_QtFramePeer_setMaximizedBounds (JNIEnv *env, jobject obj, jint w, jint h)
233    {
234      QMainWindow *frame = (QMainWindow *) getNativeObject( env, obj );
235      assert( frame );
236      // FIXME
237    }
238    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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