aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/ui/gtk/gtk.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2012-05-29 13:22:59 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-06-19 13:06:18 -0300
commit42ab68a35ffee04700648ec42c9507145a66837d (patch)
treed447878f8831a472534cddac6cdd5f2e23d5be92 /tools/perf/ui/gtk/gtk.h
parentperf ui: Introduce struct perf_error_ops (diff)
downloadwireguard-linux-42ab68a35ffee04700648ec42c9507145a66837d.tar.xz
wireguard-linux-42ab68a35ffee04700648ec42c9507145a66837d.zip
perf ui/gtk: Introduce struct perf_gtk_context
The struct perf_gtk_context is for tracking current state of GTK window and/or other things. This is a preparation of next changes. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Acked-by: Pekka Enberg <penberg@kernel.org> 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/1338265382-6872-5-git-send-email-namhyung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/gtk.h')
-rw-r--r--tools/perf/ui/gtk/gtk.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/perf/ui/gtk/gtk.h b/tools/perf/ui/gtk/gtk.h
index 75177ee04032..34fbca6d48a2 100644
--- a/tools/perf/ui/gtk/gtk.h
+++ b/tools/perf/ui/gtk/gtk.h
@@ -1,8 +1,25 @@
#ifndef _PERF_GTK_H_
#define _PERF_GTK_H_ 1
+#include <stdbool.h>
+
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#include <gtk/gtk.h>
#pragma GCC diagnostic error "-Wstrict-prototypes"
+
+struct perf_gtk_context {
+ GtkWidget *main_window;
+};
+
+extern struct perf_gtk_context *pgctx;
+
+static inline bool perf_gtk__is_active_context(struct perf_gtk_context *ctx)
+{
+ return ctx && ctx->main_window;
+}
+
+struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window);
+int perf_gtk__deactivate_context(struct perf_gtk_context **ctx);
+
#endif /* _PERF_GTK_H_ */