1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3  * anjuta-status.h
4  * Copyright (C) 2004 Naba Kumar  <naba@gnome.org>
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation; either version 2 of the License, or (at your option)
9  * any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc., 59
18  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20 
21 #ifndef _ANJUTA_STATUS_H_
22 #define _ANJUTA_STATUS_H_
23 
24 #include <gtk/gtk.h>
25 
26 G_BEGIN_DECLS
27 
28 #define ANJUTA_TYPE_STATUS        (anjuta_status_get_type ())
29 #define ANJUTA_STATUS(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_STATUS, AnjutaStatus))
30 #define ANJUTA_STATUS_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_STATUS, AnjutaStatusClass))
31 #define ANJUTA_IS_STATUS(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_STATUS))
32 #define ANJUTA_IS_STATUS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_STATUS))
33 
34 typedef struct _AnjutaStatus AnjutaStatus;
35 typedef struct _AnjutaStatusPriv AnjutaStatusPriv;
36 typedef struct _AnjutaStatusClass AnjutaStatusClass;
37 
38 struct _AnjutaStatus
39 {
40 	GtkBox parent;
41 	AnjutaStatusPriv *priv;
42 };
43 
44 struct _AnjutaStatusClass
45 {
46 	GtkBoxClass parent_class;
47 
48 	/* signals */
49 	void (*busy) (AnjutaStatus *status, gboolean state);
50 };
51 
52 GType anjuta_status_get_type (void);
53 GtkWidget* anjuta_status_new (void);
54 
55 /* Status bar text manipulation */
56 void anjuta_status_set (AnjutaStatus *status, const gchar * mesg, ...);
57 void anjuta_status_push (AnjutaStatus *status, const gchar * mesg, ...);
58 void anjuta_status_pop (AnjutaStatus *status);
59 void anjuta_status_clear_stack (AnjutaStatus *status);
60 void anjuta_status_busy_push (AnjutaStatus *status);
61 void anjuta_status_busy_pop (AnjutaStatus *status);
62 void anjuta_status_set_default (AnjutaStatus *status, const gchar *label,
63 								const gchar *value_format, ...);
64 void anjuta_status_add_widget (AnjutaStatus *status, GtkWidget *widget);
65 void anjuta_status (AnjutaStatus *status, const gchar *mesg, gint timeout);
66 void anjuta_status_set_title_window (AnjutaStatus *status, GtkWidget *window);
67 void anjuta_status_set_title (AnjutaStatus *status, const gchar *title);
68 
69 /* Status bar progress manipulation */
70 void anjuta_status_set_splash (AnjutaStatus *status, const gchar *splash_file,
71 							   gint splash_progress_position);
72 void anjuta_status_disable_splash (AnjutaStatus *status,
73 								   gboolean disable_splash);
74 void anjuta_status_progress_add_ticks (AnjutaStatus *status, gint ticks);
75 void anjuta_status_progress_tick (AnjutaStatus *status,
76 								  GdkPixbuf *icon, const gchar *text);
77 void anjuta_status_progress_increment_ticks (AnjutaStatus *status, gint ticks,
78 											 const gchar *text);
79 void anjuta_status_progress_pulse (AnjutaStatus *status, const gchar *text);
80 void anjuta_status_progress_reset (AnjutaStatus *status);
81 
82 G_END_DECLS
83 
84 #endif
85