Gtk2::StatusIcon(3)
π NAME π
Gtk2::StatusIcon β bestie, it's a wrapper for GtkStatusIcon. That's the whole thing. π
(this page comes to you from the User Contributed Perl Documentation, and it's literally all about that little icon chillin' in your system tray π)
π¦ HIERARCHY π¦
Glib::Object
+----Gtk2::StatusIcon
So it's a Glib::Object at its core, and Gtk2::StatusIcon is the main character that branches off it. β¨
π METHODS π
β¨ making one β¨
statusicon = Gtk2::StatusIcon->newβ brand new status icon, no notes. π«Άstatusicon = Gtk2::StatusIcon->new_from_file ($filename)$filename(localized file name) β ngl, localized file name is the whole personality here.
statusicon = Gtk2::StatusIcon->new_from_icon_name ($icon_name)$icon_name(string)
statusicon = Gtk2::StatusIcon->new_from_pixbuf ($pixbuf)$pixbuf(Gtk2::Gdk::Pixbuf)
statusicon = Gtk2::StatusIcon->new_from_stock ($stock_id)$stock_id(string)
β¨ blinking β¨
boolean = $status_icon->get_blinkingβ is it blinking or is it not, we must know π$status_icon->set_blinking ($blinking)$blinking(boolean)
β¨ swapping out the image β¨
$status_icon->set_from_file ($filename)$filename(localized file name)
$status_icon->set_from_icon_name ($icon_name)$icon_name(string)
$status_icon->set_from_pixbuf ($pixbuf)$pixbuf(Gtk2::Gdk::Pixbuf or undef)
$status_icon->set_from_stock ($stock_id)$stock_id(string)
β¨ info + tooltips β¨
list = $status_icon->get_geometryβ it hands you back a list, that's it, that's all it's giving.boolean = $status_icon->get_has_tooltip- Since: gtk+ 2.16
$status_icon->set_has_tooltip ($has_tooltip)$has_tooltip(boolean)- Since: gtk+ 2.16
string or undef = $status_icon->get_icon_nameboolean = $status_icon->is_embedded$status_icon->set_name ($name)$name(string)- Since: gtk+ 2.20
pixbuf or undef = $status_icon->get_pixbuf
β¨ the menu positioning one (iykyk) β¨
(x, y, push_in) = Gtk2::StatusIcon::position_menu (menu, icon)
(x, y, push_in) = Gtk2::StatusIcon::position_menu (menu, x, y, icon)
...(list)$icon(Gtk2::StatusIcon)$y(integer)$x(integer)
ok so this function takes four arguments so that it may be passed directly as the menu position callback to Gtk2::Menu::popup(), which passes in initial x and y values for historical reasons. Otherwise, you need only pass two arguments. π
This function can be used as the menu_pos_func argument to Gtk2::Menu::popup.
β¨ screens, sizes, storage β¨
screen = $status_icon->get_screen- Since: gtk+ 2.12
$status_icon->set_screen ($screen)$screen(Gtk2::Gdk::Screen)- Since: gtk+ 2.12
integer = $status_icon->get_sizestring or undef = $status_icon->get_stockimagetype = $status_icon->get_storage_type
β¨ titles β¨
string = $status_icon->get_title- Since: gtk+ 2.18
$status_icon->set_title ($title)$title(string)- Since: gtk+ 2.18
β¨ tooltip markup & text β¨
string or undef = $status_icon->get_tooltip_markup- Since: gtk+ 2.16
$status_icon->set_tooltip_markup ($markup)$markup(string or undef)- Since: gtk+ 2.16
$status_icon->set_tooltip ($tooltip_text)$tooltip_text(string or undef)
string or undef = $status_icon->get_tooltip_text- Since: gtk+ 2.16
$status_icon->set_tooltip_text ($text)$text(string or undef)- Since: gtk+ 2.16
β¨ visible or not β¨
boolean = $status_icon->get_visible$status_icon->set_visible ($visible)$visible(boolean)
β¨ x11 moment β¨
unsigned = $status_icon->get_x11_window_id- Since: gtk+ 2.14
π PROPERTIES π
'blinking'β(boolean : default false : readable / writable / private / static-nick / static-blurb / deprecated)β Whether or not the status icon is blinking'embedded'β(boolean : default false : readable / private / static-nick / static-blurb)β Whether or not the status icon is embedded'file'β(string : default undef : writable / private / static-nick / static-blurb)β Filename to load and display'gicon'β(Glib::Object::_Unregistered::GIcon : default undef : readable / writable / private / static-nick / static-blurb)β The GIcon being displayed'has-tooltip'β(boolean : default false : readable / writable / private / static-nick / static-blurb)β Whether this tray icon has a tooltip'icon-name'β(string : default undef : readable / writable / private / static-nick / static-blurb)β The name of the icon from the icon theme'orientation'β(Gtk2::Orientation : default "horizontal" : readable / private / static-nick / static-blurb)β The orientation of the tray'pixbuf'β(Gtk2::Gdk::Pixbuf : default undef : readable / writable / private / static-nick / static-blurb)β A GdkPixbuf to display'screen'β(Gtk2::Gdk::Screen : default undef : readable / writable / private / static-nick / static-blurb)β The screen where this status icon will be displayed'size'β(integer : default 0 : readable / private / static-nick / static-blurb)β The size of the icon'stock'β(string : default undef : readable / writable / private / static-nick / static-blurb)β Stock ID for a stock image to display'storage-type'β(Gtk2::ImageType : default "empty" : readable / private / static-nick / static-blurb)β The representation being used for image data'title'β(string : default undef : readable / writable / private / static-nick / static-blurb)β The title of this tray icon'tooltip-markup'β(string : default undef : readable / writable / private / static-nick / static-blurb)β The contents of the tooltip for this tray icon'tooltip-text'β(string : default undef : readable / writable / private / static-nick / static-blurb)β The contents of the tooltip for this widget'visible'β(boolean : default true : readable / writable / private / static-nick / static-blurb)β Whether or not the status icon is visible
π₯ SIGNALS π₯
activate(Gtk2::StatusIcon)boolean = button-press-event(Gtk2::StatusIcon,Gtk2::Gdk::Event)boolean = button-release-event(Gtk2::StatusIcon,Gtk2::Gdk::Event)popup-menu(Gtk2::StatusIcon,Glib::UInt,Glib::UInt)boolean = query-tooltip(Gtk2::StatusIcon,integer,integer,boolean,Gtk2::Tooltip)boolean = scroll-event(Gtk2::StatusIcon,Gtk2::Gdk::Event)boolean = size-changed(Gtk2::StatusIcon,integer)
π§ ENUMS AND FLAGS π§
π enum Gtk2::ImageType
'empty'/GTK_IMAGE_EMPTY'pixmap'/GTK_IMAGE_PIXMAP'image'/GTK_IMAGE_IMAGE'pixbuf'/GTK_IMAGE_PIXBUF'stock'/GTK_IMAGE_STOCK'icon-set'/GTK_IMAGE_ICON_SET'animation'/GTK_IMAGE_ANIMATION'icon-name'/GTK_IMAGE_ICON_NAME'gicon'/GTK_IMAGE_GICON
π enum Gtk2::Orientation
'horizontal'/GTK_ORIENTATION_HORIZONTAL'vertical'/GTK_ORIENTATION_VERTICAL
πΈ SEE ALSO πΈ
Gtk2Glib::Object
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
ok that's the whole page bestie, you ate π
β¨ this lil masterpiece was served up by perl v5.42.0 on 2025-07-25, and it's giving Gtk2::StatusIcon(3) energy forever π¦ππ
π¦ 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