"Fix" some GCC -Wparentheses warnings
[geany-mirror.git] / src / dialogs.h
blob90ffeb8d896a48a712774f0ec86643960a758e9c
1 /*
2 * dialogs.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005 The Geany contributors
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.
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.
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.
21 /**
22 * @file dialogs.h
23 * File related dialogs, miscellaneous dialogs, font dialog.
24 **/
27 #ifndef GEANY_DIALOGS_H
28 #define GEANY_DIALOGS_H 1
30 #include "document.h"
32 #include "gtkcompat.h"
34 G_BEGIN_DECLS
36 gboolean dialogs_show_question(const gchar *text, ...) G_GNUC_PRINTF (1, 2);
38 void dialogs_show_msgbox(GtkMessageType type, const gchar *text, ...) G_GNUC_PRINTF (2, 3);
40 gboolean dialogs_show_save_as(void);
42 gboolean dialogs_show_input_numeric(const gchar *title, const gchar *label_text,
43 gdouble *value, gdouble min, gdouble max, gdouble step);
45 gchar *dialogs_show_input(const gchar *title, GtkWindow *parent,
46 const gchar *label_text, const gchar *default_text);
49 #ifdef GEANY_PRIVATE
51 typedef void (*GeanyInputCallback)(const gchar *text, gpointer data);
54 void dialogs_show_open_file(void);
56 gboolean dialogs_show_unsaved_file(GeanyDocument *doc);
58 void dialogs_show_open_font(void);
60 void dialogs_show_word_count(void);
62 void dialogs_show_color(gchar *colour);
64 gchar *dialogs_show_input_goto_line(const gchar *title, GtkWindow *parent,
65 const gchar *label_text, const gchar *default_text);
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);
70 void dialogs_show_file_properties(GeanyDocument *doc);
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);
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);
81 void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text, const gchar *secondary);
83 #endif /* GEANY_PRIVATE */
85 G_END_DECLS
87 #endif /* GEANY_DIALOGS_H */