## GtkFileChooserWidget GtkFileChooserWidget — A file chooser widget |

## Functions

GtkWidget * | gtk_file_chooser_widget_new ()

## Properties

gboolean | search-mode | Read / Write
char * | subtitle | Read

## Signals

void | desktop-folder | Action
void | down-folder | Action
void | home-folder | Action
void | location-popup | Action
void | location-popup-on-paste | Action
void | location-toggle-popup | Action
void | places-shortcut | Action
void | quick-bookmark | Action
void | recent-shortcut | Action
void | search-shortcut | Action
void | show-hidden | Action
void | up-folder | Action

## Types and Values

struct | GtkFileChooserWidget
struct | GtkFileChooserWidgetClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── GtkFileChooserWidget

## Implemented Interfaces

GtkFileChooserWidget implements AtkImplementorIface, GtkBuildable, GtkOrientable, GtkFileChooser and GtkFileChooserEmbed.

## Includes

    #include <gtk/gtk.h>

## Description

GtkFileChooserWidget is a widget for choosing files. It exposes the GtkFileChooser interface, and you should use the methods of this interface to interact with the widget.

### CSS nodes

GtkFileChooserWidget has a single CSS node with name filechooser.

## Functions

### gtk_file_chooser_widget_new ()

    GtkWidget *
    gtk_file_chooser_widget_new (GtkFileChooserAction action);

Creates a new GtkFileChooserWidget. This is a file chooser widget that can be embedded in custom windows, and it is the same widget that is used by GtkFileChooserDialog.

#### Parameters

action | Open or save mode for the widget |

#### Returns

a new GtkFileChooserWidget

Since: 2.4

## Types and Values

### struct GtkFileChooserWidget

    struct GtkFileChooserWidget;

### struct GtkFileChooserWidgetClass

    struct GtkFileChooserWidgetClass {
      GtkBoxClass parent_class;
    };

#### Members

## Property Details

### The `“search-mode”` property

      “search-mode”              gboolean

Search mode.

Owner: GtkFileChooserWidget

Flags: Read / Write

Default value: FALSE

### The `“subtitle”` property

      “subtitle”                 char *

Subtitle.

Owner: GtkFileChooserWidget

Flags: Read

Default value: ""

## Signal Details

### The `“desktop-folder”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::desktop-folder signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser show the user's Desktop folder in the file list.

The default binding for this signal is `Alt + D`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“down-folder”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::down-folder signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser go to a child of the current folder in the file hierarchy. The subfolder that will be used is displayed in the path bar widget of the file chooser. For example, if the path bar is showing "/foo/bar/baz", with bar currently displayed, then this will cause the file chooser to switch to the "baz" subfolder.

The default binding for this signal is `Alt + Down`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“home-folder”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::home-folder signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser show the user's home folder in the file list.

The default binding for this signal is `Alt + Home`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“location-popup”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   char                 *path,
                   gpointer              user_data)

The ::location-popup signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser show a "Location" prompt which the user can use to manually type the name of the file he wishes to select.

The default bindings for this signal are `Control + L` with a `path` string of "" (the empty string). It is also bound to `/` with a `path` string of "`/`" (a slash): this lets you type `/` and immediately type a path name. On Unix systems, this is bound to `~` (tilde) with a `path` string of "~" itself for access to home directories.

#### Parameters

widget | the object which received the signal |
path | a string that gets put in the text entry for the file name |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“location-popup-on-paste”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::location-popup-on-paste signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser show a "Location" prompt when the user pastes into a GtkFileChooserWidget.

The default binding for this signal is `Control + V`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“location-toggle-popup”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::location-toggle-popup signal is a keybinding signal which gets emitted when the user asks for it.

This is used to toggle the visibility of a "Location" prompt which the user can use to manually type the name of the file he wishes to select.

The default binding for this signal is `Control + L`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“places-shortcut”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::places-shortcut signal is a keybinding signal which gets emitted when the user asks for it.

This is used to move the focus to the places sidebar.

The default binding for this signal is `Alt + P`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“quick-bookmark”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   int                   bookmark_index,
                   gpointer              user_data)

The ::quick-bookmark signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser switch to the bookmark specified in the `bookmark_index` parameter. For example, if you have three bookmarks, you can pass 0, 1, 2 to this signal to switch to each of them, respectively.

The default binding for this signal is `Alt + 1`, `Alt + 2`, etc. until `Alt + 0`. Note that in the default binding, that `Alt + 1` is actually defined to switch to the bookmark at index 0, and so on successively; `Alt + 0` is defined to switch to the bookmark at index 10.

#### Parameters

widget | the object which received the signal |
bookmark_index | the number of the bookmark to switch to |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“recent-shortcut”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::recent-shortcut signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser show the Recent location.

The default binding for this signal is `Alt + R`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“search-shortcut”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::search-shortcut signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser show the search entry.

The default binding for this signal is `Alt + S`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“show-hidden”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::show-hidden signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser display hidden files.

The default binding for this signal is `Control + H`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“up-folder”` signal

    void
    user_function (GtkFileChooserWidget *widget,
                   gpointer              user_data)

The ::up-folder signal is a keybinding signal which gets emitted when the user asks for it.

This is used to make the file chooser go to the parent of the current folder in the file hierarchy.

The default binding for this signal is `Alt + Up`.

#### Parameters

widget | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Action

## See Also

GtkFileChooserDialog