Drag and drop autoscrolling

Drag and drop autoscrolling — Autoscroll when dragged out of widget.

Synopsis

void                fm_dnd_set_dest_auto_scroll         (GtkWidget *drag_dest_widget,
                                                         GtkAdjustment *hadj,
                                                         GtkAdjustment *vadj);
void                fm_dnd_unset_dest_auto_scroll       (GtkWidget *drag_dest_widget);

Description

include: libfm/fm-dnd-auto-scroll.h

Details

fm_dnd_set_dest_auto_scroll ()

void                fm_dnd_set_dest_auto_scroll         (GtkWidget *drag_dest_widget,
                                                         GtkAdjustment *hadj,
                                                         GtkAdjustment *vadj);

This function installs a "drag-motion" handler to the dest widget to support auto-scroll when the dragged item is near the margin of the destination widget. For example, when a user drags an item over the bottom of a GtkTreeView, the desired behavior should be to scroll up the content of the tree view and to expose the items below currently visible region. So the user can drop on them.

drag_dest_widget :

a drag destination widget

hadj :

horizontal GtkAdjustment

vadj :

vertical GtkAdjustment

fm_dnd_unset_dest_auto_scroll ()

void                fm_dnd_unset_dest_auto_scroll       (GtkWidget *drag_dest_widget);

Unsets what has been done by fm_dnd_set_dest_auto_scroll()

drag_dest_widget :

drag destination widget.