Skip [] when performing scope autocompletion
[geany-mirror.git] / src / msgwindow.h
blobdc5fc356dc9537f2c43d371088a14086f98f6771
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;
55 void msgwin_status_add(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
57 void msgwin_compiler_add(gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
59 void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
60 G_GNUC_PRINTF (4, 5);
62 void msgwin_clear_tab(gint tabnum);
64 void msgwin_switch_tab(gint tabnum, gboolean show);
66 void msgwin_set_messages_dir(const gchar *messages_dir);
69 #ifdef GEANY_PRIVATE
71 typedef struct
73 GtkListStore *store_status;
74 GtkListStore *store_msg;
75 GtkListStore *store_compiler;
76 GtkWidget *tree_compiler;
77 GtkWidget *tree_status;
78 GtkWidget *tree_msg;
79 GtkWidget *scribble;
80 GtkWidget *popup_status_menu;
81 GtkWidget *popup_msg_menu;
82 GtkWidget *popup_compiler_menu;
83 GtkWidget *notebook;
84 gchar *messages_dir;
85 } MessageWindow;
87 extern MessageWindow msgwindow;
90 void msgwin_init(void);
92 void msgwin_finalize(void);
94 void msgwin_show_hide(gboolean show);
96 void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const gchar *string);
98 void msgwin_compiler_add_string(gint msg_color, const gchar *msg);
100 void msgwin_show_hide_tabs(void);
103 void msgwin_menu_add_common_items(GtkMenu *menu);
105 gboolean msgwin_goto_compiler_file_line(gboolean focus_editor);
107 void msgwin_parse_compiler_error_line(const gchar *string, const gchar *dir,
108 gchar **filename, gint *line);
110 gboolean msgwin_goto_messages_file_line(gboolean focus_editor);
112 #endif /* GEANY_PRIVATE */
114 G_END_DECLS
116 #endif /* GEANY_MSGWINDOW_H */