Imported Upstream version 2.8.16

This commit is contained in:
Ari Pollak
2015-11-24 14:17:30 -05:00
parent bf2f572083
commit 66d1b776a9
842 changed files with 251623 additions and 240362 deletions

View File

@ -2,13 +2,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GIMP Base Library Reference Manual: gimpunit</title>
<title>gimpunit: GIMP Base Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GIMP Base Library Reference Manual">
<link rel="up" href="libgimpbase.html" title="Part I. GIMP Base Library">
<link rel="prev" href="libgimpbase-gimpsignal.html" title="gimpsignal">
<link rel="next" href="libgimpbase-gimputils.html" title="gimputils">
<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@ -42,7 +42,7 @@
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-number-of-units" title="gimp_unit_get_number_of_units ()">gimp_unit_get_number_of_units</a> <span class="c_punctuation">()</span>
@ -50,7 +50,7 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-number-of-built-in-units" title="gimp_unit_get_number_of_built_in_units ()">gimp_unit_get_number_of_built_in_units</a> <span class="c_punctuation">()</span>
@ -66,7 +66,7 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-deletion-flag" title="gimp_unit_get_deletion_flag ()">gimp_unit_get_deletion_flag</a> <span class="c_punctuation">()</span>
@ -82,7 +82,7 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gdouble</span>
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-factor" title="gimp_unit_get_factor ()">gimp_unit_get_factor</a> <span class="c_punctuation">()</span>
@ -90,42 +90,42 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-digits" title="gimp_unit_get_digits ()">gimp_unit_get_digits</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
<td class="function_type">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-identifier" title="gimp_unit_get_identifier ()">gimp_unit_get_identifier</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
<td class="function_type">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-symbol" title="gimp_unit_get_symbol ()">gimp_unit_get_symbol</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
<td class="function_type">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-abbreviation" title="gimp_unit_get_abbreviation ()">gimp_unit_get_abbreviation</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
<td class="function_type">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-singular" title="gimp_unit_get_singular ()">gimp_unit_get_singular</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
<td class="function_type">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-plural" title="gimp_unit_get_plural ()">gimp_unit_get_plural</a> <span class="c_punctuation">()</span>
@ -133,7 +133,7 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-format-string" title="gimp_unit_format_string ()">gimp_unit_format_string</a> <span class="c_punctuation">()</span>
@ -141,7 +141,7 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gdouble</span>
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-pixels-to-units" title="gimp_pixels_to_units ()">gimp_pixels_to_units</a> <span class="c_punctuation">()</span>
@ -149,7 +149,7 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gdouble</span>
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-units-to-pixels" title="gimp_units_to_pixels ()">gimp_units_to_pixels</a> <span class="c_punctuation">()</span>
@ -157,7 +157,7 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gdouble</span>
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-units-to-points" title="gimp_units_to_points ()">gimp_units_to_points</a> <span class="c_punctuation">()</span>
@ -179,7 +179,7 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GParamSpec</span> *
<a href="https://developer.gnome.org/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="returnvalue">GParamSpec</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-param-spec-unit" title="gimp_param_spec_unit ()">gimp_param_spec_unit</a> <span class="c_punctuation">()</span>
@ -216,19 +216,18 @@ creating user-defined units.</p>
<a name="libgimpbase-gimpunit.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-unit-get-number-of-units"></a><h3>gimp_unit_get_number_of_units ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gimp_unit_get_number_of_units (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the number of units which are known to the <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> system.</p>
<div class="refsect3">
<a name="id-1.2.16.6.2.5"></a><h4>Returns</h4>
<p> The number of defined units.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-number-of-built-in-units"></a><h3>gimp_unit_get_number_of_built_in_units ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gimp_unit_get_number_of_built_in_units
(<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the number of <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s which are hardcoded in the unit system
@ -237,23 +236,22 @@ gimp_unit_get_number_of_built_in_units
<div class="refsect3">
<a name="id-1.2.16.6.3.5"></a><h4>Returns</h4>
<p> The number of built-in units.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-new"></a><h3>gimp_unit_new ()</h3>
<pre class="programlisting"><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="returnvalue">GimpUnit</span></a>
gimp_unit_new (<em class="parameter"><code><span class="type">gchar</span> *identifier</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> factor</code></em>,
<em class="parameter"><code><span class="type">gint</span> digits</code></em>,
<em class="parameter"><code><span class="type">gchar</span> *symbol</code></em>,
<em class="parameter"><code><span class="type">gchar</span> *abbreviation</code></em>,
<em class="parameter"><code><span class="type">gchar</span> *singular</code></em>,
<em class="parameter"><code><span class="type">gchar</span> *plural</code></em>);</pre>
gimp_unit_new (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *identifier</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> factor</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> digits</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *symbol</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *abbreviation</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *singular</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *plural</code></em>);</pre>
<p>Returns the integer ID of the new <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>.</p>
<p>Note that a new unit is always created with it's deletion flag
set to <code class="literal">TRUE</code>. You will have to set it to <code class="literal">FALSE</code> with
set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. You will have to set it to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> with
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-set-deletion-flag" title="gimp_unit_set_deletion_flag ()"><code class="function">gimp_unit_set_deletion_flag()</code></a> to make the unit definition persistent.</p>
<div class="refsect3">
<a name="id-1.2.16.6.4.6"></a><h4>Parameters</h4>
@ -305,13 +303,12 @@ set to <code class="literal">TRUE</code>. You will have to set it to <code class
<div class="refsect3">
<a name="id-1.2.16.6.4.7"></a><h4>Returns</h4>
<p> The ID of the new unit.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-deletion-flag"></a><h3>gimp_unit_get_deletion_flag ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gimp_unit_get_deletion_flag (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<div class="refsect3">
<a name="id-1.2.16.6.5.4"></a><h4>Parameters</h4>
@ -333,7 +330,6 @@ of.</p></td>
<a name="id-1.2.16.6.5.5"></a><h4>Returns</h4>
<p> The unit's <em class="parameter"><code>deletion_flag</code></em>
.</p>
<p></p>
</div>
</div>
<hr>
@ -341,11 +337,11 @@ of.</p></td>
<a name="gimp-unit-set-deletion-flag"></a><h3>gimp_unit_set_deletion_flag ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_unit_set_deletion_flag (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> deletion_flag</code></em>);</pre>
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> deletion_flag</code></em>);</pre>
<p>Sets a <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s <em class="parameter"><code>deletion_flag</code></em>
. If the <em class="parameter"><code>deletion_flag</code></em>
of a unit is
<code class="literal">TRUE</code> when GIMP exits, this unit will not be saved in the users's
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when GIMP exits, this unit will not be saved in the users's
"unitrc" file.</p>
<p>Trying to change the <em class="parameter"><code>deletion_flag</code></em>
of a built-in unit will be silently
@ -377,7 +373,7 @@ for.</p></td>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-factor"></a><h3>gimp_unit_get_factor ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_unit_get_factor (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>A <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s <em class="parameter"><code>factor</code></em>
is defined to be:</p>
@ -403,13 +399,12 @@ gimp_unit_get_factor (<em class="parameter"><code><a class="link" href="libgimpb
<div class="refsect3">
<a name="id-1.2.16.6.7.8"></a><h4>Returns</h4>
<p> The unit's factor.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-digits"></a><h3>gimp_unit_get_digits ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gimp_unit_get_digits (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>Returns the number of digits an entry field should provide to get
approximately the same accuracy as an inch input field with two digits.</p>
@ -433,13 +428,12 @@ approximately the same accuracy as an inch input field with two digits.</p>
<div class="refsect3">
<a name="id-1.2.16.6.8.7"></a><h4>Returns</h4>
<p> The suggested number of digits.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-identifier"></a><h3>gimp_unit_get_identifier ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_identifier (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>This is an unstranslated string and must not be changed or freed.</p>
<div class="refsect3">
@ -460,13 +454,12 @@ gimp_unit_get_identifier (<em class="parameter"><code><a class="link" href="libg
<div class="refsect3">
<a name="id-1.2.16.6.9.6"></a><h4>Returns</h4>
<p> The unit's identifier.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-symbol"></a><h3>gimp_unit_get_symbol ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_symbol (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>This is e.g. "''" for UNIT_INCH.</p>
<p>NOTE: This string must not be changed or freed.</p>
@ -488,13 +481,12 @@ gimp_unit_get_symbol (<em class="parameter"><code><a class="link" href="libgimpb
<div class="refsect3">
<a name="id-1.2.16.6.10.7"></a><h4>Returns</h4>
<p> The unit's symbol.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-abbreviation"></a><h3>gimp_unit_get_abbreviation ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_abbreviation (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated abbreviation
of the unit.</p>
@ -517,13 +509,12 @@ of the unit.</p>
<div class="refsect3">
<a name="id-1.2.16.6.11.7"></a><h4>Returns</h4>
<p> The unit's abbreviation.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-singular"></a><h3>gimp_unit_get_singular ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_singular (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated singular form
of the unit's name.</p>
@ -546,13 +537,12 @@ of the unit's name.</p>
<div class="refsect3">
<a name="id-1.2.16.6.12.7"></a><h4>Returns</h4>
<p> The unit's singular form.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-plural"></a><h3>gimp_unit_get_plural ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_get_plural (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated plural form
of the unit's name.</p>
@ -575,14 +565,13 @@ of the unit's name.</p>
<div class="refsect3">
<a name="id-1.2.16.6.13.7"></a><h4>Returns</h4>
<p> The unit's plural form.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-format-string"></a><h3>gimp_unit_format_string ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_unit_format_string (<em class="parameter"><code>const <span class="type">gchar</span> *format</code></em>,
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_unit_format_string (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>The <em class="parameter"><code>format</code></em>
string supports the following percent expansions:</p>
@ -646,17 +635,16 @@ string.</p></td>
<p> A newly allocated string with above percent expressions
replaced with the resp. strings for <em class="parameter"><code>unit</code></em>
.</p>
<p></p>
</div>
<p class="since">Since GIMP 2.8</p>
<p class="since">Since: GIMP 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-pixels-to-units"></a><h3>gimp_pixels_to_units ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span>
gimp_pixels_to_units (<em class="parameter"><code><span class="type">gdouble</span> pixels</code></em>,
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_pixels_to_units (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> pixels</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);</pre>
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in pixels to <em class="parameter"><code>unit</code></em>
.</p>
@ -691,17 +679,16 @@ gimp_pixels_to_units (<em class="parameter"><code><span class="type">gdouble</sp
<a name="id-1.2.16.6.15.6"></a><h4>Returns</h4>
<p> <em class="parameter"><code>pixels</code></em>
converted to units.</p>
<p></p>
</div>
<p class="since">Since GIMP 2.8</p>
<p class="since">Since: GIMP 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-units-to-pixels"></a><h3>gimp_units_to_pixels ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span>
gimp_units_to_pixels (<em class="parameter"><code><span class="type">gdouble</span> value</code></em>,
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_units_to_pixels (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);</pre>
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in <em class="parameter"><code>unit</code></em>
to pixels.</p>
@ -737,17 +724,16 @@ gimp_units_to_pixels (<em class="parameter"><code><span class="type">gdouble</sp
<a name="id-1.2.16.6.16.6"></a><h4>Returns</h4>
<p> <em class="parameter"><code>value</code></em>
converted to pixels.</p>
<p></p>
</div>
<p class="since">Since GIMP 2.8</p>
<p class="since">Since: GIMP 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-units-to-points"></a><h3>gimp_units_to_points ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span>
gimp_units_to_points (<em class="parameter"><code><span class="type">gdouble</span> value</code></em>,
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>
gimp_units_to_points (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);</pre>
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in <em class="parameter"><code>unit</code></em>
to points.</p>
@ -783,46 +769,41 @@ gimp_units_to_points (<em class="parameter"><code><span class="type">gdouble</sp
<a name="id-1.2.16.6.17.6"></a><h4>Returns</h4>
<p> <em class="parameter"><code>value</code></em>
converted to points.</p>
<p></p>
</div>
<p class="since">Since GIMP 2.8</p>
<p class="since">Since: GIMP 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="GIMP-TYPE-UNIT:CAPS"></a><h3>GIMP_TYPE_UNIT</h3>
<pre class="programlisting">#define GIMP_TYPE_UNIT (gimp_unit_get_type ())
</pre>
<p><a class="link" href="libgimpbase-gimpunit.html#GIMP-TYPE-UNIT:CAPS" title="GIMP_TYPE_UNIT"><span class="type">GIMP_TYPE_UNIT</span></a> is a <span class="type">GType</span> derived from <span class="type">G_TYPE_INT</span>.</p>
<p><a class="link" href="libgimpbase-gimpunit.html#GIMP-TYPE-UNIT:CAPS" title="GIMP_TYPE_UNIT"><span class="type">GIMP_TYPE_UNIT</span></a> is a <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> derived from <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#G-TYPE-INT:CAPS"><span class="type">G_TYPE_INT</span></a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="GIMP-TYPE-PARAM-UNIT:CAPS"></a><h3>GIMP_TYPE_PARAM_UNIT</h3>
<pre class="programlisting">#define GIMP_TYPE_PARAM_UNIT (gimp_param_unit_get_type ())
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GIMP-IS-PARAM-SPEC-UNIT:CAPS"></a><h3>GIMP_IS_PARAM_SPEC_UNIT()</h3>
<pre class="programlisting">#define GIMP_IS_PARAM_SPEC_UNIT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_UNIT))
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-param-spec-unit"></a><h3>gimp_param_spec_unit ()</h3>
<pre class="programlisting"><span class="returnvalue">GParamSpec</span> *
gimp_param_spec_unit (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *nick</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *blurb</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> allow_pixels</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> allow_percent</code></em>,
<pre class="programlisting"><a href="https://developer.gnome.org/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="returnvalue">GParamSpec</span></a> *
gimp_param_spec_unit (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *nick</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *blurb</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> allow_pixels</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> allow_percent</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> default_value</code></em>,
<em class="parameter"><code><span class="type">GParamFlags</span> flags</code></em>);</pre>
<em class="parameter"><code><a href="https://developer.gnome.org/gobject/unstable/gobject-GParamSpec.html#GParamFlags"><span class="type">GParamFlags</span></a> flags</code></em>);</pre>
<p>Creates a param spec to hold a units param.
See <code class="function">g_param_spec_internal()</code> for more information.</p>
See <a href="https://developer.gnome.org/gobject/unstable/gobject-GParamSpec.html#g-param-spec-internal"><code class="function">g_param_spec_internal()</code></a> for more information.</p>
<div class="refsect3">
<a name="id-1.2.16.6.21.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
@ -864,7 +845,7 @@ See <code class="function">g_param_spec_internal()</code> for more information.<
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>a combination of <span class="type">GParamFlags</span></p></td>
<td class="parameter_description"><p>a combination of <a href="https://developer.gnome.org/gobject/unstable/gobject-GParamSpec.html#GParamFlags"><span class="type">GParamFlags</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
@ -872,28 +853,23 @@ See <code class="function">g_param_spec_internal()</code> for more information.<
</div>
<div class="refsect3">
<a name="id-1.2.16.6.21.6"></a><h4>Returns</h4>
<p> a newly allocated <span class="type">GParamSpec</span> instance</p>
<p></p>
<p> a newly allocated <a href="https://developer.gnome.org/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> instance</p>
</div>
<p class="since">Since GIMP 2.4</p>
<p class="since">Since: GIMP 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GIMP-VALUE-HOLDS-UNIT:CAPS"></a><h3>GIMP_VALUE_HOLDS_UNIT()</h3>
<pre class="programlisting">#define GIMP_VALUE_HOLDS_UNIT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_UNIT))
</pre>
<p>
</p>
</div>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GimpUnit"></a><h3>enum GimpUnit</h3>
<p>
</p>
<div class="refsect3">
<a name="id-1.2.16.7.2.4"></a><h4>Members</h4>
<a name="id-1.2.16.7.2.3"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
@ -903,38 +879,38 @@ See <code class="function">g_param_spec_internal()</code> for more information.<
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-PIXEL:CAPS"></a>GIMP_UNIT_PIXEL</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-INCH:CAPS"></a>GIMP_UNIT_INCH</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-MM:CAPS"></a>GIMP_UNIT_MM</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-POINT:CAPS"></a>GIMP_UNIT_POINT</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-PICA:CAPS"></a>GIMP_UNIT_PICA</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-END:CAPS"></a>GIMP_UNIT_END</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-PERCENT:CAPS"></a>GIMP_UNIT_PERCENT</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
@ -943,11 +919,10 @@ See <code class="function">g_param_spec_internal()</code> for more information.<
</div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.see-also"></a><h2>See Also</h2>
<p><a href="/local/head/share/gtk-doc/html/libgimpwidgets/GimpUnitMenu.html"><span class="type">GimpUnitMenu</span></a>, <a href="/local/head/share/gtk-doc/html/libgimpwidgets/GimpSizeEntry.html"><span class="type">GimpSizeEntry</span></a>.</p>
<p><span class="type">GimpUnitMenu</span>, <span class="type">GimpSizeEntry</span>.</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.21</div>
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>