All of lore.kernel.org
 help / color / mirror / Atom feed
* Terminal interface and how it should be used?
@ 2006-02-20 22:55 Vesa Jääskeläinen
  2006-02-21 12:04 ` Marco Gerards
  0 siblings, 1 reply; 5+ messages in thread
From: Vesa Jääskeläinen @ 2006-02-20 22:55 UTC (permalink / raw)
  To: The development of GRUB 2

Hi,

I have made some progress with video subsystem and currently the font
manager is slowing down (we need to cache fonts) and there are some
issues with grub_term. I am not sure if all parts of the code use it
correctly or then I am just understanding it differently. After those
issues are solved I think we could start to migrate this code back to tree.

Here are selected features that might need more information in order to
get correct results.

/* Put a character. C is encoded in Unicode.  */
void (*putchar) (grub_uint32_t c);

Should putchar() instantly show results of the operation? Or after
calling refresh().

/* Go to the position (X, Y).  */
void (*gotoxy) (grub_uint8_t x, grub_uint8_t y);

Should gotoxy() instantly move cursor to specified location and if
output is not yet drawn, should it be drawn at this point.

/* Clear the screen.  */
void (*cls) (void);

Should screen be cleared instantly? Or should it be after refresh().

/* Set the current color to be used */
void (*setcolorstate) (grub_term_color_state state);

/* Set the normal color and the highlight color. The format of each
   color is VGA's.  */
void (*setcolor) (grub_uint8_t normal_color, grub_uint8_t highlight_color);

And what exactly should these two be doing ? :).. setcolorstate and
setcolor. I can imagine that it changes color, but to what. Should this
be changed to some kinda theming system. Or should I just assume that
those are palette indexes and in RGB modes, use emulated RGB palette?

/* Update the screen.  */
void (*refresh) (void);

This one is a trickier, should it cause redraw to be done to whole
screen, or to render actions in queue. I am asking this because it would
look like it is being used to render actions in queue. If I code it to
render whole screen, we get nice flickering as screen is being rendered
multiple times for nothing. (I am not interested at this point to
optimize video drawing as I want to have solid terminal interface first)
If I remove some extra refreshes terminal works quite nicely, but then
it might not be semantically correct usage.

Thanks,
Vesa Jääskeläinen



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-03-05 22:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-20 22:55 Terminal interface and how it should be used? Vesa Jääskeläinen
2006-02-21 12:04 ` Marco Gerards
2006-02-25 13:25   ` Vesa Jääskeläinen
2006-03-01 22:23     ` Vesa Jääskeläinen
2006-03-05 22:19       ` Yoshinori K. Okuji

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.