void * keyserver(void *args) { static int ch, i = 0, c = 'a'; while(ch = ui_input()) { switch(ch) { case 'q': case 'Q': ui_print("preparing to quit ...\n"); stop = 1; break; case 0x60: ui_scroll(-5); break; case 0x61: ui_scroll(5); break; case ' ': ui_pausemsg(0); break; case 1: // Ctrl-A ui_pausemsg(1); break; case 3: // Ctrl-C ui_deinit(); io_deinit(); exit(1); break; default: // ui_print("key code: %d", ch); ; } } }
static void ui_scroll_update(struct advance_ui_context* context, adv_bitmap* dst, struct ui_color_set* color) { ui_scroll(context, dst, context->state.ui_scroll_begin, context->state.ui_scroll_end, context->state.ui_scroll_pos, color->ui_f, color->ui_b, color->ui_alpha, color->title_f, color->title_b, color->title_alpha, color->def); context->state.ui_scroll_flag = 0; }