| Libfm Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
FmDndDest; struct FmDndDestClass; enum FmDndDestTargetType; gboolean fm_dnd_dest_drag_data_received (FmDndDest *dd,GdkDragContext *drag_context,gint x,gint y,GtkSelectionData *sel_data,guint info,guint time); gboolean fm_dnd_dest_drag_drop (FmDndDest *dd,GdkDragContext *drag_context,GdkAtom target,int x,int y,guint time); void fm_dnd_dest_drag_leave (FmDndDest *dd,GdkDragContext *drag_context,guint time); GdkAtom fm_dnd_dest_find_target (FmDndDest *dd,GdkDragContext *drag_context); GdkDragAction fm_dnd_dest_get_default_action (FmDndDest *dd,GdkDragContext *drag_context,GdkAtom target); FmFileInfo * fm_dnd_dest_get_dest_file (FmDndDest *dd); FmPath * fm_dnd_dest_get_dest_path (FmDndDest *dd); gboolean fm_dnd_dest_is_target_supported (FmDndDest *dd,GdkAtom target); FmDndDest * fm_dnd_dest_new (GtkWidget *w); void fm_dnd_dest_set_dest_file (FmDndDest *dd,FmFileInfo *dest_file); void fm_dnd_dest_set_widget (FmDndDest *dd,GtkWidget *w); #define fm_drag_context_has_target (ctx, target) #define fm_drag_context_has_target_name (ctx, name)
struct FmDndDestClass {
GObjectClass parent_class;
gboolean (*files_dropped)(FmDndDest* dd, int x, int y, guint action, guint info_type, FmPathList* files);
};
| the parent class | |
| the class closure for the "files-dropped" signal |
typedef enum {
FM_DND_DEST_TARGET_FM_LIST,
FM_DND_DEST_TARGET_URI_LIST,
FM_DND_DEST_TARGET_XDS,
} FmDndDestTargetType;
default droppable targets supported by FmDndDest
| direct pointer of FmList | |
| "text/uri-list" | |
| X direct save |
gboolean fm_dnd_dest_drag_data_received (FmDndDest *dd,GdkDragContext *drag_context,gint x,gint y,GtkSelectionData *sel_data,guint info,guint time);
A common handler for signals that emitted when information about dragged data is received, such as "drag-data-received".
|
a drag target descriptor |
|
the drag context |
|
horisontal position of drop |
|
vertical position of drop |
|
selection data that are dragged |
|
(FmDndDestTargetType) type of data that are dragged |
|
timestamp of operation |
Returns : |
TRUE if dropping data is accepted for processing. |
Since 0.1.17
gboolean fm_dnd_dest_drag_drop (FmDndDest *dd,GdkDragContext *drag_context,GdkAtom target,int x,int y,guint time);
A common handler for signals that emitted when dragged data are dropped onto target, "drag-drop". Prepares data and emits the "files-dropped" signal if drop is supported.
|
a drag target descriptor |
|
the drag context |
|
target type |
|
horisontal position of drop |
|
vertical position of drop |
|
timestamp of operation |
Returns : |
TRUE if drop to target is supported by libfm. |
Since 0.1.17
void fm_dnd_dest_drag_leave (FmDndDest *dd,GdkDragContext *drag_context,guint time);
A common handler for signals that emitted when drag leaves the target widget, such as "drag-leave".
|
a drag target descriptor |
|
the drag context |
|
timestamp of operation |
Since 0.1.17
GdkAtom fm_dnd_dest_find_target (FmDndDest *dd,GdkDragContext *drag_context);
Finds target type that is supported for drag_context.
|
a drag target descriptor |
|
the drag context |
Returns : |
supported target type or GDK_NONE if none found. |
Since 0.1.17
GdkDragAction fm_dnd_dest_get_default_action (FmDndDest *dd,GdkDragContext *drag_context,GdkAtom target);
|
object which will receive data |
|
the drag context |
|
GdkAtom of the target data type |
Returns : |
the default action to take for the dragged files. |
Since 0.1.17
FmFileInfo * fm_dnd_dest_get_dest_file (FmDndDest *dd);
Retrieves file info of drag target. Returned data are owned by dd and
should not be freed by caller.
|
a drag target descriptor |
Returns : |
file info of drag target. [transfer none] |
Since 0.1.0
FmPath * fm_dnd_dest_get_dest_path (FmDndDest *dd);
Retrieves file path of drag target. Returned data are owned by dd and
should not be freed by caller.
|
a drag target descriptor |
Returns : |
file path of drag target. [transfer none] |
Since 0.1.0
gboolean fm_dnd_dest_is_target_supported (FmDndDest *dd,GdkAtom target);
Checks if target is supported by libfm.
|
a drag target descriptor |
|
target type |
Returns : |
TRUE if drop to target is supported by libfm. |
Since 0.1.17
FmDndDest * fm_dnd_dest_new (GtkWidget *w);
Creates new drag target descriptor.
|
a widget that probably is drop target |
Returns : |
a new FmDndDest object. [transfer full] |
Since 0.1.0
void fm_dnd_dest_set_dest_file (FmDndDest *dd,FmFileInfo *dest_file);
Sets drag target for dd.
|
a drag target descriptor |
|
file info of drag target |
Since 0.1.0
void fm_dnd_dest_set_widget (FmDndDest *dd,GtkWidget *w);
Updates link to widget that probably is drop target.
See also: fm_dnd_dest_new()
|
a drag target descriptor |
|
a widget that probably is drop target |
Since 0.1.0
"files-dropped" signalgboolean user_function (FmDndDest *dd,
gint x,
gint y,
guint action,
guint info_type,
gpointer files,
gpointer user_data) : Run Last
The "files-dropped" signal is emitted when files are
dropped on the destination widget.
|
the object which emitted the signal |
|
horisontal position of drop |
|
vertical position of drop |
|
(GdkDragAction) action requested on drop |
|
(FmDndDestTargetType) type of data that are dropped |
|
(FmPathList *) list of files that are dropped |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if action can be performed. |
Since 0.1.0