Syntax highlighting for the different filetypes, using the Scintilla lexers.
More...
Detailed Description
Syntax highlighting for the different filetypes, using the Scintilla lexers.
Typedef Documentation
Fields representing the different attributes of a Scintilla lexer style.
- See also:
- Scintilla messages
SCI_STYLEGETFORE, etc, for use with scintilla_send_message().
Function Documentation
| const GeanyLexerStyle* highlighting_get_style |
( |
gint |
ft_id, |
|
|
gint |
style_id | |
|
) |
| | |
Retrieves a style style_id for the filetype ft_id.
If the style was not already initialised (e.g. by by opening a file of this type), it will be initialised. The returned pointer is owned by Geany and must not be freed.
- Parameters:
-
| ft_id | Filetype ID, e.g. GEANY_FILETYPES_DIFF. |
| style_id | A Scintilla lexer style, e.g. SCE_DIFF_ADDED. See scintilla/include/SciLexer.h. |
- Returns:
- A pointer to the style struct.
- See also:
- Scintilla messages
SCI_STYLEGETFORE, etc, for use with scintilla_send_message().
| gboolean highlighting_is_code_style |
( |
gint |
lexer, |
|
|
gint |
style | |
|
) |
| | |
Checks whether the given style is normal code (not string, comment, preprocessor, etc).
- Parameters:
-
| lexer | Scintilla lexer type (SCLEX_*). |
| style | Scintilla style (SCE_*). |
- Returns:
TRUE if the style is code, FALSE otherwise.
| gboolean highlighting_is_comment_style |
( |
gint |
lexer, |
|
|
gint |
style | |
|
) |
| | |
Checks whether the given style is a comment for the given lexer.
- Parameters:
-
| lexer | Scintilla lexer type (SCLEX_*). |
| style | Scintilla style (SCE_*). |
- Returns:
TRUE if the style is a comment, FALSE otherwise.
| gboolean highlighting_is_string_style |
( |
gint |
lexer, |
|
|
gint |
style | |
|
) |
| | |
Checks whether the given style is a string for the given lexer.
- Parameters:
-
| lexer | Scintilla lexer type (SCLEX_*). |
| style | Scintilla style (SCE_*). |
- Returns:
TRUE if the style is a string, FALSE otherwise.
| void highlighting_set_styles |
( |
ScintillaObject * |
sci, |
|
|
GeanyFiletype * |
ft | |
|
) |
| | |
Sets up highlighting and other visual settings.
- Parameters:
-
| sci | Scintilla widget. |
| ft | Filetype settings to use. |