mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-07 10:55:15 +07:00
![Namhyung Kim](/assets/img/avatar_default.png)
The GtkInfoBar is a modern UI component to display messages without bothering the main window. It'll be used for showing a warning message. As the GtkInfoBar requires 2.18 (or newer) version of GTK+ library, add availability check to Makefile too. Suggested-by: Sunjin Yang <fan4326@gmail.com> 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-7-git-send-email-namhyung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
40 lines
802 B
C
40 lines
802 B
C
#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;
|
|
|
|
#ifdef HAVE_GTK_INFO_BAR
|
|
GtkWidget *info_bar;
|
|
GtkWidget *message_label;
|
|
#endif
|
|
GtkWidget *statbar;
|
|
guint statbar_ctx_id;
|
|
};
|
|
|
|
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);
|
|
|
|
#ifndef HAVE_GTK_INFO_BAR
|
|
static inline GtkWidget *perf_gtk__setup_info_bar(void)
|
|
{
|
|
return NULL;
|
|
}
|
|
#endif
|
|
|
|
#endif /* _PERF_GTK_H_ */
|