Statistics
| Revision:

root / src / progressdialog.h @ 1577

History | View | Annotate | Download (2.4 kB)

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