34 |
/* If the more pager is active. */ |
/* If the more pager is active. */ |
35 |
static int grub_more; |
static int grub_more; |
36 |
|
|
37 |
|
/* The current cursor state. */ |
38 |
|
static int cursor_state = 1; |
39 |
|
|
40 |
void |
void |
41 |
grub_term_register (grub_term_t term) |
grub_term_register (grub_term_t term) |
42 |
{ |
{ |
80 |
|
|
81 |
grub_cur_term = term; |
grub_cur_term = term; |
82 |
grub_cls (); |
grub_cls (); |
83 |
|
grub_setcursor (grub_getcursor ()); |
84 |
return GRUB_ERR_NONE; |
return GRUB_ERR_NONE; |
85 |
} |
} |
86 |
|
|
233 |
int |
int |
234 |
grub_setcursor (int on) |
grub_setcursor (int on) |
235 |
{ |
{ |
236 |
static int prev = 1; |
int ret = cursor_state; |
|
int ret = prev; |
|
237 |
|
|
238 |
if (grub_cur_term->setcursor) |
if (grub_cur_term->setcursor) |
239 |
{ |
{ |
240 |
(grub_cur_term->setcursor) (on); |
(grub_cur_term->setcursor) (on); |
241 |
prev = on; |
cursor_state = on; |
242 |
} |
} |
243 |
|
|
244 |
return ret; |
return ret; |
245 |
} |
} |
246 |
|
|
247 |
|
int |
248 |
|
grub_getcursor (void) |
249 |
|
{ |
250 |
|
return cursor_state; |
251 |
|
} |
252 |
|
|
253 |
void |
void |
254 |
grub_refresh (void) |
grub_refresh (void) |
255 |
{ |
{ |