1 /* 2 * Time label widget 3 * 4 * Copyright (C) 2004-2013 Bastien Nocera <hadess@hadess.net> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be 12 * useful, but WITHOUT ANY WARRANTY; without even the implied 13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 14 * PURPOSE. See the GNU Lesser General Public License for more 15 * details. 16 * 17 * You should have received a copy of the GNU Lesser General 18 * Public License along with this program; if not, see <http://www.gnu.org/licenses/>. 19 * 20 */ 21 22 #ifndef BACON_TIME_LABEL_H 23 #define BACON_TIME_LABEL_H 24 25 #include <gtk/gtk.h> 26 27 #define BACON_TYPE_TIME_LABEL (bacon_time_label_get_type ()) 28 #define BACON_TIME_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BACON_TYPE_TIME_LABEL, BaconTimeLabel)) 29 #define BACON_TIME_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BACON_TYPE_TIME_LABEL, BaconTimeLabelClass)) 30 #define BACON_IS_TIME_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BACON_TYPE_TIME_LABEL)) 31 #define BACON_IS_TIME_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BACON_TYPE_TIME_LABEL)) 32 33 typedef struct BaconTimeLabel BaconTimeLabel; 34 typedef struct BaconTimeLabelClass BaconTimeLabelClass; 35 typedef struct _BaconTimeLabelPrivate BaconTimeLabelPrivate; 36 37 struct BaconTimeLabel { 38 GtkLabel parent; 39 BaconTimeLabelPrivate *priv; 40 }; 41 42 struct BaconTimeLabelClass { 43 GtkLabelClass parent_class; 44 }; 45 46 G_MODULE_EXPORT GType bacon_time_label_get_type (void); 47 GtkWidget *bacon_time_label_new (void); 48 void bacon_time_label_set_time (BaconTimeLabel *label, 49 gint64 time, 50 gint64 length); 51 void 52 bacon_time_label_set_remaining (BaconTimeLabel *label, 53 gboolean remaining); 54 55 #endif /* BACON_TIME_LABEL_H */ 56