2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5 <refentry id="libglabels-paper">
7 <refentrytitle role="top_of_page" id="libglabels-paper.top_of_page">The lglPaper Structure</refentrytitle>
8 <manvolnum>3</manvolnum>
9 <refmiscinfo>LIBGLABELS Library</refmiscinfo>
13 <refname>The lglPaper Structure</refname>
14 <refpurpose>Paper size definitions</refpurpose>
17 <refsynopsisdiv id="libglabels-paper.synopsis" role="synopsis">
18 <title role="synopsis.title">Synopsis</title>
22 #include <libglabels/paper.h>
24 <link linkend="lglPaper">lglPaper</link>;
25 <link linkend="lglPaper">lglPaper</link> * <link linkend="lgl-paper-new">lgl_paper_new</link> (<link linkend="gchar">gchar</link> *id,
26 <link linkend="gchar">gchar</link> *name,
27 <link linkend="gdouble">gdouble</link> width,
28 <link linkend="gdouble">gdouble</link> height,
29 <link linkend="gchar">gchar</link> *pwg_size);
30 <link linkend="lglPaper">lglPaper</link> * <link linkend="lgl-paper-dup">lgl_paper_dup</link> (const <link linkend="lglPaper">lglPaper</link> *orig);
31 <link linkend="void">void</link> <link linkend="lgl-paper-free">lgl_paper_free</link> (<link linkend="lglPaper">lglPaper</link> *paper);
43 <refsect1 id="libglabels-paper.description" role="desc">
44 <title role="desc.title">Description</title>
46 This section describes a structure for representing a paper size definition
47 and related functions.
51 <refsect1 id="libglabels-paper.details" role="details">
52 <title role="details.title">Details</title>
53 <refsect2 id="lglPaper" role="struct">
54 <title>lglPaper</title>
55 <indexterm zone="lglPaper"><primary sortas="lglPaper">lglPaper</primary></indexterm><programlisting>typedef struct {
56 gchar *id; /* Unique ID of paper definition */
57 gchar *name; /* Localized name of paper */
58 gdouble width; /* Width (in points) */
59 gdouble height; /* Height (in points) */
60 gchar *pwg_size; /* PWG 5101.1-2002 size name */
64 This structure defines a paper (page) size.
65 </para><variablelist role="struct">
67 <term><link linkend="gchar">gchar</link> *<structfield>id</structfield>;</term>
68 <listitem><simpara>Paper size ID.
72 <term><link linkend="gchar">gchar</link> *<structfield>name</structfield>;</term>
73 <listitem><simpara>Localized paper size name.
77 <term><link linkend="gdouble">gdouble</link> <structfield>width</structfield>;</term>
78 <listitem><simpara>Width of paper in points.
82 <term><link linkend="gdouble">gdouble</link> <structfield>height</structfield>;</term>
83 <listitem><simpara>Height of paper in points.
87 <term><link linkend="gchar">gchar</link> *<structfield>pwg_size</structfield>;</term>
88 <listitem><simpara>PWG 5101.1-2002 size name.
91 </variablelist></refsect2>
92 <refsect2 id="lgl-paper-new" role="function">
93 <title>lgl_paper_new ()</title>
94 <indexterm zone="lgl-paper-new"><primary sortas="lgl_paper_new">lgl_paper_new</primary></indexterm><programlisting><link linkend="lglPaper">lglPaper</link> * lgl_paper_new (<link linkend="gchar">gchar</link> *id,
95 <link linkend="gchar">gchar</link> *name,
96 <link linkend="gdouble">gdouble</link> width,
97 <link linkend="gdouble">gdouble</link> height,
98 <link linkend="gchar">gchar</link> *pwg_size);</programlisting>
100 Allocates and constructs a new <link linkend="lglPaper"><type>lglPaper</type></link> structure.</para>
102 </para><variablelist role="params">
103 <varlistentry><term><parameter>id</parameter> :</term>
104 <listitem><simpara> Id of paper definition. (E.g. US-Letter, A4, etc.) Should be
106 </simpara></listitem></varlistentry>
107 <varlistentry><term><parameter>name</parameter> :</term>
108 <listitem><simpara> Localized name of paper.
109 </simpara></listitem></varlistentry>
110 <varlistentry><term><parameter>width</parameter> :</term>
111 <listitem><simpara> Width of paper in points.
112 </simpara></listitem></varlistentry>
113 <varlistentry><term><parameter>height</parameter> :</term>
114 <listitem><simpara> Height of paper in points.
115 </simpara></listitem></varlistentry>
116 <varlistentry><term><parameter>pwg_size</parameter> :</term>
117 <listitem><simpara> PWG 5101.1-2002 size name.
118 </simpara></listitem></varlistentry>
119 <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a pointer to a newly allocated <link linkend="lglPaper"><type>lglPaper</type></link> structure.
121 </simpara></listitem></varlistentry>
122 </variablelist></refsect2>
123 <refsect2 id="lgl-paper-dup" role="function">
124 <title>lgl_paper_dup ()</title>
125 <indexterm zone="lgl-paper-dup"><primary sortas="lgl_paper_dup">lgl_paper_dup</primary></indexterm><programlisting><link linkend="lglPaper">lglPaper</link> * lgl_paper_dup (const <link linkend="lglPaper">lglPaper</link> *orig);</programlisting>
127 Duplicates an existing <link linkend="lglPaper"><type>lglPaper</type></link> structure.</para>
129 </para><variablelist role="params">
130 <varlistentry><term><parameter>orig</parameter> :</term>
131 <listitem><simpara> <link linkend="lglPaper"><type>lglPaper</type></link> structure to be duplicated.
132 </simpara></listitem></varlistentry>
133 <varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a pointer to a newly allocated <link linkend="lglPaper"><type>lglPaper</type></link> structure.
135 </simpara></listitem></varlistentry>
136 </variablelist></refsect2>
137 <refsect2 id="lgl-paper-free" role="function">
138 <title>lgl_paper_free ()</title>
139 <indexterm zone="lgl-paper-free"><primary sortas="lgl_paper_free">lgl_paper_free</primary></indexterm><programlisting><link linkend="void">void</link> lgl_paper_free (<link linkend="lglPaper">lglPaper</link> *paper);</programlisting>
141 Free all memory associated with an existing <link linkend="lglPaper"><type>lglPaper</type></link> structure.</para>
143 </para><variablelist role="params">
144 <varlistentry><term><parameter>paper</parameter> :</term>
145 <listitem><simpara> pointer to <link linkend="lglPaper"><type>lglPaper</type></link> structure to be freed.
146 </simpara></listitem></varlistentry>
147 </variablelist></refsect2>