2007-10-15 [colin] 3.0.2cvs76
[claws.git] / src / gtk / quicksearch.h
1 /*
2  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net> 
4  * and the Claws Mail team
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  * 
19  */
20
21 #ifndef QUICKSEARCH_H
22 #define QUICKSEARCH_H 1
23
24 typedef enum
25 {
26         QUICK_SEARCH_SUBJECT,
27         QUICK_SEARCH_FROM,
28         QUICK_SEARCH_TO,
29         QUICK_SEARCH_EXTENDED,
30         QUICK_SEARCH_MIXED,
31         QUICK_SEARCH_TAG
32 } QuickSearchType;
33
34 typedef struct _QuickSearch QuickSearch;
35 typedef void (*QuickSearchExecuteCallback) (QuickSearch *quicksearch, gpointer data);
36
37 #include "procmsg.h"
38
39 QuickSearch *quicksearch_new();
40 GtkWidget *quicksearch_get_widget(QuickSearch *quicksearch);
41 void quicksearch_show(QuickSearch *quicksearch);
42 void quicksearch_hide(QuickSearch *quicksearch);
43 void quicksearch_set(QuickSearch *quicksearch, QuickSearchType type, const gchar *matchstring);
44 gboolean quicksearch_is_active(QuickSearch *quicksearch);
45 void quicksearch_set_execute_callback(QuickSearch *quicksearch,
46                                       QuickSearchExecuteCallback callback,
47                                       gpointer data);
48 gboolean quicksearch_match(QuickSearch *quicksearch, MsgInfo *msginfo);
49 gboolean quicksearch_is_running(QuickSearch *quicksearch);
50 gboolean quicksearch_has_focus(QuickSearch *quicksearch);
51 void quicksearch_pass_key(QuickSearch *quicksearch, guint val, GdkModifierType mod);
52 void quicksearch_reset_cur_folder_item(QuickSearch *quicksearch);
53 void quicksearch_search_subfolders(QuickSearch *quicksearch, 
54                                    FolderView  *folderview,
55                                    FolderItem  *folder_item);
56 gboolean quicksearch_is_fast(QuickSearch *quicksearch);
57 gboolean quicksearch_is_in_typing(QuickSearch *quicksearch);
58 void quicksearch_relayout(QuickSearch *quicksearch);
59 #endif /* QUICKSEARCH_H */