javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/os.cpp
changeset 57 59b3b4473dc8
parent 50 023eef975703
child 64 0ea12c182930
equal deleted inserted replaced
56:abc41079b313 57:59b3b4473dc8
    84 #include <xqcallinfo.h>
    84 #include <xqcallinfo.h>
    85 #include <cntservicescontact.h>
    85 #include <cntservicescontact.h>
    86 #include <qnetworkconfigmanager.h>
    86 #include <qnetworkconfigmanager.h>
    87 #include <qnetworkconfiguration.h>
    87 #include <qnetworkconfiguration.h>
    88 #include <hbinputsettingproxy.h>
    88 #include <hbinputsettingproxy.h>
       
    89 #include <hbicon.h>
    89 #endif
    90 #endif
    90 
    91 
    91 #include <org_eclipse_swt_internal_qt_OS.h>
    92 #include <org_eclipse_swt_internal_qt_OS.h>
    92 #include "eventcallback.h"
    93 #include "eventcallback.h"
    93 #include "slotcallback.h"
    94 #include "slotcallback.h"
  6341         }
  6342         }
  6342     SWT_CATCH
  6343     SWT_CATCH
  6343     return reinterpret_cast< jint >(pixmap);
  6344     return reinterpret_cast< jint >(pixmap);
  6344     }
  6345     }
  6345 
  6346 
  6346 
  6347 //
       
  6348 // HbIcon
       
  6349 //
       
  6350 
       
  6351 JNIEXPORT jint JNICALL OS_NATIVE ( HbIcon_1new )
       
  6352     (JNIEnv* aJniEnv , jclass, jstring aName)
       
  6353     {
       
  6354 #ifdef __SYMBIAN32__
       
  6355     HbIcon* icon = NULL;
       
  6356     SWT_TRY
       
  6357         {
       
  6358         SWT_LOG_JNI_CALL();
       
  6359         icon = new HbIcon(swtApp->jniUtils().JavaStringToQString(aJniEnv, aName));
       
  6360         }
       
  6361     SWT_CATCH
       
  6362     return reinterpret_cast< jint >( static_cast< HbIcon* >( icon ) );
       
  6363 #else
       
  6364     return 0;
       
  6365 #endif
       
  6366     }
       
  6367 
       
  6368 JNIEXPORT jint JNICALL OS_NATIVE( HbIcon_1pixmap )
       
  6369     (JNIEnv* aJniEnv , jclass, jint aHandle)
       
  6370     {
       
  6371 #ifdef __SYMBIAN32__
       
  6372     QPixmap* pixmap = NULL;
       
  6373     SWT_TRY
       
  6374         {
       
  6375         SWT_LOG_JNI_CALL();
       
  6376         HbIcon* icon = reinterpret_cast< HbIcon* >( aHandle );
       
  6377         pixmap = new QPixmap(icon->pixmap());
       
  6378         }
       
  6379     SWT_CATCH
       
  6380     return reinterpret_cast< jint >(pixmap);
       
  6381 #else
       
  6382     return 0;
       
  6383 #endif
       
  6384     }
       
  6385 
       
  6386 JNIEXPORT void JNICALL OS_NATIVE( HbIcon_1delete )
       
  6387     (JNIEnv* aJniEnv , jclass, jint aHandle)
       
  6388     {
       
  6389 #ifdef __SYMBIAN32__
       
  6390     SWT_TRY
       
  6391         {
       
  6392         SWT_LOG_JNI_CALL();
       
  6393         SWT_LOG_DATA_1("handle=%x", aHandle);
       
  6394         HbIcon* icon = reinterpret_cast< HbIcon* >( aHandle );
       
  6395         delete icon;
       
  6396         icon = NULL;
       
  6397         }
       
  6398     SWT_CATCH
       
  6399 #endif
       
  6400     }
  6347 
  6401 
  6348 //
  6402 //
  6349 // QSlider
  6403 // QSlider
  6350 //
  6404 //
  6351 
  6405