xref: /aosp_15_r20/external/coreboot/payloads/libpayload/curses/pdcurses-backend/pdcgetsc.c (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* Public Domain Curses */
2 /* This file is BSD licensed, Copyright 2011 secunet AG */
3 
4 #include "lppdc.h"
5 
6 #include <stdlib.h>
7 
8 /* return width of screen/viewport */
9 
PDC_get_columns(void)10 int PDC_get_columns(void)
11 {
12     int cols;
13 
14     PDC_LOG(("PDC_get_columns() - called\n"));
15 
16     /* hardcode to 80 */
17     cols = 80;
18 
19     PDC_LOG(("PDC_get_columns() - returned: cols %d\n", cols));
20 
21     return cols;
22 }
23 
24 /* get the cursor size/shape */
25 
PDC_get_cursor_mode(void)26 int PDC_get_cursor_mode(void)
27 {
28     PDC_LOG(("PDC_get_cursor_mode() - called\n"));
29 
30     /* only have one cursor type */
31     return SP->visibility;
32 }
33 
34 /* return number of screen rows */
35 
PDC_get_rows(void)36 int PDC_get_rows(void)
37 {
38     int rows;
39 
40     PDC_LOG(("PDC_get_rows() - called\n"));
41 
42     /* hardcode to 25 */
43     rows = 25;
44 
45     PDC_LOG(("PDC_get_rows() - returned: rows %d\n", rows));
46 
47     return rows;
48 }
49