2012-03-19 22:13:29 +04:00
|
|
|
#ifndef _PERF_GTK_H_
|
|
|
|
#define _PERF_GTK_H_ 1
|
|
|
|
|
2012-05-29 08:22:59 +04:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2012-03-19 22:13:29 +04:00
|
|
|
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#pragma GCC diagnostic error "-Wstrict-prototypes"
|
|
|
|
|
2012-05-29 08:22:59 +04:00
|
|
|
|
|
|
|
struct perf_gtk_context {
|
|
|
|
GtkWidget *main_window;
|
2013-02-07 13:02:09 +04:00
|
|
|
GtkWidget *notebook;
|
2012-05-29 08:23:01 +04:00
|
|
|
|
2013-09-30 14:07:11 +04:00
|
|
|
#ifdef HAVE_GTK_INFO_BAR_SUPPORT
|
2012-05-29 08:23:01 +04:00
|
|
|
GtkWidget *info_bar;
|
|
|
|
GtkWidget *message_label;
|
|
|
|
#endif
|
2012-05-29 08:23:00 +04:00
|
|
|
GtkWidget *statbar;
|
|
|
|
guint statbar_ctx_id;
|
2012-05-29 08:22:59 +04:00
|
|
|
};
|
|
|
|
|
2013-09-13 10:27:43 +04:00
|
|
|
int perf_gtk__init(void);
|
|
|
|
void perf_gtk__exit(bool wait_for_ok);
|
|
|
|
|
2012-05-29 08:22:59 +04:00
|
|
|
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);
|
|
|
|
|
2012-08-16 12:14:52 +04:00
|
|
|
void perf_gtk__init_helpline(void);
|
2013-10-23 21:08:48 +04:00
|
|
|
void gtk_ui_progress__init(void);
|
2012-09-03 06:53:10 +04:00
|
|
|
void perf_gtk__init_hpp(void);
|
2012-08-16 12:14:52 +04:00
|
|
|
|
2012-12-21 12:20:13 +04:00
|
|
|
void perf_gtk__signal(int sig);
|
|
|
|
void perf_gtk__resize_window(GtkWidget *window);
|
|
|
|
const char *perf_gtk__get_percent_color(double percent);
|
|
|
|
GtkWidget *perf_gtk__setup_statusbar(void);
|
|
|
|
|
2013-09-30 14:07:11 +04:00
|
|
|
#ifdef HAVE_GTK_INFO_BAR_SUPPORT
|
2012-12-21 12:20:13 +04:00
|
|
|
GtkWidget *perf_gtk__setup_info_bar(void);
|
|
|
|
#else
|
2012-05-29 08:23:01 +04:00
|
|
|
static inline GtkWidget *perf_gtk__setup_info_bar(void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-09-13 10:27:43 +04:00
|
|
|
struct perf_evsel;
|
|
|
|
struct perf_evlist;
|
|
|
|
struct hist_entry;
|
|
|
|
struct hist_browser_timer;
|
|
|
|
|
|
|
|
int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help,
|
|
|
|
struct hist_browser_timer *hbt,
|
|
|
|
float min_pcnt);
|
|
|
|
int hist_entry__gtk_annotate(struct hist_entry *he,
|
|
|
|
struct perf_evsel *evsel,
|
|
|
|
struct hist_browser_timer *hbt);
|
|
|
|
void perf_gtk__show_annotations(void);
|
|
|
|
|
2012-03-19 22:13:29 +04:00
|
|
|
#endif /* _PERF_GTK_H_ */
|