void open_zoomer() { if (!bm_touchzoom) bm_touchzoom = GetResource("touchzoom", (ibitmap*) &touchzoom); th = header_font->height + 4; dw = bm_touchzoom->width + 80; dh = th + bm_touchzoom->height + menu_n_font->height + 40; dx = (ScreenWidth() - dw) / 2; dy = (ScreenHeight() - dh) / 2; isaves = BitmapFromScreen(dx, dy, dw + 4, dh + 4); DimArea(dx + 4, dy + 4, dw, dh, BLACK); new_scale = scale; new_rscale = rscale; new_reflow = reflow_mode; prevhandler = iv_seteventhandler(newzoomer_handler); if (ivstate.needupdate) { draw_new_zoomer(0); SoftUpdate(); } else { draw_new_zoomer(1); } }
int qPBReaderDictionaryDialog::OriginalProcHandler(int type, int par1, int par2) { TRSCOPE(dic, "qPBReaderDictionaryDialog::OriginalProcHandler"); int rc = 0; #ifdef Q_OS_POCKETBOOK assert(_pOrgProc != 0); TRACE << type << " " << ENC(iv_evttype(type)) << " " << par1 << " " << par2 << endl; TRACE << "thread id=" << (int)syscall(SYS_gettid) << endl; switch (type) { case EVT_OPENDIC: TRACE << "Dictionary opening" << endl; OpenDictionaryView(pWord, 0); rc = 1; break; case EVT_SHOW : TRACE << "Dictionary is closing" << endl; qPBReaderDictionaryDialog::Instance().Close(); rc = 1; break; case EVT_HIDE: TRACE << "Flagging dico as opened" << endl; Instance()._bOpened = true; TRACE << "Original loop has become a secondary loop." << endl; _pDicInternalProc = ivstate.hproc; ivstate.hproc = InternalDicProcHandler; TRACE << "Hooked internal dic proc with InternalDicProcHandler" << endl; SoftUpdate(); rc = 1; break; case EVT_PREVPAGE: case EVT_NEXTPAGE: case EVT_KEYPRESS: case EVT_KEYUP: case EVT_KEYREPEAT: TRACE << "Blocking keyboard" << endl; rc = 1; break; } if (!rc) { rc = _pOrgProc(type, par1, par2); TRACE << "_pOrgProc rc=" << rc << endl; } #else Q_UNUSED(type); Q_UNUSED(par1); Q_UNUSED(par2); #endif return rc; }