Gtk2::Plug(3)

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

πŸ’– 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::AtkImplementorIface
  • Gtk2::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 (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