If only given an input filename and no match string, match all changelog entries.
[geany-mirror.git] / src / msgwindow.h
blobd9e029d528e5c76d411fbe09d330a6743d506e42
1 /*
2 * msgwindow.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-2010 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
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * $Id$
24 #ifndef GEANY_MSGWINDOW_H
25 #define GEANY_MSGWINDOW_H 1
28 /**
29 * Various colors for use in the compiler and messages treeviews when adding messages.
30 **/
31 enum MsgColors
33 COLOR_RED, /**< Color red */
34 COLOR_DARK_RED, /**< Color dark red */
35 COLOR_BLACK, /**< Color black */
36 COLOR_BLUE /**< Color blue */
39 /** Indices of the notebooks in the messages window. */
40 typedef enum
42 /* force it to start at 0 to keep in sync with the notebook page numbers */
43 MSG_STATUS = 0, /**< Index of the status message tab */
44 MSG_COMPILER, /**< Index of the compiler tab */
45 MSG_MESSAGE, /**< Index of the messages tab */
46 MSG_SCRATCH, /**< Index of the scratch tab */
47 MSG_VTE /**< Index of the VTE tab */
48 } MessageWindowTabNum;
52 typedef struct
54 GtkListStore *store_status;
55 GtkListStore *store_msg;
56 GtkListStore *store_compiler;
57 GtkWidget *tree_compiler;
58 GtkWidget *tree_status;
59 GtkWidget *tree_msg;
60 GtkWidget *scribble;
61 GtkWidget *popup_status_menu;
62 GtkWidget *popup_msg_menu;
63 GtkWidget *popup_compiler_menu;
64 GtkWidget *notebook;
65 gchar *messages_dir;
66 } MessageWindow;
68 extern MessageWindow msgwindow;
71 void msgwin_init(void);
73 void msgwin_finalize(void);
75 void msgwin_show_hide(gboolean show);
77 void msgwin_switch_tab(gint tabnum, gboolean show);
79 void msgwin_clear_tab(gint tabnum);
81 void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
82 G_GNUC_PRINTF (4, 5);
84 void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const gchar *string);
86 void msgwin_compiler_add(gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
88 void msgwin_compiler_add_string(gint msg_color, const gchar *msg);
90 void msgwin_status_add(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
92 void msgwin_show_hide_tabs(void);
94 void msgwin_set_messages_dir(const gchar *messages_dir);
97 void msgwin_menu_add_common_items(GtkMenu *menu);
99 gboolean msgwin_goto_compiler_file_line(guint keyval);
101 void msgwin_parse_compiler_error_line(const gchar *string, const gchar *dir,
102 gchar **filename, gint *line);
104 gboolean msgwin_goto_messages_file_line(guint keyval);
106 #endif