1 /*
2  *      dialogs.h - this file is part of Geany, a fast and lightweight IDE
3  *
4  *      Copyright 2005 The Geany contributors
5  *
6  *      This program 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  *      This program 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 along
17  *      with this program; if not, write to the Free Software Foundation, Inc.,
18  *      51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 /**
22  *  @file dialogs.h
23  *  File related dialogs, miscellaneous dialogs, font dialog.
24  **/
25 
26 
27 #ifndef GEANY_DIALOGS_H
28 #define GEANY_DIALOGS_H 1
29 
30 #include "document.h"
31 
32 #include "gtkcompat.h"
33 
34 G_BEGIN_DECLS
35 
36 gboolean dialogs_show_question(const gchar *text, ...) G_GNUC_PRINTF (1, 2);
37 
38 void dialogs_show_msgbox(GtkMessageType type, const gchar *text, ...) G_GNUC_PRINTF (2, 3);
39 
40 gboolean dialogs_show_save_as(void);
41 
42 gboolean dialogs_show_input_numeric(const gchar *title, const gchar *label_text,
43 	gdouble *value, gdouble min, gdouble max, gdouble step);
44 
45 gchar *dialogs_show_input(const gchar *title, GtkWindow *parent,
46 	const gchar *label_text, const gchar *default_text);
47 
48 
49 #ifdef GEANY_PRIVATE
50 
51 typedef void (*GeanyInputCallback)(const gchar *text, gpointer data);
52 
53 
54 void dialogs_show_open_file(void);
55 
56 gboolean dialogs_show_unsaved_file(GeanyDocument *doc);
57 
58 void dialogs_show_open_font(void);
59 
60 void dialogs_show_word_count(void);
61 
62 void dialogs_show_color(gchar *colour);
63 
64 gchar *dialogs_show_input_goto_line(const gchar *title, GtkWindow *parent,
65 	const gchar *label_text, const gchar *default_text);
66 
67 GtkWidget *dialogs_show_input_persistent(const gchar *title, GtkWindow *parent,
68 	const gchar *label_text, const gchar *default_text, GeanyInputCallback input_cb, gpointer input_cb_data);
69 
70 void dialogs_show_file_properties(GeanyDocument *doc);
71 
72 gboolean dialogs_show_question_full(GtkWidget *parent, const gchar *yes_btn, const gchar *no_btn,
73 	const gchar *extra_text, const gchar *main_text, ...) G_GNUC_PRINTF (5, 6);
74 
75 gint dialogs_show_prompt(GtkWidget *parent,
76 		const gchar *btn_1, GtkResponseType response_1,
77 		const gchar *btn_2, GtkResponseType response_2,
78 		const gchar *btn_3, GtkResponseType response_3,
79 		const gchar *extra_text, const gchar *main_text, ...) G_GNUC_PRINTF (9, 10);
80 
81 void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text, const gchar *secondary);
82 
83 #endif /* GEANY_PRIVATE */
84 
85 G_END_DECLS
86 
87 #endif /* GEANY_DIALOGS_H */
88