Superclass: g-object
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 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 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 status-icon-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 status-icon is not a widget, but just a g-object. Making it a widget would be impractical, since the system tray on Win32 doesn't allow to embed arbitrary widgets.
Slots:
boolean
. Accessor: status-icon-blinking
.
Whether or not the status icon is blinking.
Default value: FALSE
boolean
. Accessor: status-icon-embedded
. Read-only.
TRUE if the statusicon is embedded in a notification area.
Default value: FALSE
string
. Accessor: status-icon-file
. Write-only.
Filename to load and display.
GIcon
. Accessor: status-icon-gicon
.
The GIcon displayed in the GtkStatusIcon. For themed icons, the image will be updated automatically if the theme changes.
boolean
. Accessor: status-icon-has-tooltip
.
Enables or disables the emission of status-icon::query-tooltip. A value of TRUE indicates that status icon can have a tooltip, in this case the status icon will be queried using status-icon::query-tooltip to determine whether it will provide a tooltip or not.
Note that setting this property to TRUE for the first time will change the event masks of the windows of this status icon to include leave-notify and motion-notify events. This will not be undone when the property is set to FALSE again.
Whether this property is respected is platform dependent. For plain text tooltips, use status-icon-tooltip-text in preference.
Default value: FALSE
string
. Accessor: status-icon-icon-name
.
The name of the icon from the icon theme.
status-icon-orientation
. Read-only.
The orientation of the tray in which the statusicon is embedded.
status-icon-pixbuf
.
A pixbuf to display.
status-icon-screen
.
The screen where this status icon will be displayed.
integer
. Accessor: status-icon-size
. Read-only.
The size of the icon.
Allowed values: >= 0
Default value: 0
string
. Accessor: status-icon-stock
.
Stock ID for a stock image to display.
Default value: NULL
status-icon-storage-type
. Read-only.
The representation being used for image data.
string
. Accessor: status-icon-tooltip-markup
.
Sets the text of tooltip to be the given string, which is marked up with the Pango text markup language.
This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL. status-icon-has-tooltip will automatically be set to TRUE and the default handler for the status-icon::query-tooltip signal will take care of displaying the tooltip.
On some platforms, embedded markup will be ignored.
Default value: NULL
string
. Accessor: status-icon-tooltip-text
.
Sets the text of tooltip to be the given string.
This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL. status-icon-has-tooltip will automatically be set to TRUE and the default handler for the status-icon::query-tooltip signal will take care of displaying the tooltip.
Default value: NULL
boolean
. Accessor: status-icon-visible
.
Whether or not the status icon is visible.
Default value: TRUE
Signals:
Gets emitted when the user activates the status icon. If and how status icons can activated is platform-dependent.
Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.
boolean
. Options: run-last.
This signal will be emitted when a button (typically from a mouse) is pressed.
Whether this event is emitted is platform-dependent. Use the status-icon::activate and status-icon::popup-menu signals in preference.
boolean
. Options: run-last.
This signal will be emitted when a button (typically from a mouse) is released.
Whether this event is emitted is platform-dependent. Use the status-icon::activate and status-icon::popup-menu signals in preference.
integer
), (activate-time integer
) => void. Options: run-first, action.
Gets emitted when the user brings up the context menu of the status icon. Whether status icons can have context menus and how these are activated is platform-dependent.
The button and activate-time parameters should be passed as the last to arguments to gtk_menu_popup().
Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.
integer
), (y integer
), (keyboard-mode boolean
), (tooltip tooltip) => boolean
. Options: run-last.
Emitted when the "gtk-tooltip-timeout" has expired with the cursor hovering above status_icon; or emitted when status_icon got focus in keyboard mode.
Using the given coordinates, the signal handler should determine whether a tooltip should be shown for status-icon. If this is the case TRUE should be returned, FALSE otherwise. Note that if keyboard-mode is TRUE, the values of x and y are undefined and should not be used.
The signal handler is free to manipulate tooltip with the therefore destined function calls.
Whether this signal is emitted is platform-dependent. For plain text tooltips, use status-icon-tooltip-text in preference.
x, y: the x and y coordinates of the cursor position where the request has been emitted, relative to status-icon
keyboard-mode: TRUE if the tooltip was trigged using the keyboard
boolean
. Options: run-last.
This signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.
Whether this event is emitted is platform-dependent.
integer
) => boolean
. Options: run-last.
Gets emitted when the size available for the image changes, e.g. because the notification area got resized.
Returns TRUE if the icon was updated for the new size. Otherwise, GTK+ will scale the icon as necessary.
TODO: gtk_status_icon_position_menu, gtk_status_icon_get_x11_window_id