2008-04-12 Johannes Schmid <jhs@gnome.org>
[anjuta-git-plugin.git] / plugins / valgrind / vgrule-list.h
blob2fbae0e2fabf22895f71c1eb9cdf8ae30d58b6f9
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_RULE_LIST_H__
25 #define __VG_RULE_LIST_H__
27 #include <gtk/gtk.h>
29 #include "vgrule-editor.h"
31 #include "list.h"
33 #ifdef __cplusplus
34 extern "C" {
35 #pragma }
36 #endif /* __cplusplus */
38 #define VG_TYPE_RULE_LIST (vg_rule_list_get_type ())
39 #define VG_RULE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_RULE_LIST, VgRuleList))
40 #define VG_RULE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_RULE_LIST, VgRuleListClass))
41 #define IS_VG_RULE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_RULE_LIST))
42 #define IS_VG_RULE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_RULE_LIST))
43 #define VG_RULE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_RULE_LIST, VgRuleListClass))
45 typedef struct _VgRuleList VgRuleList;
46 typedef struct _VgRuleListClass VgRuleListClass;
48 struct _VgRuleList {
49 GtkVBox parent_object;
51 GtkTreeModel *model;
52 GtkWidget *list;
54 List rules;
56 GtkWidget *add;
57 GtkWidget *edit;
58 GtkWidget *remove;
60 char *filename;
61 VgRuleParser *parser;
62 GIOChannel *gio;
63 guint show_id;
64 guint load_id;
66 gboolean changed;
69 struct _VgRuleListClass {
70 GtkVBoxClass parent_class;
72 /* signals */
74 void (* rule_added) (VgRuleList *list, VgRule *rule);
77 GType vg_rule_list_get_type (void);
78 GType vg_rule_list_get_class (void);
80 GtkWidget *vg_rule_list_new (const char *filename);
82 void vg_rule_list_set_filename (VgRuleList *list, const char *filename);
84 int vg_rule_list_save (VgRuleList *list);
87 /* interface to get add a rule from another window */
88 void vg_rule_list_add_rule (VgRuleList *list, const char *title, GtkWindow *parent,
89 VgErrorSummary *summary);
91 #ifdef __cplusplus
93 #endif /* __cplusplus */
95 #endif /* __VG_RULE_LIST__ */