## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Status_Icon

- Goto spec source

# Description

    package Gtk.Status_Icon is

The "system tray" or notification area is normally used for transient icons that indicate some special state. For example, a system tray icon might appear to tell the user that they have new mail, or have an incoming instant message, or something along those lines. The basic idea is that creating an icon in the notification area is less annoying than popping up a dialog.

A Gtk_Status_Icon object can be used to display an icon in a "system tray".

The icon can have a tooltip, and the user can interact with it by activating it or popping up a context menu. Critical information should not solely be displayed in a Gtk_Status_Icon, since it may not be visible (e.g. when the user doesn't have a notification area on his panel). This can be checked with Is_Embedded.

On X11, the implementation follows the freedesktop.org "System Tray" specification. Implementations of the "tray" side of this specification can be found e.g. in the GNOME and KDE panel applications.

Note that a Gtk_Status_Icon is not a widget, but just a GObject. Making it a widget would be impractical, since the system tray on Win32 doesn't allow to embed arbitrary widgets.

Binding from C File version 2.16.6

# Classes

### Gtk_Status_Icon_Record

- Goto declaration in source
- Goto full declaration in source

    type Gtk_Status_Icon_Record is new Glib.Object.GObject_Record with private;

#### Ancestors:

Glib.Object.GObject_Record

#### Primitive operations:

Get_Blinking

- To API doc
- To spec

Get_Geometry

- To API doc
- To spec

Get_Gicon

- To API doc
- To spec

Get_Has_Tooltip

- To API doc
- To spec

Get_Icon_Name

- To API doc
- To spec

Get_Pixbuf

- To API doc
- To spec

Get_Screen

- To API doc
- To spec

Get_Size

- To API doc
- To spec

Get_Stock

- To API doc
- To spec

Get_Storage_Type

- To API doc
- To spec

Get_Tooltip_Markup

- To API doc
- To spec

Get_Tooltip_Text

- To API doc
- To spec

Get_Visible

- To API doc
- To spec

Get_X11_Window_Id

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Is_Embedded

- To API doc
- To spec

Set_Blinking

- To API doc
- To spec

Set_From_File

- To API doc
- To spec

Set_From_Gicon

- To API doc
- To spec

Set_From_Icon_Name

- To API doc
- To spec

Set_From_Pixbuf

- To API doc
- To spec

Set_From_Stock

- To API doc
- To spec

Set_Has_Tooltip

- To API doc
- To spec

Set_Screen

- To API doc
- To spec

Set_Tooltip

- To API doc
- To spec

Set_Tooltip_Markup

- To API doc
- To spec

Set_Tooltip_Text

- To API doc
- To spec

Set_Visible

- To API doc
- To spec

# Types

### Gtk_Status_Icon

- Goto declaration in source

    type Gtk_Status_Icon is access all Gtk_Status_Icon_Record'Class;

# Constants & Global variables

### Blinking_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Blinking_Property       : constant Glib.Properties.Property_Boolean;

### Embedded_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Embedded_Property       : constant Glib.Properties.Property_Boolean;

### File_Property

- Goto declaration in source

(Glib.Properties.Property_String)

    File_Property           : constant Glib.Properties.Property_String;

### Gicon_Property

- Goto declaration in source

(Glib.Properties.Property_Object)

    Gicon_Property          : constant Glib.Properties.Property_Object;

### Has_Tooltip_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Has_Tooltip_Property    : constant Glib.Properties.Property_Boolean;

### Icon_Name_Property

- Goto declaration in source

(Glib.Properties.Property_String)

    Icon_Name_Property      : constant Glib.Properties.Property_String;

### Orientation_Property

- Goto declaration in source

(Glib.Properties.Property_Enum)

    Orientation_Property    : constant Glib.Properties.Property_Enum;

### Pixbuf_Property

- Goto declaration in source

(Glib.Properties.Property_Object)

    Pixbuf_Property         : constant Glib.Properties.Property_Object;

### Screen_Property

- Goto declaration in source

(Glib.Properties.Property_Object)

    Screen_Property         : constant Glib.Properties.Property_Object;

### Size_Property

- Goto declaration in source

(Glib.Properties.Property_Int)

    Size_Property           : constant Glib.Properties.Property_Int;

### Stock_Property

- Goto declaration in source

(Glib.Properties.Property_String)

    Stock_Property          : constant Glib.Properties.Property_String;

### Storage_Type_Property

- Goto declaration in source

(Glib.Properties.Property_Enum)

    Storage_Type_Property   : constant Glib.Properties.Property_Enum;

### Tooltip_Markup_Property

- Goto declaration in source

(Glib.Properties.Property_String)

    Tooltip_Markup_Property : constant Glib.Properties.Property_String;

### Tooltip_Text_Property

- Goto declaration in source

(Glib.Properties.Property_String)

    Tooltip_Text_Property   : constant Glib.Properties.Property_String;

### Visible_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Visible_Property        : constant Glib.Properties.Property_Boolean;

# Subprograms & Entries

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return GType;

### Gtk_New

- Goto spec in source

    procedure Gtk_New (Widget: out Gtk_Status_Icon);

### Initialize

- Goto spec in source

    procedure Initialize (Widget: access Gtk_Status_Icon_Record'Class);

Creates an empty status icon object.

### Get_Storage_Type

- Goto spec in source

    function Get_Storage_Type (Status_Icon: access Gtk_Status_Icon_Record) return Gtk.Image.Gtk_Image_Type;

Gets the type of representation being used by the Gtk_Status_Icon to store image data. If the Gtk_Status_Icon has no image data, the return value will be Image_Empty.

### Is_Embedded

- Goto spec in source

    function Is_Embedded (Status_Icon: access Gtk_Status_Icon_Record) return Boolean;

Returns whether the status icon is embedded in a notification area.

### Gtk_New_From_File

- Goto spec in source

    procedure Gtk_New_From_File (Widget: out Gtk_Status_Icon;Filename: String);

### Initialize_From_File

- Goto spec in source

    procedure Initialize_From_File (Widget: access Gtk_Status_Icon_Record'Class;Filename: String);

Creates a status icon displaying the file Filename. The image will be scaled down to fit in the available space in the notification area, if necessary.

### Set_From_File

- Goto spec in source

    procedure Set_From_File (Status_Icon: access Gtk_Status_Icon_Record;Filename: String);

Makes Status_Icon display the file Filename. See Gtk_New_From_File for details.

### Gtk_New_From_Gicon

- Goto spec in source

    procedure Gtk_New_From_Gicon (Widget: out Gtk_Status_Icon;Icon: Glib.G_Icon.G_Icon);

### Initialize_From_Gicon

- Goto spec in source

    procedure Initialize_From_Gicon (Widget: access Gtk_Status_Icon_Record'Class;Icon: Glib.G_Icon.G_Icon);

Creates a status icon displaying a G_Icon. If the icon is a themed icon, it will be updated when the theme changes.

### Get_Gicon

- Goto spec in source

    function Get_Gicon (Status_Icon: access Gtk_Status_Icon_Record) return Glib.G_Icon.G_Icon;

Retrieves the G_Icon being displayed by the Gtk_Status_Icon. The storage type of the status icon must be Image_Empty or Image_Gicon (see Get_Storage_Type). The caller of this function does not own a reference to the returned G_Icon. Status_Icon is left unchanged if this function fails. Returns null if the image is empty.

### Set_From_Gicon

- Goto spec in source

    procedure Set_From_Gicon (Status_Icon: access Gtk_Status_Icon_Record;Icon: Glib.G_Icon.G_Icon);

Makes Status_Icon display the G_Icon. See Gtk_New_From_G_Icon for details.

### Gtk_New_From_Icon_Name

- Goto spec in source

    procedure Gtk_New_From_Icon_Name (Widget: out Gtk_Status_Icon;Icon_Name: String);

### Initialize_From_Icon_Name

- Goto spec in source

    procedure Initialize_From_Icon_Name (Widget: access Gtk_Status_Icon_Record'Class;Icon_Name: String);

Creates a status icon displaying an icon from the current icon theme. If the current icon theme is changed, the icon will be updated appropriately.

### Get_Icon_Name

- Goto spec in source

    function Get_Icon_Name (Status_Icon: access Gtk_Status_Icon_Record) return String;

Gets the name of the icon being displayed by the Gtk_Status_Icon. The storage type of the status icon must be Image_Empty or Image_Icon_Name (see Get_Storage_Type). Returns "" if the image is empty.

### Set_From_Icon_Name

- Goto spec in source

    procedure Set_From_Icon_Name (Status_Icon: access Gtk_Status_Icon_Record;Icon_Name: String);

Makes Status_Icon display the icon named Icon_Name from the current icon theme. See Gtk_New_From_Icon_Name for details.

### Gtk_New_From_Pixbuf

- Goto spec in source

    procedure Gtk_New_From_Pixbuf (Widget: out Gtk_Status_Icon;Pixbuf: Gdk.Pixbuf.Gdk_Pixbuf);

### Initialize_From_Pixbuf

- Goto spec in source

    procedure Initialize_From_Pixbuf (Widget: access Gtk_Status_Icon_Record'Class;Pixbuf: Gdk.Pixbuf.Gdk_Pixbuf);

Creates a status icon displaying Pixbuf. The image will be scaled down to fit in the available space in the notification area, if necessary.

### Get_Pixbuf

- Goto spec in source

    function Get_Pixbuf (Status_Icon: access Gtk_Status_Icon_Record) return Gdk.Pixbuf.Gdk_Pixbuf;

Gets the Gdk_Pixbuf being displayed by the Gtk_Status_Icon. The storage type of the status icon must be Gtk_Image_Empty (in which case this function will return null) or Gtk_Image_Pixbuf (see Get_Storage_Type). The caller of this function does not own a reference to the returned pixbuf.

### Set_From_Pixbuf

- Goto spec in source

    procedure Set_From_Pixbuf (Status_Icon: access Gtk_Status_Icon_Record;Pixbuf: Gdk.Pixbuf.Gdk_Pixbuf);

Makes Status_Icon display Pixbuf. See Gtk_New_From_Pixbuf for details.

### Gtk_New_From_Stock

- Goto spec in source

    procedure Gtk_New_From_Stock (Widget: out Gtk_Status_Icon;Stock_Id: String);

### Initialize_From_Stock

- Goto spec in source

    procedure Initialize_From_Stock (Widget: access Gtk_Status_Icon_Record'Class;Stock_Id: String);

Creates a status icon displaying a stock icon. Sample stock icon names are "GTK_STOCK_OPEN", "GTK_STOCK_QUIT". You can register your own stock icon names, see Gtk.Icon_Factory.Add_Default and Gtk.Icon_Factory.Add.

### Get_Stock

- Goto spec in source

    function Get_Stock (Status_Icon: access Gtk_Status_Icon_Record) return String;

Gets the id of the stock icon being displayed by the Gtk_Status_Icon. The storage type of the status icon must be Image_Empty or Image_Stock (see Get_Storage_Type). Returns "" if the image is empty.

### Set_From_Stock

- Goto spec in source

    procedure Set_From_Stock (Status_Icon: access Gtk_Status_Icon_Record;Stock_Id: String);

Makes Status_Icon display the stock icon with the id Stock_Id. See Gtk_New_From_Stock for details.

### Get_Has_Tooltip

- Goto spec in source

    function Get_Has_Tooltip (Status_Icon: access Gtk_Status_Icon_Record) return Boolean;

### Set_Has_Tooltip

- Goto spec in source

    procedure Set_Has_Tooltip (Status_Icon: access Gtk_Status_Icon_Record;Has_Tooltip: Boolean);

Gets/Sets the has-tooltip property on Status_Icon. See has-tooltip for more information.

### Get_Tooltip_Markup

- Goto spec in source

    function Get_Tooltip_Markup (Status_Icon: access Gtk_Status_Icon_Record) return String;

### Set_Tooltip_Markup

- Goto spec in source

    procedure Set_Tooltip_Markup (Status_Icon: access Gtk_Status_Icon_Record;Markup: String);

Gets/Sets Markup as the contents of the tooltip, which is marked up with the Pango text markup language. "" means no tooltip. Set_Tooltip_Markup function will take care of setting has-tooltip to True and of the default handler for the query-tooltip signal. See also the tooltip-markup property.

### Get_Tooltip_Text

- Goto spec in source

    function Get_Tooltip_Text (Status_Icon: access Gtk_Status_Icon_Record) return String;

### Set_Tooltip_Text

- Goto spec in source

    procedure Set_Tooltip_Text (Status_Icon: access Gtk_Status_Icon_Record;Text: String);

Gets/Sets the contents of the tooltip. "" means no tooltip. This function will take care of setting has-tooltip to True and of the default handler for the query-tooltip signal. See also the tooltip-text property.

### Get_Geometry

- Goto spec in source

    procedure Get_Geometry (Status_Icon: access Gtk_Status_Icon_Record;Screen: in out Gdk.Screen.Gdk_Screen;Area: out Gdk.Rectangle.Gdk_Rectangle;Orientation: out Gtk.Enums.Gtk_Orientation;Success: out Boolean);

Status_Icon: a Gtk_Status_Icon Screen: a valid Gdk_Screen or null if the information is not needed Area: area occupied by the status icon Orientation: the orientation of the panel in which the status icon is embedded. A panel at the top or bottom of the screen is horizontal, a panel at the left or right is vertical. Success: True if the location information has been filled in. Obtains information about the location of the status icon on screen. This information can be used to e.g. position popups like notification bubbles. See Position_Menu for a more convenient alternative for positioning menus. Note that some platforms do not allow GTK+ to provide this information, and even on platforms that do allow it, the information is not reliable unless the status icon is embedded in a notification area, see Is_Embedded.

### Get_Blinking

- Goto spec in source

    function Get_Blinking (Status_Icon: access Gtk_Status_Icon_Record) return Boolean;

### Set_Blinking

- Goto spec in source

    procedure Set_Blinking (Status_Icon: access Gtk_Status_Icon_Record;Blinking: Boolean);

Makes the status icon start or stop blinking. Note that blinking user interface elements may be problematic for some users, and thus may be turned off, in which case this setting has no effect.

### Get_Screen

- Goto spec in source

    function Get_Screen (Status_Icon: access Gtk_Status_Icon_Record) return Gdk.Screen.Gdk_Screen;

### Set_Screen

- Goto spec in source

    procedure Set_Screen (Status_Icon: access Gtk_Status_Icon_Record;Screen: access Gdk.Screen.Gdk_Screen_Record'Class);

Gets/Sets the Gdk_Screen where Status_Icon is displayed. When invoking Set_Screen, if the icon is already mapped, it will be unmapped, and then remapped on the new screen.

### Get_Size

- Goto spec in source

    function Get_Size (Status_Icon: access Gtk_Status_Icon_Record) return Gint;

Gets the size in pixels that is available for the image. Stock icons and named icons adapt their size automatically if the size of the notification area changes. For other storage types, the size-changed signal can be used to react to size changes. Note that the returned size is only meaningful while the status icon is embedded (see Is_Embedded).

### Get_Visible

- Goto spec in source

    function Get_Visible (Status_Icon: access Gtk_Status_Icon_Record) return Boolean;

### Set_Visible

- Goto spec in source

    procedure Set_Visible (Status_Icon: access Gtk_Status_Icon_Record;Visible: Boolean);

Whether the status icon is visible or not. Note that being visible does not guarantee that the user can actually see the icon, see also Is_Embedded.

### Get_X11_Window_Id

- Goto spec in source

    function Get_X11_Window_Id (Status_Icon: access Gtk_Status_Icon_Record) return Guint32;

This function is only useful on the X11/freedesktop.org platform. It returns a window ID for the widget in the underlying status icon implementation. This is useful for the Galago notification service, which can send a window ID in the protocol in order for the server to position notification windows pointing to a status icon reliably. This function is not intended for other use cases which are more likely to be met by one of the non-X11 specific methods, such as Position_Menu.

### Position_Menu

- Goto spec in source
- Goto body in source

    procedure Position_Menu (Menu: System.Address;X: out Gint;Y: out Gint;Push_In: out Gboolean;Status_Icon: System.Address);

Menu positioning function to use with Gtk.Menu.Popup to position Menu aligned to Status_Icon. Pass Get_Object (Your_Status_Icon) as User_Data when calling Gtk.Menu.Popup.

### Set_Tooltip

- Goto spec in source

    procedure Set_Tooltip (Status_Icon: access Gtk_Status_Icon_Record;Tooltip_Text: String);

Set_Tooltip Sets the tooltip of the status icon. Deprecated: 2.16: Use Set_Tooltip_Text instead.