fix idn support properly
[apps/madmutt.git] / thread.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4  *
5  * This file is part of mutt-ng, see http://www.muttng.org/.
6  * It's licensed under the GNU General Public License,
7  * please see the file GPL in the top level source directory.
8  */
9 #ifndef _MUTT_THREAD_H
10 #define _MUTT_THREAD_H
11
12 #include "mutt.h"
13
14 #define mutt_next_thread(x) _mutt_aside_thread(x,1,0)
15 #define mutt_previous_thread(x) _mutt_aside_thread(x,0,0)
16 #define mutt_next_subthread(x) _mutt_aside_thread(x,1,1)
17 #define mutt_previous_subthread(x) _mutt_aside_thread(x,0,1)
18 int _mutt_aside_thread (HEADER *, short, short);
19
20 #define mutt_collapse_thread(x,y) _mutt_traverse_thread (x,y,M_THREAD_COLLAPSE)
21 #define mutt_uncollapse_thread(x,y) _mutt_traverse_thread (x,y,M_THREAD_UNCOLLAPSE)
22 #define mutt_get_hidden(x,y)_mutt_traverse_thread (x,y,M_THREAD_GET_HIDDEN)
23 #define mutt_thread_contains_unread(x,y) _mutt_traverse_thread (x,y,M_THREAD_UNREAD)
24 #define mutt_thread_next_unread(x,y) _mutt_traverse_thread(x,y,M_THREAD_NEXT_UNREAD)
25 int _mutt_traverse_thread (CONTEXT * ctx, HEADER * hdr, int flag);
26
27 void mutt_clear_threads (CONTEXT *);
28
29 void mutt_sort_threads (CONTEXT *, int);
30 THREAD *mutt_sort_subthreads (THREAD *, int);
31
32 int mutt_parent_message (CONTEXT *, HEADER *);
33 void mutt_set_virtual (CONTEXT *);
34
35 int mutt_messages_in_thread (CONTEXT *, HEADER *, int);
36
37 hash_t *mutt_make_id_hash (CONTEXT *);
38 hash_t *mutt_make_subj_hash (CONTEXT *);
39
40 int mutt_link_threads (HEADER *, HEADER *, CONTEXT *);
41 void mutt_break_thread (HEADER *);
42
43 /* computes an envelope's real_subj from subj */
44 void mutt_adjust_subject (ENVELOPE* e);
45 /* does mutt_adjust_subject() for messages in Context */
46 void mutt_adjust_all_subjects (void);
47
48 #endif /* !_MUTT_THREAD_H */