1 /* 2 * Copyright (C) 2002 2003 2004 2005 2006, Magnus Hjorth 3 * 4 * This file is part of mhWaveEdit. 5 * 6 * mhWaveEdit is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * mhWaveEdit is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with mhWaveEdit; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21 22 #ifndef UM_H_INCLUDED 23 #define UM_H_INCLUDED 24 25 #include <gtk/gtk.h> 26 27 #define UM_OK 0 28 #define UM_YESNOCANCEL 1 29 #define UM_OKCANCEL 2 30 31 #define MR_OK 0 32 #define MR_YES 1 33 #define MR_NO 2 34 #define MR_CANCEL 3 35 36 extern gboolean um_use_gtk; 37 38 void console_message(const char *msg); 39 void console_perror(const char *msg); 40 void user_perror(const char *msg); 41 42 int user_message(char *msg, int type); 43 void user_info(char *msg); 44 void user_error(char *msg); 45 /* Same as user_error but returns immediately */ 46 void popup_error(char *msg); 47 void user_warning(char *msg); 48 49 extern int user_message_flag; 50 51 gchar *user_input(gchar *label, gchar *title, gchar *defvalue, 52 gboolean (*validator)(gchar *c), GtkWindow *below); 53 gboolean user_input_float(gchar *label, gchar *title, gfloat defvalue, 54 GtkWindow *below, gfloat *result); 55 56 gint user_choice(gchar **choices, guint def, gchar *windowtitle, 57 gchar *windowtext, gboolean allow_cancel); 58 59 #endif 60