aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browser.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-08-11 11:24:27 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-08-12 09:27:04 -0400
commit26270a008251ec36431623bd992252934bbe529a (patch)
tree17d004ac25006781bd504129121f9ef7e19d17ef /tools/perf/ui/browser.c
parentb62bee1bdea6d78e444183b04c81ce982a371571 (diff)
perf ui browser: Introduce ui_browser__write_nstring()
To remove direct access to libslang functions, with the immediate goal of implementing horizontal scrolling at the ui_browser level, but also because we may at some point want to implement ui_browser with other UIs in addition to the current libslang implementation. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-437ineavoejzou727mr9bxpi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browser.c')
-rw-r--r--tools/perf/ui/browser.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
index 6680fa5cb9dd..5c730ab553e9 100644
--- a/tools/perf/ui/browser.c
+++ b/tools/perf/ui/browser.c
@@ -46,6 +46,12 @@ void ui_browser__gotorc(struct ui_browser *browser, int y, int x)
46 SLsmg_gotorc(browser->y + y, browser->x + x); 46 SLsmg_gotorc(browser->y + y, browser->x + x);
47} 47}
48 48
49void ui_browser__write_nstring(struct ui_browser *browser __maybe_unused, const char *msg,
50 unsigned int width)
51{
52 slsmg_write_nstring(msg, width);
53}
54
49static struct list_head * 55static struct list_head *
50ui_browser__list_head_filter_entries(struct ui_browser *browser, 56ui_browser__list_head_filter_entries(struct ui_browser *browser,
51 struct list_head *pos) 57 struct list_head *pos)
@@ -234,7 +240,7 @@ void __ui_browser__show_title(struct ui_browser *browser, const char *title)
234{ 240{
235 SLsmg_gotorc(0, 0); 241 SLsmg_gotorc(0, 0);
236 ui_browser__set_color(browser, HE_COLORSET_ROOT); 242 ui_browser__set_color(browser, HE_COLORSET_ROOT);
237 slsmg_write_nstring(title, browser->width + 1); 243 ui_browser__write_nstring(browser, title, browser->width + 1);
238} 244}
239 245
240void ui_browser__show_title(struct ui_browser *browser, const char *title) 246void ui_browser__show_title(struct ui_browser *browser, const char *title)