## GtkFileList

GtkFileList — A file list widget fot GTK

## Functions

GtkWidget * | gtk_file_list_new ()
void | gtk_file_list_construct ()
void | gtk_file_list_set_filter ()
gboolean | gtk_file_list_open_dir ()
const gchar * | gtk_file_list_get_path ()
const gchar * | gtk_file_list_get_filename ()
gint | gtk_file_list_get_filetype ()
gint | gtk_file_list_add_type ()
gint | gtk_file_list_add_type_with_pixmap ()
void | gtk_file_list_add_type_filter ()

## Types and Values

struct | GtkFileList
struct | GtkFileListItem
struct | GtkFileListType

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkFixed
                            ╰── GtkIconList
                                ╰── GtkFileList

## Implemented Interfaces

GtkFileList implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <gtkextra.h>

## Description

It is a GtkIconList subclass that displays the contents of a given directory using fancy icons for different types of files

## Functions

### gtk_file_list_new ()

    GtkWidget *
    gtk_file_list_new (guint icon_width,
                       gint mode,
                       const gchar *path);

Create a newfile list widget. Remark for the 2nd open file window you must use: gtk_icon_file_selection_show_tree(GTK_ICON_FILESEL(filesel), TRUE);

#### Parameters

icon_width | the width of the icon |
mode | GTK_FILE_LIST_SORT_NAME , GTK_FILE_LIST_SORT_TYPE |
path | the path to the files to be be opened in GtkFileList widget. |

#### Returns

the newly-created GtkFileList widget.

### gtk_file_list_construct ()

    void
    gtk_file_list_construct (GtkFileList *file_list,
                             guint icon_width,
                             gint mode,
                             const gchar *path);

Initializes newfile list widget with specified values.

#### Parameters

file_list | GtkFileList widget |
icon_width | the width of the icon |
mode | GTK_FILE_LIST_SORT_NAME , GTK_FILE_LIST_SORT_TYPE |
path | the path to the files to be be opened in GtkFileList widget. |

### gtk_file_list_set_filter ()

    void
    gtk_file_list_set_filter (GtkFileList *file_list,
                              const gchar *filter);

Sets a filter for files displayed in Open window.

#### Parameters

file_list | the GtkFileList widget. |
filter | filter applied to files |

### gtk_file_list_open_dir ()

    gboolean
    gtk_file_list_open_dir (GtkFileList *file_list,
                            const gchar *dir_path);

Opens the content of specified directory in GtkFileList widget.

#### Parameters

file_list | a GtkFileList widget |
dir_path | path of directory to be opened in GtkFileList widget |

#### Returns

TRUE(succes) or FALSE(failure)

### gtk_file_list_get_path ()

    const gchar *
    gtk_file_list_get_path (GtkFileList *file_list);

Get the path of the files shown in filelist

#### Parameters

file_list | the GtkFileList widget. |

#### Returns

the path of files.

### gtk_file_list_get_filename ()

    const gchar *
    gtk_file_list_get_filename (GtkFileList *file_list);

Get the path of the files shown in filelist

#### Parameters

file_list | the GtkFileList widget. |

#### Returns

the filename

### gtk_file_list_get_filetype ()

    gint
    gtk_file_list_get_filetype (GtkFileList *file_list);

Get the GtkFileListType of selected file in File List.

#### Parameters

file_list

the GtkFileList widget. GTK_FILE_LIST_FILE, GTK_FILE_LIST_HTML, GTK_FILE_LIST_TEXT, GTK_FILE_LIST_DOC, GTK_FILE_LIST_PDF, GTK_FILE_LIST_C, GTK_FILE_LIST_CPP, GTK_FILE_LIST_H, GTK_FILE_LIST_F, GTK_FILE_LIST_JAVA, GTK_FILE_LIST_EXEC, GTK_FILE_LIST_IMG, GTK_FILE_LIST_ARCH, GTK_FILE_LIST_PKG, GTK_FILE_LIST_DEB, GTK_FILE_LIST_RPM, GTK_FILE_LIST_CAT, GTK_FILE_LIST_SOUND, GTK_FILE_LIST_MOVIE, GTK_FILE_LIST_CORE)

#### Returns

The GtkFileListType ( GTK_FILE_LIST_FOLDER,

### gtk_file_list_add_type ()

    gint
    gtk_file_list_add_type (GtkFileList *file_list,
                            const gchar **pixmap_data);

Add a new file type in a GtkFileList structure.

#### Parameters

file_list | the GtkFileList widget. |
pixmap_data | Pointer to a string containing the XPM data.(last argument of `gdk_pixmap_create_from_xpm_d()` ). |

#### Returns

the identification number given to the added filetype

### gtk_file_list_add_type_with_pixmap ()

    gint
    gtk_file_list_add_type_with_pixmap (GtkFileList *file_list,
                                        GdkPixmap *pixmap,
                                        GdkBitmap *mask);

Add a new file type in a GtkFileList structure.

#### Parameters

file_list | the GtkFileList widget. |
pixmap | a GdkPixmap object. |
mask | a GdkBitmap mask. |

#### Returns

the identification number given to the added filetype

### gtk_file_list_add_type_filter ()

    void
    gtk_file_list_add_type_filter (GtkFileList *file_list,
                                   gint type,
                                   const gchar *filter);

Add a filter for specified file type in a GtkFileList structure.

#### Parameters

file_list | the GtkFileList widget. |
type | file type. |
filter | filter for specified type. |

## Types and Values

### struct GtkFileList

    struct GtkFileList;

The GtkFileList structure contains only private data. It should only be accessed through the functions described below.

### struct GtkFileListItem

    struct GtkFileListItem {
    };

The GtkFileListItem structure contains only private data. It should only be accessed through the functions described below.

### struct GtkFileListType

    struct GtkFileListType {
    };

The GtkFileListType structure contains only private data. It should only be accessed through the functions described below.