void ChameleonMScreen::slotTimeout() { jlong ms; if (vm_stopped) { return; } /* check and align stack suspend/resume state */ midp_checkAndResume(); ms = vm_suspended ? SR_RESUME_CHECK_TIMEOUT : JVM_TimeSlice(); /* Let the VM run for some time */ if (ms <= -2) { /* * JVM_Stop was called. Avoid call JVM_TimeSlice again until * startVM is called. */ vm_stopped = true; qteapp_get_application()->exit_loop(); } else if (ms == -1) { /* * Wait forever -- we probably have a thread blocked on IO or GUI. * No need to set up timer from here */ } else { if (ms > 0x7fffffff) { vm_slicer.start(0x7fffffff, TRUE); } else { vm_slicer.start((int)(ms & 0x7fffffff), TRUE); } } }
int QPopupMenuExt::insertItemTrunc( const QString & text0, int id) { QString text(text0); truncateQString(text, font(), qteapp_get_application()->mainWidget()->width()-16);/*magic number*/ return insertItem(text,id); }
void ImageBody::drawButton(QPainter *painter) { if (appearance == HYPERLINK) { drawButtonLabel(painter); // by default focus is drawn on top of the button; // hilight might not be visible if image background is black. // To make sure that hilight is visible we do not call // QPushButton::drawButton() and draw hilight outside of the image if (qteapp_get_application()->focusWidget() == this) { // draw focus painter->drawWinFocusRect(2, 2, width() - 4, height() - 4); } } else { QPushButton::drawButton(painter); } }
void midp_slavemode_event_loop(void) { qteapp_get_mscreen()->startVM(); qteapp_get_application()->enter_loop(); qteapp_get_mscreen()->stopVM(); }