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>Version Information: 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="ch09.html" title="Other">
<link rel="prev" href="gtksourceview-3.0-GtkSourceUtils.html" title="GtkSourceUtils">
<link rel="next" href="pt03.html" title="Part III. Syntax highlighting reference">
<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="#gtksourceview-3.0-Version-Information.description" class="shortcut">Description</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="ch09.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gtksourceview-3.0-GtkSourceUtils.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="pt03.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gtksourceview-3.0-Version-Information"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtksourceview-3.0-Version-Information.top_of_page"></a>Version Information</span></h2>
<p>Version Information — Macros and functions to check the GtkSourceView version</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gtksourceview-3.0-Version-Information.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">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="gtksourceview-3.0-Version-Information.html#gtk-source-get-major-version" title="gtk_source_get_major_version ()">gtk_source_get_major_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="gtksourceview-3.0-Version-Information.html#gtk-source-get-minor-version" title="gtk_source_get_minor_version ()">gtk_source_get_minor_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="gtksourceview-3.0-Version-Information.html#gtk-source-get-micro-version" title="gtk_source_get_micro_version ()">gtk_source_get_micro_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="gtksourceview-3.0-Version-Information.html#gtk-source-check-version" title="gtk_source_check_version ()">gtk_source_check_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-CHECK-VERSION:CAPS" title="GTK_SOURCE_CHECK_VERSION()">GTK_SOURCE_CHECK_VERSION</a><span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gtksourceview-3.0-Version-Information.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="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-MAJOR-VERSION:CAPS" title="GTK_SOURCE_MAJOR_VERSION">GTK_SOURCE_MAJOR_VERSION</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-MINOR-VERSION:CAPS" title="GTK_SOURCE_MINOR_VERSION">GTK_SOURCE_MINOR_VERSION</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-MICRO-VERSION:CAPS" title="GTK_SOURCE_MICRO_VERSION">GTK_SOURCE_MICRO_VERSION</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-0:CAPS" title="GTK_SOURCE_VERSION_3_0">GTK_SOURCE_VERSION_3_0</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-2:CAPS" title="GTK_SOURCE_VERSION_3_2">GTK_SOURCE_VERSION_3_2</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-4:CAPS" title="GTK_SOURCE_VERSION_3_4">GTK_SOURCE_VERSION_3_4</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-6:CAPS" title="GTK_SOURCE_VERSION_3_6">GTK_SOURCE_VERSION_3_6</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-8:CAPS" title="GTK_SOURCE_VERSION_3_8">GTK_SOURCE_VERSION_3_8</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-10:CAPS" title="GTK_SOURCE_VERSION_3_10">GTK_SOURCE_VERSION_3_10</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-12:CAPS" title="GTK_SOURCE_VERSION_3_12">GTK_SOURCE_VERSION_3_12</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-14:CAPS" title="GTK_SOURCE_VERSION_3_14">GTK_SOURCE_VERSION_3_14</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-16:CAPS" title="GTK_SOURCE_VERSION_3_16">GTK_SOURCE_VERSION_3_16</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-18:CAPS" title="GTK_SOURCE_VERSION_3_18">GTK_SOURCE_VERSION_3_18</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-20:CAPS" title="GTK_SOURCE_VERSION_3_20">GTK_SOURCE_VERSION_3_20</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-22:CAPS" title="GTK_SOURCE_VERSION_3_22">GTK_SOURCE_VERSION_3_22</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-3-24:CAPS" title="GTK_SOURCE_VERSION_3_24">GTK_SOURCE_VERSION_3_24</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-MIN-REQUIRED:CAPS" title="GTK_SOURCE_VERSION_MIN_REQUIRED">GTK_SOURCE_VERSION_MIN_REQUIRED</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-VERSION-MAX-ALLOWED:CAPS" title="GTK_SOURCE_VERSION_MAX_ALLOWED">GTK_SOURCE_VERSION_MAX_ALLOWED</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gtksourceview-3.0-Version-Information.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtksourceview/gtksource.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gtksourceview-3.0-Version-Information.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="gtksourceview-3.0-Version-Information.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-source-get-major-version"></a><h3>gtk_source_get_major_version ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
gtk_source_get_major_version (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the major version number of the GtkSourceView library.
(e.g. in GtkSourceView version 3.20.0 this is 3.)</p>
<p>This function is in the library, so it represents the GtkSourceView library
your code is running against. Contrast with the <a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-MAJOR-VERSION:CAPS" title="GTK_SOURCE_MAJOR_VERSION"><span class="type">GTK_SOURCE_MAJOR_VERSION</span></a>
macro, which represents the major version of the GtkSourceView headers you
have included when compiling your code.</p>
<div class="refsect3">
<a name="gtk-source-get-major-version.returns"></a><h4>Returns</h4>
<p> the major version number of the GtkSourceView library</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-20.html#api-index-3.20">3.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-get-minor-version"></a><h3>gtk_source_get_minor_version ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
gtk_source_get_minor_version (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the minor version number of the GtkSourceView library.
(e.g. in GtkSourceView version 3.20.0 this is 20.)</p>
<p>This function is in the library, so it represents the GtkSourceView library
your code is running against. Contrast with the <a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-MINOR-VERSION:CAPS" title="GTK_SOURCE_MINOR_VERSION"><span class="type">GTK_SOURCE_MINOR_VERSION</span></a>
macro, which represents the minor version of the GtkSourceView headers you
have included when compiling your code.</p>
<div class="refsect3">
<a name="gtk-source-get-minor-version.returns"></a><h4>Returns</h4>
<p> the minor version number of the GtkSourceView library</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-20.html#api-index-3.20">3.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-get-micro-version"></a><h3>gtk_source_get_micro_version ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
gtk_source_get_micro_version (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the micro version number of the GtkSourceView library.
(e.g. in GtkSourceView version 3.20.0 this is 0.)</p>
<p>This function is in the library, so it represents the GtkSourceView library
your code is running against. Contrast with the <a class="link" href="gtksourceview-3.0-Version-Information.html#GTK-SOURCE-MICRO-VERSION:CAPS" title="GTK_SOURCE_MICRO_VERSION"><span class="type">GTK_SOURCE_MICRO_VERSION</span></a>
macro, which represents the micro version of the GtkSourceView headers you
have included when compiling your code.</p>
<div class="refsect3">
<a name="gtk-source-get-micro-version.returns"></a><h4>Returns</h4>
<p> the micro version number of the GtkSourceView library</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-20.html#api-index-3.20">3.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-check-version"></a><h3>gtk_source_check_version ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_source_check_version (<em class="parameter"><code><span class="type">guint</span> major</code></em>,
                          <em class="parameter"><code><span class="type">guint</span> minor</code></em>,
                          <em class="parameter"><code><span class="type">guint</span> micro</code></em>);</pre>
<p>Like GTK_SOURCE_CHECK_VERSION, but the check for gtk_source_check_version is
at runtime instead of compile time. This is useful for compiling
against older versions of GtkSourceView, but using features from newer
versions.</p>
<div class="refsect3">
<a name="gtk-source-check-version.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>major</p></td>
<td class="parameter_description"><p>the major version to check</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>minor</p></td>
<td class="parameter_description"><p>the minor version to check</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>micro</p></td>
<td class="parameter_description"><p>the micro version to check</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-source-check-version.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the version of the GtkSourceView currently loaded
is the same as or newer than the passed-in version.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-20.html#api-index-3.20">3.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-CHECK-VERSION:CAPS"></a><h3>GTK_SOURCE_CHECK_VERSION()</h3>
<pre class="programlisting">#define             GTK_SOURCE_CHECK_VERSION(major, minor, micro)</pre>
</div>
</div>
<div class="refsect1">
<a name="gtksourceview-3.0-Version-Information.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GTK-SOURCE-MAJOR-VERSION:CAPS"></a><h3>GTK_SOURCE_MAJOR_VERSION</h3>
<pre class="programlisting">#define GTK_SOURCE_MAJOR_VERSION (3)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-MINOR-VERSION:CAPS"></a><h3>GTK_SOURCE_MINOR_VERSION</h3>
<pre class="programlisting">#define GTK_SOURCE_MINOR_VERSION (24)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-MICRO-VERSION:CAPS"></a><h3>GTK_SOURCE_MICRO_VERSION</h3>
<pre class="programlisting">#define GTK_SOURCE_MICRO_VERSION (9)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-0:CAPS"></a><h3>GTK_SOURCE_VERSION_3_0</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_0 (G_ENCODE_VERSION (3, 0))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-2:CAPS"></a><h3>GTK_SOURCE_VERSION_3_2</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_2 (G_ENCODE_VERSION (3, 2))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-4:CAPS"></a><h3>GTK_SOURCE_VERSION_3_4</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_4 (G_ENCODE_VERSION (3, 4))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-6:CAPS"></a><h3>GTK_SOURCE_VERSION_3_6</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_6 (G_ENCODE_VERSION (3, 6))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-8:CAPS"></a><h3>GTK_SOURCE_VERSION_3_8</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_8 (G_ENCODE_VERSION (3, 8))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-10:CAPS"></a><h3>GTK_SOURCE_VERSION_3_10</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_10 (G_ENCODE_VERSION (3, 10))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-12:CAPS"></a><h3>GTK_SOURCE_VERSION_3_12</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_12 (G_ENCODE_VERSION (3, 12))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-14:CAPS"></a><h3>GTK_SOURCE_VERSION_3_14</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_14 (G_ENCODE_VERSION (3, 14))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-16:CAPS"></a><h3>GTK_SOURCE_VERSION_3_16</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_16 (G_ENCODE_VERSION (3, 16))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-18:CAPS"></a><h3>GTK_SOURCE_VERSION_3_18</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_18 (G_ENCODE_VERSION (3, 18))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-20:CAPS"></a><h3>GTK_SOURCE_VERSION_3_20</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_20 (G_ENCODE_VERSION (3, 20))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-22:CAPS"></a><h3>GTK_SOURCE_VERSION_3_22</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_22 (G_ENCODE_VERSION (3, 22))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-3-24:CAPS"></a><h3>GTK_SOURCE_VERSION_3_24</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_3_24 (G_ENCODE_VERSION (3, 24))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-MIN-REQUIRED:CAPS"></a><h3>GTK_SOURCE_VERSION_MIN_REQUIRED</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_MIN_REQUIRED (GTK_SOURCE_VERSION_CUR_STABLE)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GTK-SOURCE-VERSION-MAX-ALLOWED:CAPS"></a><h3>GTK_SOURCE_VERSION_MAX_ALLOWED</h3>
<pre class="programlisting">#define GTK_SOURCE_VERSION_MAX_ALLOWED  GTK_SOURCE_VERSION_MIN_REQUIRED
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28.1</div>
</body>
</html>