thunar-dnd: Thunar Internal Functions Reference Manual

## thunar-dnd thunar-dnd |

## Functions

GdkDragAction | thunar_dnd_ask ()
gboolean | thunar_dnd_perform ()

## Description

## Functions

### thunar_dnd_ask ()

    GdkDragAction
    thunar_dnd_ask (GtkWidget *widget,
                    ThunarFile *folder,
                    GList *path_list,
                    GdkDragAction actions);

Pops up a menu that asks the user to choose one of the `actions` or to cancel the drop. If the user chooses a valid GdkDragAction from `actions` , then this action is returned. Else if the user cancels the drop, 0 will be returned.

This method can be used to implement a response to the GDK_ACTION_ASK action on drops.

#### Parameters

widget | the widget on which the drop was performed. |
folder | the ThunarFile to which the `path_list` is being dropped. |
path_list | the GFiles of the files being dropped to `file` . |
actions | the list of actions supported for the drop. |

#### Returns

the selected GdkDragAction or 0 to cancel.

### thunar_dnd_perform ()

    gboolean
    thunar_dnd_perform (GtkWidget *widget,
                        ThunarFile *file,
                        GList *uri_list,
                        GdkDragAction action,
                        GClosure *new_files_closure);

Performs the drop of `file_list` on `file` in `widget` , as given in `action` and returns `TRUE` if the drop was started successfully (or even completed successfully), else `FALSE`.

#### Parameters

widget | the GtkWidget on which the drop was done. |
file | the ThunarFile on which the `file_list` was dropped. |
file_list | the list of GFiles that was dropped. |
action | the GdkDragAction that was performed. |
new_files_closure | a GClosure to connect to the job's "new-files" signal, which will be emitted when the job finishes with the list of GFiles created by the job, or `NULL` if you're not interested in the signal. |

#### Returns

`TRUE` if the DnD operation was started successfully, else `FALSE`.