<refentry id="gnomeui-gnome-geometry">
<refmeta>
<refentrytitle>gnome-geometry</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOMEUI Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>gnome-geometry</refname><refpurpose>Window geometry utility functions.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gnome.h&gt;


<link linkend="gboolean">gboolean</link>    <link linkend="gnome-parse-geometry">gnome_parse_geometry</link>            (const <link linkend="gchar">gchar</link> *geometry,
                                             <link linkend="gint">gint</link> *xpos,
                                             <link linkend="gint">gint</link> *ypos,
                                             <link linkend="gint">gint</link> *width,
                                             <link linkend="gint">gint</link> *height);
<link linkend="gchar">gchar</link>*      <link linkend="gnome-geometry-string">gnome_geometry_string</link>           (<link linkend="GdkWindow">GdkWindow</link> *window);
</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
<para>
This module provides functions to parse a string that specifies a
window geometry (window position on the screen and dimenssions) as
well as a routine to fetch the geometry of a <type>GtkWindow</type>
(for example, a <type>GnomeApp</type> top level window).
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gnome-parse-geometry">gnome_parse_geometry ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gnome_parse_geometry            (const <link linkend="gchar">gchar</link> *geometry,
                                             <link linkend="gint">gint</link> *xpos,
                                             <link linkend="gint">gint</link> *ypos,
                                             <link linkend="gint">gint</link> *width,
                                             <link linkend="gint">gint</link> *height);</programlisting>
<para>
Parses the geometry string passed in <parameter>geometry</parameter>, and fills
<parameter>xpos</parameter>, <parameter>ypos</parameter>, <parameter>width</parameter>, and <parameter>height</parameter> with
the corresponding values upon completion of the parse.
If the parse fails, it should be assumed that <parameter>xpos</parameter>, <parameter>ypos</parameter>, <parameter>width</parameter>,
and <parameter>height</parameter> contain undefined values.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>geometry</parameter>&nbsp;:</entry>
<entry> geometry string to be parsed
</entry></row>
<row><entry align="right"><parameter>xpos</parameter>&nbsp;:</entry>
<entry> X position geometry component
</entry></row>
<row><entry align="right"><parameter>ypos</parameter>&nbsp;:</entry>
<entry> Y position geometry component
</entry></row>
<row><entry align="right"><parameter>width</parameter>&nbsp;:</entry>
<entry> pixel width geometry component
</entry></row>
<row><entry align="right"><parameter>height</parameter>&nbsp;:</entry>
<entry> pixel height geometry component
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
<literal>TRUE</literal> if the geometry was successfully parsed, <literal>FALSE</literal> otherwise.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gnome-geometry-string">gnome_geometry_string ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gnome_geometry_string           (<link linkend="GdkWindow">GdkWindow</link> *window);</programlisting>
<para>
Determines the size and position of <parameter>window</parameter> (must be a window or
dialog), and returns that information as an X geometry string.
Geometry strings are in the form of WIDTHxHEIGHT+X+Y.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>window</parameter>&nbsp;:</entry>
<entry> Pointer to window or dialog object
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Newly-allocated string containing geometry string for given
window.  Contents must be g_free'd.
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
