Index

Package: Status_Icon

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

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

Ancestors:

Primitive operations:

Get_Blinking
Get_Geometry
Get_Has_Tooltip
Get_Icon_Name
Get_Storage_Type
Get_Tooltip_Markup
Get_Tooltip_Text
Get_X11_Window_Id
Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
Set_Blinking
Set_From_File
Set_From_Gicon
Set_From_Icon_Name
Set_From_Pixbuf
Set_From_Stock
Set_Has_Tooltip
Set_Tooltip_Markup
Set_Tooltip_Text

Types

Gtk_Status_Icon

type Gtk_Status_Icon is access all Gtk_Status_Icon_Record'Class;

Constants & Global variables

Has_Tooltip_Property (Glib.Properties.Property_Boolean)

Has_Tooltip_Property    : constant Glib.Properties.Property_Boolean;

Orientation_Property (Glib.Properties.Property_Enum)

Orientation_Property    : constant Glib.Properties.Property_Enum;

Storage_Type_Property (Glib.Properties.Property_Enum)

Storage_Type_Property   : constant Glib.Properties.Property_Enum;

Tooltip_Markup_Property (Glib.Properties.Property_String)

Tooltip_Markup_Property : constant Glib.Properties.Property_String;

Tooltip_Text_Property (Glib.Properties.Property_String)

Tooltip_Text_Property   : constant Glib.Properties.Property_String;

Subprograms & Entries

Get_Type

function Get_Type return GType;

Gtk_New

procedure Gtk_New 
(Widget: out Gtk_Status_Icon);

Initialize

procedure Initialize 
(Widget: access Gtk_Status_Icon_Record'Class);
Creates an empty status icon object.

Get_Storage_Type

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

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

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

Initialize_From_File

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

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

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

Initialize_From_Gicon

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

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

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

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

Initialize_From_Icon_Name

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

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

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

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

Initialize_From_Pixbuf

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

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

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

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

Initialize_From_Stock

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

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

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

function Get_Has_Tooltip 
(Status_Icon: access Gtk_Status_Icon_Record) return Boolean;

Set_Has_Tooltip

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

function Get_Tooltip_Markup 
(Status_Icon: access Gtk_Status_Icon_Record) return String;

Set_Tooltip_Markup

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

function Get_Tooltip_Text 
(Status_Icon: access Gtk_Status_Icon_Record) return String;

Set_Tooltip_Text

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

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

function Get_Blinking 
(Status_Icon: access Gtk_Status_Icon_Record) return Boolean;

Set_Blinking

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

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

Set_Screen

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

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

function Get_Visible 
(Status_Icon: access Gtk_Status_Icon_Record) return Boolean;

Set_Visible

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

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

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

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.