Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MzZ8c-0004sY-DZ for mharc-grub-devel@gnu.org; Sun, 18 Oct 2009 13:01:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzZ8X-0004qO-MG for grub-devel@gnu.org; Sun, 18 Oct 2009 13:01:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzZ8S-0004n3-3f for grub-devel@gnu.org; Sun, 18 Oct 2009 13:01:40 -0400 Received: from [199.232.76.173] (port=33034 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzZ8R-0004mp-VD for grub-devel@gnu.org; Sun, 18 Oct 2009 13:01:35 -0400 Received: from mail-pz0-f192.google.com ([209.85.222.192]:62669) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzZ8R-0006Vj-9d for grub-devel@gnu.org; Sun, 18 Oct 2009 13:01:35 -0400 Received: by pzk30 with SMTP id 30so3022462pzk.24 for ; Sun, 18 Oct 2009 10:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=cxUw15Kf5pW3eZY3qApFjrc+XKtuSkucnA6hF4GMg3k=; b=PqKOeSNpEScfvvRyfyUJ7I1wM6EkhuLKR5JjJa8nI2gtgDINmP27TSMKLF++Cn49jG +HdBqplD8KZVDMW75ZxmY7mSNh16Me+FTtiYgnVoj+GhO7+tGdYgkd9I4jmO7+3Y4+0k 3sXM7lmPO8T6d4o5c8i2+lsRms0HGCnKSLvP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=PmgxpSKO3EpH0rWBKjl5/1pB+V2wA9MRxzSgMwJVv+OJJeOLN/knQMvYWf61GRonwj 61qSaITKBwYPsnIhNuR+wnzmZTpT/UX3YW+LuFOgclZtwh02o9NAH0oGWW8qvPGDDMqP x6dILmfWDDExYbZu6QdhJAJElU80gkRYCbs1M= MIME-Version: 1.0 Received: by 10.140.132.16 with SMTP id f16mr1517031rvd.218.1255885293030; Sun, 18 Oct 2009 10:01:33 -0700 (PDT) In-Reply-To: References: Date: Mon, 19 Oct 2009 01:01:32 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (implementation) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2009 17:01:44 -0000 Hi, Update: Add mapkey section. For example: mapkey { f5 = ctrl-x } maps f5 key to ctrl-x, this is important for platforms like EFI as ctrl-x can't be input. key name should be lowercase, it can be single character, f1 to f10, ctrl-a to ctrl-z, left, right, up, down, home, end, delete, page_up, page_down, esc, tab, backspace and space. Add onkey section, which allow you to assign a function when a key is pressed. For example ,this is the onkey section for the demo: onkey { c = "menu_popup term_window" e = "menu_popup edit_window edit.text=command" f7 = "menu_popup layout_test" f8 = menu_toggle_mode f9 = halt f10 = reboot } c open a terminal window, e open a edit box to edit the current command, use ctrl-x to save it. f7 runs the layout demo test, f8 toggle between text and graphic mode, f9 shutdown, f10 reboot. Data binding for popup windows, for example, in the above example, menu_popup edit_window edit.text=command property text in the edit widget in the popup dialog binds to the command property of current node, this is used to implement the edit function. Add two property attach_hcenter and attach_vcenter for layout manager. The top widget of popup window must use absolute position, as widget are already placed in screen and can't be moved without refresh. But it's not easy to put the widget in the middle of screen using attach_left/right/top/bottom, the new property attach_hcenter and attach_vcenter defines the offset from the center of screen. Support TAB completion for term widget. Misc optimization for graphic updates, now it should run quite smooth. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/