<?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">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkPopover">
<refmeta>
<refentrytitle role="top_of_page" id="GtkPopover.top_of_page">GtkPopover</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkPopover</refname>
<refpurpose>Context dependent bubbles</refpurpose>
</refnamediv>

<refsect1 id="GtkPopover.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="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-popover-new">gtk_popover_new</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="gtk-popover-popup">gtk_popover_popup</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="gtk-popover-popdown">gtk_popover_popdown</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="gtk-popover-set-child">gtk_popover_set_child</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-popover-get-child">gtk_popover_get_child</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="gtk-popover-set-pointing-to">gtk_popover_set_pointing_to</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="gtk-popover-get-pointing-to">gtk_popover_get_pointing_to</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="gtk-popover-set-position">gtk_popover_set_position</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkPositionType"><returnvalue>GtkPositionType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-popover-get-position">gtk_popover_get_position</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="gtk-popover-set-autohide">gtk_popover_set_autohide</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="gtk-popover-get-autohide">gtk_popover_get_autohide</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="gtk-popover-set-has-arrow">gtk_popover_set_has_arrow</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="gtk-popover-get-has-arrow">gtk_popover_get_has_arrow</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="gtk-popover-set-default-widget">gtk_popover_set_default_widget</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkPopover.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkPopover--autohide">autohide</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkPopover--child">child</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkPopover--default-widget">default-widget</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkPopover--has-arrow">has-arrow</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkPopover--mnemonics-visible">mnemonics-visible</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkRectangle"><type>GdkRectangle</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkPopover--pointing-to">pointing-to</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkPositionType"><type>GtkPositionType</type></link></entry><entry role="property_name"><link linkend="GtkPopover--position">position</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkPopover.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkPopover-activate-default">activate-default</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkPopover-closed">closed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkPopover.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkPopover
                <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkEmojiChooser">GtkEmojiChooser</link>
                <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkPopoverMenu">GtkPopoverMenu</link>
</screen>
</refsect1>
<refsect1 id="GtkPopover.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkPopover implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>,  <link linkend="GtkShortcutManager">GtkShortcutManager</link> and  <link linkend="GtkNative">GtkNative</link>.</para>

</refsect1>

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

<refsect1 id="GtkPopover.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkPopover is a bubble-like context window, primarily meant to
provide context-dependent information or options. Popovers are
attached to a widget, set with <link linkend="gtk-widget-set-parent"><function>gtk_widget_set_parent()</function></link>. By
default they will point to the whole widget area, although this
behavior can be changed through <link linkend="gtk-popover-set-pointing-to"><function>gtk_popover_set_pointing_to()</function></link>.</para>
<para>The position of a popover relative to the widget it is attached to
can also be changed through <link linkend="gtk-popover-set-position"><function>gtk_popover_set_position()</function></link>.</para>
<para>By default, <link linkend="GtkPopover"><type>GtkPopover</type></link> performs a grab, in order to ensure input events
get redirected to it while it is shown, and also so the popover is dismissed
in the expected situations (clicks outside the popover, or the Escape key
being pressed). If no such modal behavior is desired on a popover,
<link linkend="gtk-popover-set-autohide"><function>gtk_popover_set_autohide()</function></link> may be called on it to tweak its behavior.</para>
<refsect3><title>GtkPopover as menu replacement</title><para>GtkPopover is often used to replace menus. The best was to do this
is to use the <link linkend="GtkPopoverMenu"><type>GtkPopoverMenu</type></link> subclass which supports being populated
from a <link linkend="GMenuModel"><type>GMenuModel</type></link> with <link linkend="gtk-popover-menu-new-from-model"><function>gtk_popover_menu_new_from_model()</function></link>.</para>
<informalexample><programlisting role="example"><![CDATA[
<section>
  <attribute name="display-hint">horizontal-buttons</attribute>
  <item>
    <attribute name="label">Cut</attribute>
    <attribute name="action">app.cut</attribute>
    <attribute name="verb-icon">edit-cut-symbolic</attribute>
  </item>
  <item>
    <attribute name="label">Copy</attribute>
    <attribute name="action">app.copy</attribute>
    <attribute name="verb-icon">edit-copy-symbolic</attribute>
  </item>
  <item>
    <attribute name="label">Paste</attribute>
    <attribute name="action">app.paste</attribute>
    <attribute name="verb-icon">edit-paste-symbolic</attribute>
  </item>
</section>
]]></programlisting></informalexample>
<para></para>
</refsect3>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
popover[.menu]
├── arrow
╰── contents.background
    ╰── <child>
]]></programlisting></informalexample>
<para></para>
<para>The contents child node always gets the .background style class and
the popover itself gets the .menu style class if the popover is
menu-like (i.e. <link linkend="GtkPopoverMenu"><type>GtkPopoverMenu</type></link>).</para>
<para>Particular uses of GtkPopover, such as touch selection popups or magnifiers
in <link linkend="GtkEntry"><type>GtkEntry</type></link> or <link linkend="GtkTextView"><type>GtkTextView</type></link> get style classes like .touch-selection or .magnifier
to differentiate from plain popovers.</para>
<para>When styling a popover directly, the popover node should usually
not have any background.</para>
<para>Note that, in order to accomplish appropriate arrow visuals, <link linkend="GtkPopover"><type>GtkPopover</type></link> uses
custom drawing for the arrow node. This makes it possible for the arrow to
change its shape dynamically, but it also limits the possibilities of styling
it using CSS. In particular, the arrow gets drawn over the content node's
border so they look like one shape, which means that the border-width of
the content node and the arrow node should be the same. The arrow also does
not support any border shape other than solid, no border-radius, only one
border width (border-bottom-width is used) and no box-shadow.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkPopover.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-popover-new" role="function">
<title>gtk_popover_new&#160;()</title>
<indexterm zone="gtk-popover-new"><primary>gtk_popover_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_popover_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new popover.</para>
<refsect3 id="gtk-popover-new.returns" role="returns">
<title>Returns</title>
<para> the new popover</para>
</refsect3></refsect2>
<refsect2 id="gtk-popover-popup" role="function">
<title>gtk_popover_popup&#160;()</title>
<indexterm zone="gtk-popover-popup"><primary>gtk_popover_popup</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_popover_popup (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>);</programlisting>
<para>Pops <parameter>popover</parameter>
 up. This is different than a <link linkend="gtk-widget-show"><function>gtk_widget_show()</function></link> call
in that it shows the popover with a transition. If you want to show
the popover without a transition, use <link linkend="gtk-widget-show"><function>gtk_widget_show()</function></link>.</para>
<refsect3 id="gtk-popover-popup.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-popover-popdown" role="function">
<title>gtk_popover_popdown&#160;()</title>
<indexterm zone="gtk-popover-popdown"><primary>gtk_popover_popdown</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_popover_popdown (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>);</programlisting>
<para>Pops <parameter>popover</parameter>
 down.This is different than a <link linkend="gtk-widget-hide"><function>gtk_widget_hide()</function></link> call
in that it shows the popover with a transition. If you want to hide
the popover without a transition, use <link linkend="gtk-widget-hide"><function>gtk_widget_hide()</function></link>.</para>
<refsect3 id="gtk-popover-popdown.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-popover-set-child" role="function">
<title>gtk_popover_set_child&#160;()</title>
<indexterm zone="gtk-popover-set-child"><primary>gtk_popover_set_child</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_popover_set_child (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>,
                       <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *child</parameter>);</programlisting>
<para>Sets the child widget of <parameter>popover</parameter>
.</para>
<refsect3 id="gtk-popover-set-child.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>the child widget. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-popover-get-child" role="function">
<title>gtk_popover_get_child&#160;()</title>
<indexterm zone="gtk-popover-get-child"><primary>gtk_popover_get_child</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_popover_get_child (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>);</programlisting>
<para>Gets the child widget of <parameter>popover</parameter>
.</para>
<refsect3 id="gtk-popover-get-child.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-popover-get-child.returns" role="returns">
<title>Returns</title>
<para>the child widget of <parameter>popover</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-popover-set-pointing-to" role="function">
<title>gtk_popover_set_pointing_to&#160;()</title>
<indexterm zone="gtk-popover-set-pointing-to"><primary>gtk_popover_set_pointing_to</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_popover_set_pointing_to (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>,
                             <parameter>const <link linkend="GdkRectangle"><type>GdkRectangle</type></link> *rect</parameter>);</programlisting>
<para>Sets the rectangle that <parameter>popover</parameter>
 will point to, in the
coordinate space of the <parameter>popover</parameter>
 parent.</para>
<refsect3 id="gtk-popover-set-pointing-to.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rect</para></entry>
<entry role="parameter_description"><para>rectangle to point to</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-popover-get-pointing-to" role="function">
<title>gtk_popover_get_pointing_to&#160;()</title>
<indexterm zone="gtk-popover-get-pointing-to"><primary>gtk_popover_get_pointing_to</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_popover_get_pointing_to (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>,
                             <parameter><link linkend="GdkRectangle"><type>GdkRectangle</type></link> *rect</parameter>);</programlisting>
<para>If a rectangle to point to has been set, this function will
return <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and fill in <parameter>rect</parameter>
 with such rectangle, otherwise
it will return <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> and fill in <parameter>rect</parameter>
 with the attached
widget coordinates.</para>
<refsect3 id="gtk-popover-get-pointing-to.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rect</para></entry>
<entry role="parameter_description"><para>location to store the rectangle. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-popover-get-pointing-to.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if a rectangle to point to was set.</para>
</refsect3></refsect2>
<refsect2 id="gtk-popover-set-position" role="function">
<title>gtk_popover_set_position&#160;()</title>
<indexterm zone="gtk-popover-set-position"><primary>gtk_popover_set_position</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_popover_set_position (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>,
                          <parameter><link linkend="GtkPositionType"><type>GtkPositionType</type></link> position</parameter>);</programlisting>
<para>Sets the preferred position for <parameter>popover</parameter>
 to appear. If the <parameter>popover</parameter>

is currently visible, it will be immediately updated.</para>
<para>This preference will be respected where possible, although
on lack of space (eg. if close to the window edges), the
<link linkend="GtkPopover"><type>GtkPopover</type></link> may choose to appear on the opposite side</para>
<refsect3 id="gtk-popover-set-position.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>preferred popover position</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-popover-get-position" role="function">
<title>gtk_popover_get_position&#160;()</title>
<indexterm zone="gtk-popover-get-position"><primary>gtk_popover_get_position</primary></indexterm>
<programlisting language="C"><link linkend="GtkPositionType"><returnvalue>GtkPositionType</returnvalue></link>
gtk_popover_get_position (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>);</programlisting>
<para>Returns the preferred position of <parameter>popover</parameter>
.</para>
<refsect3 id="gtk-popover-get-position.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-popover-get-position.returns" role="returns">
<title>Returns</title>
<para> The preferred position.</para>
</refsect3></refsect2>
<refsect2 id="gtk-popover-set-autohide" role="function">
<title>gtk_popover_set_autohide&#160;()</title>
<indexterm zone="gtk-popover-set-autohide"><primary>gtk_popover_set_autohide</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_popover_set_autohide (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>,
                          <parameter><link linkend="gboolean"><type>gboolean</type></link> autohide</parameter>);</programlisting>
<para>Sets whether <parameter>popover</parameter>
 is modal.</para>
<para>A modal popover will grab the keyboard focus on it when being
displayed. Clicking outside the popover area or pressing Esc will
dismiss the popover.</para>
<para>Called this function on an already showing popup with a new autohide value
different from the current one, will cause the popup to be hidden.</para>
<refsect3 id="gtk-popover-set-autohide.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>autohide</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><type>TRUE</type></link> to dismiss the popover on outside clicks</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-popover-get-autohide" role="function">
<title>gtk_popover_get_autohide&#160;()</title>
<indexterm zone="gtk-popover-get-autohide"><primary>gtk_popover_get_autohide</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_popover_get_autohide (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>);</programlisting>
<para>Returns whether the popover is modal.</para>
<para>See <link linkend="gtk-popover-set-autohide"><function>gtk_popover_set_autohide()</function></link> for the
implications of this.</para>
<refsect3 id="gtk-popover-get-autohide.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-popover-get-autohide.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><type>TRUE</type></link> if <parameter>popover</parameter>
is modal</para>
</refsect3></refsect2>
<refsect2 id="gtk-popover-set-has-arrow" role="function">
<title>gtk_popover_set_has_arrow&#160;()</title>
<indexterm zone="gtk-popover-set-has-arrow"><primary>gtk_popover_set_has_arrow</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_popover_set_has_arrow (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>,
                           <parameter><link linkend="gboolean"><type>gboolean</type></link> has_arrow</parameter>);</programlisting>
<para>Sets whether this popover should draw an arrow
pointing at the widget it is relative to.</para>
<refsect3 id="gtk-popover-set-has-arrow.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>has_arrow</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to draw an arrow</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-popover-get-has-arrow" role="function">
<title>gtk_popover_get_has_arrow&#160;()</title>
<indexterm zone="gtk-popover-get-has-arrow"><primary>gtk_popover_get_has_arrow</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_popover_get_has_arrow (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>);</programlisting>
<para>Gets whether this popover is showing an arrow
pointing at the widget that it is relative to.</para>
<refsect3 id="gtk-popover-get-has-arrow.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-popover-get-has-arrow.returns" role="returns">
<title>Returns</title>
<para> whether the popover has an arrow</para>
</refsect3></refsect2>
<refsect2 id="gtk-popover-set-default-widget" role="function">
<title>gtk_popover_set_default_widget&#160;()</title>
<indexterm zone="gtk-popover-set-default-widget"><primary>gtk_popover_set_default_widget</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_popover_set_default_widget (<parameter><link linkend="GtkPopover"><type>GtkPopover</type></link> *popover</parameter>,
                                <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting>
<para>The default widget is the widget that’s activated when the user
presses Enter in a dialog (for example). This function sets or
unsets the default widget for a <link linkend="GtkPopover"><type>GtkPopover</type></link>.</para>
<refsect3 id="gtk-popover-set-default-widget.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>popover</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkPopover"><type>GtkPopover</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>a child widget of <parameter>popover</parameter>
to set as
the default, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to unset the default widget for the popover. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkPopover.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkPopover-struct" role="struct">
<title>struct GtkPopover</title>
<indexterm zone="GtkPopover-struct"><primary>GtkPopover</primary></indexterm>
<programlisting language="C">struct GtkPopover;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkPopover.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkPopover--autohide" role="property"><title>The <literal>“autohide”</literal> property</title>
<indexterm zone="GtkPopover--autohide"><primary>GtkPopover:autohide</primary></indexterm>
<programlisting>  “autohide”                 <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether to dismiss the popover on outside clicks.</para><para>Owner: GtkPopover</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkPopover--child" role="property"><title>The <literal>“child”</literal> property</title>
<indexterm zone="GtkPopover--child"><primary>GtkPopover:child</primary></indexterm>
<programlisting>  “child”                    <link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</programlisting>
<para>The child widget.</para><para>Owner: GtkPopover</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkPopover--default-widget" role="property"><title>The <literal>“default-widget”</literal> property</title>
<indexterm zone="GtkPopover--default-widget"><primary>GtkPopover:default-widget</primary></indexterm>
<programlisting>  “default-widget”           <link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</programlisting>
<para>The default widget.</para><para>Owner: GtkPopover</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkPopover--has-arrow" role="property"><title>The <literal>“has-arrow”</literal> property</title>
<indexterm zone="GtkPopover--has-arrow"><primary>GtkPopover:has-arrow</primary></indexterm>
<programlisting>  “has-arrow”                <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether to draw an arrow.</para><para>Owner: GtkPopover</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkPopover--mnemonics-visible" role="property"><title>The <literal>“mnemonics-visible”</literal> property</title>
<indexterm zone="GtkPopover--mnemonics-visible"><primary>GtkPopover:mnemonics-visible</primary></indexterm>
<programlisting>  “mnemonics-visible”        <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether mnemonics are currently visible in this popover.</para><para>Owner: GtkPopover</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkPopover--pointing-to" role="property"><title>The <literal>“pointing-to”</literal> property</title>
<indexterm zone="GtkPopover--pointing-to"><primary>GtkPopover:pointing-to</primary></indexterm>
<programlisting>  “pointing-to”              <link linkend="GdkRectangle"><type>GdkRectangle</type></link>&#160;*</programlisting>
<para>Rectangle the bubble window points to.</para><para>Owner: GtkPopover</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkPopover--position" role="property"><title>The <literal>“position”</literal> property</title>
<indexterm zone="GtkPopover--position"><primary>GtkPopover:position</primary></indexterm>
<programlisting>  “position”                 <link linkend="GtkPositionType"><type>GtkPositionType</type></link></programlisting>
<para>Position to place the bubble window.</para><para>Owner: GtkPopover</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_POS_BOTTOM</para>
</refsect2>

</refsect1>
<refsect1 id="GtkPopover.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkPopover-activate-default" role="signal"><title>The <literal>“activate-default”</literal> signal</title>
<indexterm zone="GtkPopover-activate-default"><primary>GtkPopover::activate-default</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkPopover"><type>GtkPopover</type></link> *popover,
               <link linkend="gpointer"><type>gpointer</type></link>    user_data)</programlisting>
<para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkPopover-closed" role="signal"><title>The <literal>“closed”</literal> signal</title>
<indexterm zone="GtkPopover-closed"><primary>GtkPopover::closed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkPopover"><type>GtkPopover</type></link> *popover,
               <link linkend="gpointer"><type>gpointer</type></link>    user_data)</programlisting>
<para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>

</refentry>
