Lines Matching +full:display +full:- +full:height +full:- +full:chars
1 /*-
152 for (p.tp_row = r->tr_begin.tp_row; in term_image_display()
153 p.tp_row < r->tr_end.tp_row; p.tp_row++) { in term_image_display()
154 for (p.tp_col = r->tr_begin.tp_col; in term_image_display()
155 p.tp_col < r->tr_end.tp_col; p.tp_col++) { in term_image_display()
156 idx = p.tp_col + p.tp_row * state->tg_tp.tp_col; in term_image_display()
157 if (idx >= state->tg_tp.tp_col * state->tg_tp.tp_row) in term_image_display()
181 row = p->tp_row; in efi_text_cursor()
182 if (p->tp_row >= state->tg_tp.tp_row) in efi_text_cursor()
183 row = state->tg_tp.tp_row - 1; in efi_text_cursor()
185 col = p->tp_col; in efi_text_cursor()
186 if (p->tp_col >= state->tg_tp.tp_col) in efi_text_cursor()
187 col = state->tg_tp.tp_col - 1; in efi_text_cursor()
189 conout->SetCursorPosition(conout, col, row); in efi_text_cursor()
199 px = screen_buffer + p->tp_col + p->tp_row * state->tg_tp.tp_col; in efi_text_printchar()
200 a = conout->Mode->Attribute; in efi_text_printchar()
202 fg = teken_256to16(px->a.ta_fgcolor); in efi_text_printchar()
203 bg = teken_256to16(px->a.ta_bgcolor); in efi_text_printchar()
204 if (px->a.ta_format & TF_BOLD) in efi_text_printchar()
206 if (px->a.ta_format & TF_BLINK) in efi_text_printchar()
209 if (px->a.ta_format & TF_REVERSE) { in efi_text_printchar()
218 conout->SetCursorPosition(conout, p->tp_col, p->tp_row); in efi_text_printchar()
222 p->tp_row == state->tg_tp.tp_row - 1 && in efi_text_printchar()
223 p->tp_col == state->tg_tp.tp_col - 1) in efi_text_printchar()
226 (void) conout->SetAttribute(conout, attr); in efi_text_printchar()
227 efi_cons_efiputchar(px->c); in efi_text_printchar()
228 (void) conout->SetAttribute(conout, a); in efi_text_printchar()
242 idx = p->tp_col + p->tp_row * state->tg_tp.tp_col; in efi_text_putchar()
243 if (idx >= state->tg_tp.tp_col * state->tg_tp.tp_row) in efi_text_putchar()
262 if (state->tg_cursor_visible) in efi_text_fill()
263 conout->EnableCursor(conout, FALSE); in efi_text_fill()
264 for (p.tp_row = r->tr_begin.tp_row; p.tp_row < r->tr_end.tp_row; in efi_text_fill()
266 for (p.tp_col = r->tr_begin.tp_col; in efi_text_fill()
267 p.tp_col < r->tr_end.tp_col; p.tp_col++) in efi_text_fill()
269 if (state->tg_cursor_visible) in efi_text_fill()
270 conout->EnableCursor(conout, TRUE); in efi_text_fill()
281 soffset = s->tp_col + s->tp_row * state->tg_tp.tp_col; in efi_text_copy_line()
282 doffset = d->tp_col + d->tp_row * state->tg_tp.tp_col; in efi_text_copy_line()
287 sp.tp_col = s->tp_col + x; in efi_text_copy_line()
288 dp.tp_col = d->tp_col + x; in efi_text_copy_line()
297 if (dp.tp_col + 1 == state->tg_tp.tp_col && in efi_text_copy_line()
298 dp.tp_row + 1 == state->tg_tp.tp_row) { in efi_text_copy_line()
311 int nrow, ncol, x, y; /* Has to be signed - >= 0 comparison */ in efi_text_copy()
322 nrow = r->tr_end.tp_row - r->tr_begin.tp_row; in efi_text_copy()
323 ncol = r->tr_end.tp_col - r->tr_begin.tp_col; in efi_text_copy()
328 if (p->tp_row == 0 && p->tp_col == 0 && in efi_text_copy()
329 nrow == state->tg_tp.tp_row - 2 && ncol == state->tg_tp.tp_col - 2) in efi_text_copy()
332 soffset = r->tr_begin.tp_col + r->tr_begin.tp_row * state->tg_tp.tp_col; in efi_text_copy()
333 doffset = p->tp_col + p->tp_row * state->tg_tp.tp_col; in efi_text_copy()
336 if (state->tg_cursor_visible) in efi_text_copy()
337 conout->EnableCursor(conout, FALSE); in efi_text_copy()
343 s = r->tr_begin; in efi_text_copy()
346 s.tp_row = r->tr_begin.tp_row + y; in efi_text_copy()
347 d.tp_row = p->tp_row + y; in efi_text_copy()
352 for (y = nrow - 1; y >= 0; y--) { in efi_text_copy()
353 s.tp_row = r->tr_begin.tp_row + y; in efi_text_copy()
354 d.tp_row = p->tp_row + y; in efi_text_copy()
360 /* display the cursor */ in efi_text_copy()
361 if (state->tg_cursor_visible) in efi_text_copy()
362 conout->EnableCursor(conout, TRUE); in efi_text_copy()
385 conout->EnableCursor(conout, TRUE); in efi_text_param()
386 state->tg_cursor_visible = true; in efi_text_param()
388 conout->EnableCursor(conout, FALSE); in efi_text_param()
389 state->tg_cursor_visible = false; in efi_text_param()
415 conout = ST->ConOut; in efi_cons_probe()
416 conin = ST->ConIn; in efi_cons_probe()
421 status = conout->SetMode(conout, conout->Mode->Mode); in efi_cons_probe()
424 status = BS->OpenProtocol(ST->ConsoleInHandle, in efi_cons_probe()
431 cp->c_flags |= C_PRESENTIN | C_PRESENTOUT; in efi_cons_probe()
503 "number from range [0-15].\n"); in efi_set_colors()
512 if (strcmp(ev->ev_name, "teken.fg_color") == 0) { in efi_set_colors()
514 if (ap->ta_fgcolor == val) in efi_set_colors()
518 if (strcmp(ev->ev_name, "teken.bg_color") == 0) { in efi_set_colors()
520 if (ap->ta_bgcolor == val) in efi_set_colors()
531 env_setenv(ev->ev_name, flags | EV_NOHOOK, evalue, NULL, NULL); in efi_set_colors()
541 *x = conout->Mode->CursorColumn; in get_pos()
542 *y = conout->Mode->CursorRow; in get_pos()
545 /* Move cursor to x rows and y cols (0-based). */
549 conout->SetCursorPosition(conout, x, y); in curs_move()
551 *_x = conout->Mode->CursorColumn; in curs_move()
553 *_y = conout->Mode->CursorRow; in curs_move()
561 argc = -1; in end_term()
570 conout->QueryMode(conout, conout->Mode->Mode, &x, &y); in efi_cons_rawputchar()
575 n = 8 - ((conout->Mode->CursorColumn + 8) % 8); in efi_cons_rawputchar()
594 cury--; in efi_cons_rawputchar()
600 curx--; in efi_cons_rawputchar()
606 if (curx > x-1) { in efi_cons_rawputchar()
610 if (cury > y-1) { in efi_cons_rawputchar()
612 cury--; in efi_cons_rawputchar()
617 conout->EnableCursor(conout, TRUE); in efi_cons_rawputchar()
621 /* Gracefully exit ESC-sequence processing in case of misunderstanding. */
643 /* Clear display from current position to end of screen. */
652 conout->ClearScreen(conout); in CD()
657 conout->QueryMode(conout, conout->Mode->Mode, &x, &y); in CD()
659 for (i = cury + 1; i < y-1; i++) { in CD()
669 * (the coordinates are 1-based).
675 args[0]--; in CM()
677 args[1]--; in CM()
699 conout->QueryMode(conout, conout->Mode->Mode, &x, &y); in CL()
702 len = x - curx + 1; in CL()
714 if (cury == y - 1) in CL()
715 len--; in CL()
724 line[len-1] = 0; in CL()
729 conout->OutputString(conout, line); in CL()
742 args[argc] += c - '0'; in get_arg()
775 argc = -1; in efi_term_emu()
838 fg_c = ansi_col[args[i] - 30]; in efi_term_emu()
845 bg_c = ansi_col[args[i] - 40]; in efi_term_emu()
852 conout->SetAttribute(conout, EFI_TEXT_ATTR(fg_c, bg_c)); in efi_term_emu()
884 teken_color_t fg = a->ta_fgcolor; in cons_draw_frame()
892 gfx_state.tg_fb.fb_height - gfx_state.tg_origin.tp_row - 1, in cons_draw_frame()
896 gfx_state.tg_fb.fb_height - gfx_state.tg_origin.tp_row - 1, 1); in cons_draw_frame()
898 gfx_state.tg_fb.fb_width - gfx_state.tg_origin.tp_col - 1, in cons_draw_frame()
926 roff = ffs(gfx_state.tg_fb.fb_mask_red) - 1; in cons_update_mode()
927 goff = ffs(gfx_state.tg_fb.fb_mask_green) - 1; in cons_update_mode()
928 boff = ffs(gfx_state.tg_fb.fb_mask_blue) - 1; in cons_update_mode()
942 status = conout->QueryMode(conout, conout->Mode->Mode, &cols, &rows); in cons_update_mode()
949 * When we have serial port listed in ConOut, use pre-teken emulator, in cons_update_mode()
955 * pre-teken emulator is light enough to be used on serial console. in cons_update_mode()
963 conout->EnableCursor(conout, FALSE); in cons_update_mode()
970 unsetenv("screen.height"); in cons_update_mode()
982 * We either can get too small console font - requested in cons_update_mode()
983 * terminal size is large, display resolution is in cons_update_mode()
985 * Or, we can get too large font - requested in cons_update_mode()
989 * display density and this should give us mostly in cons_update_mode()
991 * display devices will give us display density. in cons_update_mode()
992 * Still, we do hope, external monitors do - this is in cons_update_mode()
993 * where the display size will matter the most. in cons_update_mode()
1003 gfx_state.tg_origin.tp_row = (fb_height - in cons_update_mode()
1005 gfx_state.tg_origin.tp_col = (fb_width - in cons_update_mode()
1018 env_setenv("screen.height", EV_VOLATILE | EV_NOHOOK, in cons_update_mode()
1049 conout->EnableCursor(conout, TRUE); in cons_update_mode()
1051 conout->SetAttribute(conout, EFI_TEXT_ATTR(DEFAULT_FGCOLOR, in cons_update_mode()
1068 * Erase display, this will also fill our screen in cons_update_mode()
1072 gfx_state.tg_functions->tf_param(&gfx_state, in cons_update_mode()
1111 c = (utf8_partial >> (24 - (i << 3))) & 0xff; in input_partial()
1123 /* One-byte sequence. */ in input_byte()
1129 /* Two-byte sequence. */ in input_byte()
1136 /* Three-byte sequence. */ in input_byte()
1143 /* Four-byte sequence. */ in input_byte()
1155 utf8_left--; in input_byte()
1164 if (b != 0) { /* Four-byte sequence */ in input_byte()
1173 v = b & 0x0f; /* Three-byte sequence */ in input_byte()
1179 v = b & 0x1f; /* Two-byte sequence */ in input_byte()
1189 /* Anything left is illegal in UTF-8 sequence. */ in input_byte()
1247 switch (key->ScanCode) { in keybuf_inschar()
1275 keybuf[0] = key->UnicodeChar; in keybuf_inschar()
1286 status = conin->ReadKeyStroke(conin, &key); in efi_readkey()
1302 status = coninex->ReadKeyStrokeEx(coninex, &key_data); in efi_readkey_ex()
1309 * quick mapping to control chars, replace with in efi_readkey_ex()
1314 if (kp->UnicodeChar >= 'a' && in efi_readkey_ex()
1315 kp->UnicodeChar <= 'z') { in efi_readkey_ex()
1316 kp->UnicodeChar -= 'a'; in efi_readkey_ex()
1317 kp->UnicodeChar++; in efi_readkey_ex()
1325 if (kp->ScanCode == 0 && kp->UnicodeChar == 0) in efi_readkey_ex()
1342 return (-1); in efi_cons_getchar()
1354 return (-1); in efi_cons_getchar()
1369 * Some EFI implementation (u-boot for example) do not support in efi_cons_poll()
1374 if (coninex->WaitForKeyEx == NULL) { in efi_cons_poll()
1377 status = BS->CheckEvent(coninex->WaitForKeyEx); in efi_cons_poll()
1381 if (conin->WaitForKey == NULL) { in efi_cons_poll()
1384 status = BS->CheckEvent(conin->WaitForKey); in efi_cons_poll()
1402 status = conout->TestString(conout, buf); in efi_cons_efiputchar()
1405 conout->OutputString(conout, buf); in efi_cons_efiputchar()