| 
									
										
										
										
											2012-03-19 15:13:29 -03:00
										 |  |  | #ifndef _PERF_GTK_H_
 | 
					
						
							|  |  |  | #define _PERF_GTK_H_ 1
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-29 13:22:59 +09:00
										 |  |  | #include <stdbool.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-19 15:13:29 -03:00
										 |  |  | #pragma GCC diagnostic ignored "-Wstrict-prototypes"
 | 
					
						
							|  |  |  | #include <gtk/gtk.h>
 | 
					
						
							|  |  |  | #pragma GCC diagnostic error "-Wstrict-prototypes"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-29 13:22:59 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | struct perf_gtk_context { | 
					
						
							|  |  |  | 	GtkWidget *main_window; | 
					
						
							| 
									
										
										
										
											2013-02-07 18:02:09 +09:00
										 |  |  | 	GtkWidget *notebook; | 
					
						
							| 
									
										
										
										
											2012-05-29 13:23:01 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | #ifdef HAVE_GTK_INFO_BAR
 | 
					
						
							|  |  |  | 	GtkWidget *info_bar; | 
					
						
							|  |  |  | 	GtkWidget *message_label; | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2012-05-29 13:23:00 +09:00
										 |  |  | 	GtkWidget *statbar; | 
					
						
							|  |  |  | 	guint statbar_ctx_id; | 
					
						
							| 
									
										
										
										
											2012-05-29 13:22:59 +09: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 17:14:52 +09:00
										 |  |  | void perf_gtk__init_helpline(void); | 
					
						
							| 
									
										
										
										
											2012-11-13 22:30:33 +09:00
										 |  |  | void perf_gtk__init_progress(void); | 
					
						
							| 
									
										
										
										
											2012-09-03 11:53:10 +09:00
										 |  |  | void perf_gtk__init_hpp(void); | 
					
						
							| 
									
										
										
										
											2012-08-16 17:14:52 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-21 17:20:13 +09: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); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifdef HAVE_GTK_INFO_BAR
 | 
					
						
							|  |  |  | GtkWidget *perf_gtk__setup_info_bar(void); | 
					
						
							|  |  |  | #else
 | 
					
						
							| 
									
										
										
										
											2012-05-29 13:23:01 +09:00
										 |  |  | static inline GtkWidget *perf_gtk__setup_info_bar(void) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	return NULL; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-19 15:13:29 -03:00
										 |  |  | #endif /* _PERF_GTK_H_ */
 |