Methods

Widgets can be identified as sources or destinations using these Gtk::Widget methods:

void drag_source_set(const Glib::RefPtr<Gdk::ContentFormats>& targets,
      Gdk::ModifierType start_button_mask, Gdk::DragAction actions);
void drag_dest_set(const Glib::RefPtr<Gdk::ContentFormats>& targets,
    Gtk::DestDefaults flags, Gdk::DragAction actions);

There are several methods to add source formats and destination formats. Examples: