1 /* 2 * fm-tab-label.h 3 * 4 * Copyright 2010 PCMan <pcman.tw@gmail.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * MA 02110-1301, USA. 20 */ 21 22 23 #ifndef __FM_TAB_LABEL_H__ 24 #define __FM_TAB_LABEL_H__ 25 26 #include <gtk/gtk.h> 27 28 #include "fm-icon-pixbuf.h" 29 30 G_BEGIN_DECLS 31 32 #define FM_TYPE_TAB_LABEL (fm_tab_label_get_type()) 33 #define FM_TAB_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\ 34 FM_TYPE_TAB_LABEL, FmTabLabel)) 35 #define FM_TAB_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\ 36 FM_TYPE_TAB_LABEL, FmTabLabelClass)) 37 #define FM_IS_TAB_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),\ 38 FM_TYPE_TAB_LABEL)) 39 #define FM_IS_TAB_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\ 40 FM_TYPE_TAB_LABEL)) 41 42 typedef struct _FmTabLabel FmTabLabel; 43 typedef struct _FmTabLabelClass FmTabLabelClass; 44 45 struct _FmTabLabel 46 { 47 GtkEventBox parent; 48 GtkLabel* label; 49 GtkButton* close_btn; 50 /*< private >*/ 51 GtkWidget *image; 52 gpointer _reserved1; 53 }; 54 55 struct _FmTabLabelClass 56 { 57 /*< private >*/ 58 GtkEventBoxClass parent_class; 59 gpointer _reserved1; 60 }; 61 62 GType fm_tab_label_get_type(void); 63 FmTabLabel* fm_tab_label_new(const char* text); 64 65 void fm_tab_label_set_text(FmTabLabel* label, const char* text); 66 void fm_tab_label_set_tooltip_text(FmTabLabel* label, const char* text); 67 68 void fm_tab_label_set_icon(FmTabLabel *label, FmIcon *icon); 69 70 G_END_DECLS 71 72 #endif /* __FM_TAB_LABEL_H__ */ 73