/usr/share/gtk-doc/html/pygtksourceview2/class-gtksourcestylescheme2.html is in python-gtksourceview2 2.10.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtksourceview2.StyleScheme</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGtksourceview2 Reference Manual"><link rel="up" href="index.html" title="PyGtksourceview2 Reference Manual"><link rel="prev" href="class-gtksourcestyle2.html" title="gtksourceview2.Style"><link rel="next" href="class-gtksourcestyleschememanager2.html" title="gtksourceview2.StyleSchemeManager"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtksourceview2.StyleScheme</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtksourcestyle2.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="class-gtksourcestyleschememanager2.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtksourceview2.StyleScheme"><a name="class-gtksourcestylescheme2"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtksourceview2.StyleScheme</h2><p>gtksourceview2.StyleScheme — StyleScheme object for <a class="link" href="class-gtksourceview2.html" title="gtksourceview2.View">gtksourceview2.View</a></p></div><div class="refsect1" title="Synopsis"><a name="idp7746880"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtksourceview2.StyleScheme</span></span>(<span class="ooclass"><span class="classname"><a
href="../pygobject/class-gobject.html"
>gobject.GObject</a></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourcestylescheme2.html#method-gtksourcestylescheme2--get-authors" title="gtksourceview2.StyleScheme.get_authors">get_authors</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourcestylescheme2.html#method-gtksourcestylescheme2--get-description" title="gtksourceview2.StyleScheme.get_description">get_description</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourcestylescheme2.html#method-gtksourcestylescheme2--get-filename" title="gtksourceview2.StyleScheme.get_filename">get_filename</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourcestylescheme2.html#method-gtksourcestylescheme2--get-id" title="gtksourceview2.StyleScheme.get_id">get_id</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourcestylescheme2.html#method-gtksourcestylescheme2--get-name" title="gtksourceview2.StyleScheme.get_name">get_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksourcestylescheme2.html#method-gtksourcestylescheme2--get-style" title="gtksourceview2.StyleScheme.get_style">get_style</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="idp9709968"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a
href="../pygobject/class-gobject.html"
>gobject.GObject</a>
+-- <a class="link" href="class-gtksourcestylescheme2.html" title="gtksourceview2.StyleScheme">gtksourceview2.StyleScheme</a>
</pre></div><div class="refsect1" title="Properties"><a name="idp7265184"></a><h2>Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"description"</td><td valign="top">Read</td><td valign="top">Style scheme description. Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"filename"</td><td valign="top">Read</td><td valign="top">Style scheme filename or <code class="literal">None</code>. Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"id"</td><td valign="top">Read-Write-Construct only</td><td valign="top">Style scheme id, a unique string used to identify the style scheme in
<a class="link" href="class-gtksourcestyleschememanager2.html" title="gtksourceview2.StyleSchemeManager"><code class="classname">gtksourceview2.StyleSchemeManager</code></a>.
Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"name"</td><td valign="top">Read-Write</td><td valign="top">Style scheme name, a translatable string to present to user.
Default value: <code class="literal">None</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="description-gtksourcestylescheme"></a><h2>Description</h2><p>
<a class="link" href="class-gtksourcestylescheme2.html" title="gtksourceview2.StyleScheme"><code class="classname">gtksourceview2.StyleScheme</code></a> contains all
the text styles to be used in <a class="link" href="class-gtksourceview2.html" title="gtksourceview2.View"><code class="classname">gtksourceview2.View</code></a>
and <a class="link" href="class-gtksourcebuffer2.html" title="gtksourceview2.Buffer"><code class="classname">gtksourceview2.Buffer</code></a>.
For instance, it contains text styles for syntax highlighting, it may contain foreground and background
color for non-highlighted text, etc.
</p><p>
Style schemes are stored in XML files. The format of scheme file is the following.
</p><p>
The toplevel tag in a style scheme file is <style-scheme>. It has the following attributes:
</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="code">id</code> (mandatory)</span></p></td><td><p>
Identifier for the style scheme. This is must be unique among style schemes.
</p></td></tr><tr><td><p><span class="term"><code class="code">name</code> (mandatory)</span></p></td><td><p>
Name of the style scheme. This is the name of the scheme to display to user, e.g.
in a preferences dialog.
</p></td></tr><tr><td><p><span class="term"><code class="code">_name</code></span></p></td><td><p>
This is the same as <code class="code">name</code> attribute, except it will be translated.
<code class="code">name</code> and <code class="code">_name</code> may not be used simultaneously.
</p></td></tr><tr><td><p><span class="term"><code class="code">parent-scheme</code> (optional)</span></p></td><td><p>
Style schemes may have parent schemes: all styles but those specified
in the scheme will be taken from the parent scheme. In this way a scheme may
be customized without copying all its content.
</p></td></tr><tr><td><p><span class="term"><code class="code">version</code> (mandatory)</span></p></td><td><p>
Style scheme format identifier. At the moment it must be "1.0".
</p></td></tr></tbody></table><p>
</p><p>
style-scheme tag may contain the following tags:
</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="code">author</code></span></p></td><td><p>
Name of the style scheme author.
</p></td></tr><tr><td><p><span class="term"><code class="code">description</code></span></p></td><td><p>
Description of the style scheme.
</p></td></tr><tr><td><p><span class="term"><code class="code">_description</code></span></p></td><td><p>
Same as <code class="code">description</code> except it will be localized.
</p></td></tr><tr><td><p><span class="term"><code class="code">color</code> tags</span></p></td><td><p>
These define color names to be used in <code class="code">style</code> tags.
It has two attributes: <code class="code">name</code> and <code class="code">value</code>.
<code class="code">value</code> is the hexadecimal color specification like
"#000000" or named color understood by Gdk prefixed with "#",
e.g. "#beige".
</p></td></tr><tr><td><p><span class="term"><code class="code">style</code> tags</span></p></td><td><p>
See below for their format description.
</p></td></tr></tbody></table><p>
</p><p>
Each <code class="code">style</code> tag describes a single element of style scheme (it corresponds
to #GtkSourceStyle object). It has the following attributes:
</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="code">name</code> (mandatory)</span></p></td><td><p>
Name of the style. It can be anything, syntax highlighting uses lang-id:style-id,
and there are few special styles which are used to control general appearance
of the text. Style scheme may contain other names to be used in an application. For instance,
it may define color to highlight compilation errors in a build log or a color for
bookmarks.
</p></td></tr><tr><td><p><span class="term"><code class="code">foreground</code></span></p></td><td><p>
Foreground color. It may be name defined in one of <code class="code">color</code> tags, or value in
hexadecimal format, e.g. "#000000", or symbolic name understood
by Gdk, prefixed with "#", e.g. "#magenta" or "#darkred".
</p></td></tr><tr><td><p><span class="term"><code class="code">background</code></span></p></td><td><p>
Background color.
</p></td></tr><tr><td><p><span class="term"><code class="code">italic</code></span></p></td><td><p>"true" or "false"</p></td></tr><tr><td><p><span class="term"><code class="code">bold</code></span></p></td><td><p>"true" or "false"</p></td></tr><tr><td><p><span class="term"><code class="code">underline</code></span></p></td><td><p>"true" or "false"</p></td></tr><tr><td><p><span class="term"><code class="code">strikethrough</code></span></p></td><td><p>"true" or "false"</p></td></tr></tbody></table><p>
</p><p>
The following are names of styles which control #GtkSourceView appearance:
</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="code">text</code></span></p></td><td><p>Default style of text.</p></td></tr><tr><td><p><span class="term"><code class="code">selection</code></span></p></td><td><p>Style of selected text.</p></td></tr><tr><td><p><span class="term"><code class="code">selection-unfocused</code></span></p></td><td><p>Style of selected text when the widget doesn't have input focus.</p></td></tr><tr><td><p><span class="term"><code class="code">cursor</code></span></p></td><td><p>Text cursor style. Only <code class="code">foreground</code> attribute is used
for this style</p></td></tr><tr><td><p><span class="term"><code class="code">secondary-cursor</code></span></p></td><td><p>Secondary cursor style (used in bidi text). Only <code class="code">foreground</code> attribute
is used for this style. If this is not set while "cursor" is, then a color between text background
and cursor colors is chosen, so it is enough to use "cursor" style only.</p></td></tr><tr><td><p><span class="term"><code class="code">current-line</code></span></p></td><td><p>Current line style. Only <code class="code">background</code> attribute is used</p></td></tr><tr><td><p><span class="term"><code class="code">line-numbers</code></span></p></td><td><p>Text and background colors for the left margin, on which line numbers are
drawn</p></td></tr><tr><td><p><span class="term"><code class="code">bracket-match</code></span></p></td><td><p>Style to use for matching brackets.</p></td></tr><tr><td><p><span class="term"><code class="code">bracket-mismatch</code></span></p></td><td><p>Style to use for mismatching brackets.</p></td></tr></tbody></table><p>
</p></div><div class="refsect1" title="Methods"><a name="idp11461120"></a><h2>Methods</h2><div class="refsect2" title="gtksourceview2.StyleScheme.get_authors"><a name="method-gtksourcestylescheme2--get-authors"></a><h3>gtksourceview2.StyleScheme.get_authors</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_authors</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list containing the scheme authors or
<code class="literal">>None</code> if no author is specified by the style.</td></tr></tbody></table><p>
The <code class="methodname">get_authors</code>() method returns a list of scheme authors.
</p></div><div class="refsect2" title="gtksourceview2.StyleScheme.get_description"><a name="method-gtksourcestylescheme2--get-description"></a><h3>gtksourceview2.StyleScheme.get_description</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_description</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the scheme description (if defined) or <code class="literal">None</code>.</td></tr></tbody></table><p>
The <code class="methodname">get_description</code>() method gets the scheme description.
</p></div><div class="refsect2" title="gtksourceview2.StyleScheme.get_filename"><a name="method-gtksourcestylescheme2--get-filename"></a><h3>gtksourceview2.StyleScheme.get_filename</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_filename</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the scheme file name if the scheme was created parsing a style
scheme file or <code class="literal">None</code>.</td></tr></tbody></table><p>
The <code class="methodname">get_filename</code>() method gets the scheme filename.
</p></div><div class="refsect2" title="gtksourceview2.StyleScheme.get_id"><a name="method-gtksourcestylescheme2--get-id"></a><h3>gtksourceview2.StyleScheme.get_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the scheme id.</td></tr></tbody></table><p>
The <code class="methodname">get_id</code>() method gets the scheme id.
</p></div><div class="refsect2" title="gtksourceview2.StyleScheme.get_name"><a name="method-gtksourcestylescheme2--get-name"></a><h3>gtksourceview2.StyleScheme.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the style scheme.</td></tr></tbody></table><p>
The <code class="methodname">get_name</code>() method gets the name of the style scheme.
</p></div><div class="refsect2" title="gtksourceview2.StyleScheme.get_style"><a name="method-gtksourcestylescheme2--get-style"></a><h3>gtksourceview2.StyleScheme.get_style</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_style</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>style_id</code></strong> :</span></p></td><td>the id of a style.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the style which corresponds to <em class="parameter"><code>style_id</code></em>
in the scheme, or <code class="literal">None</code> when no style with this name found.</td></tr></tbody></table><p>
The <code class="methodname">get_style</code>() method gets the style which corresponds to style_id in the scheme.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtksourcestyle2.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="class-gtksourcestyleschememanager2.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtksourceview2.Style </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtksourceview2.StyleSchemeManager</td></tr></table></div></body></html>
|