Gtk2::Drag(3)
π NAME π
okay bestie, welcome to Gtk2::Drag β it's a whole module in the Gtk2 Perl bindings family (yes, the Gtk2::Drag(3) page, you found it, iconic) and it's literally the drag-and-drop girlie of the toolkit β¨
π METHODS π
π¦ dragcontext = Gtk2::Drag->begin ($widget, $targets, $actions, $button, $event)
so this is the method, the main character fr. You call it as a class method on Gtk2::Drag and it hands you back a drag context, and the args go like this π
$widgetβ aGtk2::Widget, aka the thing you're dragging from π«Ά$targetsβ aGtk2::TargetList, the list of stuff this drag will accept$actionsβ aGtk2::Gdk::DragAction, the flag set saying what kinda drag this is$buttonβ aninteger, the mouse button number$eventβ aGtk2::Gdk::Event, the event that kicked the whole thing off
bestie pls note: the order is$widget,$targets,$actions,$button,$eventβ don't shuffle them, the vibes will NOT survive π
π ENUMS AND FLAGS π
β flags Gtk2::Gdk::DragAction
these are the drag-action flags, and every one of them has a lowercase nickname AND the loud uppercase constant name. both work, pick your fave π
'default'/'GDK_ACTION_DEFAULT'β the default one, as the name so rudely implies'copy'/'GDK_ACTION_COPY'β copy vibes, the original stays put π'move'/'GDK_ACTION_MOVE'β move vibes, it's going places'link'/'GDK_ACTION_LINK'β link vibes π'private'/'GDK_ACTION_PRIVATE'β private vibes, no sharing π'ask'/'GDK_ACTION_ASK'β ask vibes, it wants to check in first
π SEE ALSO π
Gtk2β go read that one next, it's the whole parent situation π«Ά
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team. β¨
This software is licensed under the LGPL. See Gtk2 for a full notice.
okay that's the whole page, no cap πΈ this was perl v5.42.0, dated 2025-07-25, and honestly? iconic. periodt π
π
π¦ 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