### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/FileChooser.rakumod
### ----------------------------------------------------
### -- Chunk 4 of 4
_chooser_] get_current_folder_file

Gets the current folder of I<chooser> as I<GFile>.
See C<gtk_file_chooser_get_current_folder_uri()>.

Returns: (transfer full): the I<GFile> for the current folder.

Since: 2.14

  method gtk_file_chooser_get_current_folder_file ( --> N-GObject  )


=end pod

sub gtk_file_chooser_get_current_folder_file ( N-GObject $chooser )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_preview_widget:
=begin pod
=head2 [[gtk_] file_chooser_] set_preview_widget

Sets an application-supplied widget to use to display a custom preview
of the currently selected file. To implement a preview, after setting the
preview widget, you connect to the prop I<update-preview>
signal, and call C<gtk_file_chooser_get_preview_filename()> or
C<gtk_file_chooser_get_preview_uri()> on each change. If you can
display a preview of the new file, update your widget and
set the preview active using C<gtk_file_chooser_set_preview_widget_active()>.
Otherwise, set the preview inactive.

When there is no application-supplied preview widget, or the
application-supplied preview widget is not active, the file chooser
will display no preview at all.

Since: 2.4

  method gtk_file_chooser_set_preview_widget ( N-GObject $preview_widget )

=item N-GObject $preview_widget; widget for displaying preview.

=end pod

sub gtk_file_chooser_set_preview_widget ( N-GObject $chooser, N-GObject $preview_widget )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_preview_widget:
=begin pod
=head2 [[gtk_] file_chooser_] get_preview_widget

Gets the current preview widget; see
C<gtk_file_chooser_set_preview_widget()>.

Returns: (nullable) (transfer none): the current preview widget, or C<Any>

Since: 2.4

  method gtk_file_chooser_get_preview_widget ( --> N-GObject  )


=end pod

sub gtk_file_chooser_get_preview_widget ( N-GObject $chooser )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_preview_widget_active:
=begin pod
=head2 [[gtk_] file_chooser_] set_preview_widget_active

Sets whether the preview widget set by
C<gtk_file_chooser_set_preview_widget()> should be shown for the
current filename. When I<active> is set to false, the file chooser
may display an internally generated preview of the current file
or it may display no preview at all. See
C<gtk_file_chooser_set_preview_widget()> for more details.

Since: 2.4

  method gtk_file_chooser_set_preview_widget_active ( Int $active )

=item Int $active; whether to display the user-specified preview widget

=end pod

sub gtk_file_chooser_set_preview_widget_active ( N-GObject $chooser, int32 $active )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_preview_widget_active:
=begin pod
=head2 [[gtk_] file_chooser_] get_preview_widget_active

Gets whether the preview widget set by C<gtk_file_chooser_set_preview_widget()>
should be shown for the current filename. See
C<gtk_file_chooser_set_preview_widget_active()>.

Returns: C<1> if the preview widget is active for the current filename.

Since: 2.4

  method gtk_file_chooser_get_preview_widget_active ( --> Int  )


=end pod

sub gtk_file_chooser_get_preview_widget_active ( N-GObject $chooser )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_use_preview_label:
=begin pod
=head2 [[gtk_] file_chooser_] set_use_preview_label

Sets whether the file chooser should display a stock label with the name of
the file that is being previewed; the default is C<1>.  Applications that
want to draw the whole preview area themselves should set this to C<0> and
display the name themselves in their preview widget.

See also: C<gtk_file_chooser_set_preview_widget()>

Since: 2.4

  method gtk_file_chooser_set_use_preview_label ( Int $use_label )

=item Int $use_label; whether to display a stock label with the name of the previewed file

=end pod

sub gtk_file_chooser_set_use_preview_label ( N-GObject $chooser, int32 $use_label )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_use_preview_label:
=begin pod
=head2 [[gtk_] file_chooser_] get_use_preview_label

Gets whether a stock label should be drawn with the name of the previewed
file.  See C<gtk_file_chooser_set_use_preview_label()>.

Returns: C<1> if the file chooser is set to display a label with the
name of the previewed file, C<0> otherwise.

  method gtk_file_chooser_get_use_preview_label ( --> Int  )


=end pod

sub gtk_file_chooser_get_use_preview_label ( N-GObject $chooser )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_preview_filename:
=begin pod
=head2 [[gtk_] file_chooser_] get_preview_filename

Gets the filename that should be previewed in a custom preview
widget. See C<gtk_file_chooser_set_preview_widget()>.

Returns: (nullable) (type filename): the filename to preview, or C<Any> if
no file is selected, or if the selected file cannot be represented
as a local filename. Free with C<g_free()>

Since: 2.4

  method gtk_file_chooser_get_preview_filename ( --> Str  )


=end pod

sub gtk_file_chooser_get_preview_filename ( N-GObject $chooser )
  returns Str
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_preview_uri:
=begin pod
=head2 [[gtk_] file_chooser_] get_preview_uri

Gets the URI that should be previewed in a custom preview
widget. See C<gtk_file_chooser_set_preview_widget()>.

Returns: (nullable) (transfer full): the URI for the file to preview,
or C<Any> if no file is selected. Free with C<g_free()>.

Since: 2.4

  method gtk_file_chooser_get_preview_uri ( --> Str  )


=end pod

sub gtk_file_chooser_get_preview_uri ( N-GObject $chooser )
  returns Str
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_preview_file:
=begin pod
=head2 [[gtk_] file_chooser_] get_preview_file

Gets the I<GFile> that should be previewed in a custom preview
Internal function, see C<gtk_file_chooser_get_preview_uri()>.

Returns: (nullable) (transfer full): the I<GFile> for the file to preview,
or C<Any> if no file is selected. Free with C<g_object_unref()>.

Since: 2.14

  method gtk_file_chooser_get_preview_file ( --> N-GObject  )


=end pod

sub gtk_file_chooser_get_preview_file ( N-GObject $chooser )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_extra_widget:
=begin pod
=head2 [[gtk_] file_chooser_] set_extra_widget

Sets an application-supplied widget to provide extra options to the user.

Since: 2.4

  method gtk_file_chooser_set_extra_widget ( N-GObject $extra_widget )

=item N-GObject $extra_widget; widget for extra options

=end pod

sub gtk_file_chooser_set_extra_widget ( N-GObject $chooser, N-GObject $extra_widget )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_extra_widget:
=begin pod
=head2 [[gtk_] file_chooser_] get_extra_widget

Gets the current preview widget; see
C<gtk_file_chooser_set_extra_widget()>.

Returns: (nullable) (transfer none): the current extra widget, or C<Any>

Since: 2.4

  method gtk_file_chooser_get_extra_widget ( --> N-GObject  )


=end pod

sub gtk_file_chooser_get_extra_widget ( N-GObject $chooser )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_add_filter:
=begin pod
=head2 [[gtk_] file_chooser_] add_filter

Adds I<filter> 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.

Note that the I<chooser> takes ownership of the filter, so you have to
ref and sink it if you want to keep a reference.

Since: 2.4

  method gtk_file_chooser_add_filter ( N-GObject $filter )

=item N-GObject $filter; (transfer full): a I<Gnome::Gtk3::FileFilter>

=end pod

sub gtk_file_chooser_add_filter ( N-GObject $chooser, N-GObject $filter )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_remove_filter:
=begin pod
=head2 [[gtk_] file_chooser_] remove_filter

Removes I<filter> from the list of filters that the user can select between.

Since: 2.4

  method gtk_file_chooser_remove_filter ( N-GObject $filter )

=item N-GObject $filter; a I<Gnome::Gtk3::FileFilter>

=end pod

sub gtk_file_chooser_remove_filter ( N-GObject $chooser, N-GObject $filter )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_list_filters:
=begin pod
=head2 [[gtk_] file_chooser_] list_filters

Lists the current set of user-selectable filters; see
C<gtk_file_chooser_add_filter()>, C<gtk_file_chooser_remove_filter()>.

Returns: (element-type B<Gnome::Gtk3::FileFilter>) (transfer container): a
I<GSList> 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 C<g_slist_free()> when you are done with it.

Since: 2.4

  method gtk_file_chooser_list_filters ( --> N-GSList  )


=end pod

sub gtk_file_chooser_list_filters ( N-GObject $chooser )
  returns N-GSList
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_filter:
=begin pod
=head2 [[gtk_] file_chooser_] set_filter

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.

Since: 2.4

  method gtk_file_chooser_set_filter ( N-GObject $filter )

=item N-GObject $filter; a I<Gnome::Gtk3::FileFilter>

=end pod

sub gtk_file_chooser_set_filter ( N-GObject $chooser, N-GObject $filter )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_filter:
=begin pod
=head2 [[gtk_] file_chooser_] get_filter

Gets the current filter; see C<gtk_file_chooser_set_filter()>.

Returns: (nullable) (transfer none): the current filter, or C<Any>

Since: 2.4

  method gtk_file_chooser_get_filter ( --> N-GObject  )


=end pod

sub gtk_file_chooser_get_filter ( N-GObject $chooser )
  returns N-GObject
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_add_shortcut_folder:
=begin pod
=head2 [[gtk_] file_chooser_] add_shortcut_folder

Adds a folder to be displayed with the shortcut folders in a file chooser.
Internal function, see C<gtk_file_chooser_add_shortcut_folder()>.

Returns: C<1> if the folder could be added successfully, C<0>
otherwise.

Since: 2.4

  method gtk_file_chooser_add_shortcut_folder ( Str $folder, N-GError $error --> Int  )

=item Str $folder; file for the folder to add
=item N-GError $error; (allow-none): location to store error, or C<Any>

=end pod

sub gtk_file_chooser_add_shortcut_folder ( N-GObject $chooser, Str $folder, N-GError $error )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_remove_shortcut_folder:
=begin pod
=head2 [[gtk_] file_chooser_] remove_shortcut_folder

Removes a folder from the shortcut folders in a file chooser.  Internal
function, see C<gtk_file_chooser_remove_shortcut_folder()>.

Returns: C<1> if the folder could be removed successfully, C<0>
otherwise.

Since: 2.4

  method gtk_file_chooser_remove_shortcut_folder ( Str $folder, N-GError $error --> Int  )

=item Str $folder; file for the folder to remove
=item N-GError $error; (allow-none): location to store error, or C<Any>

=end pod

sub gtk_file_chooser_remove_shortcut_folder ( N-GObject $chooser, Str $folder, N-GError $error )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_list_shortcut_folders:
=begin pod
=head2 [[gtk_] file_chooser_] list_shortcut_folders

Queries the list of shortcut folders in the file chooser, as set by
C<gtk_file_chooser_add_shortcut_folder()>.

Returns: (nullable) (element-type filename) (transfer full): A list
of folder filenames, or C<Any> if there are no shortcut folders.
Free the returned list with C<g_slist_free()>, and the filenames with
C<g_free()>.

Since: 2.4

  method gtk_file_chooser_list_shortcut_folders ( --> N-GSList  )


=end pod

sub gtk_file_chooser_list_shortcut_folders ( N-GObject $chooser )
  returns N-GSList
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_add_shortcut_folder_uri:
=begin pod
=head2 [[gtk_] file_chooser_] add_shortcut_folder_uri

Adds a folder URI to be displayed with the shortcut folders in a file
chooser.  Note that shortcut folders do not get saved, as they are provided
by the application.  For example, you can use this to add a
“file:///usr/share/mydrawprogram/Clipart” folder to the volume list.

Returns: C<1> if the folder could be added successfully, C<0>
otherwise.  In the latter case, the I<error> will be set as appropriate.

Since: 2.4

  method gtk_file_chooser_add_shortcut_folder_uri ( Str $uri, N-GError $error --> Int  )

=item Str $uri; URI of the folder to add
=item N-GError $error; (allow-none): location to store error, or C<Any>

=end pod

sub gtk_file_chooser_add_shortcut_folder_uri ( N-GObject $chooser, Str $uri, N-GError $error )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_remove_shortcut_folder_uri:
=begin pod
=head2 [[gtk_] file_chooser_] remove_shortcut_folder_uri

Removes a folder URI from a file chooser’s list of shortcut folders.

Returns: C<1> if the operation succeeds, C<0> otherwise.
In the latter case, the I<error> will be set as appropriate.

See also: C<gtk_file_chooser_add_shortcut_folder_uri()>

Since: 2.4

  method gtk_file_chooser_remove_shortcut_folder_uri ( Str $uri, N-GError $error --> Int  )

=item Str $uri; URI of the folder to remove
=item N-GError $error; (allow-none): location to store error, or C<Any>

=end pod

sub gtk_file_chooser_remove_shortcut_folder_uri ( N-GObject $chooser, Str $uri, N-GError $error )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_list_shortcut_folder_uris:
=begin pod
=head2 [[gtk_] file_chooser_] list_shortcut_folder_uris

Queries the list of shortcut folders in the file chooser, as set by
C<gtk_file_chooser_add_shortcut_folder_uri()>.

Returns: (nullable) (element-type utf8) (transfer full): A list of
folder URIs, or C<Any> if there are no shortcut folders.  Free the
returned list with C<g_slist_free()>, and the URIs with C<g_free()>.

Since: 2.4

  method gtk_file_chooser_list_shortcut_folder_uris ( --> N-GSList  )


=end pod

sub gtk_file_chooser_list_shortcut_folder_uris ( N-GObject $chooser )
  returns N-GSList
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_add_choice:
=begin pod
=head2 [[gtk_] file_chooser_] add_choice

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 C<gtk_file_chooser_set_choice()> before the dialog is shown,
and you can obtain the user-selected value in the prop I<response> signal handler
using C<gtk_file_chooser_get_choice()>.

Compare C<gtk_file_chooser_set_extra_widget()>.

Since: 3.22

  method gtk_file_chooser_add_choice ( Str $id, Str $label, CArray[Str] $options, CArray[Str] $option_labels )

=item Str $id; id for the added choice
=item Str $label; user-visible label for the added choice
=item CArray[Str] $options; ids for the options of the choice, or C<Any> for a boolean choice
=item CArray[Str] $option_labels; user-visible labels for the options, must be the same length as I<options>

=end pod

sub gtk_file_chooser_add_choice ( N-GObject $chooser, Str $id, Str $label, CArray[Str] $options, CArray[Str] $option_labels )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_remove_choice:
=begin pod
=head2 [[gtk_] file_chooser_] remove_choice

Removes a 'choice' that has been added with C<gtk_file_chooser_add_choice()>.

Since: 3.22

  method gtk_file_chooser_remove_choice ( Str $id )

=item Str $id; the ID of the choice to remove

=end pod

sub gtk_file_chooser_remove_choice ( N-GObject $chooser, Str $id )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_choice:
=begin pod
=head2 [[gtk_] file_chooser_] set_choice

Selects an option in a 'choice' that has been added with
C<gtk_file_chooser_add_choice()>. For a boolean choice, the
possible options are "true" and "false".

Since: 3.22

  method gtk_file_chooser_set_choice ( Str $id, Str $option )

=item Str $id; the ID of the choice to set
=item Str $option; the ID of the option to select

=end pod

sub gtk_file_chooser_set_choice ( N-GObject $chooser, Str $id, Str $option )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_choice:
=begin pod
=head2 [[gtk_] file_chooser_] get_choice

Gets the currently selected option in the 'choice' with the given ID.

Returns: the ID of the currenly selected option
Since: 3.22

  method gtk_file_chooser_get_choice ( Str $id --> Str  )

=item Str $id; the ID of the choice to get

=end pod

sub gtk_file_chooser_get_choice ( N-GObject $chooser, Str $id )
  returns Str
  is native(&gtk-lib)
  { * }
#-------------------------------------------------------------------------------
=begin pod
=head1 Signals

Register any signal as follows. See also B<Gnome::GObject::Object>.

  my Bool $is-registered = $my-widget.register-signal (
    $handler-object, $handler-name, $signal-name,
    :$user-option1, ..., :$user-optionN
  )

=head2 Supported signals

=comment #TS:0:current-folder-changed:
=head3 current-folder-changed

This signal is emitted when the current folder in a I<Gnome::Gtk3::FileChooser> 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.

Normally you do not need to connect to this signal, unless you need to keep track of which folder a file chooser is showing.

See also:  C<gtk_file_chooser_set_current_folder()>,
C<gtk_file_chooser_get_current_folder()>,
C<gtk_file_chooser_set_current_folder_uri()>,
C<gtk_file_chooser_get_current_folder_uri()>.

  method handler (
    Int :$_handler_id,
    Gnome::GObject::Object :_widget($chooser),
    :$user-option1, ..., :$user-optionN
  );

=item $chooser; the object which received the signal.


=comment #TS:0:selection-changed:
=head3 selection-changed

This signal is emitted when there is a change in the set of selected files in a I<Gnome::Gtk3::FileChooser>. This can happen when the user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection.

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.

See also: C<gtk_file_chooser_select_filename()>,
C<gtk_file_chooser_unselect_filename()>, C<gtk_file_chooser_get_filename()>,
C<gtk_file_chooser_get_filenames()>, C<gtk_file_chooser_select_uri()>,
C<gtk_file_chooser_unselect_uri()>, C<gtk_file_chooser_get_uri()>,
C<gtk_file_chooser_get_uris()>.

  method handler (
    Int :$_handler_id,
    Gnome::GObject::Object :_widget($chooser),
    :$user-option1, ..., :$user-optionN
  );

=item $chooser; the object which received the signal.


=comment #TS:0:update-preview:
=head3 update-preview

This signal is emitted when the preview in a file chooser should be regenerated. For example, this can happen when the currently selected file changes. You should use this signal if you want your file chooser to have a preview widget.

Once you have installed a preview widget with C<gtk_file_chooser_set_preview_widget()>, you should update it when this signal is emitted.  You can use the functions C<gtk_file_chooser_get_preview_filename()> or C<gtk_file_chooser_get_preview_uri()> to get the name of the file to preview. Your widget may not be able to preview all kinds of files; your callback must call C<gtk_file_chooser_set_preview_widget_active()> to inform the file chooser about whether the preview was generated successfully or not.

=comment Please see the example code in [Using a Preview Widget][gtkfilechooser-preview].

See also: C<gtk_file_chooser_set_preview_widget()>,
C<gtk_file_chooser_set_preview_widget_active()>,
C<gtk_file_chooser_set_use_preview_label()>,
C<gtk_file_chooser_get_preview_filename()>,
C<gtk_file_chooser_get_preview_uri()>.

  method handler (
    Int :$_handler_id,
    Gnome::GObject::Object :_widget($chooser),
    :$user-option1, ..., :$user-optionN
  );

=item $chooser; the object which received the signal.


=comment #TS:0:file-activated:
=head3 file-activated

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 I<Enter>.

Normally you do not need to connect to this signal. It is used internally by I<Gnome::Gtk3::FileChooserDialog> to know when to activate the default button in the dialog.

See also: C<gtk_file_chooser_get_filename()>,
C<gtk_file_chooser_get_filenames()>, C<gtk_file_chooser_get_uri()>,
C<gtk_file_chooser_get_uris()>.

  method handler (
    Int :$_handler_id,
    Gnome::GObject::Object :_widget($chooser),
    :$user-option1, ..., :$user-optionN
  );

=item $chooser; the object which received the signal.


=comment #TS:0:confirm-overwrite:
=head3 confirm-overwrite

This signal gets emitted whenever it is appropriate to present a confirmation dialog when the user has selected a file name that already exists. The signal only gets emitted when the file chooser is in C<GTK_FILE_CHOOSER_ACTION_SAVE> mode.

Most applications just need to turn on the I<do-overwrite-confirmation> property (or call the C<gtk_file_chooser_set_do_overwrite_confirmation()> function), and they will automatically get a stock confirmation dialog. Applications which need to customize this behavior should do that, and also connect to the prop I<confirm-overwrite> signal.

A signal handler for this signal must return a B<GtkFileChooserConfirmation> value, which indicates the action to take. If the handler determines that the user wants to select a different filename, it should return C<GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN>. If it determines that the user is satisfied with his choice of file name, it should return C<GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME>. On the other hand, if it determines that the stock confirmation dialog should be used, it should return C<GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM>.

=begin comment
=head4 Custom confirmation
The following example illustrates this.

  static B<Gnome::Gtk3::FileChooserConfirmation>
  confirm_overwrite_callback (B<Gnome::Gtk3::FileChooser> *chooser, gpointer data)
  {
  char *uri;

  uri = gtk_file_chooser_get_uri (chooser);

  if (is_uri_read_only (uri))
  {
  if (user_wants_to_replace_read_only_file (uri))
  return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME;
  else
  return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN;
  } else
  return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM; // fall back to the default dialog
  }

  ...

  chooser = gtk_file_chooser_dialog_new (...);

  gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
  g_signal_connect (chooser, "confirm-overwrite",
  G_CALLBACK (confirm_overwrite_callback), NULL);

  if (gtk_dialog_run (chooser) == GTK_RESPONSE_ACCEPT)
  save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));

  gtk_widget_destroy (chooser);
=end comment

Returns: a B<GtkFileChooserConfirmation> value that indicates which action to take after emitting the signal.

Since: 2.8

  method handler (
    Int :$_handler_id,
    Gnome::GObject::Object :_widget($chooser),
    :$user-option1, ..., :$user-optionN
    --> GtkFileChooserConfirmation
  );

=item $chooser; the object which received the signal.


=end pod

=begin comment
=head2 Unsupported signals
=head2 Not yet supported signals
=end comment

#-------------------------------------------------------------------------------
=begin pod
=head1 Properties

An example of using a string type property of a B<Gnome::Gtk3::Label> object. This is just showing how to set/read a property, not that it is the best way to do it. This is because a) The class initialization often provides some options to set some of the properties and b) the classes provide many methods to modify just those properties. In the case below one can use B<new(:label('my text label'))> or B<gtk_label_set_text('my text label')>.

  my Gnome::Gtk3::Label $label .= new;
  my Gnome::GObject::Value $gv .= new(:init(G_TYPE_STRING));
  $label.g-object-get-property( 'label', $gv);
  $gv.g-value-set-string('my text label');

=head2 Supported properties

=comment #TP:0:action:
=head3 Action

The B<Gnome::GObject::Value> type of property I<action> is C<G_TYPE_ENUM>.

The type of operation that the file selector is performing

Default value: False
Flags: GTK_PARAM_READWRITE

=comment #TP:0:filter:
=head3 Filter

The B<Gnome::GObject::Value> type of property I<filter> is C<G_TYPE_OBJECT>.

The current filter for selecting which files are displayed

Widget type: GTK_TYPE_FILE_FILTER
Flags: GTK_PARAM_READWRITE

=comment #TP:0:local-only:
=head3 Local Only

The B<Gnome::GObject::Value> type of property I<local-only> is C<G_TYPE_BOOLEAN>.

Whether the selected file(s should be limited to local file: URLs)

Default value: True

=comment #TP:0:preview-widget-active:
=head3 Preview Widget Active

The B<Gnome::GObject::Value> type of property I<preview-widget-active> is C<G_TYPE_BOOLEAN>.

Whether the application supplied widget for custom previews should be shown.

Default value: True

=comment #TP:0:use-preview-label:
=head3 Use Preview Label

The B<Gnome::GObject::Value> type of property I<use-preview-label> is C<G_TYPE_BOOLEAN>.

Whether to display a stock label with the name of the previewed file.

Default value: True

=comment #TP:0:select-multiple:
=head3 Select Multiple

The B<Gnome::GObject::Value> type of property I<select-multiple> is C<G_TYPE_BOOLEAN>.

Whether to allow multiple files to be selected

Default value: False

=comment #TP:0:show-hidden:
=head3 Show Hidden

The B<Gnome::GObject::Value> type of property I<show-hidden> is C<G_TYPE_BOOLEAN>.

Whether the hidden files and folders should be displayed

Default value: False

=comment #TP:0:do-overwrite-confirmation:
=head3 Do overwrite confirmation

The B<Gnome::GObject::Value> type of property I<do-overwrite-confirmation> is C<G_TYPE_BOOLEAN>.

Whether a file chooser in C<GTK_FILE_CHOOSER_ACTION_SAVE> mode will present an overwrite confirmation dialog if the user selects a file name that already exists.

Since: 2.8

Default value: False

=comment #TP:0:create-folders:
=head3 Allow folder creation

The B<Gnome::GObject::Value> type of property I<create-folders> is C<G_TYPE_BOOLEAN>.

Whether a file chooser not in C<GTK_FILE_CHOOSER_ACTION_OPEN> mode will offer the user to create new folders.

Since: 2.18

Default value: True



=begin comment
=head2 Unsupported properties
=end comment




=head2 Not yet supported properties

=comment #TP:0:preview-widget:
=head3 Preview widget

The B<Gnome::GObject::Value> type of property I<preview-widget> is C<G_TYPE_OBJECT>.

Application supplied widget for custom previews.

Widget type: GTK_TYPE_WIDGET
Flags: GTK_PARAM_READWRITE

=comment #TP:0:extra-widget:
=head3 Extra widget

The B<Gnome::GObject::Value> type of property I<extra-widget> is C<G_TYPE_OBJECT>.

Application supplied widget for extra options.

Widget type: GTK_TYPE_WIDGET
Flags: GTK_PARAM_READWRITE

=end pod


