jbsrc/lib/src/core/jb-feature.h (1727B) - raw
1 /* 2 * JB, the Jean-Yves Lefort's Build System 3 * Copyright (C) 2008 Jean-Yves Lefort <jylefort@brutele.be> 4 * 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 3 of the License, or 8 * (at your option) any later version. 9 * 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 General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along 16 * with this program; if not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 #ifndef _JB_FEATURE_H 21 #define _JB_FEATURE_H 22 23 #include <glib.h> 24 25 /* 26 * A JBFeature is a modular chunk that must be brought in by the 27 * package if it uses a certain JB functionality. For instance it must 28 * reference jb_gconf_feature if it uses jb_group_add_gconf_schemas(). 29 */ 30 31 typedef struct 32 { 33 void (*init) (void); 34 void (*configure) (void); 35 } JBFeature; 36 37 /* ordered from least to most specific (roughly) */ 38 extern JBFeature jb_pkg_config_feature; 39 extern JBFeature jb_gettext_feature; 40 extern JBFeature jb_intltool_feature; 41 extern JBFeature jb_gconf_feature; 42 extern JBFeature jb_gnome_help_feature; 43 extern JBFeature jb_gob2_feature; 44 45 extern gboolean jb_intltool_use_xml; 46 47 void jb_feature_set_list (const JBFeature **features, int num_features); 48 gboolean jb_feature_is_enabled (JBFeature *feature); 49 50 void jb_feature_init (void); 51 void jb_feature_configure (void); 52 53 #endif /* _JB_FEATURE_H */