perf ui browser: Allow initial use without navigation UI elements

The selection and scroll bar are really needed only when the user starts
navigating, before that it just provide distractions.

This also brings the initial screen to look more like the stdio UI,
which more people are used to.

The new code is flexible enough that menu like browsers can opt out and
start with those UI elements.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-jfgok30kkerpfw8wtcltgy6z@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2011-10-18 14:31:35 -02:00
parent 3f7247e072
commit c172f7422c
4 changed files with 39 additions and 17 deletions

View File

@@ -23,6 +23,8 @@ struct ui_browser {
void (*seek)(struct ui_browser *self, off_t offset, int whence);
bool (*filter)(struct ui_browser *self, void *entry);
u32 nr_entries;
bool navkeypressed;
bool use_navkeypressed;
};
void ui_browser__set_color(struct ui_browser *self, int color);