From 8663b54cae296883452850f3baad6d4cbc92e220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Wed, 25 Jul 2012 11:29:22 +0200 Subject: Highlighting of text parts and source codes This adds 'Format as' submenu to the preview pane context menu. The submenu is available only for text/plain parts or parts with a source code (we support about 40 various types). Using the 'highlight' utility, the formatter processes the part and highlights the source code it contains. (discussion in bug #680026) --- modules/text-highlight/languages.h | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/text-highlight/languages.h (limited to 'modules/text-highlight/languages.h') diff --git a/modules/text-highlight/languages.h b/modules/text-highlight/languages.h new file mode 100644 index 0000000000..03f1442531 --- /dev/null +++ b/modules/text-highlight/languages.h @@ -0,0 +1,39 @@ +/* + * languages.h + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + */ + +#ifndef LANGUAGES_H +#define LANGUAGES_H + +#include + +typedef struct Language { + const gchar *action_name; + const gchar *action_label; + const gchar **extensions; + const gchar **mime_types; +} Language; + +const gchar * get_syntax_for_ext (const gchar *extension); +const gchar * get_syntax_for_mime_type (const gchar *mime_type); + +Language * get_default_langauges (gsize *len); +Language * get_additinal_languages (gsize *len); + +const gchar ** get_mime_types (void); + +#endif /* LANGUAGES_H */ -- cgit v1.2.3