Package: gtk
Class gtk-status-icon
Superclassesg-object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails
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. It is very important to notice that status icons depend on the existence of a notification area being available to the user. You should not use status icons as the only way to convey critical information regarding your application, as the notification area may not exist on the environment of the user, or may have been removed. You should always check that a status icon has been embedded into a notification area by using the function gtk-status-icon-is-embedded, and gracefully recover if the function returns nil. 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 2 and KDE panel applications. Note that a status icon is not a widget, but just a g-object object. Making it a widget would be impractical, since the system tray on Win32 does not allow to embed arbitrary widgets. WarningSignal DetailsThe "activate" signallambda (icon) :actionGets emitted when the user activates the status icon. If and how status icons can be activated is platform dependent. Unlike most :action signals, this signal is meant to be used by applications and should be wrapped by language bindings.
The "button-press-event" signallambda (icon event) :run-lastThe signal will be emitted when a button, typically from a mouse, is pressed. Whether this event is emitted is platform dependent. Use the "activate" and "popup-menu" signals in preference.
The "button-release-event" signallambda (icon event) :run-lastThe signal will be emitted when a button, typically from a mouse, is released. Whether this event is emitted is platform dependent. Use the "activate" and "popup-menu" signals in preference.
The "popup-menu" signallambda (icon button time) :actionGets 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 time parameters should be passed as the last arguments to the function gtk-menu-popup. Unlike most :action signals, this signal is meant to be used by applications and should be wrapped by language bindings.
The "query-tooltip" signallambda (icon x y mode tooltip) :run-lastEmitted when the gtk-tooltip-timeout setting has expired with the cursor hovering above the status icon, or emitted when the status icon got focus in keyboard mode. Using the given coordinates, the signal handler should determine whether a tooltip should be shown for the status icon. If this is the case true should be returned, false otherwise. Note that if mode is true, the values of x and y are undefined and should not be used. The signal handler is free to manipulate the tooltip with the therefore destined function calls. Whether this signal is emitted is platform dependent. For plain text tooltips, use the tooltip-text property in preference.
The "scroll-event" signallambda (icon event) :run-lastThe 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.
The "size-changed" signallambda (icon size) :run-lastGets emitted when the size available for the image changes, e.g. because the notification area got resized.
| Slot Access FunctionsInherited Slot Access Functions |
2021-7-22