Move typedefs out of geany.h and into their own headers
[geany-mirror.git] / src / dialogs.h
blobf7e96985be322886e14770a60c4108bce5ee3420
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 /* Forward-declared to avoid including document.h here */
32 struct GeanyDocument;
34 typedef void (*GeanyInputCallback)(const gchar *text);
37 void dialogs_show_open_file(void);
39 gboolean dialogs_show_save_as(void);
41 gboolean dialogs_show_unsaved_file(struct GeanyDocument *doc);
43 void dialogs_show_open_font(void);
45 void dialogs_show_word_count(void);
47 void dialogs_show_color(gchar *colour);
49 gchar *dialogs_show_input(const gchar *title, GtkWindow *parent,
50 const gchar *label_text, const gchar *default_text);
52 gchar *dialogs_show_input_goto_line(const gchar *title, GtkWindow *parent,
53 const gchar *label_text, const gchar *default_text);
55 GtkWidget *dialogs_show_input_persistent(const gchar *title, GtkWindow *parent,
56 const gchar *label_text, const gchar *default_text, GeanyInputCallback input_cb);
58 gboolean dialogs_show_input_numeric(const gchar *title, const gchar *label_text,
59 gdouble *value, gdouble min, gdouble max, gdouble step);
61 void dialogs_show_file_properties(struct GeanyDocument *doc);
63 gboolean dialogs_show_question(const gchar *text, ...) G_GNUC_PRINTF (1, 2);
65 gboolean dialogs_show_question_full(GtkWidget *parent, const gchar *yes_btn, const gchar *no_btn,
66 const gchar *extra_text, const gchar *main_text, ...) G_GNUC_PRINTF (5, 6);
68 gint dialogs_show_prompt(GtkWidget *parent,
69 const gchar *btn_1, GtkResponseType response_1,
70 const gchar *btn_2, GtkResponseType response_2,
71 const gchar *btn_3, GtkResponseType response_3,
72 const gchar *extra_text, const gchar *main_text, ...) G_GNUC_PRINTF (9, 10);
74 void dialogs_show_msgbox(GtkMessageType type, const gchar *text, ...) G_GNUC_PRINTF (2, 3);
76 void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text, const gchar *secondary);
78 #endif