aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/ui/browser.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-04-02 12:48:56 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-07 16:08:42 -0300
commit087091652bf8b351432a3f3fb50996ee3582d5e4 (patch)
tree2cfbff9c5f1262a5597a9250b108545e4e9663c0 /tools/perf/util/ui/browser.h
parentperf annotate: Validate addr in symbol__inc_addr_samples (diff)
downloadlinux-dev-087091652bf8b351432a3f3fb50996ee3582d5e4.tar.xz
linux-dev-087091652bf8b351432a3f3fb50996ee3582d5e4.zip
perf ui browser: Return the current color when setting a new one
Tools that want to change parts of the line to a different color and then restore the previous one will use this, starting with the annotate browser that will change the color of addresses if not on the current entry, i.e. the selected one. 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-uiajpevhxo4mzrvna6remb4a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ui/browser.h')
-rw-r--r--tools/perf/util/ui/browser.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/ui/browser.h b/tools/perf/util/ui/browser.h
index 6ee82f60feaf..65b25921529e 100644
--- a/tools/perf/util/ui/browser.h
+++ b/tools/perf/util/ui/browser.h
@@ -15,6 +15,7 @@ struct ui_browser {
u64 index, top_idx;
void *top, *entries;
u16 y, x, width, height;
+ int current_color;
void *priv;
const char *title;
char *helpline;
@@ -27,7 +28,7 @@ struct ui_browser {
bool use_navkeypressed;
};
-void ui_browser__set_color(struct ui_browser *self, int color);
+int ui_browser__set_color(struct ui_browser *browser, int color);
void ui_browser__set_percent_color(struct ui_browser *self,
double percent, bool current);
bool ui_browser__is_current_entry(struct ui_browser *self, unsigned row);