2524 MSwtSortedList* sortedList = reinterpret_cast<MSwtSortedList*>(aHandle); |
2524 MSwtSortedList* sortedList = reinterpret_cast<MSwtSortedList*>(aHandle); |
2525 CallMethod(sortedList, &MSwtSortedList::ShowSelection); |
2525 CallMethod(sortedList, &MSwtSortedList::ShowSelection); |
2526 } |
2526 } |
2527 |
2527 |
2528 |
2528 |
2529 /* |
2529 /** |
2530 * Class TaskTip |
2530 * Class TaskTip |
2531 */ |
2531 */ |
2532 JNIEXPORT jint JNICALL Java_org_eclipse_ercp_swt_mobile_internal_OS_TaskTip_1New( |
2532 JNIEXPORT jobject JNICALL Java_org_eclipse_ercp_swt_mobile_internal_OS_TaskTip_1DefaultBounds( |
2533 JNIEnv *aJniEnv, |
2533 JNIEnv* aJniEnv, jclass) |
2534 jclass, |
2534 { |
2535 jobject aPeer, |
2535 MSwtDisplay& display = CSwtDisplay::Current(); |
2536 jint aStyle) |
2536 TRect res(TRect::EUninitialized); |
2537 { |
2537 CallMethod(res, &display.UiUtils(), &MSwtUiUtils::TaskTipRect); |
2538 jweak peerRef = aJniEnv->NewWeakGlobalRef(aPeer); |
2538 return NewJavaRectangle(aJniEnv, res); |
2539 if (peerRef == NULL) |
|
2540 { |
|
2541 return NULL; |
|
2542 } |
|
2543 |
|
2544 CSwtDisplay& display = CSwtDisplay::Current(); |
|
2545 const MSwtFactory* factory = &display.Factory(); |
|
2546 MSwtTaskTip* result = NULL; |
|
2547 TRAPD(error, CallMethodL(result, factory, &MSwtFactory::NewTaskTipL, display, peerRef, aStyle)); |
|
2548 if (error) |
|
2549 { |
|
2550 aJniEnv->DeleteWeakGlobalRef(peerRef); |
|
2551 Throw(error, aJniEnv); |
|
2552 } |
|
2553 INCREASE_INSTANCE_COUNT(result, TaskTip); |
|
2554 |
|
2555 return reinterpret_cast<jint>(result); |
|
2556 } |
|
2557 |
|
2558 JNIEXPORT void JNICALL Java_org_eclipse_ercp_swt_mobile_internal_OS_TaskTip_1Dispose( |
|
2559 JNIEnv* aJniEnv, |
|
2560 jclass, |
|
2561 jint aHandle) |
|
2562 { |
|
2563 MSwtTaskTip* tasktip = reinterpret_cast<MSwtTaskTip*>(aHandle); |
|
2564 TSwtPeer peerRef; |
|
2565 CallMethod(peerRef, tasktip, &MSwtTaskTip::Dispose); |
|
2566 ReleasePeer(aJniEnv, peerRef); |
|
2567 DECREASE_INSTANCE_COUNT(TaskTip); |
|
2568 } |
|
2569 |
|
2570 JNIEXPORT jobject JNICALL Java_org_eclipse_ercp_swt_mobile_internal_OS_TaskTip_1GetBarDefaultBounds( |
|
2571 JNIEnv* aJniEnv, |
|
2572 jclass, |
|
2573 jint aHandle, |
|
2574 jboolean aHasText) |
|
2575 { |
|
2576 MSwtTaskTip* tasktip = reinterpret_cast<MSwtTaskTip*>(aHandle); |
|
2577 TRect bounds(TRect::EUninitialized); |
|
2578 CallMethod(bounds, tasktip, &MSwtTaskTip::GetBarDefaultBounds, aHasText); |
|
2579 return NewJavaRectangle(aJniEnv, bounds); |
|
2580 } |
|
2581 |
|
2582 JNIEXPORT jobject JNICALL Java_org_eclipse_ercp_swt_mobile_internal_OS_TaskTip_1GetLabelDefaultBounds( |
|
2583 JNIEnv* aJniEnv, |
|
2584 jclass, |
|
2585 jint aHandle, |
|
2586 jboolean aHasText) |
|
2587 { |
|
2588 MSwtTaskTip* tasktip = reinterpret_cast<MSwtTaskTip*>(aHandle); |
|
2589 TRect bounds(TRect::EUninitialized); |
|
2590 CallMethod(bounds, tasktip, &MSwtTaskTip::GetLabelDefaultBounds, aHasText); |
|
2591 return NewJavaRectangle(aJniEnv, bounds); |
|
2592 } |
|
2593 |
|
2594 JNIEXPORT jobject JNICALL Java_org_eclipse_ercp_swt_mobile_internal_OS_TaskTip_1GetShellDefaultBounds( |
|
2595 JNIEnv* aJniEnv, |
|
2596 jclass, |
|
2597 jint aHandle, |
|
2598 jboolean aHasText) |
|
2599 { |
|
2600 MSwtTaskTip* tasktip = reinterpret_cast<MSwtTaskTip*>(aHandle); |
|
2601 TRect bounds(TRect::EUninitialized); |
|
2602 CallMethod(bounds, tasktip, &MSwtTaskTip::GetShellDefaultBounds, aHasText); |
|
2603 return NewJavaRectangle(aJniEnv, bounds); |
|
2604 } |
2539 } |
2605 |
2540 |
2606 |
2541 |
2607 /* |
2542 /* |
2608 * Class TextExtension |
2543 * Class TextExtension |