From: Bean <bean123ch@gmail.com>
To: "The development of GRUB 2" <grub-devel@gnu.org>
Subject: Sugguestion: separate input and output driver
Date: Thu, 29 May 2008 16:09:54 +0800 [thread overview]
Message-ID: <ca0f59980805290109m2faa1efsba905c8a0c13ce3@mail.gmail.com> (raw)
Currently, input and output are bundled together, this make it quite
difficult to extend.
Input:
Keyboard, Serial
Output:
Text mode, Video mode
Now, the binding is fixed using individual module:
Keyboard + Text = console
Keyboard + Video = gfxterm
Serial + Text = serial
Serial + Video = ?
And there are mixing as well.
If we separate them, it would make things much clear. For example, the
grub_term structure can be split into two mutually exclusive parts:
struct grub_term =
{
.name,
.init,
.fini,
.putchar,
.getcharwidth,
.checkkey,
.getkey,
.getwh,
.getxy,
.gotoxy,
.cls,
.setcolorstate,
.setcursor,
.flags,
.next
};
=>
struct grub_input
{
.name,
.init,
.fini,
.checkkey,
.getkey
.flags,
.next
}
+
struct grub_output
{
.name,
.init,
.fini,
.putchar,
.getcharwidth,
.getxy,
.gotoxy,
.cls,
.setcolorstate,
.setcursor,
.flags,
.next
}
Integration between input and output:
Input driver <=> console driver <=> Output driver
The console driver is the central part. It accepts virtual key from
the input driver, and write to the virtual screen provided by output
driver.
--
Bean
next reply other threads:[~2008-05-29 8:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 8:09 Bean [this message]
2008-05-29 9:46 ` Sugguestion: separate input and output driver Robert Millan
2008-05-29 9:59 ` Robert Millan
2008-05-29 11:45 ` Marco Gerards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca0f59980805290109m2faa1efsba905c8a0c13ce3@mail.gmail.com \
--to=bean123ch@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.