summaryrefslogtreecommitdiff
path: root/tools/perf/ui/gtk
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-04-30 13:55:08 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-02 16:17:34 -0300
commit281ef544a8476f750b9f378593c42b3e8a0b8788 (patch)
tree685e23ed105380b167a36ccac54130c42aaf38c9 /tools/perf/ui/gtk
parent28e62b90d95a4ed8ae2ba93879003665051581a6 (diff)
downloadlinux-3.10-281ef544a8476f750b9f378593c42b3e8a0b8788.tar.gz
linux-3.10-281ef544a8476f750b9f378593c42b3e8a0b8788.tar.bz2
linux-3.10-281ef544a8476f750b9f378593c42b3e8a0b8788.zip
perf ui: Add gtk2 support into setup_browser()
Now setup_browser can handle gtk2 front-end so split the TUI code to ui/tui/setup.c in order to remove dependency. To this end, make ui__init/exit global symbols and take an argument. Also split gtk code to ui/gtk/setup.c. Signed-off-by: Namhyung Kim <namhyung.kim@lge.com> Acked-by: Pekka Enberg <penberg@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1335761711-31403-5-git-send-email-namhyung.kim@lge.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk')
-rw-r--r--tools/perf/ui/gtk/browser.c10
-rw-r--r--tools/perf/ui/gtk/setup.c12
2 files changed, 12 insertions, 10 deletions
diff --git a/tools/perf/ui/gtk/browser.c b/tools/perf/ui/gtk/browser.c
index 5eafd9b3b78..0656c381a89 100644
--- a/tools/perf/ui/gtk/browser.c
+++ b/tools/perf/ui/gtk/browser.c
@@ -9,16 +9,6 @@
#define MAX_COLUMNS 32
-void perf_gtk__setup_browser(bool fallback_to_pager __used)
-{
- gtk_init(NULL, NULL);
-}
-
-void perf_gtk__exit_browser(bool wait_for_ok __used)
-{
- gtk_main_quit();
-}
-
static void perf_gtk__signal(int sig)
{
psignal(sig, "perf");
diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c
new file mode 100644
index 00000000000..8c3b573e863
--- /dev/null
+++ b/tools/perf/ui/gtk/setup.c
@@ -0,0 +1,12 @@
+#include "gtk.h"
+#include "../../util/cache.h"
+
+void perf_gtk__init(bool fallback_to_pager __used)
+{
+ gtk_init(NULL, NULL);
+}
+
+void perf_gtk__exit(bool wait_for_ok __used)
+{
+ gtk_main_quit();
+}