2006-09-04 [colin] 2.4.0cvs143
[claws.git] / src / textview.h
index 4011d932cfd7afdbe8c33c646e9070f251639af0..b23edc838cd171366f456fefa0d566881c37b98b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #ifndef __TEXTVIEW_H__
 
 #include <glib.h>
 #include <gtk/gtkwidget.h>
+#include <gtk/gtktextiter.h>
 
 typedef struct _TextView       TextView;
+typedef struct _ClickableText  ClickableText;
 
 #include "messageview.h"
 #include "procmime.h"
@@ -36,54 +38,55 @@ struct _TextView
 {
        GtkWidget *vbox;
        GtkWidget *scrolledwin;
-       GtkWidget *scrolledwin_sb;
-       GtkWidget *scrolledwin_mb;
        GtkWidget *text;
-       GtkWidget *text_sb;
-       GtkWidget *text_mb;
 
-       GtkWidget *popup_menu;
-       GtkItemFactory *popup_factory;
+       GtkWidget *link_popup_menu;
+       GtkItemFactory *link_popup_factory;
+       GtkWidget *mail_popup_menu;
+       GtkItemFactory *mail_popup_factory;
+       GtkWidget *file_popup_menu;
+       GtkItemFactory *file_popup_factory;
 
-       gboolean text_is_mb;
        gboolean default_text;
        gboolean is_in_signature;
        
        GSList *uri_list;
        gint body_pos;
-       gint cur_pos;
-
-       GdkFont *msgfont;
-       GdkFont *boldfont;
 
        gboolean show_all_headers;
 
        MessageView *messageview;
        gint last_buttonpress;
-       gint show_url_msgid;
-       gint show_url_timeout_tag;
+
+       ClickableText *uri_hover;
+       GtkTextIter uri_hover_start_iter;
+       GtkTextIter uri_hover_end_iter;
+       GtkWidget *image;
+       gboolean loading;
+       gboolean stop_loading;
 };
 
-TextView *textview_create      (void);
-void textview_init             (TextView       *textview);
+TextView *textview_create              (void);
+void textview_init                     (TextView       *textview);
+void textview_reflect_prefs            (TextView       *textview);
+
 void textview_show_message     (TextView       *textview,
                                 MimeInfo       *mimeinfo,
                                 const gchar    *file);
 void textview_show_part                (TextView       *textview,
                                 MimeInfo       *mimeinfo,
                                 FILE           *fp);
+void textview_show_error       (TextView       *textview);
 void textview_show_mime_part   (TextView       *textview,
                                 MimeInfo       *partinfo);
-#if USE_GPGME
-void textview_show_signature_part(TextView     *textview,
-                                 MimeInfo      *partinfo);
-#endif
 void textview_clear            (TextView       *textview);
 void textview_destroy          (TextView       *textview);
 void textview_set_all_headers  (TextView       *textview,
                                 gboolean        all_headers);
 void textview_set_font         (TextView       *textview,
                                 const gchar    *codeset);
+void textview_set_text         (TextView       *textview,
+                                const gchar    *text);
 void textview_set_position     (TextView       *textview,
                                 gint            pos);
 void textview_scroll_one_line  (TextView       *textview,
@@ -91,13 +94,13 @@ void textview_scroll_one_line       (TextView       *textview,
 gboolean textview_scroll_page  (TextView       *textview,
                                 gboolean        up);
 
-void textview_update_message_colors    (void);
-
 gboolean textview_search_string                        (TextView       *textview,
                                                 const gchar    *str,
                                                 gboolean        case_sens);
 gboolean textview_search_string_backward       (TextView       *textview,
                                                 const gchar    *str,
                                                 gboolean        case_sens);
+void textview_cursor_wait(TextView *textview);
+void textview_cursor_normal(TextView *textview);
 
 #endif /* __TEXTVIEW_H__ */