Gnome2::App(3)

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

πŸ’– 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 to undef if 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:

  • Gnome2
  • Glib::Object
  • Glib::InitiallyUnowned
  • Gtk2::Object
  • Gtk2::Widget
  • Gtk2::Container
  • Gtk2::Bin
  • Gtk2::Window

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