fortran: Make sure not to index kinds out of bounds
[geany-mirror.git] / src / msgwindow.h
blob08bfb98f18f6ba0f3034c7d62d4804ad471c5e3f
1 /*
2 * msgwindow.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 #ifndef GEANY_MSGWINDOW_H
23 #define GEANY_MSGWINDOW_H 1
25 #include "document.h"
27 #include "gtkcompat.h"
30 G_BEGIN_DECLS
32 /**
33 * Various colors for use in the compiler and messages treeviews when adding messages.
34 **/
35 enum MsgColors
37 COLOR_RED, /**< Color red */
38 COLOR_DARK_RED, /**< Color dark red */
39 COLOR_BLACK, /**< Color black */
40 COLOR_BLUE /**< Color blue */
43 /** Indices of the notebooks in the messages window. */
44 typedef enum
46 /* force it to start at 0 to keep in sync with the notebook page numbers */
47 MSG_STATUS = 0, /**< Index of the status message tab */
48 MSG_COMPILER, /**< Index of the compiler tab */
49 MSG_MESSAGE, /**< Index of the messages tab */
50 MSG_SCRATCH, /**< Index of the scratch tab */
51 MSG_VTE /**< Index of the VTE tab */
52 } MessageWindowTabNum;
56 typedef struct
58 GtkListStore *store_status;
59 GtkListStore *store_msg;
60 GtkListStore *store_compiler;
61 GtkWidget *tree_compiler;
62 GtkWidget *tree_status;
63 GtkWidget *tree_msg;
64 GtkWidget *scribble;
65 GtkWidget *popup_status_menu;
66 GtkWidget *popup_msg_menu;
67 GtkWidget *popup_compiler_menu;
68 GtkWidget *notebook;
69 gchar *messages_dir;
70 } MessageWindow;
72 extern MessageWindow msgwindow;
75 void msgwin_init(void);
77 void msgwin_finalize(void);
79 void msgwin_show_hide(gboolean show);
81 void msgwin_switch_tab(gint tabnum, gboolean show);
83 void msgwin_clear_tab(gint tabnum);
85 void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
86 G_GNUC_PRINTF (4, 5);
88 void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const gchar *string);
90 void msgwin_compiler_add(gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
92 void msgwin_compiler_add_string(gint msg_color, const gchar *msg);
94 void msgwin_status_add(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
96 void msgwin_show_hide_tabs(void);
98 void msgwin_set_messages_dir(const gchar *messages_dir);
101 void msgwin_menu_add_common_items(GtkMenu *menu);
103 gboolean msgwin_goto_compiler_file_line(gboolean focus_editor);
105 void msgwin_parse_compiler_error_line(const gchar *string, const gchar *dir,
106 gchar **filename, gint *line);
108 gboolean msgwin_goto_messages_file_line(gboolean focus_editor);
110 G_END_DECLS
112 #endif /* GEANY_MSGWINDOW_H */