Gtk2::G...lection(3)

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

✨ 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 (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