2 * highlighting.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.
23 #ifndef GEANY_HIGHLIGHTING_H
24 #define GEANY_HIGHLIGHTING_H 1
26 #include "filetypes.h"
28 #include "gtkcompat.h" /* Needed by ScintillaWidget.h */
29 #include "Scintilla.h" /* Needed by ScintillaWidget.h */
30 #include "ScintillaWidget.h" /* for ScintillaObject */
37 /** Fields representing the different attributes of a Scintilla lexer style.
38 * @see Scintilla messages @c SCI_STYLEGETFORE, etc, for use with scintilla_send_message(). */
39 typedef struct GeanyLexerStyle
41 gint foreground
; /**< Foreground text colour, in @c 0xBBGGRR format. */
42 gint background
; /**< Background text colour, in @c 0xBBGGRR format. */
43 gboolean bold
; /**< Bold. */
44 gboolean italic
; /**< Italic. */
49 const GeanyLexerStyle
*highlighting_get_style(gint ft_id
, gint style_id
);
51 void highlighting_set_styles(ScintillaObject
*sci
, GeanyFiletype
*ft
);
53 gboolean
highlighting_is_string_style(gint lexer
, gint style
);
54 gboolean
highlighting_is_comment_style(gint lexer
, gint style
);
55 gboolean
highlighting_is_code_style(gint lexer
, gint style
);
60 void highlighting_init_styles(guint filetype_idx
, GKeyFile
*config
, GKeyFile
*configh
);
62 void highlighting_free_styles(void);
64 void highlighting_show_color_scheme_dialog(void);
66 #endif /* GEANY_PRIVATE */
70 #endif /* GEANY_HIGHLIGHTING_H */