Remove unnecessary code when reading IPC socket port on Windows
[geany-mirror.git] / src / msgwindow.h
blob07b06dbc7d80d56dd51513269e5c54391bc27112
1 /*
2 * msgwindow.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 #ifndef GEANY_MSGWINDOW_H
22 #define GEANY_MSGWINDOW_H 1
24 #include "document.h"
26 #include "gtkcompat.h"
29 G_BEGIN_DECLS
31 /**
32 * Various colors for use in the compiler and messages treeviews when adding messages.
33 **/
34 enum MsgColors
36 COLOR_RED, /**< Color red */
37 COLOR_DARK_RED, /**< Color dark red */
38 COLOR_BLACK, /**< Color black */
39 COLOR_BLUE /**< Color blue */
42 /** Indices of the notebooks in the messages window. */
43 typedef enum
45 /* force it to start at 0 to keep in sync with the notebook page numbers */
46 MSG_STATUS = 0, /**< Index of the status message tab */
47 MSG_COMPILER, /**< Index of the compiler tab */
48 MSG_MESSAGE, /**< Index of the messages tab */
49 MSG_SCRATCH, /**< Index of the scratch tab */
50 MSG_VTE /**< Index of the VTE tab */
51 } MessageWindowTabNum;
54 void msgwin_status_add(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
55 void msgwin_status_add_string(const gchar *msg);
57 void msgwin_compiler_add(gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
58 void msgwin_compiler_add_string(gint msg_color, const gchar *msg);
60 void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
61 G_GNUC_PRINTF (4, 5);
62 void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const char *msg);
64 void msgwin_clear_tab(gint tabnum);
66 void msgwin_switch_tab(gint tabnum, gboolean show);
68 void msgwin_set_messages_dir(const gchar *messages_dir);
71 #ifdef GEANY_PRIVATE
73 typedef struct
75 GtkListStore *store_status;
76 GtkListStore *store_msg;
77 GtkListStore *store_compiler;
78 GtkWidget *tree_compiler;
79 GtkWidget *tree_status;
80 GtkWidget *tree_msg;
81 GtkWidget *scribble;
82 GtkWidget *popup_status_menu;
83 GtkWidget *popup_msg_menu;
84 GtkWidget *popup_compiler_menu;
85 GtkWidget *notebook;
86 gchar *messages_dir;
87 } MessageWindow;
89 extern MessageWindow msgwindow;
92 void msgwin_init(void);
94 void msgwin_finalize(void);
96 void msgwin_show_hide(gboolean show);
98 void msgwin_show_hide_tabs(void);
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 #endif /* GEANY_PRIVATE */
112 G_END_DECLS
114 #endif /* GEANY_MSGWINDOW_H */