diff options
Diffstat (limited to 'src/progressdialog.h')
| -rw-r--r-- | src/progressdialog.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/src/progressdialog.h b/src/progressdialog.h new file mode 100644 index 0000000..fd5a327 --- /dev/null +++ b/src/progressdialog.h | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | /* | ||
| 2 | * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client | ||
| 3 | * Copyright (C) 1999-2009 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_PROGRESS, | ||
| 47 | PROG_COL_POINTER, | ||
| 48 | PROG_N_COLS | ||
| 49 | } ProgressColumn; | ||
| 50 | |||
| 51 | ProgressDialog *progress_dialog_create (void); | ||
| 52 | ProgressDialog *progress_dialog_simple_create (void); | ||
| 53 | |||
| 54 | void progress_dialog_destroy (ProgressDialog *progress); | ||
| 55 | |||
| 56 | void progress_dialog_set_label (ProgressDialog *progress, | ||
| 57 | gchar *str); | ||
| 58 | void progress_dialog_set_value (ProgressDialog *progress, | ||
| 59 | gfloat value); | ||
| 60 | void progress_dialog_set_percentage (ProgressDialog *progress, | ||
| 61 | gfloat percentage); | ||
| 62 | |||
| 63 | void progress_dialog_append (ProgressDialog *progress, | ||
| 64 | GdkPixbuf *pixbuf, | ||
| 65 | const gchar *name, | ||
| 66 | const gchar *status, | ||
| 67 | const gchar *progress_str, | ||
| 68 | gpointer data); | ||
| 69 | void progress_dialog_set_row (ProgressDialog *progress, | ||
| 70 | gint row, | ||
| 71 | GdkPixbuf *pixbuf, | ||
| 72 | const gchar *name, | ||
| 73 | const gchar *status, | ||
| 74 | const gchar *progress_str, | ||
| 75 | gpointer data); | ||
| 76 | |||
| 77 | void progress_dialog_set_row_pixbuf (ProgressDialog *progress, | ||
| 78 | gint row, | ||
| 79 | GdkPixbuf *pixbuf); | ||
| 80 | void progress_dialog_set_row_name (ProgressDialog *progress, | ||
| 81 | gint row, | ||
| 82 | const gchar *name); | ||
| 83 | void progress_dialog_set_row_status (ProgressDialog *progress, | ||
| 84 | gint row, | ||
| 85 | const gchar *status); | ||
| 86 | void progress_dialog_set_row_progress (ProgressDialog *progress, | ||
| 87 | gint row, | ||
| 88 | const gchar *progress_str); | ||
| 89 | |||
| 90 | void progress_dialog_scroll_to_row (ProgressDialog *progress, | ||
| 91 | gint row); | ||
| 92 | |||
| 93 | #endif /* __PROGRESS_H__ */ | ||
