1 /* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2010 Yannick Brosseau
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 #include <gtk/gtkhbox.h>
23 #include <gtk/gtktooltips.h>
24 #include <gtk/gtkwidget.h>
29 #define TIMEBAR_TYPE (timebar_get_type ())
30 #define TIMEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TIMEBAR_TYPE, Timebar))
31 #define TIMEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TIMEBAR_TYPE, TimebarClass))
32 #define IS_TIMEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TIMEBAR_TYPE))
33 #define IS_TIMEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TIMEBAR_TYPE))
35 typedef struct _Timebar Timebar
;
36 typedef struct _TimebarClass TimebarClass
;
41 GtkWidget
*title_label
;
42 GtkWidget
*title_eventbox
;
43 GtkWidget
*start_timeentry
;
44 GtkWidget
*end_timeentry
;
45 GtkWidget
*interval_timeentry
;
46 GtkWidget
*current_timeentry
;
48 int interval_handler_id
;
55 struct _TimebarClass
{
56 GtkHBoxClass parent_class
;
58 void (*timebar
) (Timebar
*timebar
);
62 GType
timebar_get_type(void);
63 GtkWidget
*timebar_new(void);
65 void timebar_set_current_time(Timebar
*timeebar
, const LttTime
*time
);
66 void timebar_set_start_time(Timebar
*timebar
, const LttTime
*time
);
67 void timebar_set_end_time(Timebar
*timebar
, const LttTime
*time
);
68 void timebar_set_minmax_time(Timebar
*timebar
,
69 const LttTime
*min_time
,
70 const LttTime
*max_time
);
72 LttTime
timebar_get_current_time(Timebar
*timeebar
);
73 LttTime
timebar_get_start_time(Timebar
*timebar
);
74 LttTime
timebar_get_end_time(Timebar
*timebar
);
78 #endif /* _TIMEBAR_ */