info bars: Explicitely move focus back to the editor when closing
[geany-mirror.git] / src / dialogs.h
blob8d82cb895caabe99f663d3ea80d48396733b72b3
1 /*
2 * dialogs.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
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.
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 General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 /**
23 * @file dialogs.h
24 * File related dialogs, miscellaneous dialogs, font dialog.
25 **/
28 #ifndef GEANY_DIALOGS_H
29 #define GEANY_DIALOGS_H 1
31 #include "document.h"
33 #include "gtkcompat.h"
35 G_BEGIN_DECLS
37 typedef void (*GeanyInputCallback)(const gchar *text);
40 void dialogs_show_open_file(void);
42 gboolean dialogs_show_save_as(void);
44 gboolean dialogs_show_unsaved_file(GeanyDocument *doc);
46 void dialogs_show_open_font(void);
48 void dialogs_show_word_count(void);
50 void dialogs_show_color(gchar *colour);
52 gchar *dialogs_show_input(const gchar *title, GtkWindow *parent,
53 const gchar *label_text, const gchar *default_text);
55 gchar *dialogs_show_input_goto_line(const gchar *title, GtkWindow *parent,
56 const gchar *label_text, const gchar *default_text);
58 GtkWidget *dialogs_show_input_persistent(const gchar *title, GtkWindow *parent,
59 const gchar *label_text, const gchar *default_text, GeanyInputCallback input_cb);
61 gboolean dialogs_show_input_numeric(const gchar *title, const gchar *label_text,
62 gdouble *value, gdouble min, gdouble max, gdouble step);
64 void dialogs_show_file_properties(GeanyDocument *doc);
66 gboolean dialogs_show_question(const gchar *text, ...) G_GNUC_PRINTF (1, 2);
68 gboolean dialogs_show_question_full(GtkWidget *parent, const gchar *yes_btn, const gchar *no_btn,
69 const gchar *extra_text, const gchar *main_text, ...) G_GNUC_PRINTF (5, 6);
71 gint dialogs_show_prompt(GtkWidget *parent,
72 const gchar *btn_1, GtkResponseType response_1,
73 const gchar *btn_2, GtkResponseType response_2,
74 const gchar *btn_3, GtkResponseType response_3,
75 const gchar *extra_text, const gchar *main_text, ...) G_GNUC_PRINTF (9, 10);
77 void dialogs_show_msgbox(GtkMessageType type, const gchar *text, ...) G_GNUC_PRINTF (2, 3);
79 void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text, const gchar *secondary);
81 G_END_DECLS
83 #endif /* GEANY_DIALOGS_H */