<?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 version SYSTEM "version.xml">
]>
<refentry id="gdk4-GdkToplevelSize">
<refmeta>
<refentrytitle role="top_of_page" id="gdk4-GdkToplevelSize.top_of_page">GdkToplevelSize</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GdkToplevelSize</refname>
<refpurpose>Information for computing toplevel size</refpurpose>
</refnamediv>

<refsect1 id="gdk4-GdkToplevelSize.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="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-toplevel-size-get-bounds">gdk_toplevel_size_get_bounds</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-toplevel-size-set-size">gdk_toplevel_size_set_size</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-toplevel-size-set-min-size">gdk_toplevel_size_set_min_size</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="gdk4-GdkToplevelSize.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="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkToplevelSize">GdkToplevelSize</link></entry></row>

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

<refsect1 id="gdk4-GdkToplevelSize.includes"><title>Includes</title><synopsis>#include &lt;gdk/gdk.h&gt;
</synopsis></refsect1>

<refsect1 id="gdk4-GdkToplevelSize.description" role="desc">
<title role="desc.title">Description</title>
<para>The GdkToplevelSIze struct contains information that may be useful
for users of GdkToplevel to compute a surface size. It also carries
information back with the computational result.</para>

</refsect1>
<refsect1 id="gdk4-GdkToplevelSize.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gdk-toplevel-size-get-bounds" role="function">
<title>gdk_toplevel_size_get_bounds&#160;()</title>
<indexterm zone="gdk-toplevel-size-get-bounds"><primary>gdk_toplevel_size_get_bounds</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_toplevel_size_get_bounds (<parameter><link linkend="GdkToplevelSize"><type>GdkToplevelSize</type></link> *size</parameter>,
                              <parameter><link linkend="int"><type>int</type></link> *bounds_width</parameter>,
                              <parameter><link linkend="int"><type>int</type></link> *bounds_height</parameter>);</programlisting>
<para>Retrieves the bounds the toplevel is placed within.</para>
<para>The bounds represent the largest size a toplevel may have while still being
able to fit within some type of boundary. Depending on the backend, this may
be equivalent to the dimensions of the work area or the monitor on which the
window is being presented on, or something else that limits the way a
toplevel can be presented.</para>
<refsect3 id="gdk-toplevel-size-get-bounds.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>size</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkToplevelSize"><type>GdkToplevelSize</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>bounds_width</para></entry>
<entry role="parameter_description"><para>return location for width. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>bounds_height</para></entry>
<entry role="parameter_description"><para>return location for height. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-toplevel-size-set-size" role="function">
<title>gdk_toplevel_size_set_size&#160;()</title>
<indexterm zone="gdk-toplevel-size-set-size"><primary>gdk_toplevel_size_set_size</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_toplevel_size_set_size (<parameter><link linkend="GdkToplevelSize"><type>GdkToplevelSize</type></link> *size</parameter>,
                            <parameter><link linkend="int"><type>int</type></link> width</parameter>,
                            <parameter><link linkend="int"><type>int</type></link> height</parameter>);</programlisting>
<para>Sets the size the toplevel prefers to be resized to. The size should be
within the bounds (see <link linkend="gdk-toplevel-size-get-bounds"><function>gdk_toplevel_size_get_bounds()</function></link>). The set size should
be considered as a hint, and should not be assumed to be respected by the
windowing system, or backend.</para>
<refsect3 id="gdk-toplevel-size-set-size.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>size</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkToplevelSize"><type>GdkToplevelSize</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>width</para></entry>
<entry role="parameter_description"><para>the width</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>height</para></entry>
<entry role="parameter_description"><para>the height</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-toplevel-size-set-min-size" role="function">
<title>gdk_toplevel_size_set_min_size&#160;()</title>
<indexterm zone="gdk-toplevel-size-set-min-size"><primary>gdk_toplevel_size_set_min_size</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_toplevel_size_set_min_size (<parameter><link linkend="GdkToplevelSize"><type>GdkToplevelSize</type></link> *size</parameter>,
                                <parameter><link linkend="int"><type>int</type></link> min_width</parameter>,
                                <parameter><link linkend="int"><type>int</type></link> min_height</parameter>);</programlisting>
<para>The minimum size corresponds to the limitations the toplevel can be shrunk
to, without resulting in incorrect painting. A user of a <link linkend="GdkToplevel"><type>GdkToplevel</type></link> should
calculate these given both the existing size, and the bounds retrieved from
the <link linkend="GdkToplevelSize"><type>GdkToplevelSize</type></link> object.</para>
<para>The minimum size should be within the bounds (see
<link linkend="gdk-toplevel-size-get-bounds"><function>gdk_toplevel_size_get_bounds()</function></link>).</para>
<refsect3 id="gdk-toplevel-size-set-min-size.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>size</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkToplevelSize"><type>GdkToplevelSize</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>min_width</para></entry>
<entry role="parameter_description"><para>the minimum width</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>min_height</para></entry>
<entry role="parameter_description"><para>the minimum height</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="gdk4-GdkToplevelSize.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkToplevelSize" role="struct">
<title>GdkToplevelSize</title>
<indexterm zone="GdkToplevelSize"><primary>GdkToplevelSize</primary></indexterm>
<programlisting language="C">typedef struct {
  int bounds_width;
  int bounds_height;

  int width;
  int height;
  int min_width;
  int min_height;
} GdkToplevelSize;
</programlisting>
<para>Struct containing information for computing the size of a <link linkend="GdkToplevel"><type>GdkToplevel</type></link>.</para>
</refsect2>

</refsect1>

</refentry>
