]> git.sur5r.net Git - glabels/blobdiff - docs/libglabels/html/libglabels-3.0-units.html
Imported Upstream version 3.0.0
[glabels] / docs / libglabels / html / libglabels-3.0-units.html
diff --git a/docs/libglabels/html/libglabels-3.0-units.html b/docs/libglabels/html/libglabels-3.0-units.html
new file mode 100644 (file)
index 0000000..79a2835
--- /dev/null
@@ -0,0 +1,265 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Units</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="LibGlabels 3.0 Reference Manual">
+<link rel="up" href="ch03.html" title="Miscellaneous">
+<link rel="prev" href="ch03.html" title="Miscellaneous">
+<link rel="next" href="libglabels-3.0-str.html" title="String Utility Functions">
+<meta name="generator" content="GTK-Doc V1.17 (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="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">LibGlabels 3.0 Reference Manual</th>
+<td><a accesskey="n" href="libglabels-3.0-str.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#libglabels-3.0-units.synopsis" class="shortcut">Top</a>
+                   | 
+                  <a href="#libglabels-3.0-units.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry">
+<a name="libglabels-3.0-units"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libglabels-3.0-units.top_of_page"></a>Units</span></h2>
+<p>Units — Type to represent units of distance supported by libglabels</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="libglabels-3.0-units.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+#include &lt;libglabels/lgl-units.h&gt;
+
+enum                <a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits">lglUnits</a>;
+const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="libglabels-3.0-units.html#lgl-units-get-id" title="lgl_units_get_id ()">lgl_units_get_id</a>                    (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);
+<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="returnvalue">lglUnits</span></a>            <a class="link" href="libglabels-3.0-units.html#lgl-units-from-id" title="lgl_units_from_id ()">lgl_units_from_id</a>                   (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id</code></em>);
+const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="libglabels-3.0-units.html#lgl-units-get-name" title="lgl_units_get_name ()">lgl_units_get_name</a>                  (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);
+<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="returnvalue">lglUnits</span></a>            <a class="link" href="libglabels-3.0-units.html#lgl-units-from-name" title="lgl_units_from_name ()">lgl_units_from_name</a>                 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="libglabels-3.0-units.html#lgl-units-get-points-per-unit" title="lgl_units_get_points_per_unit ()">lgl_units_get_points_per_unit</a>       (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);
+<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="libglabels-3.0-units.html#lgl-units-get-units-per-point" title="lgl_units_get_units_per_point ()">lgl_units_get_units_per_point</a>       (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);
+</pre>
+</div>
+<div class="refsect1">
+<a name="libglabels-3.0-units.description"></a><h2>Description</h2>
+<p>
+This section defines a type to represent the various units of distance
+supported by libglabels.  It also defines a set of related functions.
+</p>
+</div>
+<div class="refsect1">
+<a name="libglabels-3.0-units.details"></a><h2>Details</h2>
+<div class="refsect2">
+<a name="lglUnits"></a><h3>enum lglUnits</h3>
+<pre class="programlisting">typedef enum {
+        LGL_UNITS_POINT, /* encoded as "pt" */
+        LGL_UNITS_INCH,  /* encoded as "in" */
+        LGL_UNITS_MM,    /* encoded as "mm" */
+        LGL_UNITS_CM,    /* encoded as "cm" */
+        LGL_UNITS_PICA,  /* encoded as "pc" */
+
+        LGL_UNITS_FIRST = LGL_UNITS_POINT,
+        LGL_UNITS_LAST  = LGL_UNITS_PICA,
+
+        LGL_UNITS_INVALID = -1
+} lglUnits;
+</pre>
+<p>
+This enumeration defines supported units of distance.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><a name="LGL-UNITS-POINT:CAPS"></a><span class="term"><code class="literal">LGL_UNITS_POINT</code></span></p></td>
+<td>Points.
+</td>
+</tr>
+<tr>
+<td><p><a name="LGL-UNITS-INCH:CAPS"></a><span class="term"><code class="literal">LGL_UNITS_INCH</code></span></p></td>
+<td>Inches.
+</td>
+</tr>
+<tr>
+<td><p><a name="LGL-UNITS-MM:CAPS"></a><span class="term"><code class="literal">LGL_UNITS_MM</code></span></p></td>
+<td>Millimeters
+</td>
+</tr>
+<tr>
+<td><p><a name="LGL-UNITS-CM:CAPS"></a><span class="term"><code class="literal">LGL_UNITS_CM</code></span></p></td>
+<td>Centimeters
+</td>
+</tr>
+<tr>
+<td><p><a name="LGL-UNITS-PICA:CAPS"></a><span class="term"><code class="literal">LGL_UNITS_PICA</code></span></p></td>
+<td>Picas
+</td>
+</tr>
+<tr>
+<td><p><a name="LGL-UNITS-FIRST:CAPS"></a><span class="term"><code class="literal">LGL_UNITS_FIRST</code></span></p></td>
+<td>First supported unit.  (Used for bounds checking and iteration through supported units.)
+</td>
+</tr>
+<tr>
+<td><p><a name="LGL-UNITS-LAST:CAPS"></a><span class="term"><code class="literal">LGL_UNITS_LAST</code></span></p></td>
+<td>Last supported unit.  (Used for bounds checking and iteration through supported units.)
+</td>
+</tr>
+<tr>
+<td><p><a name="LGL-UNITS-INVALID:CAPS"></a><span class="term"><code class="literal">LGL_UNITS_INVALID</code></span></p></td>
+<td>Invalid unit.  (Returned by libglabels units functions when a supported unit cannot be determined.)
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="lgl-units-get-id"></a><h3>lgl_units_get_id ()</h3>
+<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       lgl_units_get_id                    (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);</pre>
+<p>
+Return a unique ID string for the given units.  This ID is how units
+are encoded in libglabels XML files and will remain constant across
+all locales.  IDs are identical to the absolute length units supported
+in the CSS2 Specification (Section 4.3.2).
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>units</code></em> :</span></p></td>
+<td>Units (<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a>)</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>ID string.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="lgl-units-from-id"></a><h3>lgl_units_from_id ()</h3>
+<pre class="programlisting"><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="returnvalue">lglUnits</span></a>            lgl_units_from_id                   (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id</code></em>);</pre>
+<p>
+Return the unique <a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> for the given ID string.
+This ID is how units are encoded in libglabels XML files and will remain
+constant across all locales.  IDs are identical to the absolute length
+units supported in the CSS2 Specification (Section 4.3.2).
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
+<td>ID string</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>units (<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a>).</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="lgl-units-get-name"></a><h3>lgl_units_get_name ()</h3>
+<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       lgl_units_get_name                  (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);</pre>
+<p>
+Return a unique name string for the given units.  This name is human
+readable and will be translated to the current locale.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>units</code></em> :</span></p></td>
+<td>Units (<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a>)</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>name string.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="lgl-units-from-name"></a><h3>lgl_units_from_name ()</h3>
+<pre class="programlisting"><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="returnvalue">lglUnits</span></a>            lgl_units_from_name                 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
+<p>
+Return the unique <a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> for the given name string.  This name is
+human readable and is expected to be translated to the current locale.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
+<td>NAME string</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>units (<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a>).</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="lgl-units-get-points-per-unit"></a><h3>lgl_units_get_points_per_unit ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             lgl_units_get_points_per_unit       (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);</pre>
+<p>
+Return a scale factor for the given units in points/unit.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>units</code></em> :</span></p></td>
+<td>Units (<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a>)</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>scale factor.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2">
+<a name="lgl-units-get-units-per-point"></a><h3>lgl_units_get_units_per_point ()</h3>
+<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             lgl_units_get_units_per_point       (<em class="parameter"><code><a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a> units</code></em>);</pre>
+<p>
+Return a scale factor for the given units in units/point.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>units</code></em> :</span></p></td>
+<td>Units (<a class="link" href="libglabels-3.0-units.html#lglUnits" title="enum lglUnits"><span class="type">lglUnits</span></a>)</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td>scale factor.</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+          Generated by GTK-Doc V1.17</div>
+</body>
+</html>
\ No newline at end of file