geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

highlighting.h
Go to the documentation of this file.
1/*
2 * highlighting.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2005 The Geany contributors
5 *
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.
10 *
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.
15 *
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.
19 */
20
21
22#ifndef GEANY_HIGHLIGHTING_H
23#define GEANY_HIGHLIGHTING_H 1
24
25#include "filetypes.h"
26
27#include "gtkcompat.h" /* Needed by ScintillaWidget.h */
28#include "Scintilla.h" /* Needed by ScintillaWidget.h */
29#include "ScintillaWidget.h" /* for ScintillaObject */
30
31
32#include <glib.h>
33
34G_BEGIN_DECLS
35
36/** Fields representing the different attributes of a Scintilla lexer style.
37 * @see Scintilla messages @c SCI_STYLEGETFORE, etc, for use with scintilla_send_message(). */
38typedef struct GeanyLexerStyle
39{
40 gint foreground; /**< Foreground text colour, in @c 0xBBGGRR format. */
41 gint background; /**< Background text colour, in @c 0xBBGGRR format. */
42 gboolean bold; /**< Bold. */
43 gboolean italic; /**< Italic. */
44}
46
47
48const GeanyLexerStyle *highlighting_get_style(gint ft_id, gint style_id);
49
50void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft);
51
52gboolean highlighting_is_string_style(gint lexer, gint style);
53gboolean highlighting_is_comment_style(gint lexer, gint style);
54gboolean highlighting_is_code_style(gint lexer, gint style);
55
56
57#ifdef GEANY_PRIVATE
58
59void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *configh);
60
62
64
65#endif /* GEANY_PRIVATE */
66
67G_END_DECLS
68
69#endif /* GEANY_HIGHLIGHTING_H */
Interface to the edit control.
ScintillaObject * sci
Definition: editor.c:88
Filetype detection, file extensions and filetype menu items.
void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *configh)
Definition: highlighting.c:970
void highlighting_show_color_scheme_dialog(void)
void highlighting_free_styles(void)
Definition: highlighting.c:421
const GeanyLexerStyle * highlighting_get_style(gint ft_id, gint style_id)
Retrieves a style style_id for the filetype ft_id.
gboolean highlighting_is_string_style(gint lexer, gint style)
Checks whether the given style is a string for the given lexer.
gboolean highlighting_is_code_style(gint lexer, gint style)
Checks whether the given style is normal code (not string, comment, preprocessor, etc).
void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft)
Sets up highlighting and other visual settings.
struct GeanyLexerStyle GeanyLexerStyle
Fields representing the different attributes of a Scintilla lexer style.
gboolean highlighting_is_comment_style(gint lexer, gint style)
Checks whether the given style is a comment for the given lexer.
Represents a filetype.
Definition: filetypes.h:144
Fields representing the different attributes of a Scintilla lexer style.
Definition: highlighting.h:39
gboolean bold
Bold.
Definition: highlighting.h:42
gint foreground
Foreground text colour, in 0xBBGGRR format.
Definition: highlighting.h:40
gboolean italic
Italic.
Definition: highlighting.h:43
gint background
Background text colour, in 0xBBGGRR format.
Definition: highlighting.h:41