grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Redesign of the menu system


From: Vladimir 'phcoder' Serbinenko
Subject: Re: [RFC] Redesign of the menu system
Date: Wed, 19 Aug 2009 11:45:43 +0200

On Wed, Aug 19, 2009 at 11:05 AM, Bean<address@hidden> wrote:
> Hi,
>
> Currently, the menu system is a little unorganized and difficult to
> extend. My goal of the redesign are:
>
> Modular
> Split code into small modules, each module implement a specific
> function, modules uses predefined interface to call each other.
I'm ok with using predefined interfaces but splitting between .mods
may be not beneficial since normal.mod isn't size-critical. But I'm ok
with just compiling code-independent parts into the same module
>
> Extensible
> The core of the menu system is components, which can be extended
> easily. Components can be written in C or lua.
>
> Configurable
> The menu system can be configured easily by end users. The layout of
> screen can be configured with xml file, while the window styles is
> configured with css file. Interface are exported to C and lua so that
> you can configure the menu system dynamically.
I don't like the idea of xml or css. For xnu device tree I designed my
own format but then I saw that the whole idea of loading file for
configuring grub behaviour is fundamentally flawed. Environment
variables are already present, modifiable from shell and easy to use.
To have level or tree-like model you can use '.' as a name separator
it will make the system uniform with current FreeBSD booting.
>
> I suggest reorganize the menu system based on four layers:
>
>
> Windows layer
> The windows layer build on top of display layer, it implement windows
> creation and manipulation. The windows layer uses css to configure the
> look and feel of windows, it also handle the difference between text
> mode and graphics mode so that components can be written regardless of
> the underlying display system.
>
> Component layer
> This is the core of menu system. This layer implements the logic of
> gui components, and rely on the windows layer or display layer for the
> actual rendering.
>
> Menu layer
> This is the lop layer. The layer is actually quite simple, it creates
> the components based on xml and link the various parts together.
>
Doesn't gfxmenu in Collin's patches already have a similar system?
Additionally your proposed abstractions are visually-oriented. It's ok
for them to be so in menu_text and gfxmenu but these are the only 2
menus of this kind (they can be extensible, sure). In future we're
likely to have other types of menus like dumb terminal menu or voice
menu.
> --
> Bean
>
> gitgrub home: http://github.com/grub/grub/
> my fork page: http://github.com/bean123/grub/
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git




reply via email to

[Prev in Thread] Current Thread [Next in Thread]