-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Namhyung Kim
authored and
Arnaldo Carvalho de Melo
committed
Jun 19, 2012
1 parent
ba47a14
commit 42ab68a
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters