1 /*
2  * Copyright (C) 2009 - 2011 Vivien Malerba <malerba@gnome-db.org>
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 #ifndef __GDAUI_BAR_H__
20 #define __GDAUI_BAR_H__
21 
22 #include <gtk/gtk.h>
23 
24 G_BEGIN_DECLS
25 
26 /*
27  * Type checking and casting macros
28  */
29 #define GDAUI_TYPE_BAR              (gdaui_bar_get_type())
30 #define GDAUI_BAR(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GDAUI_TYPE_BAR, GdauiBar))
31 #define GDAUI_BAR_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GDAUI_TYPE_BAR, GdauiBarClass))
32 #define GDAUI_IS_BAR(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GDAUI_TYPE_BAR))
33 #define GDAUI_IS_BAR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDAUI_TYPE_BAR))
34 #define GDAUI_BAR_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GDAUI_TYPE_BAR, GdauiBarClass))
35 
36 
37 typedef struct _GdauiBarPrivate GdauiBarPrivate;
38 typedef struct _GdauiBarClass GdauiBarClass;
39 typedef struct _GdauiBar GdauiBar;
40 
41 struct _GdauiBar
42 {
43 	GtkBox parent;
44 
45 	/*< private > */
46 	GdauiBarPrivate *priv;
47 };
48 
49 
50 struct _GdauiBarClass
51 {
52 	GtkBoxClass parent_class;
53 };
54 
55 GType        gdaui_bar_get_type              (void) G_GNUC_CONST;
56 GtkWidget   *gdaui_bar_new                   (const gchar *text);
57 const gchar *gdaui_bar_get_text              (GdauiBar *bar);
58 void         gdaui_bar_set_text              (GdauiBar *bar, const gchar *text);
59 void         gdaui_bar_set_icon_from_pixbuf  (GdauiBar *bar, GdkPixbuf *pixbuf);
60 void         gdaui_bar_set_icon_from_file    (GdauiBar *bar, const gchar *file);
61 void         gdaui_bar_set_icon_from_stock   (GdauiBar *bar, const gchar *stock_id, GtkIconSize size);
62 void         gdaui_bar_set_show_icon         (GdauiBar *bar, gboolean show);
63 gboolean     gdaui_bar_get_show_icon         (GdauiBar *bar);
64 GtkWidget   *gdaui_bar_add_button_from_stock (GdauiBar *bar, const gchar *stock_id);
65 GtkWidget   *gdaui_bar_add_search_entry      (GdauiBar *bar);
66 
67 G_END_DECLS
68 
69 #endif
70