<?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="GtkFileChooser">
<refmeta>
<refentrytitle role="top_of_page" id="GtkFileChooser.top_of_page">GtkFileChooser</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkFileChooser</refname>
<refpurpose>File chooser interface used by GtkFileChooserWidget and GtkFileChooserDialog</refpurpose>
</refnamediv>

<refsect1 id="GtkFileChooser.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="gtk-file-chooser-set-action">gtk_file_chooser_set_action</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkFileChooserAction"><returnvalue>GtkFileChooserAction</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-file-chooser-get-action">gtk_file_chooser_get_action</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-file-chooser-set-select-multiple">gtk_file_chooser_set_select_multiple</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-file-chooser-get-select-multiple">gtk_file_chooser_get_select_multiple</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-file-chooser-set-create-folders">gtk_file_chooser_set_create_folders</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-file-chooser-get-create-folders">gtk_file_chooser_get_create_folders</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-file-chooser-set-current-name">gtk_file_chooser_set_current_name</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-file-chooser-get-current-name">gtk_file_chooser_get_current_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GFile"><returnvalue>GFile</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-file-chooser-get-file">gtk_file_chooser_get_file</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-file-chooser-set-file">gtk_file_chooser_set_file</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-file-chooser-select-file">gtk_file_chooser_select_file</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-file-chooser-unselect-file">gtk_file_chooser_unselect_file</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-file-chooser-select-all">gtk_file_chooser_select_all</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-file-chooser-unselect-all">gtk_file_chooser_unselect_all</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-file-chooser-get-files">gtk_file_chooser_get_files</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-file-chooser-set-current-folder">gtk_file_chooser_set_current_folder</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GFile"><returnvalue>GFile</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-file-chooser-get-current-folder">gtk_file_chooser_get_current_folder</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-file-chooser-add-filter">gtk_file_chooser_add_filter</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-file-chooser-remove-filter">gtk_file_chooser_remove_filter</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-file-chooser-list-filters">gtk_file_chooser_list_filters</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-file-chooser-set-filter">gtk_file_chooser_set_filter</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkFileFilter"><returnvalue>GtkFileFilter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-file-chooser-get-filter">gtk_file_chooser_get_filter</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-file-chooser-add-shortcut-folder">gtk_file_chooser_add_shortcut_folder</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-file-chooser-remove-shortcut-folder">gtk_file_chooser_remove_shortcut_folder</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-file-chooser-list-shortcut-folders">gtk_file_chooser_list_shortcut_folders</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-file-chooser-add-choice">gtk_file_chooser_add_choice</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-file-chooser-remove-choice">gtk_file_chooser_remove_choice</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-file-chooser-set-choice">gtk_file_chooser_set_choice</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-file-chooser-get-choice">gtk_file_chooser_get_choice</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkFileChooser.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="GtkFileChooserAction"><type>GtkFileChooserAction</type></link></entry><entry role="property_name"><link linkend="GtkFileChooser--action">action</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="GtkFileChooser--create-folders">create-folders</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkFileFilter"><type>GtkFileFilter</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkFileChooser--filter">filter</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="GtkFileChooser--select-multiple">select-multiple</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkFileChooser.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="GtkFileChooser-current-folder-changed">current-folder-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkFileChooser-file-activated">file-activated</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkFileChooser-selection-changed">selection-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkFileChooser.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="GtkFileChooser-struct">GtkFileChooser</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkFileChooserAction">GtkFileChooserAction</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GTK-FILE-CHOOSER-ERROR:CAPS">GTK_FILE_CHOOSER_ERROR</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkFileChooserError">GtkFileChooserError</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkFileChooser.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> GtkFileChooser
</screen>
</refsect1>
<refsect1 id="GtkFileChooser.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GtkFileChooser requires
 <link linkend="GObject">GObject</link>.</para>

</refsect1>
<refsect1 id="GtkFileChooser.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
GtkFileChooser is implemented by
 <link linkend="GtkFileChooserButton">GtkFileChooserButton</link>,  <link linkend="GtkFileChooserDialog">GtkFileChooserDialog</link> and  <link linkend="GtkFileChooserWidget">GtkFileChooserWidget</link>.</para>

</refsect1>

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

<refsect1 id="GtkFileChooser.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> is an interface that can be implemented by file
selection widgets.  In GTK+, the main objects that implement this
interface are <link linkend="GtkFileChooserWidget"><type>GtkFileChooserWidget</type></link>, <link linkend="GtkFileChooserDialog"><type>GtkFileChooserDialog</type></link>, and
<link linkend="GtkFileChooserButton"><type>GtkFileChooserButton</type></link>.  You do not need to write an object that
implements the <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> interface unless you are trying to
adapt an existing file selector to expose a standard programming
interface.</para>
<para><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> allows for shortcuts to various places in the filesystem.
In the default implementation these are displayed in the left pane. It
may be a bit confusing at first that these shortcuts come from various
sources and in various flavours, so lets explain the terminology here:</para>
<itemizedlist>
<listitem>
<para>Bookmarks: are created by the user, by dragging folders from the
right pane to the left pane, or by using the “Add”. Bookmarks
can be renamed and deleted by the user.</para>
</listitem>
<listitem>
<para>Shortcuts: can be provided by the application. For example, a Paint
program may want to add a shortcut for a Clipart folder. Shortcuts
cannot be modified by the user.</para>
</listitem>
<listitem>
<para>Volumes: are provided by the underlying filesystem abstraction. They are
the “roots” of the filesystem.</para>
</listitem>
</itemizedlist>
<refsect2><title>File Names and Encodings</title><para>When the user is finished selecting files in a
<link linkend="GtkFileChooser"><type>GtkFileChooser</type></link>, your program can get the selected filenames as
<link linkend="GFiles"><type>GFiles</type></link>.</para>
</refsect2>
<refsect2><title>Adding options</title><para>You can add extra widgets to a file chooser to provide options
that are not present in the default design, by using
<link linkend="gtk-file-chooser-add-choice"><function>gtk_file_chooser_add_choice()</function></link>. Each choice has an identifier and
a user visible label; additionally, each choice can have multiple
options. If a choice has no option, it will be rendered as a
check button with the given label; if a choice has options, it will
be rendered as a combo box.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkFileChooser.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-file-chooser-set-action" role="function">
<title>gtk_file_chooser_set_action&#160;()</title>
<indexterm zone="gtk-file-chooser-set-action"><primary>gtk_file_chooser_set_action</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_set_action (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                             <parameter><link linkend="GtkFileChooserAction"><type>GtkFileChooserAction</type></link> action</parameter>);</programlisting>
<para>Sets the type of operation that the chooser is performing; the
user interface is adapted to suit the selected action. For example,
an option to create a new folder might be shown if the action is
<link linkend="GTK-FILE-CHOOSER-ACTION-SAVE:CAPS"><literal>GTK_FILE_CHOOSER_ACTION_SAVE</literal></link> but not if the action is
<link linkend="GTK-FILE-CHOOSER-ACTION-OPEN:CAPS"><literal>GTK_FILE_CHOOSER_ACTION_OPEN</literal></link>.</para>
<refsect3 id="gtk-file-chooser-set-action.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>action</para></entry>
<entry role="parameter_description"><para>the action that the file selector is performing</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-action" role="function">
<title>gtk_file_chooser_get_action&#160;()</title>
<indexterm zone="gtk-file-chooser-get-action"><primary>gtk_file_chooser_get_action</primary></indexterm>
<programlisting language="C"><link linkend="GtkFileChooserAction"><returnvalue>GtkFileChooserAction</returnvalue></link>
gtk_file_chooser_get_action (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Gets the type of operation that the file chooser is performing; see
<link linkend="gtk-file-chooser-set-action"><function>gtk_file_chooser_set_action()</function></link>.</para>
<refsect3 id="gtk-file-chooser-get-action.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-action.returns" role="returns">
<title>Returns</title>
<para> the action that the file selector is performing</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-set-select-multiple" role="function">
<title>gtk_file_chooser_set_select_multiple&#160;()</title>
<indexterm zone="gtk-file-chooser-set-select-multiple"><primary>gtk_file_chooser_set_select_multiple</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_set_select_multiple (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                      <parameter><link linkend="gboolean"><type>gboolean</type></link> select_multiple</parameter>);</programlisting>
<para>Sets whether multiple files can be selected in the file selector.  This is
only relevant if the action is set to be <link linkend="GTK-FILE-CHOOSER-ACTION-OPEN:CAPS"><literal>GTK_FILE_CHOOSER_ACTION_OPEN</literal></link> or
<link linkend="GTK-FILE-CHOOSER-ACTION-SELECT-FOLDER:CAPS"><literal>GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</literal></link>.</para>
<refsect3 id="gtk-file-chooser-set-select-multiple.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>select_multiple</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if multiple files can be selected.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-select-multiple" role="function">
<title>gtk_file_chooser_get_select_multiple&#160;()</title>
<indexterm zone="gtk-file-chooser-get-select-multiple"><primary>gtk_file_chooser_get_select_multiple</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_file_chooser_get_select_multiple (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Gets whether multiple files can be selected in the file
selector. See <link linkend="gtk-file-chooser-set-select-multiple"><function>gtk_file_chooser_set_select_multiple()</function></link>.</para>
<refsect3 id="gtk-file-chooser-get-select-multiple.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-select-multiple.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if multiple files can be selected.</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-set-create-folders" role="function">
<title>gtk_file_chooser_set_create_folders&#160;()</title>
<indexterm zone="gtk-file-chooser-set-create-folders"><primary>gtk_file_chooser_set_create_folders</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_set_create_folders (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                     <parameter><link linkend="gboolean"><type>gboolean</type></link> create_folders</parameter>);</programlisting>
<para>Sets whether file choser will offer to create new folders.
This is only relevant if the action is not set to be 
<link linkend="GTK-FILE-CHOOSER-ACTION-OPEN:CAPS"><literal>GTK_FILE_CHOOSER_ACTION_OPEN</literal></link>.</para>
<refsect3 id="gtk-file-chooser-set-create-folders.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>create_folders</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the Create Folder button should be displayed</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-create-folders" role="function">
<title>gtk_file_chooser_get_create_folders&#160;()</title>
<indexterm zone="gtk-file-chooser-get-create-folders"><primary>gtk_file_chooser_get_create_folders</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_file_chooser_get_create_folders (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Gets whether file choser will offer to create new folders.
See <link linkend="gtk-file-chooser-set-create-folders"><function>gtk_file_chooser_set_create_folders()</function></link>.</para>
<refsect3 id="gtk-file-chooser-get-create-folders.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-create-folders.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the Create Folder button should be displayed.</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-set-current-name" role="function">
<title>gtk_file_chooser_set_current_name&#160;()</title>
<indexterm zone="gtk-file-chooser-set-current-name"><primary>gtk_file_chooser_set_current_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_set_current_name (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                   <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>);</programlisting>
<para>Sets the current name in the file selector, as if entered
by the user. Note that the name passed in here is a UTF-8
string rather than a filename. This function is meant for
such uses as a suggested name in a “Save As...” dialog.  You can
pass “Untitled.doc” or a similarly suitable suggestion for the <parameter>name</parameter>
.</para>
<para>If you want to preselect a particular existing file, you should use
<link linkend="gtk-file-chooser-set-file"><function>gtk_file_chooser_set_file()</function></link> instead.</para>
<para>Please see the documentation for those functions for an example of using
<link linkend="gtk-file-chooser-set-current-name"><function>gtk_file_chooser_set_current_name()</function></link> as well.</para>
<refsect3 id="gtk-file-chooser-set-current-name.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>the filename to use, as a UTF-8 string. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> filename]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-current-name" role="function">
<title>gtk_file_chooser_get_current_name&#160;()</title>
<indexterm zone="gtk-file-chooser-get-current-name"><primary>gtk_file_chooser_get_current_name</primary></indexterm>
<programlisting language="C"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_file_chooser_get_current_name (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Gets the current name in the file selector, as entered by the user in the
text entry for “Name”.</para>
<para>This is meant to be used in save dialogs, to get the currently typed filename
when the file itself does not exist yet.</para>
<refsect3 id="gtk-file-chooser-get-current-name.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-current-name.returns" role="returns">
<title>Returns</title>
<para> The raw text from the file chooser’s “Name” entry.  Free this with
<link linkend="g-free"><function>g_free()</function></link>.  Note that this string is not a full pathname or URI; it is
whatever the contents of the entry are.  Note also that this string is in
UTF-8 encoding, which is not necessarily the system’s encoding for filenames.</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-file" role="function">
<title>gtk_file_chooser_get_file&#160;()</title>
<indexterm zone="gtk-file-chooser-get-file"><primary>gtk_file_chooser_get_file</primary></indexterm>
<programlisting language="C"><link linkend="GFile"><returnvalue>GFile</returnvalue></link>&#160;*
gtk_file_chooser_get_file (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Gets the <link linkend="GFile"><type>GFile</type></link> for the currently selected file in
the file selector. If multiple files are selected,
one of the files will be returned at random.</para>
<para>If the file chooser is in folder mode, this function returns the selected
folder.</para>
<refsect3 id="gtk-file-chooser-get-file.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-file.returns" role="returns">
<title>Returns</title>
<para>a selected <link linkend="GFile"><type>GFile</type></link>. You own the returned file;
use <link linkend="g-object-unref"><function>g_object_unref()</function></link> to release it. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-set-file" role="function">
<title>gtk_file_chooser_set_file&#160;()</title>
<indexterm zone="gtk-file-chooser-set-file"><primary>gtk_file_chooser_set_file</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_file_chooser_set_file (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                           <parameter><link linkend="GFile"><type>GFile</type></link> *file</parameter>,
                           <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Sets <parameter>file</parameter>
 as the current filename for the file chooser, by changing
to the file’s parent folder and actually selecting the file in list.  If
the <parameter>chooser</parameter>
 is in <link linkend="GTK-FILE-CHOOSER-ACTION-SAVE:CAPS"><literal>GTK_FILE_CHOOSER_ACTION_SAVE</literal></link> mode, the file’s base name
will also appear in the dialog’s file name entry.</para>
<para>If the file name isn’t in the current folder of <parameter>chooser</parameter>
, then the current
folder of <parameter>chooser</parameter>
 will be changed to the folder containing <parameter>filename</parameter>
. This
is equivalent to a sequence of <link linkend="gtk-file-chooser-unselect-all"><function>gtk_file_chooser_unselect_all()</function></link> followed by
<link linkend="gtk-file-chooser-select-filename"><function>gtk_file_chooser_select_filename()</function></link>.</para>
<para>Note that the file must exist, or nothing will be done except
for the directory change.</para>
<para>If you are implementing a save dialog,
you should use this function if you already have a file name to which the
user may save; for example, when the user opens an existing file and then
does Save As...  If you don’t have
a file name already — for example, if the user just created a new
file and is saving it for the first time, do not call this function.
Instead, use something similar to this:</para>
<informalexample><programlisting role="example"><![CDATA[
if (document_is_new)
  {
    // the user just created a new document
    gtk_file_chooser_set_current_folder (chooser, default_file_for_saving);
    gtk_file_chooser_set_current_name (chooser, "Untitled document");
  }
else
  {
    // the user edited an existing document
    gtk_file_chooser_set_file (chooser, existing_file);
  }
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gtk-file-chooser-set-file.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>file</para></entry>
<entry role="parameter_description"><para>the <link linkend="GFile"><type>GFile</type></link> to set as current</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>location to store the error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to ignore errors. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-set-file.returns" role="returns">
<title>Returns</title>
<para> Not useful.</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-select-file" role="function">
<title>gtk_file_chooser_select_file&#160;()</title>
<indexterm zone="gtk-file-chooser-select-file"><primary>gtk_file_chooser_select_file</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_file_chooser_select_file (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                              <parameter><link linkend="GFile"><type>GFile</type></link> *file</parameter>,
                              <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Selects the file referred to by <parameter>file</parameter>
.</para>
<refsect3 id="gtk-file-chooser-select-file.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>file</para></entry>
<entry role="parameter_description"><para>the file to select</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>location to store error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-select-file.returns" role="returns">
<title>Returns</title>
<para> Not useful.</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-unselect-file" role="function">
<title>gtk_file_chooser_unselect_file&#160;()</title>
<indexterm zone="gtk-file-chooser-unselect-file"><primary>gtk_file_chooser_unselect_file</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_unselect_file (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                <parameter><link linkend="GFile"><type>GFile</type></link> *file</parameter>);</programlisting>
<para>Unselects the file referred to by <parameter>file</parameter>
. If the file is not in the current
directory, does not exist, or is otherwise not currently selected, does nothing.</para>
<refsect3 id="gtk-file-chooser-unselect-file.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>file</para></entry>
<entry role="parameter_description"><para>a <link linkend="GFile"><type>GFile</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-select-all" role="function">
<title>gtk_file_chooser_select_all&#160;()</title>
<indexterm zone="gtk-file-chooser-select-all"><primary>gtk_file_chooser_select_all</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_select_all (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Selects all the files in the current folder of a file chooser.</para>
<refsect3 id="gtk-file-chooser-select-all.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-unselect-all" role="function">
<title>gtk_file_chooser_unselect_all&#160;()</title>
<indexterm zone="gtk-file-chooser-unselect-all"><primary>gtk_file_chooser_unselect_all</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_unselect_all (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Unselects all the files in the current folder of a file chooser.</para>
<refsect3 id="gtk-file-chooser-unselect-all.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-files" role="function">
<title>gtk_file_chooser_get_files&#160;()</title>
<indexterm zone="gtk-file-chooser-get-files"><primary>gtk_file_chooser_get_files</primary></indexterm>
<programlisting language="C"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
gtk_file_chooser_get_files (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Lists all the selected files and subfolders in the current folder of <parameter>chooser</parameter>

as <link linkend="GFile"><type>GFile</type></link>.</para>
<refsect3 id="gtk-file-chooser-get-files.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-files.returns" role="returns">
<title>Returns</title>
<para>a list
containing a <link linkend="GFile"><type>GFile</type></link> for each selected file and subfolder in the
current folder.  Free the returned list with <link linkend="g-slist-free"><function>g_slist_free()</function></link>, and
the files with <link linkend="g-object-unref"><function>g_object_unref()</function></link>. </para>
<para><emphasis role="annotation">[<acronym>element-type</acronym> GFile][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-set-current-folder" role="function">
<title>gtk_file_chooser_set_current_folder&#160;()</title>
<indexterm zone="gtk-file-chooser-set-current-folder"><primary>gtk_file_chooser_set_current_folder</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_file_chooser_set_current_folder (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                     <parameter><link linkend="GFile"><type>GFile</type></link> *file</parameter>,
                                     <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Sets the current folder for <parameter>chooser</parameter>
 from a <link linkend="GFile"><type>GFile</type></link>.</para>
<refsect3 id="gtk-file-chooser-set-current-folder.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>file</para></entry>
<entry role="parameter_description"><para>the <link linkend="GFile"><type>GFile</type></link> for the new folder</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>location to store error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-set-current-folder.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the folder could be changed successfully, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
otherwise.</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-current-folder" role="function">
<title>gtk_file_chooser_get_current_folder&#160;()</title>
<indexterm zone="gtk-file-chooser-get-current-folder"><primary>gtk_file_chooser_get_current_folder</primary></indexterm>
<programlisting language="C"><link linkend="GFile"><returnvalue>GFile</returnvalue></link>&#160;*
gtk_file_chooser_get_current_folder (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Gets the current folder of <parameter>chooser</parameter>
 as <link linkend="GFile"><type>GFile</type></link>.</para>
<refsect3 id="gtk-file-chooser-get-current-folder.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-current-folder.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GFile"><type>GFile</type></link> for the current folder. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-add-filter" role="function">
<title>gtk_file_chooser_add_filter&#160;()</title>
<indexterm zone="gtk-file-chooser-add-filter"><primary>gtk_file_chooser_add_filter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_add_filter (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                             <parameter><link linkend="GtkFileFilter"><type>GtkFileFilter</type></link> *filter</parameter>);</programlisting>
<para>Adds <parameter>filter</parameter>
 to the list of filters that the user can select between.
When a filter is selected, only files that are passed by that
filter are displayed. </para>
<para>Note that the <parameter>chooser</parameter>
 takes ownership of the filter if it is floating,
so you have to ref and sink it if you want to keep a reference.</para>
<refsect3 id="gtk-file-chooser-add-filter.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>filter</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileFilter"><type>GtkFileFilter</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-remove-filter" role="function">
<title>gtk_file_chooser_remove_filter&#160;()</title>
<indexterm zone="gtk-file-chooser-remove-filter"><primary>gtk_file_chooser_remove_filter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_remove_filter (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                <parameter><link linkend="GtkFileFilter"><type>GtkFileFilter</type></link> *filter</parameter>);</programlisting>
<para>Removes <parameter>filter</parameter>
 from the list of filters that the user can select between.</para>
<refsect3 id="gtk-file-chooser-remove-filter.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>filter</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileFilter"><type>GtkFileFilter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-list-filters" role="function">
<title>gtk_file_chooser_list_filters&#160;()</title>
<indexterm zone="gtk-file-chooser-list-filters"><primary>gtk_file_chooser_list_filters</primary></indexterm>
<programlisting language="C"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
gtk_file_chooser_list_filters (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Lists the current set of user-selectable filters; see
<link linkend="gtk-file-chooser-add-filter"><function>gtk_file_chooser_add_filter()</function></link>, <link linkend="gtk-file-chooser-remove-filter"><function>gtk_file_chooser_remove_filter()</function></link>.</para>
<refsect3 id="gtk-file-chooser-list-filters.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-list-filters.returns" role="returns">
<title>Returns</title>
<para>a
<link linkend="GSList"><type>GSList</type></link> containing the current set of user selectable filters. The
contents of the list are owned by GTK+, but you must free the list
itself with <link linkend="g-slist-free"><function>g_slist_free()</function></link> when you are done with it. </para>
<para><emphasis role="annotation">[<acronym>element-type</acronym> GtkFileFilter][<acronym>transfer container</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-set-filter" role="function">
<title>gtk_file_chooser_set_filter&#160;()</title>
<indexterm zone="gtk-file-chooser-set-filter"><primary>gtk_file_chooser_set_filter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_set_filter (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                             <parameter><link linkend="GtkFileFilter"><type>GtkFileFilter</type></link> *filter</parameter>);</programlisting>
<para>Sets the current filter; only the files that pass the
filter will be displayed. If the user-selectable list of filters
is non-empty, then the filter should be one of the filters
in that list. Setting the current filter when the list of
filters is empty is useful if you want to restrict the displayed
set of files without letting the user change it.</para>
<refsect3 id="gtk-file-chooser-set-filter.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>filter</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileFilter"><type>GtkFileFilter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-filter" role="function">
<title>gtk_file_chooser_get_filter&#160;()</title>
<indexterm zone="gtk-file-chooser-get-filter"><primary>gtk_file_chooser_get_filter</primary></indexterm>
<programlisting language="C"><link linkend="GtkFileFilter"><returnvalue>GtkFileFilter</returnvalue></link>&#160;*
gtk_file_chooser_get_filter (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Gets the current filter; see <link linkend="gtk-file-chooser-set-filter"><function>gtk_file_chooser_set_filter()</function></link>.</para>
<refsect3 id="gtk-file-chooser-get-filter.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-filter.returns" role="returns">
<title>Returns</title>
<para>the current filter, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-add-shortcut-folder" role="function">
<title>gtk_file_chooser_add_shortcut_folder&#160;()</title>
<indexterm zone="gtk-file-chooser-add-shortcut-folder"><primary>gtk_file_chooser_add_shortcut_folder</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_file_chooser_add_shortcut_folder (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                      <parameter><link linkend="GFile"><type>GFile</type></link> *folder</parameter>,
                                      <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Adds a folder to be displayed with the shortcut folders in a file chooser.</para>
<refsect3 id="gtk-file-chooser-add-shortcut-folder.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>folder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GFile"><type>GFile</type></link> for the folder to add</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>location to store error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-add-shortcut-folder.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the folder could be added successfully, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
otherwise.</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-remove-shortcut-folder" role="function">
<title>gtk_file_chooser_remove_shortcut_folder&#160;()</title>
<indexterm zone="gtk-file-chooser-remove-shortcut-folder"><primary>gtk_file_chooser_remove_shortcut_folder</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_file_chooser_remove_shortcut_folder
                               (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                <parameter><link linkend="GFile"><type>GFile</type></link> *folder</parameter>,
                                <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Removes a folder from the shortcut folders in a file chooser.</para>
<refsect3 id="gtk-file-chooser-remove-shortcut-folder.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>folder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GFile"><type>GFile</type></link> for the folder to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>location to store error, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-remove-shortcut-folder.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the folder could be removed successfully, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
otherwise.</para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-list-shortcut-folders" role="function">
<title>gtk_file_chooser_list_shortcut_folders&#160;()</title>
<indexterm zone="gtk-file-chooser-list-shortcut-folders"><primary>gtk_file_chooser_list_shortcut_folders</primary></indexterm>
<programlisting language="C"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
gtk_file_chooser_list_shortcut_folders
                               (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>);</programlisting>
<para>Queries the list of shortcut folders in the file chooser, as set by
<link linkend="gtk-file-chooser-add-shortcut-folder"><function>gtk_file_chooser_add_shortcut_folder()</function></link>.</para>
<refsect3 id="gtk-file-chooser-list-shortcut-folders.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-list-shortcut-folders.returns" role="returns">
<title>Returns</title>
<para>A list
of folder filenames, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if there are no shortcut folders. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>element-type</acronym> Gio.File][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-add-choice" role="function">
<title>gtk_file_chooser_add_choice&#160;()</title>
<indexterm zone="gtk-file-chooser-add-choice"><primary>gtk_file_chooser_add_choice</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_add_choice (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                             <parameter>const <link linkend="char"><type>char</type></link> *id</parameter>,
                             <parameter>const <link linkend="char"><type>char</type></link> *label</parameter>,
                             <parameter>const <link linkend="char"><type>char</type></link> **options</parameter>,
                             <parameter>const <link linkend="char"><type>char</type></link> **option_labels</parameter>);</programlisting>
<para>Adds a 'choice' to the file chooser. This is typically implemented
as a combobox or, for boolean choices, as a checkbutton. You can select
a value using <link linkend="gtk-file-chooser-set-choice"><function>gtk_file_chooser_set_choice()</function></link> before the dialog is shown,
and you can obtain the user-selected value in the ::response signal handler
using <link linkend="gtk-file-chooser-get-choice"><function>gtk_file_chooser_get_choice()</function></link>.</para>
<refsect3 id="gtk-file-chooser-add-choice.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>id</para></entry>
<entry role="parameter_description"><para>id for the added choice</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>label</para></entry>
<entry role="parameter_description"><para>user-visible label for the added choice</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>options</para></entry>
<entry role="parameter_description"><para>ids for the options of the choice, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for a boolean choice. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>array</acronym> zero-terminated=1]</emphasis></entry></row>
<row><entry role="parameter_name"><para>option_labels</para></entry>
<entry role="parameter_description"><para>user-visible labels for the options, must be the same length as <parameter>options</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>array</acronym> zero-terminated=1]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-remove-choice" role="function">
<title>gtk_file_chooser_remove_choice&#160;()</title>
<indexterm zone="gtk-file-chooser-remove-choice"><primary>gtk_file_chooser_remove_choice</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_remove_choice (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                                <parameter>const <link linkend="char"><type>char</type></link> *id</parameter>);</programlisting>
<para>Removes a 'choice' that has been added with <link linkend="gtk-file-chooser-add-choice"><function>gtk_file_chooser_add_choice()</function></link>.</para>
<refsect3 id="gtk-file-chooser-remove-choice.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>id</para></entry>
<entry role="parameter_description"><para>the ID of the choice to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-set-choice" role="function">
<title>gtk_file_chooser_set_choice&#160;()</title>
<indexterm zone="gtk-file-chooser-set-choice"><primary>gtk_file_chooser_set_choice</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_file_chooser_set_choice (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                             <parameter>const <link linkend="char"><type>char</type></link> *id</parameter>,
                             <parameter>const <link linkend="char"><type>char</type></link> *option</parameter>);</programlisting>
<para>Selects an option in a 'choice' that has been added with
<link linkend="gtk-file-chooser-add-choice"><function>gtk_file_chooser_add_choice()</function></link>. For a boolean choice, the
possible options are "true" and "false".</para>
<refsect3 id="gtk-file-chooser-set-choice.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>id</para></entry>
<entry role="parameter_description"><para>the ID of the choice to set</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>option</para></entry>
<entry role="parameter_description"><para>the ID of the option to select</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-file-chooser-get-choice" role="function">
<title>gtk_file_chooser_get_choice&#160;()</title>
<indexterm zone="gtk-file-chooser-get-choice"><primary>gtk_file_chooser_get_choice</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_file_chooser_get_choice (<parameter><link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser</parameter>,
                             <parameter>const <link linkend="char"><type>char</type></link> *id</parameter>);</programlisting>
<para>Gets the currently selected option in the 'choice' with the given ID.</para>
<refsect3 id="gtk-file-chooser-get-choice.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>chooser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>id</para></entry>
<entry role="parameter_description"><para>the ID of the choice to get</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-file-chooser-get-choice.returns" role="returns">
<title>Returns</title>
<para> the ID of the currenly selected option</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkFileChooser.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkFileChooser-struct" role="struct">
<title>GtkFileChooser</title>
<indexterm zone="GtkFileChooser-struct"><primary>GtkFileChooser</primary></indexterm>
<programlisting language="C">typedef struct _GtkFileChooser GtkFileChooser;</programlisting>
</refsect2>
<refsect2 id="GtkFileChooserAction" role="enum">
<title>enum GtkFileChooserAction</title>
<indexterm zone="GtkFileChooserAction"><primary>GtkFileChooserAction</primary></indexterm>
<para>Describes whether a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> is being used to open existing files
or to save to a possibly new file.</para>
<refsect3 id="GtkFileChooserAction.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="GTK-FILE-CHOOSER-ACTION-OPEN:CAPS">GTK_FILE_CHOOSER_ACTION_OPEN</para></entry>
<entry role="enum_member_description"><para>Indicates open mode.  The file chooser
will only let the user pick an existing file.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-FILE-CHOOSER-ACTION-SAVE:CAPS">GTK_FILE_CHOOSER_ACTION_SAVE</para></entry>
<entry role="enum_member_description"><para>Indicates save mode.  The file chooser
will let the user pick an existing file, or type in a new
filename.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-FILE-CHOOSER-ACTION-SELECT-FOLDER:CAPS">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</para></entry>
<entry role="enum_member_description"><para>Indicates an Open mode for
selecting folders.  The file chooser will let the user pick an
existing folder.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GTK-FILE-CHOOSER-ERROR:CAPS" role="macro">
<title>GTK_FILE_CHOOSER_ERROR</title>
<indexterm zone="GTK-FILE-CHOOSER-ERROR:CAPS"><primary>GTK_FILE_CHOOSER_ERROR</primary></indexterm>
<programlisting language="C">#define GTK_FILE_CHOOSER_ERROR (gtk_file_chooser_error_quark ())
</programlisting>
<para>Used to get the <link linkend="GError"><type>GError</type></link> quark for <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> errors.</para>
</refsect2>
<refsect2 id="GtkFileChooserError" role="enum">
<title>enum GtkFileChooserError</title>
<indexterm zone="GtkFileChooserError"><primary>GtkFileChooserError</primary></indexterm>
<para>These identify the various errors that can occur while calling
<link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> functions.</para>
<refsect3 id="GtkFileChooserError.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="GTK-FILE-CHOOSER-ERROR-NONEXISTENT:CAPS">GTK_FILE_CHOOSER_ERROR_NONEXISTENT</para></entry>
<entry role="enum_member_description"><para>Indicates that a file does not exist.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-FILE-CHOOSER-ERROR-BAD-FILENAME:CAPS">GTK_FILE_CHOOSER_ERROR_BAD_FILENAME</para></entry>
<entry role="enum_member_description"><para>Indicates a malformed filename.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-FILE-CHOOSER-ERROR-ALREADY-EXISTS:CAPS">GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS</para></entry>
<entry role="enum_member_description"><para>Indicates a duplicate path (e.g. when
adding a bookmark).</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-FILE-CHOOSER-ERROR-INCOMPLETE-HOSTNAME:CAPS">GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME</para></entry>
<entry role="enum_member_description"><para>Indicates an incomplete hostname (e.g. "http://foo" without a slash after that).</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkFileChooser.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkFileChooser--action" role="property"><title>The <literal>“action”</literal> property</title>
<indexterm zone="GtkFileChooser--action"><primary>GtkFileChooser:action</primary></indexterm>
<programlisting>  “action”                   <link linkend="GtkFileChooserAction"><type>GtkFileChooserAction</type></link></programlisting>
<para>The type of operation that the file selector is performing.</para><para>Owner: GtkFileChooser</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_FILE_CHOOSER_ACTION_OPEN</para>
</refsect2>
<refsect2 id="GtkFileChooser--create-folders" role="property"><title>The <literal>“create-folders”</literal> property</title>
<indexterm zone="GtkFileChooser--create-folders"><primary>GtkFileChooser:create-folders</primary></indexterm>
<programlisting>  “create-folders”           <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether a file chooser not in <link linkend="GTK-FILE-CHOOSER-ACTION-OPEN:CAPS"><literal>GTK_FILE_CHOOSER_ACTION_OPEN</literal></link> mode
will offer the user to create new folders.</para>
<para>Owner: GtkFileChooser</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkFileChooser--filter" role="property"><title>The <literal>“filter”</literal> property</title>
<indexterm zone="GtkFileChooser--filter"><primary>GtkFileChooser:filter</primary></indexterm>
<programlisting>  “filter”                   <link linkend="GtkFileFilter"><type>GtkFileFilter</type></link>&#160;*</programlisting>
<para>The current filter for selecting which files are displayed.</para><para>Owner: GtkFileChooser</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkFileChooser--select-multiple" role="property"><title>The <literal>“select-multiple”</literal> property</title>
<indexterm zone="GtkFileChooser--select-multiple"><primary>GtkFileChooser:select-multiple</primary></indexterm>
<programlisting>  “select-multiple”          <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether to allow multiple files to be selected.</para><para>Owner: GtkFileChooser</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkFileChooser.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkFileChooser-current-folder-changed" role="signal"><title>The <literal>“current-folder-changed”</literal> signal</title>
<indexterm zone="GtkFileChooser-current-folder-changed"><primary>GtkFileChooser::current-folder-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser,
               <link linkend="gpointer"><type>gpointer</type></link>        user_data)</programlisting>
<para>This signal is emitted when the current folder in a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link>
changes.  This can happen due to the user performing some action that
changes folders, such as selecting a bookmark or visiting a folder on the
file list.  It can also happen as a result of calling a function to
explicitly change the current folder in a file chooser.</para>
<para>Normally you do not need to connect to this signal, unless you need to keep
track of which folder a file chooser is showing.</para>
<para>See also:  <link linkend="gtk-file-chooser-set-current-folder"><function>gtk_file_chooser_set_current_folder()</function></link>,
<link linkend="gtk-file-chooser-get-current-folder"><function>gtk_file_chooser_get_current_folder()</function></link>,</para>
<refsect3 id="GtkFileChooser-current-folder-changed.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>chooser</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkFileChooser-file-activated" role="signal"><title>The <literal>“file-activated”</literal> signal</title>
<indexterm zone="GtkFileChooser-file-activated"><primary>GtkFileChooser::file-activated</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser,
               <link linkend="gpointer"><type>gpointer</type></link>        user_data)</programlisting>
<para>This signal is emitted when the user "activates" a file in the file
chooser.  This can happen by double-clicking on a file in the file list, or
by pressing <literal>Enter</literal>.</para>
<para>Normally you do not need to connect to this signal.  It is used internally
by <link linkend="GtkFileChooserDialog"><type>GtkFileChooserDialog</type></link> to know when to activate the default button in the
dialog.</para>
<para>See also: <link linkend="gtk-file-chooser-get-file"><function>gtk_file_chooser_get_file()</function></link>, <link linkend="gtk-file-chooser-get-files"><function>gtk_file_chooser_get_files()</function></link></para>
<refsect3 id="GtkFileChooser-file-activated.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>chooser</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkFileChooser-selection-changed" role="signal"><title>The <literal>“selection-changed”</literal> signal</title>
<indexterm zone="GtkFileChooser-selection-changed"><primary>GtkFileChooser::selection-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkFileChooser"><type>GtkFileChooser</type></link> *chooser,
               <link linkend="gpointer"><type>gpointer</type></link>        user_data)</programlisting>
<para>This signal is emitted when there is a change in the set of selected files
in a <link linkend="GtkFileChooser"><type>GtkFileChooser</type></link>.  This can happen when the user modifies the selection
with the mouse or the keyboard, or when explicitly calling functions to
change the selection.</para>
<para>Normally you do not need to connect to this signal, as it is easier to wait
for the file chooser to finish running, and then to get the list of
selected files using the functions mentioned below.</para>
<refsect3 id="GtkFileChooser-selection-changed.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>chooser</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkFileChooser.see-also">
<title>See Also</title>
<para><link linkend="GtkFileChooserDialog"><type>GtkFileChooserDialog</type></link>, <link linkend="GtkFileChooserWidget"><type>GtkFileChooserWidget</type></link>, <link linkend="GtkFileChooserButton"><type>GtkFileChooserButton</type></link></para>

</refsect1>

</refentry>
