Chapter 19. Drag and Drop

# Chapter 19. Drag and Drop

The `Gtk::DragSource` and `Gtk::DropTarget` event controllers have methods and signals which are used for Drag and Drop.

## Sources and Targets

Things are dragged from `sources` to be dropped on `targets`. Each source and target has information about the data formats that it can send or receive, provided by `Gdk::ContentFormats`. A drop target will only accept a dragged item if they both share a compatible format. Appropriate signals will then be emitted, telling the signal handlers which format was used.

`Gdk::ContentFormats` objects contain information about available GTypes and mime types (media types).

Example Application: Creating a Clock with Cairo |  | Methods