---
name: "Gtk2::StatusIcon"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::StatusIcon"
---

# Gtk2::StatusIcon(3pm)

wrapper for GtkStatusIcon

## NAME

Gtk2::StatusIcon - wrapper for GtkStatusIcon

## HIERARCHY

```
  Glib::Object
  +----Gtk2::StatusIcon
```

## METHODS

### statusicon = Gtk2::StatusIcon-\>new

### statusicon = Gtk2::StatusIcon-\>new\_from\_file ($filename)

- •

  `$filename` (localized file name)

### 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)

### boolean = $status\_icon-\>get\_blinking

### $status\_icon-\>set\_blinking ($blinking)

- •

  `$blinking` (boolean)

### $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)

### list = $status\_icon-\>get\_geometry

### 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\_name

### boolean = $status\_icon-\>is\_embedded

### $status\_icon-\>set\_name ($name)

- •

  `$name` (string)

Since: gtk+ 2.20

### pixbuf or undef = $status\_icon-\>get\_pixbuf

### (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)

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*.

### 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\_size

### string or undef = $status\_icon-\>get\_stock

### imagetype = $status\_icon-\>get\_storage\_type

### string = $status\_icon-\>get\_title

Since: gtk+ 2.18

### $status\_icon-\>set\_title ($title)

- •

  `$title` (string)

Since: gtk+ 2.18

### 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

### boolean = $status\_icon-\>get\_visible

### $status\_icon-\>set\_visible ($visible)

- •

  `$visible` (boolean)

### unsigned = $status\_icon-\>get\_x11\_window\_id

Since: gtk+ 2.14

## PROPERTIES

- 'blinking' (boolean : default false : readable / writable / private)

  Whether or not the status icon is blinking

- 'embedded' (boolean : default false : readable / private)

  Whether or not the status icon is embedded

- 'file' (string : default undef : writable / private)

  Filename to load and display

- 'gicon' (Glib::Object::\_Unregistered::GIcon : default undef : readable / writable / private)

  The GIcon being displayed

- 'has-tooltip' (boolean : default false : readable / writable / private)

  Whether this tray icon has a tooltip

- 'icon-name' (string : default undef : readable / writable / private)

  The name of the icon from the icon theme

- 'orientation' (Gtk2::Orientation : default "horizontal" : readable / private)

  The orientation of the tray

- 'pixbuf' (Gtk2::Gdk::Pixbuf : default undef : readable / writable / private)

  A GdkPixbuf to display

- 'screen' (Gtk2::Gdk::Screen : default undef : readable / writable / private)

  The screen where this status icon will be displayed

- 'size' (integer : default 0 : readable / private)

  The size of the icon

- 'stock' (string : default undef : readable / writable / private)

  Stock ID for a stock image to display

- 'storage-type' (Gtk2::ImageType : default "empty" : readable / private)

  The representation being used for image data

- 'title' (string : default undef : readable / writable / private)

  The title of this tray icon

- 'tooltip-markup' (string : default undef : readable / writable / private)

  The contents of the tooltip for this tray icon

- 'tooltip-text' (string : default undef : readable / writable / private)

  The contents of the tooltip for this widget

- 'visible' (boolean : default true : readable / writable / private)

  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

Gtk2, Glib::Object

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
