Gtk2::Selection(3)

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

πŸ’– Gtk2::Selection πŸ’–

okay bestie, welcome to Gtk2::Selection β€” it's part of the Gtk2 Perl bindings, and it's all about selections, aka that whole "who owns the clipboard / the primary selection / the X11 selection drama" situation. It's giving clipboard politics, honestly. Let's get into it πŸŽ€


✨ METHODS ✨

🌸 boolean = Gtk2::Selection->owner_set ($widget, $selection, $time_)

claims ownership of a selection for you, and tells you if it worked with a boolean. here's the tea on the args:

  • $widget (Gtk2::Widget or undef) β€” the widget doing the claiming, or literally nothing, which is valid, okay? undef is allowed, no judgement πŸ’…
  • $selection (Gtk2::Gdk::Atom) β€” which selection you're snatching
  • $time_ (unsigned) β€” the timestamp, yes it has a trailing underscore, that's just her name, leave her alone 😭

πŸ¦‹ boolean = Gtk2::Selection->owner_set_for_display ($display, $widget, $selection, $time_)

same energy as above but you get to pick the display too. iconic, honestly. args:

  • $display (Gtk2::Gdk::Display) β€” which display we're doing this on
  • $widget (Gtk2::Widget or undef) β€” widget or undef, both valid, she contains multitudes
  • $selection (Gtk2::Gdk::Atom) β€” the selection in question
  • $time_ (unsigned) β€” timestamp, yes again with the underscore, it's a whole thing
Since: gtk+ 2.2 ✨ (so she's been around, lowkey a veteran)

🫢 boolean = Gtk2->targets_include_image ($writable, $first_target_atom, ...)

does this target list include an image? let's find out. args:

  • $writable (boolean) β€” is it writable, yes or no
  • $first_target_atom (Gtk2::Gdk::Atom) β€” the first target atom
  • ... (list) β€” and then the rest of them, as many as you want, go off
Since: gtk+ 2.10 ⭐

🧚 boolean = Gtk2->targets_include_rich_text ($buffer, $first_target_atom, ...)

rich text check, fancy girl behaviour. args:

  • $buffer (Gtk2::TextBuffer) β€” the text buffer we're inspecting
  • $first_target_atom (Gtk2::Gdk::Atom) β€” the first target atom
  • ... (list) β€” the rest of the atoms, list it out bestie
Since: gtk+ 2.10 ⭐

🌈 boolean = Gtk2->targets_include_text ($first_target_atom, ...)

plain old text check, no frills, still slaying. args:

  • $first_target_atom (Gtk2::Gdk::Atom) β€” the first target atom
  • ... (list) β€” the remaining atoms, as many as you like
Since: gtk+ 2.10 ⭐

πŸ‘‘ boolean = Gtk2->targets_include_uri ($first_target_atom, ...)

are there URIs in here? links? bestie we love a link. args:

  • $first_target_atom (Gtk2::Gdk::Atom) β€” the first target atom
  • ... (list) β€” the rest of the atoms, go wild
Since: gtk+ 2.10 ⭐

🌟 SEE ALSO 🌟

  • Gtk2 β€” the whole main character, go read her

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

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


and that's the whole page bestie, no cap 🫢 this was Gtk2::Selection(3), from the User Contributed Perl Documentation, documented for perl v5.42.0 and dated 2025-07-25. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from