## ThunarBrowser

ThunarBrowser

## Functions

void | ( *ThunarBrowserPokeFileFunc ) ()
void | ( *ThunarBrowserPokeDeviceFunc ) ()
void | ( *ThunarBrowserPokeLocationFunc ) ()
void | thunar_browser_poke_file ()
void | thunar_browser_poke_device ()
void | thunar_browser_poke_location ()

## Object Hierarchy

        GInterface
        ╰── ThunarBrowser

## Description

## Functions

### ThunarBrowserPokeFileFunc ()

    void
    (*ThunarBrowserPokeFileFunc) (ThunarBrowser *browser,
                                  ThunarFile *file,
                                  ThunarFile *target_file,
                                  GError *error,
                                  gpointer user_data);

### ThunarBrowserPokeDeviceFunc ()

    void
    (*ThunarBrowserPokeDeviceFunc) (ThunarBrowser *browser,
                                    ThunarDevice *volume,
                                    ThunarFile *mount_point,
                                    GError *error,
                                    gpointer user_data,
                                    gboolean cancelled);

### ThunarBrowserPokeLocationFunc ()

    void
    (*ThunarBrowserPokeLocationFunc) (ThunarBrowser *browser,
                                      GFile *location,
                                      ThunarFile *file,
                                      ThunarFile *target_file,
                                      GError *error,
                                      gpointer user_data);

### thunar_browser_poke_file ()

    void
    thunar_browser_poke_file (ThunarBrowser *browser,
                              ThunarFile *file,
                              gpointer widget,
                              ThunarBrowserPokeFileFunc func,
                              gpointer user_data);

Pokes a ThunarFile to see what's behind it.

If `file` has the type `G_FILE_TYPE_SHORTCUT`, it tries to load and mount the file that is referred to by the `G_FILE_ATTRIBUTE_STANDARD_TARGET_URI` of the `file` .

If `file` has the type `G_FILE_TYPE_MOUNTABLE`, it tries to mount the `file` .

In the other cases, if the enclosing volume of the `file` is not mounted yet, it tries to mount it.

When finished or if an error occured, it calls `func` with the provided `user` data. The GError parameter to `func` is set if, and only if there was an error.

#### Parameters

browser | a ThunarBrowser. |
file | a ThunarFile. |
widget | a GtkWidget, a GdkScreen or `NULL`. |
func | a ThunarBrowserPokeFileFunc callback or `NULL`. |
user_data | pointer to arbitrary user data or `NULL`. |

### thunar_browser_poke_device ()

    void
    thunar_browser_poke_device (ThunarBrowser *browser,
                                ThunarDevice *device,
                                gpointer widget,
                                ThunarBrowserPokeDeviceFunc func,
                                gpointer user_data);

This function checks if `device` is mounted or not. If it is, it loads a ThunarFile for the mount root and calls `func` . If it is not mounted, it first mounts the device asynchronously and calls `func` with the ThunarFile corresponding to the mount root when the mounting is finished.

The ThunarFile passed to `func` will be `NULL` if, and only if mounting the `device` failed. The GError passed to `func` will be set if, and only if mounting failed.

#### Parameters

browser | a ThunarBrowser. |
device | a ThunarDevice. |
widget | a GtkWidget, a GdkScreen or `NULL`. |
func | a ThunarBrowserPokeDeviceFunc callback or `NULL`. |
user_data | pointer to arbitrary user data or `NULL`. |

### thunar_browser_poke_location ()

    void
    thunar_browser_poke_location (ThunarBrowser *browser,
                                  GFile *location,
                                  gpointer widget,
                                  ThunarBrowserPokeLocationFunc func,
                                  gpointer user_data);

Pokes a GFile to see what's behind it.

It first resolves the GFile into a ThunarFile asynchronously using `thunar_file_get_async()`. It then performs the same steps as `thunar_browser_poke_file()`.

#### Parameters

browser | a ThunarBrowser. |
location | a GFile. |
widget | a GtkWidget, a GdkScreen or `NULL`. |
func | a ThunarBrowserPokeDeviceFunc callback or `NULL`. |
user_data | pointer to arbitrary user data or `NULL`. |