| Libfm Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
struct FmDndSrc; struct FmDndSrcClass; enum FmDndSrcTarget; FmDndSrc * fm_dnd_src_new (GtkWidget *w); void fm_dnd_src_set_file (FmDndSrc *ds,FmFileInfo *file); void fm_dnd_src_set_files (FmDndSrc *ds,FmFileInfoList *files); void fm_dnd_src_set_widget (FmDndSrc *ds,GtkWidget *w);
include: libfm/fm-dnd-src.h
The FmDndSrc is used to assign selection for Drag & Drop operations and deliver info about it to target widget when requested.
struct FmDndSrcClass {
GObjectClass parent_class;
void (*data_get)(FmDndSrc*);
};
| the parent class | |
| the class closure for the "data-get" signal |
typedef enum {
FM_DND_SRC_TARGET_FM_LIST,
FM_DND_SRC_TARGET_URI_LIST,
} FmDndSrcTarget;
default targets of drag source
FmDndSrc * fm_dnd_src_new (GtkWidget *w);
Creates new drag source descriptor.
|
the widget where source files are selected. [allow-none] |
Returns : |
a new FmDndSrc object. [transfer full] |
Since 0.1.0
void fm_dnd_src_set_file (FmDndSrc *ds,FmFileInfo *file);
Sets file as selection in the source descriptor.
|
the drag source descriptor |
|
files to set |
Since 0.1.0
void fm_dnd_src_set_files (FmDndSrc *ds,FmFileInfoList *files);
Sets files as selection list in the source descriptor.
|
the drag source descriptor |
|
list of files to set |
Since 0.1.0
void fm_dnd_src_set_widget (FmDndSrc *ds,GtkWidget *w);
Resets drag source widget in ds.
|
the drag source descriptor |
|
the widget where source files are selected. [allow-none] |
Since 0.1.0
"data-get" signalvoid user_function (FmDndSrc *object,
gpointer user_data) : Run First
The "data-get" signal is emitted when information of
source files is needed. Handler of the signal should then call
fm_dnd_src_set_files() to provide info of dragged source files.
|
the object which emitted the signal |
|
user data set when the signal handler was connected. |
Since 0.1.0