<?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="GdkPopupLayout">
<refmeta>
<refentrytitle role="top_of_page" id="GdkPopupLayout.top_of_page">GdkPopupLayout</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GdkPopupLayout</refname>
<refpurpose>Information for presenting popups</refpurpose>
</refnamediv>

<refsect1 id="GdkPopupLayout.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="GdkPopupLayout"><returnvalue>GdkPopupLayout</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-popup-layout-new">gdk_popup_layout_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkPopupLayout"><returnvalue>GdkPopupLayout</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-popup-layout-ref">gdk_popup_layout_ref</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-popup-layout-unref">gdk_popup_layout_unref</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkPopupLayout"><returnvalue>GdkPopupLayout</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-popup-layout-copy">gdk_popup_layout_copy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-popup-layout-equal">gdk_popup_layout_equal</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-popup-layout-set-anchor-rect">gdk_popup_layout_set_anchor_rect</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GdkRectangle"><returnvalue>GdkRectangle</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-popup-layout-get-anchor-rect">gdk_popup_layout_get_anchor_rect</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-popup-layout-set-rect-anchor">gdk_popup_layout_set_rect_anchor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkGravity"><returnvalue>GdkGravity</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-popup-layout-get-rect-anchor">gdk_popup_layout_get_rect_anchor</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-popup-layout-set-surface-anchor">gdk_popup_layout_set_surface_anchor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkGravity"><returnvalue>GdkGravity</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-popup-layout-get-surface-anchor">gdk_popup_layout_get_surface_anchor</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-popup-layout-set-anchor-hints">gdk_popup_layout_set_anchor_hints</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkAnchorHints"><returnvalue>GdkAnchorHints</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-popup-layout-get-anchor-hints">gdk_popup_layout_get_anchor_hints</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-popup-layout-set-offset">gdk_popup_layout_set_offset</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-popup-layout-get-offset">gdk_popup_layout_get_offset</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkPopupLayout.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GBoxed">GBoxed</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GdkPopupLayout
</screen>
</refsect1>

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

<refsect1 id="GdkPopupLayout.description" role="desc">
<title role="desc.title">Description</title>
<para>Popups are positioned relative to their parent surface.
The GdkPopupLayout struct contains information that is
necessary to do so.</para>

</refsect1>
<refsect1 id="GdkPopupLayout.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gdk-popup-layout-new" role="function">
<title>gdk_popup_layout_new&#160;()</title>
<indexterm zone="gdk-popup-layout-new"><primary>gdk_popup_layout_new</primary></indexterm>
<programlisting language="C"><link linkend="GdkPopupLayout"><returnvalue>GdkPopupLayout</returnvalue></link>&#160;*
gdk_popup_layout_new (<parameter>const <link linkend="GdkRectangle"><type>GdkRectangle</type></link> *anchor_rect</parameter>,
                      <parameter><link linkend="GdkGravity"><type>GdkGravity</type></link> rect_anchor</parameter>,
                      <parameter><link linkend="GdkGravity"><type>GdkGravity</type></link> surface_anchor</parameter>);</programlisting>
<para>Create a popup layout description. Used together with <link linkend="gdk-popup-present"><function>gdk_popup_present()</function></link>
to describe how a popup surface should be placed and behave on-screen.</para>
<para><parameter>anchor_rect</parameter>
 is relative to the top-left corner of the surface's parent.
<parameter>rect_anchor</parameter>
 and <parameter>surface_anchor</parameter>
 determine anchor points on <parameter>anchor_rect</parameter>

and surface to pin together.</para>
<para>The position of <parameter>anchor_rect</parameter>
's anchor point can optionally be offset using
<link linkend="gdk-popup-layout-set-offset"><function>gdk_popup_layout_set_offset()</function></link>, which is equivalent to offsetting the
position of surface.</para>

<para><emphasis role="annotation">[<acronym>constructor</acronym>]</emphasis></para><refsect3 id="gdk-popup-layout-new.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>anchor_rect</para></entry>
<entry role="parameter_description"><para>the anchor <link linkend="GdkRectangle"><type>GdkRectangle</type></link> to align <parameter>surface</parameter>
with. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>not nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>rect_anchor</para></entry>
<entry role="parameter_description"><para>the point on <parameter>anchor_rect</parameter>
to align with <parameter>surface</parameter>
's anchor point</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>surface_anchor</para></entry>
<entry role="parameter_description"><para>the point on <parameter>surface</parameter>
to align with <parameter>rect</parameter>
's anchor point</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-popup-layout-new.returns" role="returns">
<title>Returns</title>
<para>newly created instance of <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-ref" role="function">
<title>gdk_popup_layout_ref&#160;()</title>
<indexterm zone="gdk-popup-layout-ref"><primary>gdk_popup_layout_ref</primary></indexterm>
<programlisting language="C"><link linkend="GdkPopupLayout"><returnvalue>GdkPopupLayout</returnvalue></link>&#160;*
gdk_popup_layout_ref (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>);</programlisting>
<para>Increases the reference count of <parameter>value</parameter>
.</para>
<refsect3 id="gdk-popup-layout-ref.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-popup-layout-ref.returns" role="returns">
<title>Returns</title>
<para> the same <parameter>layout</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-unref" role="function">
<title>gdk_popup_layout_unref&#160;()</title>
<indexterm zone="gdk-popup-layout-unref"><primary>gdk_popup_layout_unref</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_popup_layout_unref (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>);</programlisting>
<para>Decreases the reference count of <parameter>value</parameter>
.</para>
<refsect3 id="gdk-popup-layout-unref.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-copy" role="function">
<title>gdk_popup_layout_copy&#160;()</title>
<indexterm zone="gdk-popup-layout-copy"><primary>gdk_popup_layout_copy</primary></indexterm>
<programlisting language="C"><link linkend="GdkPopupLayout"><returnvalue>GdkPopupLayout</returnvalue></link>&#160;*
gdk_popup_layout_copy (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>);</programlisting>
<para>Create a new <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> and copy the contents of <parameter>layout</parameter>
 into it.</para>
<refsect3 id="gdk-popup-layout-copy.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-popup-layout-copy.returns" role="returns">
<title>Returns</title>
<para>a copy of <parameter>layout</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-equal" role="function">
<title>gdk_popup_layout_equal&#160;()</title>
<indexterm zone="gdk-popup-layout-equal"><primary>gdk_popup_layout_equal</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_popup_layout_equal (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>,
                        <parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *other</parameter>);</programlisting>
<para>Check whether <parameter>layout</parameter>
 and <parameter>other</parameter>
 has identical layout properties.</para>
<refsect3 id="gdk-popup-layout-equal.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>other</para></entry>
<entry role="parameter_description"><para>another <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-popup-layout-equal.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>layout</parameter>
and <parameter>other</parameter>
have identical layout properties,
otherwise <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.</para>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-set-anchor-rect" role="function">
<title>gdk_popup_layout_set_anchor_rect&#160;()</title>
<indexterm zone="gdk-popup-layout-set-anchor-rect"><primary>gdk_popup_layout_set_anchor_rect</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_popup_layout_set_anchor_rect (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>,
                                  <parameter>const <link linkend="GdkRectangle"><type>GdkRectangle</type></link> *anchor_rect</parameter>);</programlisting>
<para>Set the anchor rectangle.</para>
<refsect3 id="gdk-popup-layout-set-anchor-rect.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>anchor_rect</para></entry>
<entry role="parameter_description"><para>the new anchor rectangle</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-get-anchor-rect" role="function">
<title>gdk_popup_layout_get_anchor_rect&#160;()</title>
<indexterm zone="gdk-popup-layout-get-anchor-rect"><primary>gdk_popup_layout_get_anchor_rect</primary></indexterm>
<programlisting language="C">const <link linkend="GdkRectangle"><returnvalue>GdkRectangle</returnvalue></link>&#160;*
gdk_popup_layout_get_anchor_rect (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>);</programlisting>
<para>Get the anchor rectangle.</para>
<refsect3 id="gdk-popup-layout-get-anchor-rect.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-popup-layout-get-anchor-rect.returns" role="returns">
<title>Returns</title>
<para> The anchor rectangle.</para>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-set-rect-anchor" role="function">
<title>gdk_popup_layout_set_rect_anchor&#160;()</title>
<indexterm zone="gdk-popup-layout-set-rect-anchor"><primary>gdk_popup_layout_set_rect_anchor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_popup_layout_set_rect_anchor (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>,
                                  <parameter><link linkend="GdkGravity"><type>GdkGravity</type></link> anchor</parameter>);</programlisting>
<para>Set the anchor on the anchor rectangle.</para>
<refsect3 id="gdk-popup-layout-set-rect-anchor.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>anchor</para></entry>
<entry role="parameter_description"><para>the new rect anchor</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-get-rect-anchor" role="function">
<title>gdk_popup_layout_get_rect_anchor&#160;()</title>
<indexterm zone="gdk-popup-layout-get-rect-anchor"><primary>gdk_popup_layout_get_rect_anchor</primary></indexterm>
<programlisting language="C"><link linkend="GdkGravity"><returnvalue>GdkGravity</returnvalue></link>
gdk_popup_layout_get_rect_anchor (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>);</programlisting>
<para>Returns the anchor position on the anchor rectangle.</para>
<refsect3 id="gdk-popup-layout-get-rect-anchor.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-popup-layout-get-rect-anchor.returns" role="returns">
<title>Returns</title>
<para> the anchor on the anchor rectangle.</para>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-set-surface-anchor" role="function">
<title>gdk_popup_layout_set_surface_anchor&#160;()</title>
<indexterm zone="gdk-popup-layout-set-surface-anchor"><primary>gdk_popup_layout_set_surface_anchor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_popup_layout_set_surface_anchor (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>,
                                     <parameter><link linkend="GdkGravity"><type>GdkGravity</type></link> anchor</parameter>);</programlisting>
<para>Set the anchor on the popup surface.</para>
<refsect3 id="gdk-popup-layout-set-surface-anchor.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>anchor</para></entry>
<entry role="parameter_description"><para>the new popup surface anchor</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-get-surface-anchor" role="function">
<title>gdk_popup_layout_get_surface_anchor&#160;()</title>
<indexterm zone="gdk-popup-layout-get-surface-anchor"><primary>gdk_popup_layout_get_surface_anchor</primary></indexterm>
<programlisting language="C"><link linkend="GdkGravity"><returnvalue>GdkGravity</returnvalue></link>
gdk_popup_layout_get_surface_anchor (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>);</programlisting>
<para>Returns the anchor position on the popup surface.</para>
<refsect3 id="gdk-popup-layout-get-surface-anchor.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-popup-layout-get-surface-anchor.returns" role="returns">
<title>Returns</title>
<para> the anchor on the popup surface.</para>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-set-anchor-hints" role="function">
<title>gdk_popup_layout_set_anchor_hints&#160;()</title>
<indexterm zone="gdk-popup-layout-set-anchor-hints"><primary>gdk_popup_layout_set_anchor_hints</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_popup_layout_set_anchor_hints (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>,
                                   <parameter><link linkend="GdkAnchorHints"><type>GdkAnchorHints</type></link> anchor_hints</parameter>);</programlisting>
<para>Set new anchor hints.</para>
<para>The set <parameter>anchor_hints</parameter>
 determines how <parameter>surface</parameter>
 will be moved if the anchor
points cause it to move off-screen. For example, <link linkend="GDK-ANCHOR-FLIP-X:CAPS"><literal>GDK_ANCHOR_FLIP_X</literal></link> will
replace <link linkend="GDK-GRAVITY-NORTH-WEST:CAPS"><literal>GDK_GRAVITY_NORTH_WEST</literal></link> with <link linkend="GDK-GRAVITY-NORTH-EAST:CAPS"><literal>GDK_GRAVITY_NORTH_EAST</literal></link> and vice versa
if <parameter>surface</parameter>
 extends beyond the left or right edges of the monitor.</para>
<refsect3 id="gdk-popup-layout-set-anchor-hints.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>anchor_hints</para></entry>
<entry role="parameter_description"><para>the new <link linkend="GdkAnchorHints"><type>GdkAnchorHints</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-get-anchor-hints" role="function">
<title>gdk_popup_layout_get_anchor_hints&#160;()</title>
<indexterm zone="gdk-popup-layout-get-anchor-hints"><primary>gdk_popup_layout_get_anchor_hints</primary></indexterm>
<programlisting language="C"><link linkend="GdkAnchorHints"><returnvalue>GdkAnchorHints</returnvalue></link>
gdk_popup_layout_get_anchor_hints (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>);</programlisting>
<para>Get the <link linkend="GdkAnchorHints"><type>GdkAnchorHints</type></link>.</para>
<refsect3 id="gdk-popup-layout-get-anchor-hints.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-popup-layout-get-anchor-hints.returns" role="returns">
<title>Returns</title>
<para> the <link linkend="GdkAnchorHints"><type>GdkAnchorHints</type></link>.</para>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-set-offset" role="function">
<title>gdk_popup_layout_set_offset&#160;()</title>
<indexterm zone="gdk-popup-layout-set-offset"><primary>gdk_popup_layout_set_offset</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_popup_layout_set_offset (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>,
                             <parameter><link linkend="int"><type>int</type></link> dx</parameter>,
                             <parameter><link linkend="int"><type>int</type></link> dy</parameter>);</programlisting>
<para>Offset the position of the anchor rectangle with the given delta.</para>
<refsect3 id="gdk-popup-layout-set-offset.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dx</para></entry>
<entry role="parameter_description"><para>x delta to offset the anchor rectangle with</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dy</para></entry>
<entry role="parameter_description"><para>y delta to offset the anchor rectangle with</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-popup-layout-get-offset" role="function">
<title>gdk_popup_layout_get_offset&#160;()</title>
<indexterm zone="gdk-popup-layout-get-offset"><primary>gdk_popup_layout_get_offset</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_popup_layout_get_offset (<parameter><link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link> *layout</parameter>,
                             <parameter><link linkend="int"><type>int</type></link> *dx</parameter>,
                             <parameter><link linkend="int"><type>int</type></link> *dy</parameter>);</programlisting>
<para>Get the delta the anchor rectangle is offset with</para>
<refsect3 id="gdk-popup-layout-get-offset.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>layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPopupLayout"><type>GdkPopupLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dx</para></entry>
<entry role="parameter_description"><para>a pointer to where to store the delta x coordinate</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dy</para></entry>
<entry role="parameter_description"><para>a pointer to where to store the delta y coordinate</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GdkPopupLayout.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkPopupLayout-struct" role="struct">
<title>GdkPopupLayout</title>
<indexterm zone="GdkPopupLayout-struct"><primary>GdkPopupLayout</primary></indexterm>
<programlisting language="C">typedef struct _GdkPopupLayout GdkPopupLayout;</programlisting>
<para>Struct containing information for <link linkend="gdk-popup-present"><function>gdk_popup_present()</function></link></para>
</refsect2>
<refsect2 id="GdkAnchorHints" role="enum">
<title>enum GdkAnchorHints</title>
<indexterm zone="GdkAnchorHints"><primary>GdkAnchorHints</primary></indexterm>
<para>Positioning hints for aligning a surface relative to a rectangle.</para>
<para>These hints determine how the surface should be positioned in the case that
the surface would fall off-screen if placed in its ideal position.</para>
<para>For example, <link linkend="GDK-ANCHOR-FLIP-X:CAPS"><literal>GDK_ANCHOR_FLIP_X</literal></link> will replace <link linkend="GDK-GRAVITY-NORTH-WEST:CAPS"><literal>GDK_GRAVITY_NORTH_WEST</literal></link> with
<link linkend="GDK-GRAVITY-NORTH-EAST:CAPS"><literal>GDK_GRAVITY_NORTH_EAST</literal></link> and vice versa if the surface extends beyond the left
or right edges of the monitor.</para>
<para>If <link linkend="GDK-ANCHOR-SLIDE-X:CAPS"><literal>GDK_ANCHOR_SLIDE_X</literal></link> is set, the surface can be shifted horizontally to fit
on-screen. If <link linkend="GDK-ANCHOR-RESIZE-X:CAPS"><literal>GDK_ANCHOR_RESIZE_X</literal></link> is set, the surface can be shrunken
horizontally to fit.</para>
<para>In general, when multiple flags are set, flipping should take precedence over
sliding, which should take precedence over resizing.</para>
<refsect3 id="GdkAnchorHints.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-FLIP-X:CAPS">GDK_ANCHOR_FLIP_X</para></entry>
<entry role="enum_member_description"><para>allow flipping anchors horizontally</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-FLIP-Y:CAPS">GDK_ANCHOR_FLIP_Y</para></entry>
<entry role="enum_member_description"><para>allow flipping anchors vertically</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-SLIDE-X:CAPS">GDK_ANCHOR_SLIDE_X</para></entry>
<entry role="enum_member_description"><para>allow sliding surface horizontally</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-SLIDE-Y:CAPS">GDK_ANCHOR_SLIDE_Y</para></entry>
<entry role="enum_member_description"><para>allow sliding surface vertically</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-RESIZE-X:CAPS">GDK_ANCHOR_RESIZE_X</para></entry>
<entry role="enum_member_description"><para>allow resizing surface horizontally</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-RESIZE-Y:CAPS">GDK_ANCHOR_RESIZE_Y</para></entry>
<entry role="enum_member_description"><para>allow resizing surface vertically</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-FLIP:CAPS">GDK_ANCHOR_FLIP</para></entry>
<entry role="enum_member_description"><para>allow flipping anchors on both axes</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-SLIDE:CAPS">GDK_ANCHOR_SLIDE</para></entry>
<entry role="enum_member_description"><para>allow sliding surface on both axes</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ANCHOR-RESIZE:CAPS">GDK_ANCHOR_RESIZE</para></entry>
<entry role="enum_member_description"><para>allow resizing surface on both axes</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>

</refentry>
