libanjuta: Move autogen functions from project-wizard to libanjuta
[anjuta.git] / plugins / class-gen / validator.h
blob8aa841d3b0070e4514275c71aaf7aec7cb1ed54e
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /* validator.h
3 * Copyright (C) 2006 Armin Burgmeier
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program 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
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __CLASSGEN_VALIDATOR_H__
21 #define __CLASSGEN_VALIDATOR_H__
23 #include <gtk/gtk.h>
25 #include <glib-object.h>
27 G_BEGIN_DECLS
29 #define CG_TYPE_VALIDATOR (cg_validator_get_type ())
30 #define CG_VALIDATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CG_TYPE_VALIDATOR, CgValidator))
31 #define CG_VALIDATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CG_TYPE_VALIDATOR, CgValidatorClass))
32 #define CG_IS_VALIDATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CG_TYPE_VALIDATOR))
33 #define CG_IS_VALIDATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CG_TYPE_VALIDATOR))
34 #define CG_VALIDATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CG_TYPE_VALIDATOR, CgValidatorClass))
36 typedef struct _CgValidatorClass CgValidatorClass;
37 typedef struct _CgValidator CgValidator;
39 /* Object that sets the a given widget to insensitive if a
40 * variable amount of GtkEntrys are empty. */
42 struct _CgValidatorClass
44 GObjectClass parent_class;
47 struct _CgValidator
49 GObject parent_instance;
52 GType cg_validator_get_type (void) G_GNUC_CONST;
54 CgValidator *cg_validator_new (GtkWidget *widget,
55 ...);
56 void cg_validator_revalidate (CgValidator *validator);
58 G_END_DECLS
60 #endif /* __CLASSGEN_VALIDATOR_H__ */