perf ui browser: Add routines to compactly specify exit keys

This makes the usual idiom for specifying a series of key codes to exit
ui_browser__run() for specialized processing (search, annotate, etc) or
plain exiting the browser more compact.

It also abstracts away some more libnewt operations. At some point we'll
also replace NEWT_KEY_foo with something that can be mapped to NEWT or,
say, gtk.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2010-08-12 12:37:51 -03:00
parent b50e003db1
commit 4c1c952e37
6 changed files with 34 additions and 35 deletions

View File

@ -11,8 +11,6 @@
#include "helpline.h"
#include "util.h"
newtComponent newt_form__new(void);
static void newt_form__set_exit_keys(newtComponent self)
{
newtFormAddHotKey(self, NEWT_KEY_LEFT);
@ -22,7 +20,7 @@ static void newt_form__set_exit_keys(newtComponent self)
newtFormAddHotKey(self, CTRL('c'));
}
newtComponent newt_form__new(void)
static newtComponent newt_form__new(void)
{
newtComponent self = newtForm(NULL, NULL, 0);
if (self)