colour message instead of mark it
[claws.git] / src / procmsg.h
index 0f65c473ee10d8683cd7f91b7583c1eb897b0310..7dbc1340e3e76e4eb7232a5b72deaab2c37abaa6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 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
@@ -39,11 +39,22 @@ typedef enum
        MSG_DELETED     = 1 << 3,
        MSG_REPLIED     = 1 << 4,
        MSG_FORWARDED   = 1 << 5,
+       MSG_REALLY_DELETED = 1 << 6,
 
        /* temporary flags (0xffff0000) */
        MSG_MOVE        = 1 << 16,
        MSG_COPY        = 1 << 17,
 
+       MSG_LABEL         = 1 << 8 | 1 << 7 | 1 << 6,
+       MSG_LABEL_NONE    = 0 << 8 | 0 << 7 | 0 << 6,
+       MSG_LABEL_ORANGE  = 0 << 8 | 0 << 7 | 1 << 6,
+       MSG_LABEL_RED     = 0 << 8 | 1 << 7 | 0 << 6,
+       MSG_LABEL_PINK    = 0 << 8 | 1 << 7 | 1 << 6,
+       MSG_LABEL_SKYBLUE = 1 << 8 | 0 << 7 | 0 << 6,
+       MSG_LABEL_BLUE    = 1 << 8 | 0 << 7 | 1 << 6,
+       MSG_LABEL_GREEN   = 1 << 8 | 1 << 7 | 0 << 6,
+       MSG_LABEL_BROWN   = 1 << 8 | 1 << 7 | 1 << 6,
+
        MSG_QUEUED      = 1 << 25,
        MSG_DRAFT       = 1 << 26,
        MSG_ENCRYPTED   = 1 << 27,
@@ -58,7 +69,9 @@ typedef enum
                                         MSG_MARKED    | \
                                         MSG_DELETED   | \
                                         MSG_REPLIED   | \
-                                        MSG_FORWARDED)
+                                        MSG_FORWARDED | \
+                                         MSG_LABEL     | \
+                                         MSG_REALLY_DELETED)
 #define MSG_CACHED_FLAG_MASK           (MSG_MIME)
 
 #define MSG_SET_FLAGS(msg, flags)      { (msg) |= (flags); }
@@ -72,6 +85,7 @@ typedef enum
 
 #define MSG_IS_MOVE(msg)               ((msg & MSG_MOVE) != 0)
 #define MSG_IS_COPY(msg)               ((msg & MSG_COPY) != 0)
+#define MSG_IS_REALLY_DELETED(msg)     ((msg & MSG_REALLY_DELETED) != 0)
 
 #define MSG_IS_QUEUED(msg)             ((msg & MSG_QUEUED) != 0)
 #define MSG_IS_DRAFT(msg)              ((msg & MSG_DRAFT) != 0)
@@ -81,6 +95,8 @@ typedef enum
 #define MSG_IS_NEWS(msg)               ((msg & MSG_NEWS) != 0)
 #define MSG_IS_CACHED(msg)             ((msg & MSG_CACHED) != 0)
 
+#define MSG_GET_LABEL(msg)             (msg & MSG_LABEL)
+
 #define WRITE_CACHE_DATA_INT(n, fp) \
        fwrite(&n, sizeof(n), 1, fp)
 
@@ -111,11 +127,11 @@ struct _MsgInfo
        gchar *date;
        gchar *from;
        gchar *to;
+       gchar *cc;
        gchar *newsgroups;
        gchar *subject;
        gchar *msgid;
        gchar *inreplyto;
-       gchar *cc;
 
        FolderItem *folder;
        FolderItem *to_folder;
@@ -125,6 +141,9 @@ struct _MsgInfo
        gchar *dispositionnotificationto;
        gchar *returnreceiptto;
 
+       gchar *references;
+       gchar *fromspace;
+
        gint score;
        gint threadscore;
 
@@ -143,6 +162,7 @@ GSList *procmsg_read_cache          (FolderItem     *item,
 void   procmsg_set_flags               (GSList         *mlist,
                                         FolderItem     *item);
 gint   procmsg_get_last_num_in_cache   (GSList         *mlist);
+void   procmsg_msg_list_free           (GSList         *mlist);
 void   procmsg_write_cache             (MsgInfo        *msginfo,
                                         FILE           *fp);
 void   procmsg_write_flags             (MsgInfo        *msginfo,