Gtk2::TargetList(3)
π Gtk2::TargetList β ok bestie, let's talk drag-and-drop π
So <pink>Gtk2::TargetList</pink> is literally just a wrapper for GtkTargetList in the Gtk2 Perl bindings, and it lives in the Gtk2::TargetList(3) manpage, which is what you're reading rn. It's the whole vibe of "what kinds of data can this widget even accept" β the guest list for your drag-and-drop party π
π¦ HIERARCHY π¦
This is where it sits in the family tree, and yes it's giving nepo baby:
Glib::Boxed
+----Gtk2::TargetList
β¨ METHODS β¨
πΈ targetlist = Gtk2::TargetList->new (...)
Build a whole new target list from scratch, queen π
...β a (list) ofGtk2::TargetEntry's. That's it, that's the whole guest list.
π $list->add ($target, $flags, $info)
Add one single target to the list. One in, one out, no drama π
$targetβ aGtk2::Gdk::Atom$flagsβ an integer$infoβ an integer
π $list->add_image_targets ($info, $writable)
Adds all the image targets in one go, so you don't have to list them yourself. Iconic behaviour honestly β¨
$infoβ an integer$writableβ a boolean
Since: gtk+ 2.6 β so if you're on something ancient, this one's not gonna show up for you π
π§ $list->add_rich_text_targets ($info, $deserializable, $buffer)
Rich text targets, added as a bundle. Very fancy, very demure π«Ά
$infoβ an integer$deserializableβ a boolean$bufferβ aGtk2::TextBuffer
Since: gtk+ 2.10 β newer than the image one, just so you know πΈ
π $list->add_table (...)
Add a whole table of entries at once, because doing it one by one is not the move.
...β a (list) ofGtk2::TargetEntry's
β $list->add_text_targets ($info)
All the text targets, boom, done, no cap.
$infoβ an integer
Since: gtk+ 2.6
π₯ $list->add_uri_targets ($info)
URIs get their own little bundle too. Slay.
$infoβ an integer
Since: gtk+ 2.6
π integer = $list->find ($target)
Look up a target in the list and get back an integer. It's giving detective energy π
$targetβ aGtk2::Gdk::Atom
π $list->remove ($target)
Bye bye target, we hardly knew ye. Removes it from the list π
$targetβ aGtk2::Gdk::Atom
π SEE ALSO π
Go read these next, bestie, they're all connected:
Gtk2Glib::BoxedGtk2::TargetEntry
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
Ok that's the whole page, you ate it up fr fr π This was perl v5.42.0, dated 2025-07-25, and it's the Gtk2::TargetList(3) manpage β go forth and drag-and-drop responsibly, mwah πβ¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms