Gtk2::Plug(3)
π Gtk2::Plug π
okay bestie, so you know how sometimes you want one app's window to just... live inside another app's window? like it's moving in, rent free, sharing a wall? that's this. Gtk2::Plug is the perl wrapper for GtkPlug, and it's literally the little plug that gets shoved into a socket. iykyk π¦
β¨ HIERARCHY β¨
the family tree, and yes we're gonna read the whole thing because lineage matters π
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Bin
+----Gtk2::Window
+----Gtk2::Plug
so like, it's a Gtk2::Window that's also a Gtk2::Bin that's also a Gtk2::Containerβ¦ it's giving "i contain multitudes" fr fr πΈ
π«Ά INTERFACES π«Ά
these are the interfaces it implements, no cap:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::Buildable
π METHODS π
π widget = Gtk2::Plug->new ($socket_id)
makes you a brand new plug, and it's obsessed with the socket id you hand it.
$socket_id(Gtk2::Gdk::NativeWindow) β the socket's native window, the address of the place your plug is moving into π
π widget = Gtk2::Plug->new_for_display
Since: gtk+ 2.2
same energy as new but display-aware. that's it, that's the whole vibe.
π§ $plug->construct ($socket_id)
you already got a plug object and now you're building it out with a socket.
$socket_id(Gtk2::Gdk::NativeWindow) β the socket's native window, again, iconic π«
π $plug->construct_for_display ($display, $socket_id)
the display-having version of construct. look at her go.
$display(Gtk2::Gdk::Display) β the display we're doing this on$socket_id(Gtk2::Gdk::NativeWindow) β the socket's native window
Since: gtk+ 2.2
β¨ boolean = $plug->get_embedded
tells you whether the plug is embedded or not. is she in? is she out? main character can't tell you, this method can.
Since: gtk+ 2.14
π¦ nativewindow = $plug->get_id
hands you the plug's own native window id. that's the id other people use to find her π
π window or undef = $plug->get_socket_window
gives you the window of the socket this plug is embedded in β or undef if there's no such thing, and honestly relatable.
Since: gtk+ 2.14
π PROPERTIES π
'embedded' (boolean : default false : readable / private / static-nick / static-blurb)
Whether or not the plug is embedded
'socket-window' (Gtk2::Gdk::Window : default undef : readable / private / static-nick / static-blurb)
The window of the socket the plug is embedded in
π₯ SIGNALS π₯
embedded(Gtk2::Plug) β the signal, the moment, the slay β¨
πΈ SEE ALSO πΈ
the whole extended friend group, go say hi:
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Window
π 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, no skips no summaries, we ate and left no crumbs π«Ά this was perl v5.42.0, dated 2025-07-25, straight from the Gtk2::Plug(3) manpage. go forth and embed π
β¨
π¦ 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