2
* This file is part of libslab.
4
* Copyright (c) 2006 Novell, Inc.
6
* Libslab is free software; you can redistribute it and/or modify it under the
7
* terms of the GNU Lesser General Public License as published by the Free
8
* Software Foundation; either version 2 of the License, or (at your option)
11
* Libslab is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with libslab; if not, write to the Free Software Foundation, Inc., 51
18
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef __NLD_SEARCH_BAR_H__
22
#define __NLD_SEARCH_BAR_H__
28
#define NLD_TYPE_SEARCH_BAR (nld_search_bar_get_type ())
29
#define NLD_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NLD_TYPE_SEARCH_BAR, NldSearchBar))
30
#define NLD_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NLD_TYPE_SEARCH_BAR, NldSearchBarClass))
31
#define NLD_IS_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NLD_TYPE_SEARCH_BAR))
32
#define NLD_IS_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NLD_TYPE_SEARCH_BAR))
33
#define NLD_SEARCH_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NLD_TYPE_SEARCH_BAR, NldSearchBarClass))
42
GtkVBoxClass parent_class;
44
void (*search) (NldSearchBar *, int context_id, const char *text);
47
GType nld_search_bar_get_type (void);
49
GtkWidget *nld_search_bar_new (void);
51
void nld_search_bar_clear (NldSearchBar * search_bar);
52
gboolean nld_search_bar_has_focus (NldSearchBar * search_bar);
54
gboolean nld_search_bar_get_show_contexts (NldSearchBar * search_bar);
55
void nld_search_bar_set_show_contexts (NldSearchBar * search_bar, gboolean show_contexts);
56
void nld_search_bar_add_context (NldSearchBar * search_bar, const char *label,
57
const char *icon_name, int context_id);
59
gboolean nld_search_bar_get_show_button (NldSearchBar * search_bar);
60
void nld_search_bar_set_show_button (NldSearchBar * search_bar, gboolean show_button);
62
int nld_search_bar_get_search_timeout (NldSearchBar * search_bar);
63
void nld_search_bar_set_search_timeout (NldSearchBar * search_bar, int search_timeout);
65
const char *nld_search_bar_get_text (NldSearchBar * search_bar);
66
void nld_search_bar_set_text (NldSearchBar * search_bar, const char *text, gboolean activate);
68
int nld_search_bar_get_context_id (NldSearchBar * search_bar);
69
void nld_search_bar_set_context_id (NldSearchBar * search_bar, int context_id);
72
#endif /* __NLD_SEARCH_BAR_H__ */