Gtk2::G...lection(3)
β¨ Gtk2::Gdk::Selection β¨
okay bestie, sit down, hydrate, and let me tell you about Gtk2::Gdk::Selection π β this is the Perl glue for GDK's X selection machinery, and yes it lives in the Gtk2 distribution. It's giving "low-level but iconic." π
πΈ NAME πΈ
Gtk2::Gdk::Selection β fr fr, that's the whole name, no notes π
π¦ METHODS π¦
π« Gtk2::Gdk::Selection->convert ($requestor, $selection, $target, $time_)
the args, in order, no skipping:
$requestor(Gtk2::Gdk::Window) β the window doing the asking π«Ά$selection(Gtk2::Gdk::Atom) β which selection we're talking about$target(Gtk2::Gdk::Atom) β the target format you want$time_(unsigned) β the timestamp, and yes the trailing underscore is part of the name, don't @ me π
π« window or undef = Gtk2::Gdk::Selection->owner_get ($selection)
$selection(Gtk2::Gdk::Atom)
it hands you back a window or undef, so like... vibe check the return value before you use it, bestie π
π« window or undef = Gtk2::Gdk::Selection->owner_get_for_display ($display, $selection)
$display(Gtk2::Gdk::Display)$selection(Gtk2::Gdk::Atom)
returns a window or undef, same energy as above β¨
Since: gtk+ 2.2 β so like, old news but still slaying π
π« boolean = Gtk2::Gdk::Selection->owner_set ($owner, $selection, $time_, $send_event)
$owner(Gtk2::Gdk::Window or undef) β note the or undef, she's flexible π$selection(Gtk2::Gdk::Atom)$time_(unsigned)$send_event(boolean)
gives you back a boolean, periodt π
π« boolean = Gtk2::Gdk::Selection->owner_set_for_display ($display, $owner, $selection, $time_, $send_event)
$display(Gtk2::Gdk::Display)$owner(Gtk2::Gdk::Window) β and here she is NOT "or undef", so don't come for me, that's literally what it says π$selection(Gtk2::Gdk::Atom)$time_(unsigned)$send_event(boolean)
returns a boolean π
Since: gtk+ 2.2 β vintage but valid β¨
π« (data, prop_type, prop_format) = Gtk2::Gdk::Selection->property_get ($requestor)
$requestor(Gtk2::Gdk::Window)
you get three things back: data, prop_type, and prop_format β a lil trio, cute π
Use Gtk2::Clipboard instead. β okay so the manpage literally says this, and I am not gonna pretend otherwise. this one is deprecated-coded, bestie, take the hint π«Ά
π« Gtk2::Gdk::Selection->send_notify ($requestor, $selection, $target, $property, $time_)
$requestor(unsigned) β yes unsigned here, not a window, do not mix them up π$selection(Gtk2::Gdk::Atom)$target(Gtk2::Gdk::Atom)$property(Gtk2::Gdk::Atom)$time_(unsigned)
no return value listed, she just does her thing π
π« Gtk2::Gdk::Selection->send_notify_for_display ($display, $requestor, $selection, $target, $property, $time_)
$display(Gtk2::Gdk::Display)$requestor(unsigned)$selection(Gtk2::Gdk::Atom)$target(Gtk2::Gdk::Atom)$property(Gtk2::Gdk::Atom)$time_(unsigned)
Since: gtk+ 2.2 β the whole display-flavored squad arrived in 2.2, iconic behavior π
π₯ SEE ALSO π₯
- Gtk2 β go read that one too, iykyk πΈ
π 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, bestie, you ate that πβ¨ this was perl v5.42.0, dated 2025-07-25, and the page is Gtk2::G...lection(3) β mwah, go forth and select responsibly π
π
π¦ 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