Gnome2::App(3)
π Gnome2::App π
okay bestie, so this whole page is the manual for Gnome2::App(3) β it lives under the User Contributed Perl Documentation umbrella and it's literally the Perl wrapper for GnomeApp. Like, the C thing? Wrapped. For you. In Perl. We're so back. β¨
πΈ NAME πΈ
Gnome2::App β wrapper for GnomeApp. that's it, that's the whole vibe. she wraps. she serves. π
π¦ HIERARCHY π¦
here's the family tree, and yes she has main character energy all the way down:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Bin
+----Gtk2::Window
+----Gnome2::App
she's a Window that's been to college. β¨
π INTERFACES π
these are the interfaces she implements, no cap:
Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable
π METHODS π
okay this is the big one, grab a snack π
β¨ widget = Gnome2::App->new ($appname, $title=undef)
constructor queen. makes you a shiny new app.
$appname(string) β the app's name, string, you got this$title(string) β the title, also a string, and it defaults toundefif you don't pass one
β¨ scalar = $app->accel_group
hands you back the accel group as a scalar. keyboard shortcuts live here, iykyk. β¨οΈ
β¨ $app->add_dock_item ($item, $placement, $band_num, $band_position, $offset)
plops a dock item into place. five whole arguments, she's thorough:
$item(Gnome2::Bonobo::DockItem) β the item itself$placement(Gnome2::Bonobo::DockPlacement) β where it goes$band_num(integer) β which band$band_position(integer) β position within the band$offset(integer) β the offset, yes it's an integer
β¨ widget = $app->add_docked ($widget, $name, $behavior, $placement, $band_num, $band_position, $offset)
same energy, but you hand her a widget and she docks it for you. returns the widget. π«Ά
$widget(Gtk2::Widget) β the widget going in$name(string) β name it$behavior(Gnome2::Bonobo::DockItemBehavior) β how it should behave$placement(Gnome2::Bonobo::DockPlacement) β where it lands$band_num(integer) β band number$band_position(integer) β band position$offset(integer) β offset
β¨ $app->add_toolbar ($toolbar, $name, $behavior, $placement, $band_num, $band_position, $offset)
toolbar time!! same seven-arg situation, but for a toolbar instead of a widget.
$toolbar(Gtk2::Toolbar) β the toolbar$name(string) β name$behavior(Gnome2::Bonobo::DockItemBehavior) β behavior$placement(Gnome2::Bonobo::DockPlacement) β placement$band_num(integer) β band number$band_position(integer) β band position$offset(integer) β offset
β¨ scalar = $app->contents
gets the contents, returns a scalar. simple. iconic.
β¨ $app->set_contents ($contents)
sets the contents.
$contents(Gtk2::Widget) β the widget that becomes the contents
β¨ $app->create_menus ($uiinfo)
builds the menus for you from UI info.
$uiinfo(Gnome2::UIInfo) β the UIInfo driving it
β¨ $app->create_toolbar ($uiinfo)
same but a toolbar. she's versatile like that.
$uiinfo(Gnome2::UIInfo) β the UIInfo driving it
β¨ scalar = $app->dock
gives you the dock as a scalar.
β¨ dock = $app->get_dock
gives you the dock, but as a dock. yeah. two ways to get the same girl. π
β¨ dockitem = $app->get_dock_item_by_name ($name)
find a dock item by name, returns a dockitem.
$name(string) β the name you're searching for
β¨ $app->enable_layout_config ($enable)
flips layout config on or off.
$enable(boolean) β true/false, turn it on or don't
β¨ scalar = $app->get_enable_layout_config
asks her whether layout config is enabled. returns a scalar.
β¨ $app->insert_menus ($path, $menuinfo)
inserts menus at a path.
$path(string) β the path$menuinfo(Gnome2::UIInfo) β the UIInfo
β¨ $app->install_menu_hints ($uiinfo)
installs the menu hints.
$uiinfo(Gnome2::UIInfo) β the UIInfo with the hints
β¨ scalar = $app->layout
the layout, as a scalar.
β¨ scalar = $app->menubar
the menubar, as a scalar.
β¨ $app->set_menus ($menubar)
sets the menubar.
$menubar(Gtk2::MenuBar) β the MenuBar you want
β¨ scalar = $app->prefix
the prefix, as a scalar. β¨
β¨ $app->remove_menu_range ($path, $start, $items)
yeets a range of menus out.
$path(string) β where$start(integer) β start index$items(integer) β how many items to remove
β¨ $app->remove_menus ($path, $items)
same removal energy, just path + count.
$path(string) β where$items(integer) β how many
β¨ Gnome2::App->setup_toolbar ($toolbar, $dock_item)
a class method, not an instance one β call it on Gnome2::App itself. it sets up your toolbar. π
$toolbar(Gtk2::Toolbar) β the toolbar$dock_item(Gnome2::Bonobo::DockItem) β the dock item
β¨ scalar = $app->statusbar
the statusbar, as a scalar.
β¨ $app->set_statusbar_custom ($container, $statusbar)
custom statusbar setup, because sometimes you need your own container.
$container(Gtk2::Widget) β the container$statusbar(Gtk2::Widget) β the statusbar widget
β¨ $app->set_statusbar ($statusbar)
the regular, non-custom statusbar setter.
$statusbar(Gtk2::Widget) β the statusbar widget
β¨ $app->set_toolbar ($toolbar)
sets the toolbar.
$toolbar(Gtk2::Toolbar) β the toolbar
β¨ scalar = $app->vbox
the vbox, as a scalar. and that's the last one bestie, you made it. π
π PROPERTIES π
'app-id'(string : default undef : readable / writable / construct) β the application ID string. she's readable, she's writable, she's construct. triple threat. π
π ENUMS AND FLAGS π
β¨ flags Gnome2::Bonobo::DockItemBehavior
'normal'/'BONOBO_DOCK_ITEM_BEH_NORMAL''exclusive'/'BONOBO_DOCK_ITEM_BEH_EXCLUSIVE''never-floating'/'BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING''never-vertical'/'BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL''never-horizontal'/'BONOBO_DOCK_ITEM_BEH_NEVER_HORIZONTAL''locked'/'BONOBO_DOCK_ITEM_BEH_LOCKED'
β¨ enum Gnome2::Bonobo::DockPlacement
'top'/'BONOBO_DOCK_TOP''right'/'BONOBO_DOCK_RIGHT''bottom'/'BONOBO_DOCK_BOTTOM''left'/'BONOBO_DOCK_LEFT''floating'/'BONOBO_DOCK_FLOATING'
π«Ά SEE ALSO π«Ά
go read these next, bestie, they're all part of the family:
Gnome2Glib::ObjectGlib::InitiallyUnownedGtk2::ObjectGtk2::WidgetGtk2::ContainerGtk2::BinGtk2::Window
π COPYRIGHT π
Copyright (C) 2003-2004 by the gtk2-perl team.
This software is licensed under the LGPL. See Gnome2 for a full notice.
and that's the whole page, babe!! this gem of a doc came to you via perl v5.42.0, dated 2025-07-25, and she's filed under Gnome2::App(3). go build something iconic with her. πβ¨ππ¦
π¦ where this page comes from
- fedora 43: perl-Gnome2 1.048-18.fc43 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms