Added NNTP authentication support
[claws.git] / src / textview.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999,2000 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 __TEXTVIEW_H__
21 #define __TEXTVIEW_H__
22
23 #include <glib.h>
24 #include <gtk/gtkwidget.h>
25
26 typedef struct _TextView        TextView;
27
28 #include "messageview.h"
29 #include "procmime.h"
30
31 struct _TextView
32 {
33         GtkWidget *vbox;
34         GtkWidget *scrolledwin;
35         GtkWidget *scrolledwin_sb;
36         GtkWidget *scrolledwin_mb;
37         GtkWidget *text;
38         GtkWidget *text_sb;
39         GtkWidget *text_mb;
40
41         gboolean text_is_mb;
42
43         GSList *uri_list;
44
45         GdkFont *msgfont;
46         GdkFont *boldfont;
47         gint prev_ascent;
48         gint prev_descent;
49
50         MessageView *messageview;
51 };
52
53 TextView *textview_create       (void);
54 void textview_init              (TextView       *textview);
55 void textview_show_message      (TextView       *textview,
56                                  MimeInfo       *mimeinfo,
57                                  const gchar    *file);
58 void textview_show_part         (TextView       *textview,
59                                  MimeInfo       *mimeinfo,
60                                  FILE           *fp);
61 void textview_show_mime_part    (TextView       *textview,
62                                  MimeInfo       *partinfo);
63 #if USE_GPGME
64 void textview_show_signature_part(TextView      *textview,
65                                   MimeInfo      *partinfo);
66 #endif
67 void textview_clear             (TextView       *textview);
68 void textview_destroy           (TextView       *textview);
69 void textview_set_font          (TextView       *textview,
70                                  const gchar    *codeset);
71 void textview_scroll_one_line   (TextView       *textview,
72                                  gboolean        up);
73 gboolean textview_scroll_page   (TextView       *textview,
74                                  gboolean        up);
75 void textview_update_message_colors(void);
76
77 #endif /* __TEXTVIEW_H__ */