Add powerbox hook
[gtk-with-powerbox.git] / perf / gtkwidgetprofiler.h
blob59c478894395843f1ed2249a7c224b93dd55547e
1 #include <gtk/gtk.h>
3 #ifndef GTK_WIDGET_PROFILER_H
4 #define GTK_WIDGET_PROFILER_H
6 G_BEGIN_DECLS
8 #define GTK_TYPE_WIDGET_PROFILER (gtk_widget_profiler_get_type ())
9 #define GTK_WIDGET_PROFILER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_WIDGET_PROFILER, GtkWidgetProfiler))
10 #define GTK_WIDGET_PROFILER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_WIDGET_PROFILER, GtkWidgetProfilerClass))
11 #define GTK_IS_WIDGET_PROFILER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_WIDGET_PROFILER))
12 #define GTK_IS_WIDGET_PROFILER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WIDGET_PROFILER))
13 #define GTK_WIDGET_PROFILER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WIDGET_PROFILER, GtkWidgetProfilerClass))
15 typedef enum
17 GTK_WIDGET_PROFILER_REPORT_CREATE,
18 GTK_WIDGET_PROFILER_REPORT_MAP,
19 GTK_WIDGET_PROFILER_REPORT_EXPOSE,
20 GTK_WIDGET_PROFILER_REPORT_DESTROY
21 } GtkWidgetProfilerReport;
23 typedef struct _GtkWidgetProfiler GtkWidgetProfiler;
24 typedef struct _GtkWidgetProfilerClass GtkWidgetProfilerClass;
25 typedef struct _GtkWidgetProfilerPrivate GtkWidgetProfilerPrivate;
27 struct _GtkWidgetProfiler {
28 GObject object;
30 GtkWidgetProfilerPrivate *priv;
33 struct _GtkWidgetProfilerClass {
34 GObjectClass parent_class;
36 /* signals */
38 GtkWidget *(* create_widget) (GtkWidgetProfiler *profiler);
40 void (* report) (GtkWidgetProfiler *profiler,
41 GtkWidgetProfilerReport report,
42 GtkWidget *widget,
43 gdouble elapsed);
46 GType gtk_widget_profiler_get_type (void) G_GNUC_CONST;
48 GtkWidgetProfiler *gtk_widget_profiler_new (void);
50 void gtk_widget_profiler_set_num_iterations (GtkWidgetProfiler *profiler,
51 gint n_iterations);
53 void gtk_widget_profiler_profile_boot (GtkWidgetProfiler *profiler);
55 void gtk_widget_profiler_profile_expose (GtkWidgetProfiler *profiler);
58 G_END_DECLS
60 #endif