sync with sylpheed 0.7.0cvs27
[claws.git] / src / summaryview.h
index 1ec8372..98b7e1d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
  *
  * 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
 #include <gtk/gtkctree.h>
 #include <gtk/gtkdnd.h>
 
-typedef struct _SummaryView    SummaryView;
+typedef struct _SummaryView            SummaryView;
+typedef struct _SummaryColumnState     SummaryColumnState;
 
 #include "mainwindow.h"
 #include "folderview.h"
 #include "headerview.h"
 #include "messageview.h"
 #include "headerwindow.h"
+#include "compose.h"
+#include "prefs_filter.h"
 #include "folder.h"
 #include "gtksctree.h"
 
 typedef enum
 {
-       S_COL_MARK      = 0,
-       S_COL_UNREAD    = 1,
-       S_COL_MIME      = 2,
-       S_COL_NUMBER    = 3,
-       S_COL_SCORE     = 4,
-       S_COL_SIZE      = 5,
-       S_COL_DATE      = 6,
-       S_COL_FROM      = 7,
-       S_COL_SUBJECT   = 8
-} SummaryColumnPos;
-
-#define N_SUMMARY_COLS 9
+       S_COL_MARK,
+       S_COL_UNREAD,
+       S_COL_MIME,
+       S_COL_SUBJECT,
+       S_COL_FROM,
+       S_COL_DATE,
+       S_COL_SIZE,
+       S_COL_NUMBER,
+       S_COL_SCORE,
+       S_COL_LOCKED
+} SummaryColumnType;
+
+#define N_SUMMARY_COLS 10
 
 typedef enum
 {
@@ -61,7 +65,11 @@ typedef enum
        SORT_BY_FROM,
        SORT_BY_SUBJECT,
        SORT_BY_SCORE,
-       SORT_BY_LABEL
+       SORT_BY_LOCKED,
+       SORT_BY_LABEL,
+       SORT_BY_MARK,
+       SORT_BY_UNREAD,
+       SORT_BY_MIME
 } SummarySortType;
 
 typedef enum
@@ -80,6 +88,12 @@ typedef enum
 
 extern GtkTargetEntry summary_drag_types[1];
 
+struct _SummaryColumnState
+{
+       SummaryColumnType type;
+       gboolean visible;
+};
+
 struct _SummaryView
 {
        GtkWidget *vbox;
@@ -89,9 +103,10 @@ struct _SummaryView
        GtkWidget *statlabel_folder;
        GtkWidget *statlabel_select;
        GtkWidget *statlabel_msgs;
-       GtkWidget *toggle_eventbox;
-       GtkWidget *toggle_arrow;
+       GtkWidget *toggle_view_btn;
+       GtkWidget *toggle_view_arrow;
        GtkWidget *popupmenu;
+       GtkWidget *colorlabel_menu;
 
        GtkItemFactory *popupfactory;
 
@@ -104,9 +119,13 @@ struct _SummaryView
        gboolean display_msg;
 
        GdkColor color_important;
+       SummaryColumnState col_state[N_SUMMARY_COLS];
+       gint col_pos[N_SUMMARY_COLS];
+
        GdkColor color_marked;
        GdkColor color_dim;
-       GdkColor color_normal;
+
+       guint lock_count;
 
        MainWindow   *mainwin;
        FolderView   *folderview;
@@ -143,6 +162,7 @@ private:
        /* current sorting state */
        SummarySortType sort_mode;
        GtkSortType sort_type;
+
 };
 
 SummaryView    *summary_create(void);
@@ -154,26 +174,47 @@ gboolean summary_show               (SummaryView          *summaryview,
 void summary_clear_list                  (SummaryView          *summaryview);
 void summary_clear_all           (SummaryView          *summaryview);
 
+void summary_lock                (SummaryView          *summaryview);
+void summary_unlock              (SummaryView          *summaryview);
+gboolean summary_is_locked       (SummaryView          *summaryview);
+
+SummarySelection summary_get_selection_type    (SummaryView    *summaryview);
+
+void summary_select_prev_unread          (SummaryView          *summaryview);
 void summary_select_next_unread          (SummaryView          *summaryview);
-void summary_select_next_marked   (SummaryView         *summaryview);
-void summary_select_prev_marked   (SummaryView         *summaryview);
+void summary_select_prev_marked          (SummaryView          *summaryview);
+void summary_select_next_marked          (SummaryView          *summaryview);
+void summary_select_prev_labeled  (SummaryView         *summaryview);
+void summary_select_next_labeled  (SummaryView         *summaryview);
 void summary_select_by_msgnum    (SummaryView          *summaryview,
                                   guint                 msgnum);
 guint summary_get_current_msgnum  (SummaryView         *summaryview);
+void summary_select_node         (SummaryView          *summaryview,
+                                  GtkCTreeNode         *node,
+                                  gboolean              display_msg);
+
 void summary_thread_build        (SummaryView          *summaryview);
 void summary_unthread            (SummaryView          *summaryview);
+
 void summary_filter              (SummaryView          *summaryview);
+void summary_filter_open         (SummaryView          *summaryview,
+                                  PrefsFilterType       type);
+
 void summary_sort                (SummaryView          *summaryview,
                                   SummarySortType       type);
 
 void summary_delete              (SummaryView          *summaryview);
 void summary_delete_duplicated   (SummaryView          *summaryview);
-void summary_execute             (SummaryView          *summaryview);
+
+gboolean summary_execute         (SummaryView          *summaryview);
+
 void summary_attract_by_subject          (SummaryView          *summaryview);
+
 gint summary_write_cache         (SummaryView          *summaryview);
+
 void summary_pass_key_press_event (SummaryView         *summaryview,
                                   GdkEventKey          *event);
-void summary_change_display_item  (SummaryView         *summaryview);
+
 void summary_redisplay_msg       (SummaryView          *summaryview);
 void summary_open_msg            (SummaryView          *summaryview);
 void summary_view_source         (SummaryView          *summaryview);
@@ -194,9 +235,27 @@ void summary_mark            (SummaryView          *summaryview);
 void summary_unmark              (SummaryView          *summaryview);
 void summary_mark_as_unread      (SummaryView          *summaryview);
 void summary_mark_as_read        (SummaryView          *summaryview);
+void summary_mark_all_read       (SummaryView          *summaryview);
+void summary_add_address         (SummaryView          *summaryview);
 void summary_select_all                  (SummaryView          *summaryview);
 void summary_unselect_all        (SummaryView          *summaryview);
-void summary_set_label           (SummaryView          *summaryview, guint labelcolor, GtkWidget *widget);
-void summary_set_label_color     (GtkCTree *ctree, GtkCTreeNode *node, guint labelcolor);
+
+void summary_reply               (SummaryView          *summaryview,
+                                  ComposeMode           mode);
+
+void summary_set_colorlabel      (SummaryView          *summaryview,
+                                  guint                 labelcolor,
+                                  GtkWidget            *widget);
+void summary_set_colorlabel_color (GtkCTree            *ctree,
+                                  GtkCTreeNode         *node,
+                                  guint                 labelcolor);
+
+void summary_set_column_order    (SummaryView          *summaryview);
+
+void processing_apply();
+
+void summary_toggle_show_read_messages (SummaryView *summaryview);
+
+void summary_toggle_view_real  (SummaryView    *summaryview);
 
 #endif /* __SUMMARY_H__ */