<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
  <!ENTITY % gtkdocentities SYSTEM "../xml/gtkdocentities.ent">
  %gtkdocentities;
]>
<refentry id="atk-Versioning-Utilities">
<refmeta>
<refentrytitle role="top_of_page" id="atk-Versioning-Utilities.top_of_page">Versioning macros</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>ATK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Versioning macros</refname>
<refpurpose>Variables and functions to check the ATK version</refpurpose>
</refnamediv>

<refsect1 id="atk-Versioning-Utilities.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-get-major-version">atk_get_major_version</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-get-minor-version">atk_get_minor_version</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-get-micro-version">atk_get_micro_version</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-get-binary-age">atk_get_binary_age</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-get-interface-age">atk_get_interface_age</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-CHECK-VERSION:CAPS">ATK_CHECK_VERSION</link><phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="atk-Versioning-Utilities.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-BINARY-AGE:CAPS">ATK_BINARY_AGE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-INTERFACE-AGE:CAPS">ATK_INTERFACE_AGE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-MAJOR-VERSION:CAPS">ATK_MAJOR_VERSION</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-MINOR-VERSION:CAPS">ATK_MINOR_VERSION</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="ATK-MICRO-VERSION:CAPS">ATK_MICRO_VERSION</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>


<refsect1 id="atk-Versioning-Utilities.description" role="desc">
<title role="desc.title">Description</title>
<para>ATK provides a set of macros and methods for checking the version
of the library at compile and run time.</para>

</refsect1>
<refsect1 id="atk-Versioning-Utilities.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="atk-get-major-version" role="function" condition="since:2.8">
<title>atk_get_major_version&#160;()</title>
<indexterm zone="atk-get-major-version" role="2.8"><primary>atk_get_major_version</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
atk_get_major_version (<parameter><type>void</type></parameter>);</programlisting>
<para>Returns the major version number of the ATK library.  (e.g. in ATK
version 2.7.4 this is 2.)</para>
<para>This function is in the library, so it represents the ATK library
your code is running against. In contrast, the <link linkend="ATK-MAJOR-VERSION:CAPS"><type>ATK_MAJOR_VERSION</type></link>
macro represents the major version of the ATK headers you have
included when compiling your code.</para>
<refsect3 id="atk-get-major-version.returns" role="returns">
<title>Returns</title>
<para> the major version number of the ATK library</para>
</refsect3><para role="since">Since: <link linkend="api-index-2.8">2.8</link></para></refsect2>
<refsect2 id="atk-get-minor-version" role="function" condition="since:2.8">
<title>atk_get_minor_version&#160;()</title>
<indexterm zone="atk-get-minor-version" role="2.8"><primary>atk_get_minor_version</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
atk_get_minor_version (<parameter><type>void</type></parameter>);</programlisting>
<para>Returns the minor version number of the ATK library.  (e.g. in ATK
version 2.7.4 this is 7.)</para>
<para>This function is in the library, so it represents the ATK library
your code is are running against. In contrast, the
<link linkend="ATK-MINOR-VERSION:CAPS"><type>ATK_MINOR_VERSION</type></link> macro represents the minor version of the ATK
headers you have included when compiling your code.</para>
<refsect3 id="atk-get-minor-version.returns" role="returns">
<title>Returns</title>
<para> the minor version number of the ATK library</para>
</refsect3><para role="since">Since: <link linkend="api-index-2.8">2.8</link></para></refsect2>
<refsect2 id="atk-get-micro-version" role="function" condition="since:2.8">
<title>atk_get_micro_version&#160;()</title>
<indexterm zone="atk-get-micro-version" role="2.8"><primary>atk_get_micro_version</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
atk_get_micro_version (<parameter><type>void</type></parameter>);</programlisting>
<para>Returns the micro version number of the ATK library.  (e.g. in ATK
version 2.7.4 this is 4.)</para>
<para>This function is in the library, so it represents the ATK library
your code is are running against. In contrast, the
<link linkend="ATK-MICRO-VERSION:CAPS"><type>ATK_MICRO_VERSION</type></link> macro represents the micro version of the ATK
headers you have included when compiling your code.</para>
<refsect3 id="atk-get-micro-version.returns" role="returns">
<title>Returns</title>
<para> the micro version number of the ATK library</para>
</refsect3><para role="since">Since: <link linkend="api-index-2.8">2.8</link></para></refsect2>
<refsect2 id="atk-get-binary-age" role="function" condition="since:2.8">
<title>atk_get_binary_age&#160;()</title>
<indexterm zone="atk-get-binary-age" role="2.8"><primary>atk_get_binary_age</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
atk_get_binary_age (<parameter><type>void</type></parameter>);</programlisting>
<para>Returns the binary age as passed to libtool when building the ATK
library the process is running against.</para>
<refsect3 id="atk-get-binary-age.returns" role="returns">
<title>Returns</title>
<para> the binary age of the ATK library</para>
</refsect3><para role="since">Since: <link linkend="api-index-2.8">2.8</link></para></refsect2>
<refsect2 id="atk-get-interface-age" role="function" condition="since:2.8">
<title>atk_get_interface_age&#160;()</title>
<indexterm zone="atk-get-interface-age" role="2.8"><primary>atk_get_interface_age</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
atk_get_interface_age (<parameter><type>void</type></parameter>);</programlisting>
<para>Returns the interface age as passed to libtool when building the
ATK library the process is running against.</para>
<refsect3 id="atk-get-interface-age.returns" role="returns">
<title>Returns</title>
<para> the interface age of the ATK library</para>
</refsect3><para role="since">Since: <link linkend="api-index-2.8">2.8</link></para></refsect2>
<refsect2 id="ATK-CHECK-VERSION:CAPS" role="macro" condition="since:2.7.4">
<title>ATK_CHECK_VERSION()</title>
<indexterm zone="ATK-CHECK-VERSION:CAPS" role="2.7.4"><primary>ATK_CHECK_VERSION</primary></indexterm>
<programlisting language="C">#define             ATK_CHECK_VERSION(major,minor,micro)</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the version of the ATK header files is the same as
or newer than the passed-in version.</para>
<refsect3 id="ATK-CHECK-VERSION.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>major</para></entry>
<entry role="parameter_description"><para>major version (e.g. 1 for version 1.2.5)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>minor</para></entry>
<entry role="parameter_description"><para>minor version (e.g. 2 for version 1.2.5)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>micro</para></entry>
<entry role="parameter_description"><para>micro version (e.g. 5 for version 1.2.5)</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-2.7.4">2.7.4</link></para></refsect2>

</refsect1>
<refsect1 id="atk-Versioning-Utilities.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="ATK-BINARY-AGE:CAPS" role="macro" condition="since:2.7.4">
<title>ATK_BINARY_AGE</title>
<indexterm zone="ATK-BINARY-AGE:CAPS" role="2.7.4"><primary>ATK_BINARY_AGE</primary></indexterm>
<programlisting language="C">#define ATK_BINARY_AGE    (23010)
</programlisting>
<para>Like <link linkend="atk-get-binary-age"><function>atk_get_binary_age()</function></link>, but from the headers used at
application compile time, rather than from the library linked
against at application run time.</para>
<para role="since">Since: <link linkend="api-index-2.7.4">2.7.4</link></para></refsect2>
<refsect2 id="ATK-INTERFACE-AGE:CAPS" role="macro" condition="since:2.7.4">
<title>ATK_INTERFACE_AGE</title>
<indexterm zone="ATK-INTERFACE-AGE:CAPS" role="2.7.4"><primary>ATK_INTERFACE_AGE</primary></indexterm>
<programlisting language="C">#define ATK_INTERFACE_AGE (1)
</programlisting>
<para>Like <link linkend="atk-get-interface-age"><function>atk_get_interface_age()</function></link>, but from the headers used at
application compile time, rather than from the library linked
against at application run time.</para>
<para role="since">Since: <link linkend="api-index-2.7.4">2.7.4</link></para></refsect2>
<refsect2 id="ATK-MAJOR-VERSION:CAPS" role="macro" condition="since:2.7.4">
<title>ATK_MAJOR_VERSION</title>
<indexterm zone="ATK-MAJOR-VERSION:CAPS" role="2.7.4"><primary>ATK_MAJOR_VERSION</primary></indexterm>
<programlisting language="C">#define ATK_MAJOR_VERSION (2)
</programlisting>
<para>Like <link linkend="atk-get-major-version"><function>atk_get_major_version()</function></link>, but from the headers used at
application compile time, rather than from the library linked
against at application run time.</para>
<para role="since">Since: <link linkend="api-index-2.7.4">2.7.4</link></para></refsect2>
<refsect2 id="ATK-MINOR-VERSION:CAPS" role="macro" condition="since:2.7.4">
<title>ATK_MINOR_VERSION</title>
<indexterm zone="ATK-MINOR-VERSION:CAPS" role="2.7.4"><primary>ATK_MINOR_VERSION</primary></indexterm>
<programlisting language="C">#define ATK_MINOR_VERSION (30)
</programlisting>
<para>Like <link linkend="atk-get-minor-version"><function>atk_get_minor_version()</function></link>, but from the headers used at
application compile time, rather than from the library linked
against at application run time.</para>
<para role="since">Since: <link linkend="api-index-2.7.4">2.7.4</link></para></refsect2>
<refsect2 id="ATK-MICRO-VERSION:CAPS" role="macro" condition="since:2.7.4">
<title>ATK_MICRO_VERSION</title>
<indexterm zone="ATK-MICRO-VERSION:CAPS" role="2.7.4"><primary>ATK_MICRO_VERSION</primary></indexterm>
<programlisting language="C">#define ATK_MICRO_VERSION (0)
</programlisting>
<para>Like <link linkend="atk-get-micro-version"><function>atk_get_micro_version()</function></link>, but from the headers used at
application compile time, rather than from the library linked
against at application run time.</para>
<para role="since">Since: <link linkend="api-index-2.7.4">2.7.4</link></para></refsect2>

</refsect1>

</refentry>
