Moved struct and enum declarations from prefswindow.c to .h.
[claws.git] / src / gtk / quicksearch.h
1 /*
2  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2012 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 #include "advsearch.h"
25
26 typedef struct _QuickSearch QuickSearch;
27 typedef void (*QuickSearchExecuteCallback) (QuickSearch *quicksearch, gpointer data);
28
29 #include "procmsg.h"
30
31 QuickSearch *quicksearch_new();
32 GtkWidget *quicksearch_get_widget(QuickSearch *quicksearch);
33 void quicksearch_show(QuickSearch *quicksearch);
34 void quicksearch_hide(QuickSearch *quicksearch);
35 void quicksearch_set(QuickSearch *quicksearch, AdvancedSearchType type, const gchar *matchstring);
36 void quicksearch_set_recursive(QuickSearch *quicksearch, gboolean recursive);
37 gboolean quicksearch_has_sat_predicate(QuickSearch *quicksearch);
38 void quicksearch_set_execute_callback(QuickSearch *quicksearch,
39                                       QuickSearchExecuteCallback callback,
40                                       gpointer data);
41 void quicksearch_set_on_progress_cb(QuickSearch* search,
42                 gboolean (*cb)(gpointer data, guint at, guint matched, guint total), gpointer data);
43
44 gboolean quicksearch_run_on_folder(QuickSearch* quicksearch, FolderItem *folderItem, MsgInfoList **result);
45
46 gboolean quicksearch_is_running(QuickSearch *quicksearch);
47 gboolean quicksearch_has_focus(QuickSearch *quicksearch);
48 void quicksearch_pass_key(QuickSearch *quicksearch, guint val, GdkModifierType mod);
49 gboolean quicksearch_is_fast(QuickSearch *quicksearch);
50 gboolean quicksearch_is_in_typing(QuickSearch *quicksearch);
51 void quicksearch_relayout(QuickSearch *quicksearch);
52 void quicksearch_set_search_strings(QuickSearch *quicksearch);
53 #endif /* QUICKSEARCH_H */