1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 * Copyright (C) 2005 Novell, Inc.
5 * Nautilus is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * Nautilus is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; see the file COPYING. If not,
17 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: Anders Carlsson <andersca@imendio.com>
24 #ifndef NAUTILUS_SEARCH_BAR_H
25 #define NAUTILUS_SEARCH_BAR_H
27 #include <gtk/gtkeventbox.h>
28 #include <libnautilus-private/nautilus-query.h>
30 #define NAUTILUS_TYPE_SEARCH_BAR (nautilus_search_bar_get_type ())
31 #define NAUTILUS_SEARCH_BAR(obj) \
32 GTK_CHECK_CAST (obj, NAUTILUS_TYPE_SEARCH_BAR, NautilusSearchBar)
33 #define NAUTILUS_SEARCH_BAR_CLASS(klass) \
34 GTK_CHECK_CLASS_CAST (klass, NAUTILUS_TYPE_SEARCH_BAR, NautilusSearchBarClass)
35 #define NAUTILUS_IS_SEARCH_BAR(obj) \
36 GTK_CHECK_TYPE (obj, NAUTILUS_TYPE_SEARCH_BAR)
38 typedef struct NautilusSearchBarDetails NautilusSearchBarDetails
;
40 typedef struct NautilusSearchBar
{
42 NautilusSearchBarDetails
*details
;
46 GtkEventBoxClass parent_class
;
48 void (* activate
) (NautilusSearchBar
*bar
);
49 void (* cancel
) (NautilusSearchBar
*bar
);
50 } NautilusSearchBarClass
;
52 GType
nautilus_search_bar_get_type (void);
53 GtkWidget
* nautilus_search_bar_new (void);
55 GtkWidget
* nautilus_search_bar_borrow_entry (NautilusSearchBar
*bar
);
56 void nautilus_search_bar_return_entry (NautilusSearchBar
*bar
);
57 void nautilus_search_bar_grab_focus (NautilusSearchBar
*bar
);
58 NautilusQuery
*nautilus_search_bar_get_query (NautilusSearchBar
*bar
);
59 void nautilus_search_bar_clear (NautilusSearchBar
*bar
);
61 #endif /* NAUTILUS_SEARCH_BAR_H */