Gtk2::Drag(3)

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

πŸ’– 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 β€” a Gtk2::Widget, aka the thing you're dragging from 🫢
  • $targets β€” a Gtk2::TargetList, the list of stuff this drag will accept
  • $actions β€” a Gtk2::Gdk::DragAction, the flag set saying what kinda drag this is
  • $button β€” an integer, the mouse button number
  • $event β€” a Gtk2::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 (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