1 /* 2 * libInstPatch 3 * Copyright (C) 1999-2014 Element Green <element@elementsofsound.org> 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public License 7 * as published by the Free Software Foundation; version 2.1 8 * of the License only. 9 * 10 * This library 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 Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser 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 18 * 02110-1301, USA or on the web at http://www.gnu.org. 19 */ 20 #ifndef __IPATCH_UTIL_H__ 21 #define __IPATCH_UTIL_H__ 22 23 #include <glib.h> 24 #include <glib-object.h> 25 26 extern GValue *ipatch_util_value_bool_true; 27 extern GValue *ipatch_util_value_bool_false; 28 29 /* a pointer to a constant boolean GValue for TRUE or FALSE depending on input 30 * value. */ 31 #define IPATCH_UTIL_VALUE_BOOL(b) \ 32 ((b) ? ipatch_util_value_bool_true : ipatch_util_value_bool_false) 33 34 guint ipatch_util_value_hash(GValue *val); 35 guint ipatch_util_value_array_hash(GValueArray *valarray); 36 guint64 ipatch_util_file_size(const char *fname, GError **err); 37 char *ipatch_util_abs_filename(const char *filename); 38 void ipatch_util_weakref_destroy(gpointer value); 39 40 #endif 41