Statistics
| Revision:

root / src / progressdialog.h @ 3064

History | View | Annotate | Download (2.6 kB)

1 1 hiro
/*
2 1 hiro
 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 2196 hiro
 * Copyright (C) 1999-2009 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 2043 hiro
        PROG_COL_PROGRESS,
47 321 hiro
        PROG_COL_POINTER,
48 321 hiro
        PROG_N_COLS
49 321 hiro
} ProgressColumn;
50 321 hiro
51 2196 hiro
ProgressDialog *progress_dialog_create                (void);
52 2196 hiro
ProgressDialog *progress_dialog_simple_create        (void);
53 2196 hiro
54 321 hiro
void progress_dialog_destroy                (ProgressDialog        *progress);
55 321 hiro
56 1 hiro
void progress_dialog_set_label                (ProgressDialog        *progress,
57 1 hiro
                                         gchar                *str);
58 1 hiro
void progress_dialog_set_value                (ProgressDialog        *progress,
59 1 hiro
                                         gfloat                 value);
60 1 hiro
void progress_dialog_set_percentage        (ProgressDialog        *progress,
61 1 hiro
                                         gfloat                 percentage);
62 1 hiro
63 321 hiro
void progress_dialog_append                (ProgressDialog        *progress,
64 321 hiro
                                         GdkPixbuf        *pixbuf,
65 321 hiro
                                         const gchar        *name,
66 321 hiro
                                         const gchar        *status,
67 2043 hiro
                                         const gchar        *progress_str,
68 321 hiro
                                         gpointer         data);
69 321 hiro
void progress_dialog_set_row                (ProgressDialog        *progress,
70 321 hiro
                                         gint                 row,
71 321 hiro
                                         GdkPixbuf        *pixbuf,
72 321 hiro
                                         const gchar        *name,
73 321 hiro
                                         const gchar        *status,
74 2043 hiro
                                         const gchar        *progress_str,
75 321 hiro
                                         gpointer         data);
76 321 hiro
77 321 hiro
void progress_dialog_set_row_pixbuf        (ProgressDialog        *progress,
78 321 hiro
                                         gint                 row,
79 321 hiro
                                         GdkPixbuf        *pixbuf);
80 321 hiro
void progress_dialog_set_row_name        (ProgressDialog        *progress,
81 321 hiro
                                         gint                 row,
82 321 hiro
                                         const gchar        *name);
83 321 hiro
void progress_dialog_set_row_status        (ProgressDialog        *progress,
84 321 hiro
                                         gint                 row,
85 321 hiro
                                         const gchar        *status);
86 2043 hiro
void progress_dialog_set_row_progress        (ProgressDialog        *progress,
87 2043 hiro
                                         gint                 row,
88 2043 hiro
                                         const gchar        *progress_str);
89 321 hiro
90 321 hiro
void progress_dialog_scroll_to_row        (ProgressDialog        *progress,
91 321 hiro
                                         gint                 row);
92 321 hiro
93 1 hiro
#endif /* __PROGRESS_H__ */