Gtk2::Selection(3)
π 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 orundef) β the widget doing the claiming, or literally nothing, which is valid, okay?undefis 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 orundef) β widget orundef, 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 π
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
- 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