blob: 6fe13fdc513eed9cab8532915c3358f46985db96 [file] [log] [blame]
Namhyung Kimba47a142012-05-29 13:22:58 +09001#include "../util.h"
2#include "../../util/debug.h"
3#include "gtk.h"
4
5
Namhyung Kim42ab68a2012-05-29 13:22:59 +09006struct perf_gtk_context *pgctx;
7
8struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window)
9{
10 struct perf_gtk_context *ctx;
11
12 ctx = malloc(sizeof(*pgctx));
13 if (ctx)
14 ctx->main_window = window;
15
16 return ctx;
17}
18
19int perf_gtk__deactivate_context(struct perf_gtk_context **ctx)
20{
21 if (!perf_gtk__is_active_context(*ctx))
22 return -1;
23
24 free(*ctx);
25 *ctx = NULL;
26 return 0;
27}
28
Namhyung Kimba47a142012-05-29 13:22:58 +090029/*
30 * FIXME: Functions below should be implemented properly.
31 * For now, just add stubs for NO_NEWT=1 build.
32 */
33#ifdef NO_NEWT_SUPPORT
34int ui_helpline__show_help(const char *format __used, va_list ap __used)
35{
36 return 0;
37}
38
39void ui_progress__update(u64 curr __used, u64 total __used,
40 const char *title __used)
41{
42}
43#endif