gtr-statusbar.h 3.01 KB
Newer Older
1 2 3 4
/*
 * Copyright (C) 2005 - Paolo Borelli
 * 		 2007 - Ignacio Casal Quinteiro <nacho.resa@gmail.com>
 *
5 6 7 8 9 10 11
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 * 
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 14 15 16
 *     GNU General Public License for more details.
 * 
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
18

19 20 21
#ifndef GTR_STATUSBAR_H
#define GTR_STATUSBAR_H

22
#include <gtk/gtk.h>
23 24

G_BEGIN_DECLS
25
#define GTR_TYPE_STATUSBAR		(gtr_statusbar_get_type ())
26 27
#define GTR_STATUSBAR(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GTR_TYPE_STATUSBAR, GtrStatusbar))
#define GTR_STATUSBAR_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), GTR_TYPE_STATUSBAR, GtrStatusbarClass))
28 29
#define GTR_IS_STATUSBAR(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GTR_TYPE_STATUSBAR))
#define GTR_IS_STATUSBAR_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GTR_TYPE_STATUSBAR))
30 31 32
#define GTR_STATUSBAR_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GTR_TYPE_STATUSBAR, GtrStatusbarClass))
typedef struct _GtrStatusbar GtrStatusbar;
typedef struct _GtrStatusbarClass GtrStatusbarClass;
33

34
struct _GtrStatusbar
35
{
36
  GtkBox parent;
37 38
};

39
struct _GtrStatusbarClass
40
{
41
  GtkBoxClass parent_class;
42 43
};

44
GType
45
gtr_statusbar_get_type (void)
46
  G_GNUC_CONST;
47

48
     GtkWidget *gtr_statusbar_new (void);
49

50
     void gtr_statusbar_push_default (GtrStatusbar *
51
                                      statusbar, const gchar * text);
52

53
     void gtr_statusbar_pop_default (GtrStatusbar * statusbar);
54

55
     guint gtr_statusbar_push (GtrStatusbar * statusbar,
56
                               guint context_id, const gchar * text);
57

58
     void gtr_statusbar_pop (GtrStatusbar * statusbar, guint context_id);
59

60
     guint gtr_statusbar_get_context_id (GtrStatusbar *
61 62
                                         statusbar,
                                         const gchar * context_description);
63

64
     void gtr_statusbar_set_overwrite (GtrStatusbar *
65
                                       statusbar, gboolean overwrite);
66

67
     void gtr_statusbar_clear_overwrite (GtrStatusbar * statusbar);
68

69
     void gtr_statusbar_flash_message (GtrStatusbar *
70 71 72
                                       statusbar, guint context_id,
                                       const gchar * format,
                                       ...) G_GNUC_PRINTF (3, 4);
73

74
     void gtr_statusbar_update_progress_bar (GtrStatusbar *
75 76 77
                                             statusbar,
                                             gdouble translated_count,
                                             gdouble messages_count);
78

79
     void gtr_statusbar_clear_progress_bar (GtrStatusbar * statusbar);
80

81
G_END_DECLS
82
#endif