Lines Matching +full:display +full:- +full:rows

1 /*-
152 for (p.tp_row = r->tr_begin.tp_row;
153 p.tp_row < r->tr_end.tp_row; p.tp_row++) {
154 for (p.tp_col = r->tr_begin.tp_col;
155 p.tp_col < r->tr_end.tp_col; p.tp_col++) {
156 idx = p.tp_col + p.tp_row * state->tg_tp.tp_col;
157 if (idx >= state->tg_tp.tp_col * state->tg_tp.tp_row)
181 row = p->tp_row;
182 if (p->tp_row >= state->tg_tp.tp_row)
183 row = state->tg_tp.tp_row - 1;
185 col = p->tp_col;
186 if (p->tp_col >= state->tg_tp.tp_col)
187 col = state->tg_tp.tp_col - 1;
189 conout->SetCursorPosition(conout, col, row);
199 px = screen_buffer + p->tp_col + p->tp_row * state->tg_tp.tp_col;
200 a = conout->Mode->Attribute;
202 fg = teken_256to16(px->a.ta_fgcolor);
203 bg = teken_256to16(px->a.ta_bgcolor);
204 if (px->a.ta_format & TF_BOLD)
206 if (px->a.ta_format & TF_BLINK)
209 if (px->a.ta_format & TF_REVERSE) {
218 conout->SetCursorPosition(conout, p->tp_col, p->tp_row);
222 p->tp_row == state->tg_tp.tp_row - 1 &&
223 p->tp_col == state->tg_tp.tp_col - 1)
226 (void) conout->SetAttribute(conout, attr);
227 efi_cons_efiputchar(px->c);
228 (void) conout->SetAttribute(conout, a);
242 idx = p->tp_col + p->tp_row * state->tg_tp.tp_col;
243 if (idx >= state->tg_tp.tp_col * state->tg_tp.tp_row)
262 if (state->tg_cursor_visible)
263 conout->EnableCursor(conout, FALSE);
264 for (p.tp_row = r->tr_begin.tp_row; p.tp_row < r->tr_end.tp_row;
266 for (p.tp_col = r->tr_begin.tp_col;
267 p.tp_col < r->tr_end.tp_col; p.tp_col++)
269 if (state->tg_cursor_visible)
270 conout->EnableCursor(conout, TRUE);
281 soffset = s->tp_col + s->tp_row * state->tg_tp.tp_col;
282 doffset = d->tp_col + d->tp_row * state->tg_tp.tp_col;
287 sp.tp_col = s->tp_col + x;
288 dp.tp_col = d->tp_col + x;
297 if (dp.tp_col + 1 == state->tg_tp.tp_col &&
298 dp.tp_row + 1 == state->tg_tp.tp_row) {
311 int nrow, ncol, x, y; /* Has to be signed - >= 0 comparison */
322 nrow = r->tr_end.tp_row - r->tr_begin.tp_row;
323 ncol = r->tr_end.tp_col - r->tr_begin.tp_col;
328 if (p->tp_row == 0 && p->tp_col == 0 &&
329 nrow == state->tg_tp.tp_row - 2 && ncol == state->tg_tp.tp_col - 2)
332 soffset = r->tr_begin.tp_col + r->tr_begin.tp_row * state->tg_tp.tp_col;
333 doffset = p->tp_col + p->tp_row * state->tg_tp.tp_col;
336 if (state->tg_cursor_visible)
337 conout->EnableCursor(conout, FALSE);
343 s = r->tr_begin;
346 s.tp_row = r->tr_begin.tp_row + y;
347 d.tp_row = p->tp_row + y;
352 for (y = nrow - 1; y >= 0; y--) {
353 s.tp_row = r->tr_begin.tp_row + y;
354 d.tp_row = p->tp_row + y;
360 /* display the cursor */
361 if (state->tg_cursor_visible)
362 conout->EnableCursor(conout, TRUE);
385 conout->EnableCursor(conout, TRUE);
386 state->tg_cursor_visible = true;
388 conout->EnableCursor(conout, FALSE);
389 state->tg_cursor_visible = false;
415 conout = ST->ConOut;
416 conin = ST->ConIn;
421 status = conout->SetMode(conout, conout->Mode->Mode);
424 status = BS->OpenProtocol(ST->ConsoleInHandle,
431 cp->c_flags |= C_PRESENTIN | C_PRESENTOUT;
503 "number from range [0-15].\n");
512 if (strcmp(ev->ev_name, "teken.fg_color") == 0) {
514 if (ap->ta_fgcolor == val)
518 if (strcmp(ev->ev_name, "teken.bg_color") == 0) {
520 if (ap->ta_bgcolor == val)
531 env_setenv(ev->ev_name, flags | EV_NOHOOK, evalue, NULL, NULL);
541 *x = conout->Mode->CursorColumn;
542 *y = conout->Mode->CursorRow;
545 /* Move cursor to x rows and y cols (0-based). */
549 conout->SetCursorPosition(conout, x, y);
551 *_x = conout->Mode->CursorColumn;
553 *_y = conout->Mode->CursorRow;
561 argc = -1;
570 conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
575 n = 8 - ((conout->Mode->CursorColumn + 8) % 8);
594 cury--;
600 curx--;
606 if (curx > x-1) {
610 if (cury > y-1) {
612 cury--;
617 conout->EnableCursor(conout, TRUE);
621 /* Gracefully exit ESC-sequence processing in case of misunderstanding. */
643 /* Clear display from current position to end of screen. */
652 conout->ClearScreen(conout);
657 conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
659 for (i = cury + 1; i < y-1; i++) {
668 * Absolute cursor move to args[0] rows and args[1] columns
669 * (the coordinates are 1-based).
675 args[0]--;
677 args[1]--;
699 conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
702 len = x - curx + 1;
714 if (cury == y - 1)
715 len--;
724 line[len-1] = 0;
729 conout->OutputString(conout, line);
742 args[argc] += c - '0';
775 argc = -1;
838 fg_c = ansi_col[args[i] - 30];
845 bg_c = ansi_col[args[i] - 40];
852 conout->SetAttribute(conout, EFI_TEXT_ATTR(fg_c, bg_c));
884 teken_color_t fg = a->ta_fgcolor;
892 gfx_state.tg_fb.fb_height - gfx_state.tg_origin.tp_row - 1,
896 gfx_state.tg_fb.fb_height - gfx_state.tg_origin.tp_row - 1, 1);
898 gfx_state.tg_fb.fb_width - gfx_state.tg_origin.tp_col - 1,
909 UINTN cols, rows;
926 roff = ffs(gfx_state.tg_fb.fb_mask_red) - 1;
927 goff = ffs(gfx_state.tg_fb.fb_mask_green) - 1;
928 boff = ffs(gfx_state.tg_fb.fb_mask_blue) - 1;
942 status = conout->QueryMode(conout, conout->Mode->Mode, &cols, &rows);
943 if (EFI_ERROR(status) || cols * rows == 0) {
945 rows = TEXT_ROWS;
949 * When we have serial port listed in ConOut, use pre-teken emulator,
955 * pre-teken emulator is light enough to be used on serial console.
963 conout->EnableCursor(conout, FALSE);
982 * We either can get too small console font - requested
983 * terminal size is large, display resolution is
985 * Or, we can get too large font - requested
989 * display density and this should give us mostly
991 * display devices will give us display density.
992 * Still, we do hope, external monitors do - this is
993 * where the display size will matter the most.
1000 rows = gfx_state.tg_tp.tp_row;
1003 gfx_state.tg_origin.tp_row = (fb_height -
1004 (rows * gfx_state.tg_font.vf_height)) / 2;
1005 gfx_state.tg_origin.tp_col = (fb_width -
1030 gfx_state.tg_tp.tp_row = rows;
1037 screen_buffer = malloc(rows * cols * sizeof(*screen_buffer));
1070 conout->EnableCursor(conout, TRUE);
1072 conout->SetAttribute(conout, EFI_TEXT_ATTR(DEFAULT_FGCOLOR,
1089 * Erase display, this will also fill our screen
1093 gfx_state.tg_functions->tf_param(&gfx_state,
1097 snprintf(env, sizeof (env), "%u", (unsigned)rows);
1132 c = (utf8_partial >> (24 - (i << 3))) & 0xff;
1144 /* One-byte sequence. */
1150 /* Two-byte sequence. */
1157 /* Three-byte sequence. */
1164 /* Four-byte sequence. */
1176 utf8_left--;
1185 if (b != 0) { /* Four-byte sequence */
1194 v = b & 0x0f; /* Three-byte sequence */
1200 v = b & 0x1f; /* Two-byte sequence */
1210 /* Anything left is illegal in UTF-8 sequence. */
1268 switch (key->ScanCode) {
1296 keybuf[0] = key->UnicodeChar;
1307 status = conin->ReadKeyStroke(conin, &key);
1323 status = coninex->ReadKeyStrokeEx(coninex, &key_data);
1335 if (kp->UnicodeChar >= 'a' &&
1336 kp->UnicodeChar <= 'z') {
1337 kp->UnicodeChar -= 'a';
1338 kp->UnicodeChar++;
1346 if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
1363 return (-1);
1375 return (-1);
1390 * Some EFI implementation (u-boot for example) do not support
1395 if (coninex->WaitForKeyEx == NULL) {
1398 status = BS->CheckEvent(coninex->WaitForKeyEx);
1402 if (conin->WaitForKey == NULL) {
1405 status = BS->CheckEvent(conin->WaitForKey);
1423 status = conout->TestString(conout, buf);
1426 conout->OutputString(conout, buf);