33cf98364a21b134965ac47b68ceafa79064f344
[claws.git] / src / gtk / progressdialog.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2005 Hiroyuki Yamamoto
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __PROGRESS_H__
21 #define __PROGRESS_H__
22
23 #include <glib.h>
24 #include <gtk/gtkwidget.h>
25 #include <gtk/gtkliststore.h>
26 #include <gdk/gdkpixbuf.h>
27
28 typedef struct _ProgressDialog  ProgressDialog;
29
30 struct _ProgressDialog
31 {
32         GtkWidget *window;
33         GtkWidget *label;
34         GtkWidget *cancel_btn;
35         GtkWidget *progressbar;
36
37         GtkWidget *treeview;
38         GtkListStore *store;
39 };
40
41 typedef enum
42 {
43         PROG_COL_PIXBUF,
44         PROG_COL_NAME,
45         PROG_COL_STATUS,
46         PROG_COL_POINTER,
47         PROG_N_COLS
48 } ProgressColumn;
49
50 ProgressDialog *progress_dialog_create  (void);
51 void progress_dialog_destroy            (ProgressDialog *progress);
52
53 void progress_dialog_set_label          (ProgressDialog *progress,
54                                          gchar          *str);
55 void progress_dialog_set_value          (ProgressDialog *progress,
56                                          gfloat          value);
57 void progress_dialog_set_percentage     (ProgressDialog *progress,
58                                          gfloat          percentage);
59
60 void progress_dialog_append             (ProgressDialog *progress,
61                                          GdkPixbuf      *pixbuf,
62                                          const gchar    *name,
63                                          const gchar    *status,
64                                          gpointer        data);
65 void progress_dialog_set_row            (ProgressDialog *progress,
66                                          gint            row,
67                                          GdkPixbuf      *pixbuf,
68                                          const gchar    *name,
69                                          const gchar    *status,
70                                          gpointer        data);
71
72 void progress_dialog_set_row_pixbuf     (ProgressDialog *progress,
73                                          gint            row,
74                                          GdkPixbuf      *pixbuf);
75 void progress_dialog_set_row_name       (ProgressDialog *progress,
76                                          gint            row,
77                                          const gchar    *name);
78 void progress_dialog_set_row_status     (ProgressDialog *progress,
79                                          gint            row,
80                                          const gchar    *status);
81
82 void progress_dialog_scroll_to_row      (ProgressDialog *progress,
83                                          gint            row);
84
85 #endif /* __PROGRESS_H__ */