Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkSourceStyleScheme: GtkSourceView 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GtkSourceView 3 Reference Manual">
<link rel="up" href="ch03.html" title="Styling">
<link rel="prev" href="GtkSourceStyle.html" title="GtkSourceStyle">
<link rel="next" href="GtkSourceStyleSchemeManager.html" title="GtkSourceStyleSchemeManager">
<meta name="generator" content="GTK-Doc V1.28.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GtkSourceStyleScheme.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GtkSourceStyleScheme.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GtkSourceStyleScheme.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkSourceStyle.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkSourceStyleSchemeManager.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkSourceStyleScheme"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkSourceStyleScheme.top_of_page"></a>GtkSourceStyleScheme</span></h2>
<p>GtkSourceStyleScheme — Controls the appearance of GtkSourceView</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GtkSourceStyleScheme.html#gtk-source-style-scheme-get-id" title="gtk_source_style_scheme_get_id ()">gtk_source_style_scheme_get_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GtkSourceStyleScheme.html#gtk-source-style-scheme-get-name" title="gtk_source_style_scheme_get_name ()">gtk_source_style_scheme_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GtkSourceStyleScheme.html#gtk-source-style-scheme-get-description" title="gtk_source_style_scheme_get_description ()">gtk_source_style_scheme_get_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> * const *
</td>
<td class="function_name">
<a class="link" href="GtkSourceStyleScheme.html#gtk-source-style-scheme-get-authors" title="gtk_source_style_scheme_get_authors ()">gtk_source_style_scheme_get_authors</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GtkSourceStyleScheme.html#gtk-source-style-scheme-get-filename" title="gtk_source_style_scheme_get_filename ()">gtk_source_style_scheme_get_filename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkSourceStyle.html" title="GtkSourceStyle"><span class="returnvalue">GtkSourceStyle</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkSourceStyleScheme.html#gtk-source-style-scheme-get-style" title="gtk_source_style_scheme_get_style ()">gtk_source_style_scheme_get_style</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="GtkSourceStyleScheme.html#GtkSourceStyleScheme--description" title="The “description” property">description</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="GtkSourceStyleScheme.html#GtkSourceStyleScheme--filename" title="The “filename” property">filename</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="GtkSourceStyleScheme.html#GtkSourceStyleScheme--id" title="The “id” property">id</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="GtkSourceStyleScheme.html#GtkSourceStyleScheme--name" title="The “name” property">name</a></td>
<td class="property_flags">Read</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GtkSourceStyleScheme.html#GtkSourceStyleScheme-struct" title="GtkSourceStyleScheme">GtkSourceStyleScheme</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GtkSourceStyleScheme
</pre>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtksourceview/gtksource.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.description"></a><h2>Description</h2>
<p><a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> contains all the text styles to be used in
<a class="link" href="GtkSourceView.html" title="GtkSourceView"><span class="type">GtkSourceView</span></a> and <a class="link" href="GtkSourceBuffer.html" title="GtkSourceBuffer"><span class="type">GtkSourceBuffer</span></a>. For instance, it contains text styles
for syntax highlighting, it may contain foreground and background color for
non-highlighted text, color for the line numbers, current line highlighting,
bracket matching, etc.</p>
<p>Style schemes are stored in XML files. The format of a scheme file is
documented in the <a class="link" href="style-reference.html" title="Style Scheme Definition Reference">style scheme reference</a>.</p>
<p>The two style schemes with IDs "classic" and "tango" follow more closely the
GTK+ theme (for example for the background color).</p>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-source-style-scheme-get-id"></a><h3>gtk_source_style_scheme_get_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gtk_source_style_scheme_get_id (<em class="parameter"><code><a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> *scheme</code></em>);</pre>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-id.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>scheme</code></em>
id.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-0.html#api-index-2.0">2.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-style-scheme-get-name"></a><h3>gtk_source_style_scheme_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gtk_source_style_scheme_get_name (<em class="parameter"><code><a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> *scheme</code></em>);</pre>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-name.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>scheme</code></em>
name.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-0.html#api-index-2.0">2.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-style-scheme-get-description"></a><h3>gtk_source_style_scheme_get_description ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gtk_source_style_scheme_get_description
                               (<em class="parameter"><code><a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> *scheme</code></em>);</pre>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-description.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-description.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>scheme</code></em>
description (if defined), or <code class="literal">NULL</code>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-0.html#api-index-2.0">2.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-style-scheme-get-authors"></a><h3>gtk_source_style_scheme_get_authors ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * const *
gtk_source_style_scheme_get_authors (<em class="parameter"><code><a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> *scheme</code></em>);</pre>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-authors.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-authors.returns"></a><h4>Returns</h4>
<p>a
<code class="literal">NULL</code>-terminated array containing the <em class="parameter"><code>scheme</code></em>
authors or <code class="literal">NULL</code> if
no author is specified by the style scheme. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-0.html#api-index-2.0">2.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-style-scheme-get-filename"></a><h3>gtk_source_style_scheme_get_filename ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gtk_source_style_scheme_get_filename (<em class="parameter"><code><a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> *scheme</code></em>);</pre>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-filename.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-filename.returns"></a><h4>Returns</h4>
<p><em class="parameter"><code>scheme</code></em>
file name if the scheme was created
parsing a style scheme file or <code class="literal">NULL</code> in the other cases. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-0.html#api-index-2.0">2.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-style-scheme-get-style"></a><h3>gtk_source_style_scheme_get_style ()</h3>
<pre class="programlisting"><a class="link" href="GtkSourceStyle.html" title="GtkSourceStyle"><span class="returnvalue">GtkSourceStyle</span></a> *
gtk_source_style_scheme_get_style (<em class="parameter"><code><a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a> *scheme</code></em>,
                                   <em class="parameter"><code>const <span class="type">gchar</span> *style_id</code></em>);</pre>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-style.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>scheme</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkSourceStyleScheme.html" title="GtkSourceStyleScheme"><span class="type">GtkSourceStyleScheme</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>style_id</p></td>
<td class="parameter_description"><p>id of the style to retrieve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-source-style-scheme-get-style.returns"></a><h4>Returns</h4>
<p>style which corresponds to <em class="parameter"><code>style_id</code></em>
in
the <em class="parameter"><code>scheme</code></em>
, or <code class="literal">NULL</code> when no style with this name found.  It is owned by
<em class="parameter"><code>scheme</code></em>
and may not be unref'ed. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-0.html#api-index-2.0">2.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkSourceStyleScheme-struct"></a><h3>GtkSourceStyleScheme</h3>
<pre class="programlisting">typedef struct _GtkSourceStyleScheme GtkSourceStyleScheme;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkSourceStyleScheme--description"></a><h3>The <code class="literal">“description”</code> property</h3>
<pre class="programlisting">  “description”              <span class="type">gchar</span> *</pre>
<p>Style scheme description, a translatable string to present to the user.</p>
<p>Flags: Read</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkSourceStyleScheme--filename"></a><h3>The <code class="literal">“filename”</code> property</h3>
<pre class="programlisting">  “filename”                 <span class="type">gchar</span> *</pre>
<p>Style scheme filename or <code class="literal">NULL</code>.</p>
<p>Flags: Read</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkSourceStyleScheme--id"></a><h3>The <code class="literal">“id”</code> property</h3>
<pre class="programlisting">  “id”                       <span class="type">gchar</span> *</pre>
<p>Style scheme id, a unique string used to identify the style scheme
in <a class="link" href="GtkSourceStyleSchemeManager.html" title="GtkSourceStyleSchemeManager"><span class="type">GtkSourceStyleSchemeManager</span></a>.</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkSourceStyleScheme--name"></a><h3>The <code class="literal">“name”</code> property</h3>
<pre class="programlisting">  “name”                     <span class="type">gchar</span> *</pre>
<p>Style scheme name, a translatable string to present to the user.</p>
<p>Flags: Read</p>
<p>Default value: NULL</p>
</div>
</div>
<div class="refsect1">
<a name="GtkSourceStyleScheme.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkSourceStyle.html" title="GtkSourceStyle"><span class="type">GtkSourceStyle</span></a>, <a class="link" href="GtkSourceStyleSchemeManager.html" title="GtkSourceStyleSchemeManager"><span class="type">GtkSourceStyleSchemeManager</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28.1</div>
</body>
</html>