1 /*  Gringotts - a small utility to safe-keep sensitive data
2  *  (c) 2002, Germano Rizzo <mano78@users.sourceforge.net>
3  *
4  *  grg_widgets.h - header file for grg_widgets.c
5  *  Author: Germano Rizzo
6  *
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.
11  *
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 Library General Public License for more details.
16  *
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef GRG_WIDGETS_H
23 #define GRG_WIDGETS_H
24 
25 #include "grg_defs.h"
26 #include <gtk/gtk.h>
27 
28 extern gboolean mapIsUTF;
29 
30 /* Shows and manages a dialog that asks for a string. */
31 gchar *grg_input_dialog (gchar * title, gchar * qtext, gchar * preset,
32 			 gboolean is_pass, GtkWidget * parent);
33 
34 /* Displays a dialog that shows a message. */
35 void grg_msg (gchar * text, GtkMessageType msgt, GtkWidget * parent);
36 
37 /* transparent X and non-X error reporting */
38 void report_err (gchar * msg, gboolean X, gboolean doquit,
39 		 GtkWidget * parent);
40 
41 /* Asks a question for a boolean answer. */
42 grg_response grg_ask_dialog (gchar * title, gchar * question,
43         gboolean allowcanc, GtkWidget * parent);
44 
45 /* Associates the Gringotts icon with the given window. */
46 void grg_window_set_icon (GtkWindow * w);
47 
48 gboolean grg_find_dialog (gchar ** needle, gboolean * only_current,
49 			  gboolean * case_sens, GtkWindow * parent);
50 
51 /* displays a "Wait..." window, to be destroyed at the end of waiting */
52 GtkWidget *grg_wait_msg (gchar * reason, GtkWidget * parent);
53 void grg_wait_message_change_reason (GtkWidget * wait, gchar * reason);
54 
55 /* calls an external application to display a text file */
56 void grg_display_file (gchar * file);
57 
58 /* callback to submit a form when enter is pressed */
59 gboolean return_submit (GtkWidget * w, GdkEventKey * ev, GtkWidget * w2);
60 
61 GtkWidget *
62 grg_toolbar_insert_stock(GtkToolbar *toolbar,
63     const gchar *stock_id,
64     const char *tooltip_text,
65     GtkSignalFunc callback,
66     gpointer user_data,
67     gint position);
68 
69 #endif
70