Gtk2::T...gSource(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– Gtk2::TreeDragSource β€” okay bestie, let's talk drag sources ✨

So this page is Gtk2::T...gSource(3) from the User Contributed Perl Documentation, and the thing it's actually about is Gtk2::TreeDragSource β€” a lil wrapper for GtkTreeDragSource. πŸŽ€


✨ NAME ✨

Gtk2::TreeDragSource β€” wrapper for GtkTreeDragSource

Like. It's the drag source. The one doing the dragging. Main character energy fr. πŸ’…


🌸 HIERARCHY 🌸

Glib::Interface
+----Gtk2::TreeDragSource

So it's a Glib::Interface at the top, and Gtk2::TreeDragSource hangs off it. It's giving "descended from greatness". πŸ‘‘


πŸ¦‹ METHODS πŸ¦‹

πŸ’œ boolean = $drag_source->drag_data_delete ($path)

  • $path β€” a Gtk2::TreePath. That's it, that's the whole argument. πŸ’«

πŸ’œ selection_data = $drag_source->drag_data_get ($path, $selection_data)

  • $path β€” a Gtk2::TreePath. 🩷
  • $selection_data β€” a Gtk2::SelectionData. 🩷

okay so this one actually does the thing: it gets selection data from a drag source, no cap. The data gets written to $selection_data… unless you didn't pass $selection_data, in which case it goes into a brand-new Gtk2::SelectionData object with target type "GTK_TREE_MODEL_ROW". ✨

And on success? The return is the given or new object β€” whichever one we ended up with. On failure? The return is undef. 😭 Not me getting undef back and having a whole crisis. Check your returns, bestie.

πŸ’œ boolean = $drag_source->row_draggable ($path)

  • $path β€” a Gtk2::TreePath. 🌈

πŸ‘€ SEE ALSO πŸ‘€

  • Gtk2
  • Glib::Interface

iykyk. go read those next, the lore runs deep. πŸ“š


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.

πŸ’€ lowkey important: that's the whole license situation, don't skip it. respect the license, it's iconic behavior.

perl v5.42.0 Β· 2025-07-25 Β· Gtk2::T...gSource(3)

and that's the page!! πŸŽ€βœ¨ mwah, go forth and drag responsibly, bestie. πŸ’–

πŸ“¦ where this page comes from