Cleanup main.h header
[geeqie.git] / src / ui-tabcomp.h
1 /*
2  * Copyright (C) 2004 John Ellis
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * Author: John Ellis
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef UI_TABCOMP_H
23 #define UI_TABCOMP_H
24
25 #include <gtk/gtk.h>
26
27 GtkWidget *tab_completion_new_with_history(GtkWidget **entry, const gchar *text,
28                                            const gchar *history_key, gint max_levels,
29                                            void (*enter_func)(const gchar *, gpointer), gpointer data);
30 const gchar *tab_completion_set_to_last_history(GtkWidget *entry);
31 void tab_completion_append_to_history(GtkWidget *entry, const gchar *path);
32
33 GtkWidget *tab_completion_new(GtkWidget **entry, const gchar *text,
34                               void (*enter_func)(const gchar *, gpointer), const gchar *filter, const gchar *filter_desc, gpointer data);
35 void tab_completion_add_to_entry(GtkWidget *entry, void (*enter_func)(const gchar *, gpointer), const gchar *filter, const gchar *filter_desc, gpointer data);
36 void tab_completion_add_tab_func(GtkWidget *entry, void (*tab_func)(const gchar *, gpointer), gpointer data);
37 gchar *remove_trailing_slash(const gchar *path);
38
39 void tab_completion_add_select_button(GtkWidget *entry, const gchar *title, gboolean folders_only);
40 void tab_completion_add_append_func(GtkWidget *entry, void (*tab_append_func)(const gchar *, gpointer, gint), gpointer data);
41
42
43 #endif
44 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */