aboutsummaryrefslogtreecommitdiffstats
path: root/modules/text-highlight/languages.h
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-07-25 17:29:22 +0800
committerDan Vrátil <dvratil@redhat.com>2012-07-25 17:29:22 +0800
commit8663b54cae296883452850f3baad6d4cbc92e220 (patch)
treef895a43b817e0115a57bc639b2b6a9e40caa1193 /modules/text-highlight/languages.h
parentb456ff5423b9f4ffe5719e460e4b769bed28c934 (diff)
downloadgsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.gz
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.bz2
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.lz
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.xz
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.zst
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.zip
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)
Diffstat (limited to 'modules/text-highlight/languages.h')
-rw-r--r--modules/text-highlight/languages.h39
1 files changed, 39 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef LANGUAGES_H
+#define LANGUAGES_H
+
+#include <glib.h>
+
+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 */