<?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="GtkAppChooser">
<refmeta>
<refentrytitle role="top_of_page" id="GtkAppChooser.top_of_page">GtkAppChooser</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkAppChooser</refname>
<refpurpose>Interface implemented by widgets for choosing an application</refpurpose>
</refnamediv>

<refsect1 id="GtkAppChooser.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="GAppInfo"><returnvalue>GAppInfo</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-app-chooser-get-app-info">gtk_app_chooser_get_app_info</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-app-chooser-get-content-type">gtk_app_chooser_get_content_type</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-app-chooser-refresh">gtk_app_chooser_refresh</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkAppChooser.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="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkAppChooser--content-type">content-type</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkAppChooser.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GInterface">GInterface</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkAppChooser
</screen>
</refsect1>
<refsect1 id="GtkAppChooser.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GtkAppChooser requires
 <link linkend="GtkWidget">GtkWidget</link>.</para>

</refsect1>
<refsect1 id="GtkAppChooser.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
GtkAppChooser is implemented by
 <link linkend="GtkAppChooserButton">GtkAppChooserButton</link>,  <link linkend="GtkAppChooserDialog">GtkAppChooserDialog</link> and  <link linkend="GtkAppChooserWidget">GtkAppChooserWidget</link>.</para>

</refsect1>

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

<refsect1 id="GtkAppChooser.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkAppChooser"><type>GtkAppChooser</type></link> is an interface that can be implemented by widgets which
allow the user to choose an application (typically for the purpose of
opening a file). The main objects that implement this interface are
<link linkend="GtkAppChooserWidget"><type>GtkAppChooserWidget</type></link>, <link linkend="GtkAppChooserDialog"><type>GtkAppChooserDialog</type></link> and <link linkend="GtkAppChooserButton"><type>GtkAppChooserButton</type></link>.</para>
<para>Applications are represented by GIO <link linkend="GAppInfo"><type>GAppInfo</type></link> objects here.
GIO has a concept of recommended and fallback applications for a
given content type. Recommended applications are those that claim
to handle the content type itself, while fallback also includes
applications that handle a more generic content type. GIO also
knows the default and last-used application for a given content
type. The <link linkend="GtkAppChooserWidget"><type>GtkAppChooserWidget</type></link> provides detailed control over
whether the shown list of applications should include default,
recommended or fallback applications.</para>
<para>To obtain the application that has been selected in a <link linkend="GtkAppChooser"><type>GtkAppChooser</type></link>,
use <link linkend="gtk-app-chooser-get-app-info"><function>gtk_app_chooser_get_app_info()</function></link>.</para>

</refsect1>
<refsect1 id="GtkAppChooser.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-app-chooser-get-app-info" role="function">
<title>gtk_app_chooser_get_app_info&#160;()</title>
<indexterm zone="gtk-app-chooser-get-app-info"><primary>gtk_app_chooser_get_app_info</primary></indexterm>
<programlisting language="C"><link linkend="GAppInfo"><returnvalue>GAppInfo</returnvalue></link>&#160;*
gtk_app_chooser_get_app_info (<parameter><link linkend="GtkAppChooser"><type>GtkAppChooser</type></link> *self</parameter>);</programlisting>
<para>Returns the currently selected application.</para>
<refsect3 id="gtk-app-chooser-get-app-info.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkAppChooser"><type>GtkAppChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-app-chooser-get-app-info.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GAppInfo"><type>GAppInfo</type></link> for the currently selected
application, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none is selected. Free with <link linkend="g-object-unref"><function>g_object_unref()</function></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-app-chooser-get-content-type" role="function">
<title>gtk_app_chooser_get_content_type&#160;()</title>
<indexterm zone="gtk-app-chooser-get-content-type"><primary>gtk_app_chooser_get_content_type</primary></indexterm>
<programlisting language="C"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_app_chooser_get_content_type (<parameter><link linkend="GtkAppChooser"><type>GtkAppChooser</type></link> *self</parameter>);</programlisting>
<para>Returns the current value of the <link linkend="GtkAppChooser--content-type"><type>“content-type”</type></link> property.</para>
<refsect3 id="gtk-app-chooser-get-content-type.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkAppChooser"><type>GtkAppChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-app-chooser-get-content-type.returns" role="returns">
<title>Returns</title>
<para> the content type of <parameter>self</parameter>
. Free with <link linkend="g-free"><function>g_free()</function></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-app-chooser-refresh" role="function">
<title>gtk_app_chooser_refresh&#160;()</title>
<indexterm zone="gtk-app-chooser-refresh"><primary>gtk_app_chooser_refresh</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_app_chooser_refresh (<parameter><link linkend="GtkAppChooser"><type>GtkAppChooser</type></link> *self</parameter>);</programlisting>
<para>Reloads the list of applications.</para>
<refsect3 id="gtk-app-chooser-refresh.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkAppChooser"><type>GtkAppChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

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

</refsect1>
<refsect1 id="GtkAppChooser.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkAppChooser--content-type" role="property"><title>The <literal>“content-type”</literal> property</title>
<indexterm zone="GtkAppChooser--content-type"><primary>GtkAppChooser:content-type</primary></indexterm>
<programlisting>  “content-type”             <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The content type of the <link linkend="GtkAppChooser"><type>GtkAppChooser</type></link> object.</para>
<para>See <link linkend="gio-GContentType">GContentType</link>
for more information about content types.</para>
<para>Owner: GtkAppChooser</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
<para>Default value: NULL</para>
</refsect2>

</refsect1>
<refsect1 id="GtkAppChooser.see-also">
<title>See Also</title>
<para><link linkend="GAppInfo"><type>GAppInfo</type></link></para>

</refsect1>

</refentry>
