Check that a given filename is valid before setting it on a GtkFileChooserButton
[anjuta-git-plugin.git] / plugins / valgrind / vgsearchbar.h
blobdfb516c6fd60679303b08ee4f18cac641d2e8934
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * Authors: Jeffrey Stedfast <fejj@ximian.com>
5 * Copyright 2003 Ximian, Inc. (www.ximian.com)
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.
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.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #ifndef __VG_SEARCH_BAR_H__
25 #define __VG_SEARCH_BAR_H__
27 #include <gtk/gtk.h>
29 #ifdef __cplusplus
30 extern "C" {
31 #pragma }
32 #endif /* __cplusplus */
34 #define VG_TYPE_SEARCH_BAR (vg_search_bar_get_type ())
35 #define VG_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_SEARCH_BAR, VgSearchBar))
36 #define VG_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_SEARCH_BAR, VgSearchBarClass))
37 #define VG_IS_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_SEARCH_BAR))
38 #define VG_IS_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_SEARCH_BAR))
39 #define VG_SEARCH_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_SEARCH_BAR, VgSearchBarClass))
41 typedef struct _VgSearchBar VgSearchBar;
42 typedef struct _VgSearchBarClass VgSearchBarClass;
44 typedef struct _VgSearchBarItem {
45 const char *label;
46 int id;
47 } VgSearchBarItem;
49 struct _VgSearchBar {
50 GtkHBox parent_object;
52 GtkOptionMenu *menu;
53 GtkEntry *entry;
54 GtkWidget *clear;
56 int item_id;
59 struct _VgSearchBarClass {
60 GtkHBoxClass parent_class;
62 /* virtual methods */
63 void (* set_menu_items) (VgSearchBar *bar, VgSearchBarItem *items);
65 /* signals */
66 void (* search) (VgSearchBar *bar, int item_id);
67 void (* clear) (VgSearchBar *bar);
71 GType vg_search_bar_get_type (void);
73 GtkWidget *vg_search_bar_new (void);
75 void vg_search_bar_set_menu_items (VgSearchBar *bar, VgSearchBarItem *items);
77 const char *vg_search_bar_get_text (VgSearchBar *bar);
79 #ifdef __cplusplus
81 #endif /* __cplusplus */
83 #endif /* __VG_SEARCH_BAR_H__ */