gtksourceview3 2.2.0-x86-mingw32 → 2.2.1-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/ext/gtksourceview3/extconf.rb +1 -2
- data/ext/gtksourceview3/rbgtksourcegutterrenderertext.c +1 -25
- data/ext/gtksourceview3/rbgtksourceview3conversions.h +7 -0
- data/ext/gtksourceview3/rbgtksourceview3private.h +0 -1
- data/lib/2.0/gtksourceview3.so +0 -0
- data/test/run-test.rb +17 -7
- data/test/test_mark_attributes.rb +1 -1
- data/test/test_source_gutter_renderer.rb +33 -0
- data/test/test_source_language_manager.rb +46 -0
- data/test/test_source_view.rb +34 -0
- data/vendor/local/bin/libgtksourceview-3.0-1.dll +0 -0
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksource.h +4 -0
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcebuffer.h +28 -0
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourceencoding.h +54 -0
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcefile.h +115 -0
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcefileloader.h +122 -0
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcefilesaver.h +147 -0
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcegutter.h +3 -0
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcetypes.h +48 -2
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourceundomanager.h +1 -3
- data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourceview-typebuiltins.h +33 -0
- data/vendor/local/lib/girepository-1.0/GtkSource-3.0.typelib +0 -0
- data/vendor/local/lib/libgtksourceview-3.0.dll.a +0 -0
- data/vendor/local/lib/libgtksourceview-3.0.la +3 -3
- data/vendor/local/lib/locale/ar/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/as/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/be/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/bg/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/bn_IN/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ca/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ca@valencia/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/cs/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/da/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/de/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/el/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/en_GB/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/es/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/eu/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/fa/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/fi/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/fr/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ga/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/gl/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/gu/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/he/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/hi/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/hu/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/id/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/it/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ja/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/kn/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ko/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/lt/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/lv/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ml/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/mr/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/nb/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/nl/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/or/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/pa/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/pl/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/pt/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/pt_BR/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ru/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/sk/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/sl/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/sr/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/sr@latin/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/sv/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ta/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/te/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/th/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/tr/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/ug/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/uk/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/vi/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/zh_CN/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/zh_HK/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/locale/zh_TW/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
- data/vendor/local/lib/pkgconfig/gtksourceview-3.0.pc +2 -2
- data/vendor/local/share/gir-1.0/GtkSource-3.0.gir +2211 -330
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceBuffer.html +1682 -983
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletion.html +818 -573
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionContext.html +267 -189
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionInfo.html +209 -157
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionItem.html +247 -167
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionProposal.html +428 -295
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionProvider.html +558 -420
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionWords.html +217 -125
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceEncoding.html +366 -0
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceFile.html +563 -0
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceFileLoader.html +769 -0
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceFileSaver.html +962 -0
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceGutter.html +341 -196
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceGutterRenderer.html +1211 -827
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceGutterRendererPixbuf.html +327 -206
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceGutterRendererText.html +156 -96
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceLanguage.html +431 -269
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceLanguageManager.html +300 -235
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceMark.html +203 -139
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceMarkAttributes.html +640 -452
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourcePrintCompositor.html +1444 -1114
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceSearchContext.html +794 -573
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceSearchSettings.html +421 -280
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyle.html +232 -99
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyleScheme.html +283 -178
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyleSchemeManager.html +326 -220
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceUndoManager.html +313 -194
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceView.html +1430 -924
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/annotation-glossary.html +33 -13
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-0.html +7 -7
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-10.html +47 -47
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-12.html +39 -0
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-14.html +299 -0
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-4.html +5 -5
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-deprecated.html +35 -15
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-full.html +742 -430
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch01.html +31 -19
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch02.html +4 -4
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/gtksourceview-3.0-GtkSourceUtils.html +95 -81
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/gtksourceview-3.0.devhelp2 +519 -463
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/index.html +32 -18
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/index.sgml +326 -153
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/lang-reference.html +151 -57
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/lang-tutorial.html +14 -17
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/object-tree.html +42 -37
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/style-reference.html +39 -8
- data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/style.css +260 -105
- data/vendor/local/share/gtksourceview-3.0/language-specs/actionscript.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/ada.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/ansforth94.lang +729 -0
- data/vendor/local/share/gtksourceview-3.0/language-specs/asp.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/automake.lang +3 -2
- data/vendor/local/share/gtksourceview-3.0/language-specs/awk.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/bennugd.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/bluespec.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/boo.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/c.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/cg.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/changelog.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/chdr.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/cmake.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/cobol.lang +536 -345
- data/vendor/local/share/gtksourceview-3.0/language-specs/cpp.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/csharp.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/css.lang +6 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/cuda.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/d.lang +25 -3
- data/vendor/local/share/gtksourceview-3.0/language-specs/def.lang +8 -0
- data/vendor/local/share/gtksourceview-3.0/language-specs/desktop.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/diff.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/dosbatch.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/dot.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/dpatch.lang +2 -2
- data/vendor/local/share/gtksourceview-3.0/language-specs/dtd.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/eiffel.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/erlang.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/fcl.lang +1 -3
- data/vendor/local/share/gtksourceview-3.0/language-specs/forth.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/fortran.lang +85 -6
- data/vendor/local/share/gtksourceview-3.0/language-specs/fsharp.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/gdb-log.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/glsl.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/go.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/gtkrc.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/haskell-literate.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/haskell.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/html.lang +238 -137
- data/vendor/local/share/gtksourceview-3.0/language-specs/idl.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/ini.lang +2 -2
- data/vendor/local/share/gtksourceview-3.0/language-specs/j.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/java.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/javascript.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/json.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/latex.lang +389 -133
- data/vendor/local/share/gtksourceview-3.0/language-specs/lex.lang +209 -0
- data/vendor/local/share/gtksourceview-3.0/language-specs/libtool.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/llvm.lang +315 -0
- data/vendor/local/share/gtksourceview-3.0/language-specs/lua.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/m4.lang +4 -4
- data/vendor/local/share/gtksourceview-3.0/language-specs/makefile.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/mediawiki.lang +16 -12
- data/vendor/local/share/gtksourceview-3.0/language-specs/nemerle.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/netrexx.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/nsis.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/objc.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/objj.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/ocaml.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/ocl.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/ooc.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/opal.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/opencl.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/pascal.lang +12 -12
- data/vendor/local/share/gtksourceview-3.0/language-specs/perl.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/php.lang +15 -15
- data/vendor/local/share/gtksourceview-3.0/language-specs/pkgconfig.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/po.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/prolog.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/protobuf.lang +2 -4
- data/vendor/local/share/gtksourceview-3.0/language-specs/puppet.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/python.lang +62 -3
- data/vendor/local/share/gtksourceview-3.0/language-specs/python3.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/rpmspec.lang +3 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/rst.lang +142 -0
- data/vendor/local/share/gtksourceview-3.0/language-specs/ruby.lang +2 -2
- data/vendor/local/share/gtksourceview-3.0/language-specs/scala.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/scheme.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/sh.lang +2 -2
- data/vendor/local/share/gtksourceview-3.0/language-specs/sml.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/sparql.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/sql.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/sweave.lang +67 -0
- data/vendor/local/share/gtksourceview-3.0/language-specs/systemverilog.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/tcl.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/vala.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/vbnet.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/verilog.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/vhdl.lang +1 -1
- data/vendor/local/share/gtksourceview-3.0/language-specs/yacc.lang +2 -2
- data/vendor/local/share/gtksourceview-3.0/language-specs/yaml.lang +214 -0
- data/vendor/local/share/gtksourceview-3.0/styles/classic.xml +13 -2
- data/vendor/local/share/gtksourceview-3.0/styles/cobalt.xml +16 -5
- data/vendor/local/share/gtksourceview-3.0/styles/kate.xml +11 -3
- data/vendor/local/share/gtksourceview-3.0/styles/oblivion.xml +14 -4
- data/vendor/local/share/gtksourceview-3.0/styles/solarized-dark.xml +101 -0
- data/vendor/local/share/gtksourceview-3.0/styles/solarized-light.xml +101 -0
- data/vendor/local/share/gtksourceview-3.0/styles/styles.rng +3 -0
- data/vendor/local/share/gtksourceview-3.0/styles/tango.xml +14 -2
- data/vendor/local/share/license/gtksourceview/AUTHORS +1 -0
- data/vendor/local/share/license/gtksourceview/COPYING +415 -251
- metadata +31 -13
- data/lib/1.9/gtksourceview3.so +0 -0
- data/lib/2.1/gtksourceview3.so +0 -0
@@ -8,12 +8,12 @@
|
|
8
8
|
<link rel="up" href="ch02.html" title="Syntax highlighting reference">
|
9
9
|
<link rel="prev" href="lang-tutorial.html" title="Language Definition v2.0 Tutorial">
|
10
10
|
<link rel="next" href="style-reference.html" title="Style Scheme Definition Reference">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.
|
11
|
+
<meta name="generator" content="GTK-Doc V1.21.1 (XML mode)">
|
12
12
|
<link rel="stylesheet" href="style.css" type="text/css">
|
13
13
|
</head>
|
14
14
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="
|
16
|
-
<td width="100%" align="left"></td>
|
15
|
+
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
16
|
+
<td width="100%" align="left" class="shortcuts"></td>
|
17
17
|
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
18
18
|
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
19
19
|
<td><a accesskey="p" href="lang-tutorial.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
@@ -28,18 +28,15 @@
|
|
28
28
|
Reference to the GtkSourceView language definition file format
|
29
29
|
</p>
|
30
30
|
</td>
|
31
|
-
<td valign="top" align="right"></td>
|
31
|
+
<td class="gallery_image" valign="top" align="right"></td>
|
32
32
|
</tr></table></div>
|
33
33
|
<div class="refsect1">
|
34
34
|
<a name="id-1.3.3.3"></a><h2>Overview</h2>
|
35
|
-
<div class="note">
|
36
|
-
<h3 class="title">Note</h3>
|
37
|
-
<p>
|
35
|
+
<div class="note"><p>
|
38
36
|
The version 2 here refers to the language definition file format,
|
39
37
|
not to the version of GtkSourceView. So this reference is suitable
|
40
38
|
for GtkSourceView 2 and 3.
|
41
|
-
</p>
|
42
|
-
</div>
|
39
|
+
</p></div>
|
43
40
|
<p>
|
44
41
|
This is an overview of the Language Definition XML format, describing the
|
45
42
|
meaning and usage of every element and attribute. The formal definition is
|
@@ -51,7 +48,42 @@ should be installed on your system in the directory
|
|
51
48
|
</p>
|
52
49
|
</div>
|
53
50
|
<div class="refsect1">
|
54
|
-
<a name="id-1.3.3.4"></a><h2>
|
51
|
+
<a name="id-1.3.3.4"></a><h2>Best practices</h2>
|
52
|
+
<p>
|
53
|
+
It is better to follow the following rules, especially if you want to
|
54
|
+
contribute upstream, and get your language definition file included in
|
55
|
+
GtkSourceView.
|
56
|
+
</p>
|
57
|
+
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
58
|
+
<li class="listitem"><p>
|
59
|
+
Indentation: 2 spaces.
|
60
|
+
</p></li>
|
61
|
+
<li class="listitem"><p>
|
62
|
+
Have the main context at the bottom.
|
63
|
+
</p></li>
|
64
|
+
<li class="listitem"><p>
|
65
|
+
Use references to def.lang.
|
66
|
+
</p></li>
|
67
|
+
<li class="listitem"><p>
|
68
|
+
Add an example in tests/syntax-highlighting/.
|
69
|
+
</p></li>
|
70
|
+
<li class="listitem"><p>
|
71
|
+
LGPL v2.1+ license (copy/paste the license header from c.lang, for
|
72
|
+
example).
|
73
|
+
</p></li>
|
74
|
+
<li class="listitem"><p>
|
75
|
+
Add the e-mail address of the language definition file author(s).
|
76
|
+
</p></li>
|
77
|
+
<li class="listitem"><p>
|
78
|
+
Refer to the HACKING file for submitting your language definition
|
79
|
+
file upstream. If the file is not included upstream, you can also
|
80
|
+
add the language definition file to the GtkSourceView wiki, so
|
81
|
+
users can easily find it.
|
82
|
+
</p></li>
|
83
|
+
</ul></div>
|
84
|
+
</div>
|
85
|
+
<div class="refsect1">
|
86
|
+
<a name="id-1.3.3.5"></a><h2>Tag <code class="code"><language></code>
|
55
87
|
</h2>
|
56
88
|
<p>
|
57
89
|
The root element for Language Definition files.
|
@@ -97,7 +129,7 @@ The version of the XML format (currently "2.0").
|
|
97
129
|
The translatable category in which the language has to be grouped when
|
98
130
|
presented to the user. It can be marked for translation putting
|
99
131
|
an underscore before the attribute name. Currently used categories in
|
100
|
-
GtkSourceView are "
|
132
|
+
GtkSourceView are "Source", "Script", "Markup" and "Other", but
|
101
133
|
it is possible to use arbitrary categories (while usually discouraged).
|
102
134
|
</p></td>
|
103
135
|
</tr>
|
@@ -114,7 +146,7 @@ a syntax highlighting choice.
|
|
114
146
|
</div>
|
115
147
|
</div>
|
116
148
|
<div class="refsect1">
|
117
|
-
<a name="id-1.3.3.
|
149
|
+
<a name="id-1.3.3.6"></a><h2>Tag <code class="code"><metadata></code>
|
118
150
|
</h2>
|
119
151
|
<p>
|
120
152
|
Contains optional metadata about the language definition.
|
@@ -148,7 +180,7 @@ files.
|
|
148
180
|
</p></dd>
|
149
181
|
</div>
|
150
182
|
<div class="refsect1">
|
151
|
-
<a name="id-1.3.3.
|
183
|
+
<a name="id-1.3.3.7"></a><h2>Tag <code class="code"><styles></code>
|
152
184
|
</h2>
|
153
185
|
<p>
|
154
186
|
Contains the definitions of every style used in the current language and
|
@@ -160,10 +192,10 @@ Contained elements:
|
|
160
192
|
</p>
|
161
193
|
</div>
|
162
194
|
<div class="refsect1">
|
163
|
-
<a name="id-1.3.3.
|
195
|
+
<a name="id-1.3.3.8"></a><h2>Tag <code class="code"><style></code>
|
164
196
|
</h2>
|
165
197
|
<p>
|
166
|
-
Defines a style, associating
|
198
|
+
Defines a style, associating its id with a user visible translatable
|
167
199
|
name and a default style.
|
168
200
|
</p>
|
169
201
|
<p>
|
@@ -201,7 +233,7 @@ font properties defined for those default styles.
|
|
201
233
|
The id of the default style has to be preceded with the id of the
|
202
234
|
language where it is defined, separated with a semicolon ":".
|
203
235
|
When omitted the style is not considered derived from any style and will
|
204
|
-
be
|
236
|
+
not be highlighted until the user specifies a color scheme for this
|
205
237
|
style.
|
206
238
|
</p></td>
|
207
239
|
</tr>
|
@@ -210,7 +242,7 @@ style.
|
|
210
242
|
</div>
|
211
243
|
</div>
|
212
244
|
<div class="refsect1">
|
213
|
-
<a name="id-1.3.3.
|
245
|
+
<a name="id-1.3.3.9"></a><h2>Tag <code class="code"><keyword-char-class></code>
|
214
246
|
</h2>
|
215
247
|
<p>
|
216
248
|
Contains a regex character class used to redefine the customizable
|
@@ -223,7 +255,7 @@ Contained elements: none.
|
|
223
255
|
</p>
|
224
256
|
</div>
|
225
257
|
<div class="refsect1">
|
226
|
-
<a name="id-1.3.3.
|
258
|
+
<a name="id-1.3.3.10"></a><h2>Tag <code class="code"><default-regex-options></code>
|
227
259
|
</h2>
|
228
260
|
<p>
|
229
261
|
Used to set global options for how regular expressions are processed.
|
@@ -242,7 +274,7 @@ Contained elements: none.
|
|
242
274
|
<tr>
|
243
275
|
<td><p><span class="term"><code class="code">case-sensitive</code> (optional)</span></p></td>
|
244
276
|
<td><p>Set to <code class="code">false</code> to make regular expressions
|
245
|
-
ignore case.
|
277
|
+
ignore case.
|
246
278
|
Defaults to <code class="code">true</code>.
|
247
279
|
</p></td>
|
248
280
|
</tr>
|
@@ -265,12 +297,9 @@ Defaults to <code class="code">false</code>.
|
|
265
297
|
</tbody>
|
266
298
|
</table>
|
267
299
|
</div>
|
268
|
-
<p>
|
269
|
-
Contained elements: none.
|
270
|
-
</p>
|
271
300
|
</div>
|
272
301
|
<div class="refsect1">
|
273
|
-
<a name="id-1.3.3.
|
302
|
+
<a name="id-1.3.3.11"></a><h2>Tag <code class="code"><definitions></code>
|
274
303
|
</h2>
|
275
304
|
<p>
|
276
305
|
The element containing the real description of the syntax to be
|
@@ -291,7 +320,7 @@ Contained elements:
|
|
291
320
|
</p>
|
292
321
|
</div>
|
293
322
|
<div class="refsect1">
|
294
|
-
<a name="id-1.3.3.
|
323
|
+
<a name="id-1.3.3.12"></a><h2>Tag <code class="code"><define-regex></code>
|
295
324
|
</h2>
|
296
325
|
<p>
|
297
326
|
Defines a regular expression that can be reused inside other regular
|
@@ -318,6 +347,10 @@ be redefined with the <code class="code"><keyword-char-class></code> (in c
|
|
318
347
|
</p></li>
|
319
348
|
</ul></div>
|
320
349
|
<p>
|
350
|
+
It is allowed to use any of the attributes from
|
351
|
+
<code class="code"><default-regex-opts></code> as attributes of this tag.
|
352
|
+
</p>
|
353
|
+
<p>
|
321
354
|
Contained elements: none.
|
322
355
|
</p>
|
323
356
|
<div class="variablelist">
|
@@ -340,7 +373,7 @@ hyphens ("<code class="code">-</code>") and underscores ("<code class="code">_</
|
|
340
373
|
</div>
|
341
374
|
</div>
|
342
375
|
<div class="refsect1">
|
343
|
-
<a name="id-1.3.3.
|
376
|
+
<a name="id-1.3.3.13"></a><h2>Tag <code class="code"><context></code>
|
344
377
|
</h2>
|
345
378
|
<p>
|
346
379
|
This is the most important element when describing the syntax: the file to
|
@@ -349,8 +382,26 @@ colored differently. Contexts can also contain other contexts.
|
|
349
382
|
There are different kind of context elements: simple contexts, container
|
350
383
|
contexts, sub-pattern contexts, reference contexts and keyword contexts.
|
351
384
|
</p>
|
385
|
+
<p>
|
386
|
+
Context classes can be enabled or disabled for some contexts, with the
|
387
|
+
<code class="code">class</code> and <code class="code">class-disabled</code> attributes. You can create
|
388
|
+
your own context classes in custom language definition files. Here are the
|
389
|
+
default context classes:
|
390
|
+
</p>
|
391
|
+
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
392
|
+
<li class="listitem"><p>
|
393
|
+
<span class="emphasis"><em>comment</em></span>: the context delimits a comment;
|
394
|
+
</p></li>
|
395
|
+
<li class="listitem"><p>
|
396
|
+
<span class="emphasis"><em>string</em></span>: the context delimits a string;
|
397
|
+
</p></li>
|
398
|
+
<li class="listitem"><p>
|
399
|
+
<span class="emphasis"><em>no-spell-check</em></span>: the context's content should
|
400
|
+
not be spell checked.
|
401
|
+
</p></li>
|
402
|
+
</ul></div>
|
352
403
|
<div class="refsect2">
|
353
|
-
<a name="id-1.3.3.
|
404
|
+
<a name="id-1.3.3.13.5"></a><h3>Simple contexts</h3>
|
354
405
|
They contain a mandatory <code class="code"><match></code> element and an optional
|
355
406
|
<code class="code"><include></code> element. The context will span over the strings
|
356
407
|
matched by the regular expression contained in the <code class="code"><match></code>
|
@@ -359,7 +410,7 @@ can only put sub-pattern contexts.
|
|
359
410
|
|
360
411
|
<p>
|
361
412
|
Contained elements:
|
362
|
-
<span class="simplelist"><code class="code"><match></code> (mandatory)</span>.
|
413
|
+
<span class="simplelist"><code class="code"><match></code> (mandatory), <code class="code"><include></code> (optional)</span>.
|
363
414
|
</p>
|
364
415
|
<div class="variablelist">
|
365
416
|
<p class="title"><b>Attributes:</b></p>
|
@@ -415,13 +466,25 @@ A boolean value telling the engine whether the context can occur only
|
|
415
466
|
once in its parent. If not specified it defaults to <code class="code">false</code>.
|
416
467
|
</p></td>
|
417
468
|
</tr>
|
469
|
+
<tr>
|
470
|
+
<td><p><span class="term"><code class="code">class</code> (optional)</span></p></td>
|
471
|
+
<td><p>
|
472
|
+
A space-separated list of context classes to enable.
|
473
|
+
</p></td>
|
474
|
+
</tr>
|
475
|
+
<tr>
|
476
|
+
<td><p><span class="term"><code class="code">class-disabled</code> (optional)</span></p></td>
|
477
|
+
<td><p>
|
478
|
+
A space-separated list of context classes to disable.
|
479
|
+
</p></td>
|
480
|
+
</tr>
|
418
481
|
</tbody>
|
419
482
|
</table>
|
420
483
|
</div>
|
421
484
|
</div>
|
422
485
|
<hr>
|
423
486
|
<div class="refsect2">
|
424
|
-
<a name="id-1.3.3.
|
487
|
+
<a name="id-1.3.3.13.6"></a><h3>Container contexts</h3>
|
425
488
|
They contain a <code class="code"><start></code> element and an optional
|
426
489
|
<code class="code"><end></code>. They respectively contain the regular
|
427
490
|
expression that makes the engine enter in the context and the terminating one.
|
@@ -473,7 +536,7 @@ whole context will be highlighted.
|
|
473
536
|
<td><p><span class="term"><code class="code">extend-parent</code> (optional)</span></p></td>
|
474
537
|
<td><p>
|
475
538
|
A boolean value telling the engine whether the context has a higher
|
476
|
-
priority than the end of
|
539
|
+
priority than the end of its parent. If not specified it defaults to
|
477
540
|
<code class="code">true</code>.
|
478
541
|
</p></td>
|
479
542
|
</tr>
|
@@ -481,8 +544,8 @@ priority than the end of he parent. If not specified it defaults to
|
|
481
544
|
<td><p><span class="term"><code class="code">end-at-line-end</code> (optional)</span></p></td>
|
482
545
|
<td><p>
|
483
546
|
A boolean value telling the engine whether the context must be forced
|
484
|
-
to end at the end of the line
|
485
|
-
|
547
|
+
to end at the end of the line. If not specified it defaults to
|
548
|
+
<code class="code">false</code>.
|
486
549
|
</p></td>
|
487
550
|
</tr>
|
488
551
|
<tr>
|
@@ -507,13 +570,25 @@ A boolean value telling the engine whether the context can occur only
|
|
507
570
|
once in its parent. If not specified it defaults to <code class="code">false</code>.
|
508
571
|
</p></td>
|
509
572
|
</tr>
|
573
|
+
<tr>
|
574
|
+
<td><p><span class="term"><code class="code">class</code> (optional)</span></p></td>
|
575
|
+
<td><p>
|
576
|
+
A space-separated list of context classes to enable.
|
577
|
+
</p></td>
|
578
|
+
</tr>
|
579
|
+
<tr>
|
580
|
+
<td><p><span class="term"><code class="code">class-disabled</code> (optional)</span></p></td>
|
581
|
+
<td><p>
|
582
|
+
A space-separated list of context classes to disable.
|
583
|
+
</p></td>
|
584
|
+
</tr>
|
510
585
|
</tbody>
|
511
586
|
</table>
|
512
587
|
</div>
|
513
588
|
</div>
|
514
589
|
<hr>
|
515
590
|
<div class="refsect2">
|
516
|
-
<a name="id-1.3.3.
|
591
|
+
<a name="id-1.3.3.13.7"></a><h3>Sub-pattern contexts</h3>
|
517
592
|
<p>
|
518
593
|
They refer to a group in a regular expression of the parent context, so it
|
519
594
|
is possible to highlight differently only a portion of the matched regular
|
@@ -555,13 +630,25 @@ expression of the <code class="code"><start></code> or the <code class="co
|
|
555
630
|
element. In simple contexts it must be omitted.
|
556
631
|
</p></td>
|
557
632
|
</tr>
|
633
|
+
<tr>
|
634
|
+
<td><p><span class="term"><code class="code">class</code> (optional)</span></p></td>
|
635
|
+
<td><p>
|
636
|
+
A space-separated list of context classes to enable.
|
637
|
+
</p></td>
|
638
|
+
</tr>
|
639
|
+
<tr>
|
640
|
+
<td><p><span class="term"><code class="code">class-disabled</code> (optional)</span></p></td>
|
641
|
+
<td><p>
|
642
|
+
A space-separated list of context classes to disable.
|
643
|
+
</p></td>
|
644
|
+
</tr>
|
558
645
|
</tbody>
|
559
646
|
</table>
|
560
647
|
</div>
|
561
648
|
</div>
|
562
649
|
<hr>
|
563
650
|
<div class="refsect2">
|
564
|
-
<a name="id-1.3.3.
|
651
|
+
<a name="id-1.3.3.13.8"></a><h3>Reference contexts</h3>
|
565
652
|
<p>
|
566
653
|
Used to include a previously defined context.
|
567
654
|
</p>
|
@@ -598,17 +685,24 @@ in the referenced context.
|
|
598
685
|
<tr>
|
599
686
|
<td><p><span class="term"><code class="code">ignore-style</code> (optional)</span></p></td>
|
600
687
|
<td><p>
|
601
|
-
If this attribute
|
688
|
+
If this attribute is "true" then the referenced context will not
|
602
689
|
be highlighted. It does not affect child contexts and their styles.
|
603
690
|
</p></td>
|
604
691
|
</tr>
|
692
|
+
<tr>
|
693
|
+
<td><p><span class="term"><code class="code">original</code> (optional)</span></p></td>
|
694
|
+
<td><p>
|
695
|
+
If this attribute is "true", it references the original context, if it
|
696
|
+
has been replaced with the <code class="code"><replace></code> tag.
|
697
|
+
</p></td>
|
698
|
+
</tr>
|
605
699
|
</tbody>
|
606
700
|
</table>
|
607
701
|
</div>
|
608
702
|
</div>
|
609
703
|
<hr>
|
610
704
|
<div class="refsect2">
|
611
|
-
<a name="id-1.3.3.
|
705
|
+
<a name="id-1.3.3.13.9"></a><h3>Keyword contexts</h3>
|
612
706
|
<p>
|
613
707
|
They contain a list of <code class="code"><keyword></code> and matches every keyword
|
614
708
|
listed. You can also put a <code class="code"><prefix></code> and/or a
|
@@ -629,7 +723,7 @@ The attributes are the same used in simple contexts.
|
|
629
723
|
</div>
|
630
724
|
</div>
|
631
725
|
<div class="refsect1">
|
632
|
-
<a name="id-1.3.3.
|
726
|
+
<a name="id-1.3.3.14"></a><h2>Tag <code class="code"><include></code>
|
633
727
|
</h2>
|
634
728
|
<p>
|
635
729
|
Contains the list of context contained in the current
|
@@ -641,13 +735,13 @@ Contained elements:
|
|
641
735
|
</p>
|
642
736
|
</div>
|
643
737
|
<div class="refsect1">
|
644
|
-
<a name="id-1.3.3.
|
738
|
+
<a name="id-1.3.3.15"></a><h2>Tag <code class="code"><match></code>
|
645
739
|
</h2>
|
646
740
|
<p>
|
647
|
-
Contains the regular expression for the current simple context.
|
741
|
+
Contains the regular expression for the current simple context.
|
648
742
|
The expression is in the same form used in
|
649
743
|
<code class="code"><define-regex></code> elements.
|
650
|
-
It is allowed to use any of the attributes from
|
744
|
+
It is allowed to use any of the attributes from
|
651
745
|
<code class="code"><default-regex-opts></code> as attributes of this tag.
|
652
746
|
</p>
|
653
747
|
<p>
|
@@ -655,13 +749,13 @@ Contained elements: none.
|
|
655
749
|
</p>
|
656
750
|
</div>
|
657
751
|
<div class="refsect1">
|
658
|
-
<a name="id-1.3.3.
|
752
|
+
<a name="id-1.3.3.16"></a><h2>Tag <code class="code"><start></code>
|
659
753
|
</h2>
|
660
754
|
<p>
|
661
755
|
Contains the starting regular expression for the current container context.
|
662
756
|
The expression is in the same form used in <code class="code"><define-regex></code>
|
663
757
|
elements.
|
664
|
-
It is allowed to use any of the attributes from
|
758
|
+
It is allowed to use any of the attributes from
|
665
759
|
<code class="code"><default-regex-opts></code> as attributes of this tag.
|
666
760
|
</p>
|
667
761
|
<p>
|
@@ -669,7 +763,7 @@ Contained elements: none.
|
|
669
763
|
</p>
|
670
764
|
</div>
|
671
765
|
<div class="refsect1">
|
672
|
-
<a name="id-1.3.3.
|
766
|
+
<a name="id-1.3.3.17"></a><h2>Tag <code class="code"><end></code>
|
673
767
|
</h2>
|
674
768
|
<p>
|
675
769
|
Contains the terminating regular expression for the current container
|
@@ -687,7 +781,7 @@ implement shell-style here-documents with this code:
|
|
687
781
|
</context>
|
688
782
|
</pre>
|
689
783
|
<p>
|
690
|
-
It is also possible to use any of the attributes from
|
784
|
+
It is also possible to use any of the attributes from
|
691
785
|
<code class="code"><default-regex-opts></code> as attributes of this tag.
|
692
786
|
</p>
|
693
787
|
<p>
|
@@ -695,7 +789,7 @@ Contained elements: none.
|
|
695
789
|
</p>
|
696
790
|
</div>
|
697
791
|
<div class="refsect1">
|
698
|
-
<a name="id-1.3.3.
|
792
|
+
<a name="id-1.3.3.18"></a><h2>Tag <code class="code"><keyword></code>
|
699
793
|
</h2>
|
700
794
|
<p>
|
701
795
|
Contains a keyword to be matched by the current context. The keyword is a
|
@@ -706,7 +800,7 @@ Contained elements: none.
|
|
706
800
|
</p>
|
707
801
|
</div>
|
708
802
|
<div class="refsect1">
|
709
|
-
<a name="id-1.3.3.
|
803
|
+
<a name="id-1.3.3.19"></a><h2>Tag <code class="code"><prefix></code>
|
710
804
|
</h2>
|
711
805
|
<p>
|
712
806
|
Contains a prefix common to all of the following keywords in the current
|
@@ -719,7 +813,7 @@ Contained elements: none.
|
|
719
813
|
</p>
|
720
814
|
</div>
|
721
815
|
<div class="refsect1">
|
722
|
-
<a name="id-1.3.3.
|
816
|
+
<a name="id-1.3.3.20"></a><h2>Tag <code class="code"><suffix></code>
|
723
817
|
</h2>
|
724
818
|
<p>
|
725
819
|
Contains a suffix common to all of the following keywords in the current
|
@@ -732,17 +826,17 @@ Contained elements: none.
|
|
732
826
|
</p>
|
733
827
|
</div>
|
734
828
|
<div class="refsect1">
|
735
|
-
<a name="id-1.3.3.
|
829
|
+
<a name="id-1.3.3.21"></a><h2>Tag <code class="code"><replace></code>
|
736
830
|
</h2>
|
737
831
|
<p>
|
738
|
-
The replace tag allows you to change one context so it functions as
|
739
|
-
another context. For example, in the <code class="code">html.lang</code> definition,
|
740
|
-
there are a few references to a null context with id
|
741
|
-
"<code class="code">
|
742
|
-
replaced like this: <code class="code"><replace id="html:
|
743
|
-
ref="php-block"></code>, so that php blocks are recognized within the
|
744
|
-
<code class="code">html:html</code> context at the points where the
|
745
|
-
<code class="code">
|
832
|
+
The replace tag allows you to change one context so it functions as
|
833
|
+
another context. For example, in the <code class="code">html.lang</code> definition,
|
834
|
+
there are a few references to a null context with id
|
835
|
+
"<code class="code">embedded-lang-hook</code>". In <code class="code">php.lang</code>, that context is
|
836
|
+
replaced like this: <code class="code"><replace id="html:embedded-lang-hook"
|
837
|
+
ref="php-block"></code>, so that php blocks are recognized within the
|
838
|
+
<code class="code">html:html</code> context at the points where the
|
839
|
+
<code class="code">embedded-lang-hook</code> context appears.
|
746
840
|
</p>
|
747
841
|
<p>
|
748
842
|
Contained elements: none.
|
@@ -758,7 +852,7 @@ Contained elements: none.
|
|
758
852
|
<tr>
|
759
853
|
<td><p><span class="term"><code class="code">id</code> (mandatory)</span></p></td>
|
760
854
|
<td><p>
|
761
|
-
The id of the context to replace. Ex: <code class="code">id="html:
|
855
|
+
The id of the context to replace. Ex: <code class="code">id="html:embedded-lang-hook"</code>
|
762
856
|
</p></td>
|
763
857
|
</tr>
|
764
858
|
<tr>
|
@@ -774,6 +868,6 @@ The id of the context to put in place of the context being replaced. Ex: <code c
|
|
774
868
|
</div>
|
775
869
|
<div class="footer">
|
776
870
|
<hr>
|
777
|
-
Generated by GTK-Doc V1.
|
871
|
+
Generated by GTK-Doc V1.21.1</div>
|
778
872
|
</body>
|
779
873
|
</html>
|
@@ -8,12 +8,12 @@
|
|
8
8
|
<link rel="up" href="ch02.html" title="Syntax highlighting reference">
|
9
9
|
<link rel="prev" href="ch02.html" title="Syntax highlighting reference">
|
10
10
|
<link rel="next" href="lang-reference.html" title="Language Definition v2.0 Reference">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.
|
11
|
+
<meta name="generator" content="GTK-Doc V1.21.1 (XML mode)">
|
12
12
|
<link rel="stylesheet" href="style.css" type="text/css">
|
13
13
|
</head>
|
14
14
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="
|
16
|
-
<td width="100%" align="left"></td>
|
15
|
+
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
16
|
+
<td width="100%" align="left" class="shortcuts"></td>
|
17
17
|
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
18
18
|
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
19
19
|
<td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
@@ -28,18 +28,15 @@
|
|
28
28
|
Guide to the GtkSourceView language definition file format
|
29
29
|
</p>
|
30
30
|
</td>
|
31
|
-
<td valign="top" align="right"></td>
|
31
|
+
<td class="gallery_image" valign="top" align="right"></td>
|
32
32
|
</tr></table></div>
|
33
33
|
<div class="refsect1">
|
34
34
|
<a name="tutorial"></a><h2>A language definition for the C language</h2>
|
35
|
-
<div class="note">
|
36
|
-
<h3 class="title">Note</h3>
|
37
|
-
<p>
|
35
|
+
<div class="note"><p>
|
38
36
|
The version 2 here refers to the language definition file format,
|
39
37
|
not to the version of GtkSourceView. So this tutorial is suitable
|
40
38
|
for GtkSourceView 2 and 3.
|
41
|
-
</p>
|
42
|
-
</div>
|
39
|
+
</p></div>
|
43
40
|
<p>
|
44
41
|
To describe the syntax of a language GtkSourceView uses an XML format which
|
45
42
|
defines nested context to be highlighted. Each context roughly corresponds
|
@@ -62,7 +59,7 @@ XML declaration:
|
|
62
59
|
After the usual preamble, the main tag is the <code class="code"><language></code> element:
|
63
60
|
</p>
|
64
61
|
<pre class="programlisting">
|
65
|
-
<language id="c" _name="C" version="2.0" _section="
|
62
|
+
<language id="c" _name="C" version="2.0" _section="Source">
|
66
63
|
</pre>
|
67
64
|
<p>
|
68
65
|
The attribute <code class="code">id</code> is used in external references and defines a standard
|
@@ -73,8 +70,8 @@ the name presented to the user (it is translatable using gettext prepending a
|
|
73
70
|
<p>
|
74
71
|
The attribute <code class="code">section</code>, also translatable, tells the category where
|
75
72
|
this language should be grouped when it is presented to the user. Currently
|
76
|
-
available categories in GtkSourceView are "
|
77
|
-
"Scientific" and "
|
73
|
+
available categories in GtkSourceView are "Source", "Script", "Markup",
|
74
|
+
"Scientific" and "Other".
|
78
75
|
</p>
|
79
76
|
<p>
|
80
77
|
The attribute <code class="code">version</code> specifies the version of the xml syntax
|
@@ -91,7 +88,7 @@ The <code class="code"><language></code> element contains three sections:
|
|
91
88
|
<p>
|
92
89
|
The <code class="code"><metadata></code> element is optional and provides a collection
|
93
90
|
of properties which specify arbitrary information about the language definition
|
94
|
-
file itself. It is particularly important to specify the conventional
|
91
|
+
file itself. It is particularly important to specify the conventional
|
95
92
|
<code class="code">mimetypes</code> and <code class="code">globs</code> properties that
|
96
93
|
GtkSourceView uses to automatically detect which syntax highlighting to use
|
97
94
|
for a given file. They respectively contain a semi-colon separated list of
|
@@ -135,8 +132,8 @@ contexts, so they will share the same appearance.
|
|
135
132
|
<style id="type" _name="Data Type" map-to="def:type"/>
|
136
133
|
</pre>
|
137
134
|
<p>
|
138
|
-
Following the <code class="code"><styles></code> element there is the
|
139
|
-
<code class="code"><definitions></code> element, which contains the
|
135
|
+
Following the <code class="code"><styles></code> element there is the
|
136
|
+
<code class="code"><definitions></code> element, which contains the
|
140
137
|
description proper of the syntax:
|
141
138
|
</p>
|
142
139
|
<pre class="programlisting">
|
@@ -523,7 +520,7 @@ for this tutorial:
|
|
523
520
|
</p>
|
524
521
|
<pre class="programlisting">
|
525
522
|
<?xml version="1.0" encoding="UTF-8"?>
|
526
|
-
<language id="c" _name="C" version="2.0" _section="
|
523
|
+
<language id="c" _name="C" version="2.0" _section="Source">
|
527
524
|
<metadata>
|
528
525
|
<property name="mimetypes">text/x-c;text/x-csrc</property>
|
529
526
|
<property name="globs">*.c</property>
|
@@ -652,6 +649,6 @@ for this tutorial:
|
|
652
649
|
</div>
|
653
650
|
<div class="footer">
|
654
651
|
<hr>
|
655
|
-
Generated by GTK-Doc V1.
|
652
|
+
Generated by GTK-Doc V1.21.1</div>
|
656
653
|
</body>
|
657
654
|
</html>
|