### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/FileChooser.rakumod
### ----------------------------------------------------
### -- Chunk 3 of 4
C<set_preview_widget_active()>,
C<set_use_preview_label()>,
C<get_preview_filename()>,
C<get_preview_uri()>.

  method handler (
    Int :$_handler-id,
    N-GObject :$_native-object,
    *%user-options
  )

=item $_handler-id; The handler id which is returned from the registration
=item $_native-object; The native object provided by the caller wrapped in the Raku object which registered the signal.
=item %user-options; A list of named arguments provided at the C<register-signal()> method

=end pod

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

=comment -----------------------------------------------------------------------
=comment #TP:0:action:
=head2 action

The type of operation that the file selector is performing

=item B<Gnome::GObject::Value> type of this property is G_TYPE_ENUM
=item The type of this G_TYPE_ENUM object is GTK_TYPE_FILE_CHOOSER_ACTION
=item Parameter is readable and writable.
=item Default value is GTK_FILE_CHOOSER_ACTION_OPEN.


=comment -----------------------------------------------------------------------
=comment #TP:0:create-folders:
=head2 create-folders

Whether a file chooser not in open mode will offer the user to create new folders.

=item B<Gnome::GObject::Value> type of this property is G_TYPE_BOOLEAN
=item Parameter is readable and writable.
=item Default value is TRUE.


=comment -----------------------------------------------------------------------
=comment #TP:0:do-overwrite-confirmation:
=head2 do-overwrite-confirmation

Whether a file chooser in save mode will present an overwrite confirmation dialog if necessary.

=item B<Gnome::GObject::Value> type of this property is G_TYPE_BOOLEAN
=item Parameter is readable and writable.
=item Default value is FALSE.


=comment -----------------------------------------------------------------------
=comment #TP:0:extra-widget:
=head2 extra-widget

Application supplied widget for extra options.

=item B<Gnome::GObject::Value> type of this property is G_TYPE_OBJECT
=item The type of this G_TYPE_OBJECT object is GTK_TYPE_WIDGET
=item Parameter is readable and writable.


=comment -----------------------------------------------------------------------
=comment #TP:0:filter:
=head2 filter

The current filter for selecting which files are displayed

=item B<Gnome::GObject::Value> type of this property is G_TYPE_OBJECT
=item The type of this G_TYPE_OBJECT object is GTK_TYPE_FILE_FILTER
=item Parameter is readable and writable.


=comment -----------------------------------------------------------------------
=comment #TP:0:local-only:
=head2 local-only

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

=item B<Gnome::GObject::Value> type of this property is G_TYPE_BOOLEAN
=item Parameter is readable and writable.
=item Default value is TRUE.


=comment -----------------------------------------------------------------------
=comment #TP:0:preview-widget:
=head2 preview-widget

Application supplied widget for custom previews.

=item B<Gnome::GObject::Value> type of this property is G_TYPE_OBJECT
=item The type of this G_TYPE_OBJECT object is GTK_TYPE_WIDGET
=item Parameter is readable and writable.


=comment -----------------------------------------------------------------------
=comment #TP:0:preview-widget-active:
=head2 preview-widget-active

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

=item B<Gnome::GObject::Value> type of this property is G_TYPE_BOOLEAN
=item Parameter is readable and writable.
=item Default value is TRUE.


=comment -----------------------------------------------------------------------
=comment #TP:0:select-multiple:
=head2 select-multiple

Whether to allow multiple files to be selected

=item B<Gnome::GObject::Value> type of this property is G_TYPE_BOOLEAN
=item Parameter is readable and writable.
=item Default value is FALSE.


=comment -----------------------------------------------------------------------
=comment #TP:0:show-hidden:
=head2 show-hidden

Whether the hidden files and folders should be displayed

=item B<Gnome::GObject::Value> type of this property is G_TYPE_BOOLEAN
=item Parameter is readable and writable.
=item Default value is FALSE.


=comment -----------------------------------------------------------------------
=comment #TP:0:use-preview-label:
=head2 use-preview-label

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

=item B<Gnome::GObject::Value> type of this property is G_TYPE_BOOLEAN
=item Parameter is readable and writable.
=item Default value is TRUE.

=end pod




























=finish
#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_error_quark:
=begin pod
=head2 [[gtk_] file_chooser_] error_quark

Returns: The error quark used for I<Gnome::Gtk3::FileChooser> errors.

Since: 2.4

  method gtk_file_chooser_error_quark ( --> int32  )

=end pod

sub gtk_file_chooser_error_quark (  )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:2:gtk_file_chooser_set_action:t/FileChooserDialog.t
=begin pod
=head2 [[gtk_] file_chooser_] set_action

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 C<GTK_FILE_CHOOSER_ACTION_SAVE> but not if the action is C<GTK_FILE_CHOOSER_ACTION_OPEN>.

Since: 2.4

  method gtk_file_chooser_set_action ( GtkFileChooserAction $action )

=item GtkFileChooserAction $action; the action that the file selector is performing

=end pod

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

#-------------------------------------------------------------------------------
#TM:2:gtk_file_chooser_get_action:t/FileChooserDialog.t
=begin pod
=head2 [[gtk_] file_chooser_] get_action

Gets the type of operation that the file chooser is performing; see C<gtk_file_chooser_set_action()>.

Returns: the action that the file selector is performing

Since: 2.4

  method gtk_file_chooser_get_action ( --> GtkFileChooserAction )

=end pod

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

#-------------------------------------------------------------------------------
#TM:2:gtk_file_chooser_set_local_only:t/FileChooserDialog.t
=begin pod
=head2 [[gtk_] file_chooser_] set_local_only

Sets whether only local files can be selected in the file selector. If I<$local_only> is C<1> (the default), then the selected file or files are guaranteed to be accessible through the operating systems native file system and therefore the application only needs to worry about the filename functions in I<Gnome::Gtk3::FileChooser>, like C<gtk_file_chooser_get_filename()>, rather than the URI functions like C<gtk_file_chooser_get_uri()>,

On some systems non-native files may still be available using the native filesystem via a userspace filesystem (FUSE).

Since: 2.4

  method gtk_file_chooser_set_local_only ( Int $local_only )

=item Int $local_only; C<1> if only local files can be selected

=end pod

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

#-------------------------------------------------------------------------------
#TM:2:gtk_file_chooser_get_local_only:t/FileChooserDialog.t
=begin pod
=head2 [[gtk_] file_chooser_] get_local_only

Gets whether only local files can be selected in the file selector. See C<gtk_file_chooser_set_local_only()>

Returns: C<1> if only local files can be selected.

Since: 2.4

  method gtk_file_chooser_get_local_only ( --> Int )

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_select_multiple:
=begin pod
=head2 [[gtk_] file_chooser_] set_select_multiple

Sets whether multiple files can be selected in the file selector.  This is
only relevant if the action is set to be C<GTK_FILE_CHOOSER_ACTION_OPEN> or
C<GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER>.

Since: 2.4

  method gtk_file_chooser_set_select_multiple ( Int $select_multiple )

=item Int $select_multiple; C<1> if multiple files can be selected.

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_select_multiple:
=begin pod
=head2 [[gtk_] file_chooser_] get_select_multiple

Gets whether multiple files can be selected in the file
selector. See C<gtk_file_chooser_set_select_multiple()>.

Returns: C<1> if multiple files can be selected.

Since: 2.4

  method gtk_file_chooser_get_select_multiple ( --> Int  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_show_hidden:
=begin pod
=head2 [[gtk_] file_chooser_] set_show_hidden

Sets whether hidden files and folders are displayed in the file selector.

Since: 2.6

  method gtk_file_chooser_set_show_hidden ( Int $show_hidden )

=item Int $show_hidden; C<1> if hidden files and folders should be displayed.

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_show_hidden:
=begin pod
=head2 [[gtk_] file_chooser_] get_show_hidden

Gets whether hidden files and folders are displayed in the file selector.
See C<gtk_file_chooser_set_show_hidden()>.

Returns: C<1> if hidden files and folders are displayed.

Since: 2.6

  method gtk_file_chooser_get_show_hidden ( --> Int  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_do_overwrite_confirmation:
=begin pod
=head2 [[gtk_] file_chooser_] set_do_overwrite_confirmation

Sets whether a file chooser in C<GTK_FILE_CHOOSER_ACTION_SAVE> mode will present
a confirmation dialog if the user types a file name that already exists.  This
is C<0> by default.

If set to C<1>, the I<chooser> will emit the
prop I<confirm-overwrite> signal when appropriate.

If all you need is the stock confirmation dialog, set this property to C<1>.
You can override the way confirmation is done by actually handling the
prop I<confirm-overwrite> signal; please refer to its documentation
for the details.

Since: 2.8

  method gtk_file_chooser_set_do_overwrite_confirmation ( Int $do_overwrite_confirmation )

=item Int $do_overwrite_confirmation; whether to confirm overwriting in save mode

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_do_overwrite_confirmation:
=begin pod
=head2 [[gtk_] file_chooser_] get_do_overwrite_confirmation

Queries whether a file chooser is set to confirm for overwriting when the user
types a file name that already exists.

Returns: C<1> if the file chooser will present a confirmation dialog;
C<0> otherwise.

Since: 2.8

  method gtk_file_chooser_get_do_overwrite_confirmation ( --> Int  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_create_folders:
=begin pod
=head2 [[gtk_] file_chooser_] set_create_folders

Sets whether file choser will offer to create new folders.
This is only relevant if the action is not set to be
C<GTK_FILE_CHOOSER_ACTION_OPEN>.

Since: 2.18

  method gtk_file_chooser_set_create_folders ( Int $create_folders )

=item Int $create_folders; C<1> if the Create Folder button should be displayed

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_create_folders:
=begin pod
=head2 [[gtk_] file_chooser_] get_create_folders

Gets whether file choser will offer to create new folders.
See C<gtk_file_chooser_set_create_folders()>.

Returns: C<1> if the Create Folder button should be displayed.

Since: 2.18

  method gtk_file_chooser_get_create_folders ( --> Int  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_current_name:
=begin pod
=head2 [[gtk_] file_chooser_] set_current_name

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

If you want to preselect a particular existing file, you should use
C<gtk_file_chooser_set_filename()> or C<gtk_file_chooser_set_uri()> instead.
Please see the documentation for those functions for an example of using
C<gtk_file_chooser_set_current_name()> as well.

Since: 2.4

  method gtk_file_chooser_set_current_name ( Str $name )

=item Str $name; (type filename): the filename to use, as a UTF-8 string

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_current_name:
=begin pod
=head2 [[gtk_] file_chooser_] get_current_name

Gets the current name in the file selector, as entered by the user in the
text entry for “Name”.

This is meant to be used in save dialogs, to get the currently typed filename
when the file itself does not exist yet.  For example, an application that
adds a custom extra widget to the file chooser for “file format” may want to
change the extension of the typed filename based on the chosen format, say,
from “.jpg” to “.png”.

Returns: The raw text from the file chooser’s “Name” entry.  Free this with
C<g_free()>.  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.

Since: 3.10

  method gtk_file_chooser_get_current_name ( --> Str  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_filename:
=begin pod
=head2 [[gtk_] file_chooser_] get_filename

Gets the filename for the currently selected file in
the file selector. The filename is returned as an absolute path. If
multiple files are selected, one of the filenames will be returned at
random.

If the file chooser is in folder mode, this function returns the selected
folder.

Returns: (nullable) (type filename): The currently selected filename,
or C<Any> if no file is selected, or the selected file can't
be represented with a local filename. Free with C<g_free()>.

Since: 2.4

  method gtk_file_chooser_get_filename ( --> Str  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_filename:
=begin pod
=head2 [[gtk_] file_chooser_] set_filename

Sets I<filename> as the current filename for the file chooser, by changing to the file’s parent folder and actually selecting the file in list; all other files will be unselected. If the I<chooser> is in C<GTK_FILE_CHOOSER_ACTION_SAVE> mode, the file’s base name will also appear in the dialog’s file name entry.

Note that the file must exist, or nothing will be done except for the directory change.

You should use this function only when implementing a save dialog for which you already have a file name to which the user may save. For example, when the user opens an existing file and then does I<Save As...> to save a copy or a modified version. 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:

  my Gnome::Gtk3::FileChooserDialog $fcd .= new(:title('Choose a file'));
  my Gnome::Gtk3::FileChooser $fc .= new(:widget($fcd));

  my Document $doc .= new;
  ... add content to doc ...

  if $doc.is-new {
    # the user just created a new document
    $fc.set-current-name("Untitled document");
  }

  else {
    # the user edited an existing document
    $fc.set-filename($existing-filename);
  }

  my $status = $fcd.gtk-dialog-run;


In the first case, the file chooser will present the user with useful suggestions as to where to save his new file. In the second case, the file’s existing location is already known, so the file chooser will use it.

Since: 2.4

  method gtk_file_chooser_set_filename ( Str $filename )

=item Str $filename; (type filename): the filename to set as current

=end pod

sub gtk_file_chooser_set_filename ( N-GObject $chooser, Str $filename )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_select_filename:
=begin pod
=head2 [[gtk_] file_chooser_] select_filename

Selects a filename. If the file name isn’t in the current
folder of I<chooser>, then the current folder of I<chooser> will
be changed to the folder containing I<filename>.

Returns: Not useful.

See also: C<gtk_file_chooser_set_filename()>

Since: 2.4

  method gtk_file_chooser_select_filename ( Str $filename --> Int  )

=item Str $filename; (type filename): the filename to select

=end pod

sub gtk_file_chooser_select_filename ( N-GObject $chooser, Str $filename )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_unselect_filename:
=begin pod
=head2 [[gtk_] file_chooser_] unselect_filename

Unselects a currently selected filename. If the filename
is not in the current directory, does not exist, or
is otherwise not currently selected, does nothing.

Since: 2.4

  method gtk_file_chooser_unselect_filename ( Str $filename )

=item Str $filename; (type filename): the filename to unselect

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_select_all:
=begin pod
=head2 [[gtk_] file_chooser_] select_all

Selects all the files in the current folder of a file chooser.

Since: 2.4

  method gtk_file_chooser_select_all ( )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_unselect_all:
=begin pod
=head2 [[gtk_] file_chooser_] unselect_all

Unselects all the files in the current folder of a file chooser.

Since: 2.4

  method gtk_file_chooser_unselect_all ( )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_filenames:
=begin pod
=head2 [[gtk_] file_chooser_] get_filenames

Lists all the selected files and subfolders in the current folder of
I<chooser>. The returned names are full absolute paths. If files in the current
folder cannot be represented as local filenames they will be ignored. (See
C<gtk_file_chooser_get_uris()>)

Returns: (element-type filename) (transfer full): a I<GSList>
containing the filenames of all selected files and subfolders in
the current folder. Free the returned list with C<g_slist_free()>,
and the filenames with C<g_free()>.

Since: 2.4

  method gtk_file_chooser_get_filenames ( --> N-GSList  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_current_folder:
=begin pod
=head2 [[gtk_] file_chooser_] set_current_folder

Sets the current folder for I<chooser> from a local filename.
The user will be shown the full contents of the current folder,
plus user interface elements for navigating to other folders.

In general, you should not use this function.  See the
[section on setting up a file chooser dialog][gtkfilechooserdialog-setting-up]
for the rationale behind this.

Returns: Not useful.

Since: 2.4

  method gtk_file_chooser_set_current_folder ( Str $filename --> Int  )

=item Str $filename; (type filename): the full path of the new current folder

=end pod

sub gtk_file_chooser_set_current_folder ( N-GObject $chooser, Str $filename )
  returns int32
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_current_folder:
=begin pod
=head2 [[gtk_] file_chooser_] get_current_folder

Gets the current folder of I<chooser> as a local filename.
See C<gtk_file_chooser_set_current_folder()>.

Note that this is the folder that the file chooser is currently displaying
(e.g. "/home/username/Documents"), which is not the same
as the currently-selected folder if the chooser is in
C<GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER> mode
(e.g. "/home/username/Documents/selected-folder/".  To get the
currently-selected folder in that mode, use C<gtk_file_chooser_get_uri()> as the
usual way to get the selection.

Returns: (nullable) (type filename): the full path of the current
folder, or C<Any> if the current path cannot be represented as a local
filename.  Free with C<g_free()>.  This function will also return
C<Any> if the file chooser was unable to load the last folder that
was requested from it; for example, as would be for calling
C<gtk_file_chooser_set_current_folder()> on a nonexistent folder.

Since: 2.4

  method gtk_file_chooser_get_current_folder ( --> Str  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_uri:
=begin pod
=head2 [[gtk_] file_chooser_] get_uri

Gets the URI for the currently selected file in
the file selector. If multiple files are selected,
one of the filenames will be returned at random.

If the file chooser is in folder mode, this function returns the selected
folder.

Returns: (nullable) (transfer full): The currently selected URI, or C<Any>
if no file is selected. If C<gtk_file_chooser_set_local_only()> is set to
C<1> (the default) a local URI will be returned for any FUSE locations.
Free with C<g_free()>

Since: 2.4

  method gtk_file_chooser_get_uri ( --> Str  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_uri:
=begin pod
=head2 [[gtk_] file_chooser_] set_uri

Sets the file referred to by I<uri> as the current file for the file chooser,
by changing to the URI’s parent folder and actually selecting the URI in the
list.  If the I<chooser> is C<GTK_FILE_CHOOSER_ACTION_SAVE> mode, the URI’s base
name will also appear in the dialog’s file name entry.

Note that the URI must exist, or nothing will be done except for the
directory change.

You should use this function only when implementing a save
dialog for which 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... to save a copy or a
modified version.  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:
|[<!-- language="C" -->
if (document_is_new)
{
// the user just created a new document
gtk_file_chooser_set_current_name (chooser, "Untitled document");
}
else
{
// the user edited an existing document
gtk_file_chooser_set_uri (chooser, existing_uri);
}
]|


In the first case, the file chooser will present the user with useful suggestions
as to where to save his new file.  In the second case, the file’s existing location
is already known, so the file chooser will use it.

Returns: Not useful.

Since: 2.4

  method gtk_file_chooser_set_uri ( Str $uri --> Int  )

=item Str $uri; the URI to set as current

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_select_uri:
=begin pod
=head2 [[gtk_] file_chooser_] select_uri

Selects the file to by I<uri>. If the URI doesn’t refer to a
file in the current folder of I<chooser>, then the current folder of
I<chooser> will be changed to the folder containing I<filename>.

Returns: Not useful.

Since: 2.4

  method gtk_file_chooser_select_uri ( Str $uri --> Int  )

=item Str $uri; the URI to select

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_unselect_uri:
=begin pod
=head2 [[gtk_] file_chooser_] unselect_uri

Unselects the file referred to by I<uri>. If the file
is not in the current directory, does not exist, or
is otherwise not currently selected, does nothing.

Since: 2.4

  method gtk_file_chooser_unselect_uri ( Str $uri )

=item Str $uri; the URI to unselect

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_uris:
=begin pod
=head2 [[gtk_] file_chooser_] get_uris

Lists all the selected files and subfolders in the current folder of
I<chooser>. The returned names are full absolute URIs.

Returns: (element-type utf8) (transfer full): a I<GSList> containing the URIs of all selected
files and subfolders in the current folder. Free the returned list
with C<g_slist_free()>, and the filenames with C<g_free()>.

Since: 2.4

  method gtk_file_chooser_get_uris ( --> N-GSList  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_current_folder_uri:
=begin pod
=head2 [[gtk_] file_chooser_] set_current_folder_uri

Sets the current folder for I<chooser> from an URI.
The user will be shown the full contents of the current folder,
plus user interface elements for navigating to other folders.

In general, you should not use this function.  See the
[section on setting up a file chooser dialog][gtkfilechooserdialog-setting-up]
for the rationale behind this.

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

Since: 2.4

  method gtk_file_chooser_set_current_folder_uri ( Str $uri --> Int  )

=item Str $uri; the URI for the new current folder

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_current_folder_uri:
=begin pod
=head2 [[gtk_] file_chooser_] get_current_folder_uri

Gets the current folder of I<chooser> as an URI.
See C<gtk_file_chooser_set_current_folder_uri()>.

Note that this is the folder that the file chooser is currently displaying
(e.g. "file:///home/username/Documents"), which is not the same
as the currently-selected folder if the chooser is in
C<GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER> mode
(e.g. "file:///home/username/Documents/selected-folder/".  To get the
currently-selected folder in that mode, use C<gtk_file_chooser_get_uri()> as the
usual way to get the selection.

Returns: (nullable) (transfer full): the URI for the current folder.
Free with C<g_free()>.  This function will also return C<Any> if the file chooser
was unable to load the last folder that was requested from it; for example,
as would be for calling C<gtk_file_chooser_set_current_folder_uri()> on a
nonexistent folder.

Since: 2.4

  method gtk_file_chooser_get_current_folder_uri ( --> Str  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_file:
=begin pod
=head2 [[gtk_] file_chooser_] get_file

Gets the I<GFile> for the currently selected file in
the file selector. If multiple files are selected,
one of the files will be returned at random.

If the file chooser is in folder mode, this function returns the selected
folder.

Returns: (transfer full): a selected I<GFile>. You own the returned file;
use C<g_object_unref()> to release it.

Since: 2.14

  method gtk_file_chooser_get_file ( --> N-GObject  )


=end pod

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

#`{{
#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_file:
=begin pod
=head2 [[gtk_] file_chooser_] set_file

Sets I<file> 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 I<chooser> is in C<GTK_FILE_CHOOSER_ACTION_SAVE> mode, the file’s base name
will also appear in the dialog’s file name entry.

If the file name isn’t in the current folder of I<chooser>, then the current
folder of I<chooser> will be changed to the folder containing I<filename>. This
is equivalent to a sequence of C<gtk_file_chooser_unselect_all()> followed by
C<gtk_file_chooser_select_filename()>.

Note that the file must exist, or nothing will be done except
for the directory change.

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:
|[<!-- language="C" -->
if (document_is_new)
{
// the user just created a new document
gtk_file_chooser_set_current_folder_file (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);
}
]|

Returns: Not useful.

Since: 2.14

  method gtk_file_chooser_set_file ( N-GObject $file, N-GError $error --> Int  )

=item N-GObject $file; the I<GFile> to set as current
=item N-GError $error; (allow-none): location to store the error, or C<Any> to ignore errors.

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_select_file:
=begin pod
=head2 [[gtk_] file_chooser_] select_file

Selects the file referred to by I<file>. An internal function. See
C<_gtk_file_chooser_select_uri()>.

Returns: Not useful.

Since: 2.14

  method gtk_file_chooser_select_file ( N-GObject $file, N-GError $error --> Int  )

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

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_unselect_file:
=begin pod
=head2 [[gtk_] file_chooser_] unselect_file

Unselects the file referred to by I<file>. If the file is not in the current
directory, does not exist, or is otherwise not currently selected, does nothing.

Since: 2.14

  method gtk_file_chooser_unselect_file ( N-GObject $file )

=item N-GObject $file; a I<GFile>

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_files:
=begin pod
=head2 [[gtk_] file_chooser_] get_files

Lists all the selected files and subfolders in the current folder of I<chooser>
as I<GFile>. An internal function, see C<gtk_file_chooser_get_uris()>.

Returns: (element-type GFile) (transfer full): a I<GSList>
containing a I<GFile> for each selected file and subfolder in the
current folder.  Free the returned list with C<g_slist_free()>, and
the files with C<g_object_unref()>.

Since: 2.14

  method gtk_file_chooser_get_files ( --> N-GSList  )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_set_current_folder_file:
=begin pod
=head2 [[gtk_] file_chooser_] set_current_folder_file

Sets the current folder for I<chooser> from a I<GFile>.
Internal function, see C<gtk_file_chooser_set_current_folder_uri()>.

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

Since: 2.14

  method gtk_file_chooser_set_current_folder_file ( N-GObject $file, N-GError $error --> Int  )

=item N-GObject $file; the I<GFile> for the new folder
=item N-GError $error; (allow-none): location to store error, or C<Any>.

=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_file_chooser_get_current_folder_file:
=begin pod
=head2 [[gtk_] file