StatusIconProtocol
public protocol StatusIconProtocol : ObjectProtocol
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 GtkStatusIcon
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 user’s environment, or may have
been removed. You should always check that a status icon has been embedded into
a notification area by using gtk_status_icon_is_embedded()
, and gracefully
recover if the function returns false
.
On X11, the implementation follows the FreeDesktop 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 GtkStatusIcon is not a widget, but just a GObject
. Making it a
widget would be impractical, since the system tray on Windows doesn’t allow
to embed arbitrary widgets.
GtkStatusIcon has been deprecated in 3.14. You should consider using
notifications or more modern platform-specific APIs instead. GLib provides
the GNotification
API which works well with GtkApplication
on multiple
platforms and environments, and should be the preferred mechanism to notify
the users of transient status updates. See this HowDoI
for code examples.
The StatusIconProtocol
protocol exposes the methods and properties of an underlying GtkStatusIcon
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see StatusIcon
.
Alternatively, use StatusIconRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkStatusIcon
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
status_icon_ptr
Default implementationTyped pointer to the underlying
GtkStatusIcon
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkStatusIcon
instance.Declaration
Swift
var status_icon_ptr: UnsafeMutablePointer<GtkStatusIcon>! { get }
-
Required Initialiser for types conforming to
StatusIconProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
StatusIconPropertyName
source property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: StatusIconPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a StatusIcon property
Declaration
Swift
@inlinable func get(property: StatusIconPropertyName) -> GLibObject.Value
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
set(property:
Extension methodvalue: ) Set the value of a StatusIcon property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: StatusIconPropertyName, value v: GLibObject.Value)
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
connect(signal:
Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
StatusIconSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: StatusIconSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
handler
The Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:
Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
StatusIconSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: StatusIconSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
signalHandler
The C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onActivate(flags:
Extension methodhandler: ) 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.
Note
This represents the underlyingactivate
signalDeclaration
Swift
@discardableResult @inlinable func onActivate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
handler
The signal handler to call Run the given callback whenever the
activate
signal is emitted -
activateSignal
Extension methodTyped
activate
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var activateSignal: StatusIconSignalName { get }
-
onButtonPressEvent(flags:
Extension methodhandler: ) The
button-press-event
signal will be emitted when a button (typically from a mouse) is pressed.Whether this event is emitted is platform-dependent. Use the
activate
andpopup-menu
signals in preference.Note
This represents the underlyingbutton-press-event
signalDeclaration
Swift
@discardableResult @inlinable func onButtonPressEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ event: Gdk.EventButtonRef) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
event
the
GdkEventButton
which triggered this signalhandler
true
to stop other handlers from being invoked for the event.false
to propagate the event further. Run the given callback whenever thebuttonPressEvent
signal is emitted -
buttonPressEventSignal
Extension methodTyped
button-press-event
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var buttonPressEventSignal: StatusIconSignalName { get }
-
onButtonReleaseEvent(flags:
Extension methodhandler: ) The
button-release-event
signal will be emitted when a button (typically from a mouse) is released.Whether this event is emitted is platform-dependent. Use the
activate
andpopup-menu
signals in preference.Note
This represents the underlyingbutton-release-event
signalDeclaration
Swift
@discardableResult @inlinable func onButtonReleaseEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ event: Gdk.EventButtonRef) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
event
the
GdkEventButton
which triggered this signalhandler
true
to stop other handlers from being invoked for the event.false
to propagate the event further. Run the given callback whenever thebuttonReleaseEvent
signal is emitted -
buttonReleaseEventSignal
Extension methodTyped
button-release-event
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var buttonReleaseEventSignal: StatusIconSignalName { get }
-
onPopupMenu(flags:
Extension methodhandler: ) 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
andactivate_time
parameters should be passed as the last to arguments togtk_menu_popup()
.Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.
Note
This represents the underlyingpopup-menu
signalDeclaration
Swift
@discardableResult @inlinable func onPopupMenu(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ button: UInt, _ activateTime: UInt) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
button
the button that was pressed, or 0 if the signal is not emitted in response to a button press event
activateTime
the timestamp of the event that triggered the signal emission
handler
The signal handler to call Run the given callback whenever the
popupMenu
signal is emitted -
popupMenuSignal
Extension methodTyped
popup-menu
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var popupMenuSignal: StatusIconSignalName { get }
-
onQueryTooltip(flags:
Extension methodhandler: ) Emitted when the hover timeout has expired with the cursor hovering above
status_icon
; or emitted whenstatus_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 casetrue
should be returned,false
otherwise. Note that ifkeyboard_mode
istrue
, the values ofx
andy
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
GtkStatusIcon:tooltip-text
in preference.Note
This represents the underlyingquery-tooltip
signalDeclaration
Swift
@discardableResult @inlinable func onQueryTooltip(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ x: Int, _ y: Int, _ keyboardMode: Bool, _ tooltip: TooltipRef) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
x
the x coordinate of the cursor position where the request has been emitted, relative to
status_icon
y
the y coordinate of the cursor position where the request has been emitted, relative to
status_icon
keyboardMode
true
if the tooltip was trigged using the keyboardtooltip
a
GtkTooltip
handler
true
iftooltip
should be shown right now,false
otherwise. Run the given callback whenever thequeryTooltip
signal is emitted -
queryTooltipSignal
Extension methodTyped
query-tooltip
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var queryTooltipSignal: StatusIconSignalName { get }
-
onScrollEvent(flags:
Extension methodhandler: ) The
scroll-event
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.
Note
This represents the underlyingscroll-event
signalDeclaration
Swift
@discardableResult @inlinable func onScrollEvent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ event: Gdk.EventScrollRef) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
event
the
GdkEventScroll
which triggered this signalhandler
true
to stop other handlers from being invoked for the event.false
to propagate the event further. Run the given callback whenever thescrollEvent
signal is emitted -
scrollEventSignal
Extension methodTyped
scroll-event
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var scrollEventSignal: StatusIconSignalName { get }
-
onSizeChanged(flags:
Extension methodhandler: ) Gets emitted when the size available for the image changes, e.g. because the notification area got resized.
Note
This represents the underlyingsize-changed
signalDeclaration
Swift
@discardableResult @inlinable func onSizeChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ size: Int) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
size
the new size
handler
true
if the icon was updated for the new size. Otherwise, GTK+ will scale the icon as necessary. Run the given callback whenever thesizeChanged
signal is emitted -
sizeChangedSignal
Extension methodTyped
size-changed
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var sizeChangedSignal: StatusIconSignalName { get }
-
onNotifyEmbedded(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::embedded
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyEmbedded(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyEmbedded
signal is emitted -
notifyEmbeddedSignal
Extension methodTyped
notify::embedded
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyEmbeddedSignal: StatusIconSignalName { get }
-
onNotifyFile(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::file
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyFile(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyFile
signal is emitted -
notifyFileSignal
Extension methodTyped
notify::file
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyFileSignal: StatusIconSignalName { get }
-
onNotifyIcon(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::gicon
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyIcon(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyIcon
signal is emitted -
notifyIconSignal
Extension methodTyped
notify::gicon
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyIconSignal: StatusIconSignalName { get }
-
onNotifyHasTooltip(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::has-tooltip
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyHasTooltip(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyHasTooltip
signal is emitted -
notifyHasTooltipSignal
Extension methodTyped
notify::has-tooltip
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyHasTooltipSignal: StatusIconSignalName { get }
-
onNotifyIconName(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::icon-name
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyIconName(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyIconName
signal is emitted -
notifyIconNameSignal
Extension methodTyped
notify::icon-name
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyIconNameSignal: StatusIconSignalName { get }
-
onNotifyOrientation(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::orientation
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyOrientation(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyOrientation
signal is emitted -
notifyOrientationSignal
Extension methodTyped
notify::orientation
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyOrientationSignal: StatusIconSignalName { get }
-
onNotifyPixbuf(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::pixbuf
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPixbuf(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyPixbuf
signal is emitted -
notifyPixbufSignal
Extension methodTyped
notify::pixbuf
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyPixbufSignal: StatusIconSignalName { get }
-
onNotifyScreen(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::screen
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyScreen(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyScreen
signal is emitted -
notifyScreenSignal
Extension methodTyped
notify::screen
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyScreenSignal: StatusIconSignalName { get }
-
onNotifySize(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::size
signalDeclaration
Swift
@discardableResult @inlinable func onNotifySize(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifySize
signal is emitted -
notifySizeSignal
Extension methodTyped
notify::size
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifySizeSignal: StatusIconSignalName { get }
-
onNotifyStock(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::stock
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyStock(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyStock
signal is emitted -
notifyStockSignal
Extension methodTyped
notify::stock
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyStockSignal: StatusIconSignalName { get }
-
onNotifyStorageType(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::storage-type
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyStorageType(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyStorageType
signal is emitted -
notifyStorageTypeSignal
Extension methodTyped
notify::storage-type
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyStorageTypeSignal: StatusIconSignalName { get }
-
onNotifyTitle(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::title
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyTitle(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyTitle
signal is emitted -
notifyTitleSignal
Extension methodTyped
notify::title
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyTitleSignal: StatusIconSignalName { get }
-
onNotifyTooltipMarkup(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::tooltip-markup
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyTooltipMarkup(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyTooltipMarkup
signal is emitted -
notifyTooltipMarkupSignal
Extension methodTyped
notify::tooltip-markup
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyTooltipMarkupSignal: StatusIconSignalName { get }
-
onNotifyTooltipText(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::tooltip-text
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyTooltipText(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyTooltipText
signal is emitted -
notifyTooltipTextSignal
Extension methodTyped
notify::tooltip-text
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyTooltipTextSignal: StatusIconSignalName { get }
-
onNotifyVisible(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::visible
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StatusIconRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyVisible
signal is emitted -
notifyVisibleSignal
Extension methodTyped
notify::visible
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyVisibleSignal: StatusIconSignalName { get }
-
getGeometry(screen:
Extension methodarea: orientation: ) 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
gtk_status_icon_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
gtk_status_icon_is_embedded()
.get_geometry is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as the platform is responsible for the presentation of notifications
Declaration
Swift
@available(*, deprecated) @inlinable func getGeometry(screen: UnsafeMutablePointer<UnsafeMutablePointer<GdkScreen>?>! = nil, area: Gdk.RectangleRef? = nil, orientation: UnsafeMutablePointer<GtkOrientation>! = nil) -> Bool
-
getGeometry(screen:
Extension methodarea: orientation: ) 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
gtk_status_icon_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
gtk_status_icon_is_embedded()
.get_geometry is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as the platform is responsible for the presentation of notifications
Declaration
Swift
@available(*, deprecated) @inlinable func getGeometry<RectangleT>(screen: UnsafeMutablePointer<UnsafeMutablePointer<GdkScreen>?>! = nil, area: RectangleT?, orientation: UnsafeMutablePointer<GtkOrientation>! = nil) -> Bool where RectangleT : RectangleProtocol
-
getIcon()
Extension methodRetrieves the
GIcon
being displayed by theGtkStatusIcon
. The storage type of the status icon must beGTK_IMAGE_EMPTY
orGTK_IMAGE_GICON
(seegtk_status_icon_get_storage_type()
). The caller of this function does not own a reference to the returnedGIcon
.If this function fails,
icon
is left unchanged;get_gicon is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getIcon() -> GIO.IconRef!
-
getHasTooltip()
Extension methodReturns the current value of the has-tooltip property. See
GtkStatusIcon:has-tooltip
for more information.get_has_tooltip is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getHasTooltip() -> Bool
-
getIconName()
Extension methodGets the name of the icon being displayed by the
GtkStatusIcon
. The storage type of the status icon must beGTK_IMAGE_EMPTY
orGTK_IMAGE_ICON_NAME
(seegtk_status_icon_get_storage_type()
). The returned string is owned by theGtkStatusIcon
and should not be freed or modified.get_icon_name is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getIconName() -> String!
-
getPixbuf()
Extension methodGets the
GdkPixbuf
being displayed by theGtkStatusIcon
. The storage type of the status icon must beGTK_IMAGE_EMPTY
orGTK_IMAGE_PIXBUF
(seegtk_status_icon_get_storage_type()
). The caller of this function does not own a reference to the returned pixbuf.get_pixbuf is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getPixbuf() -> PixbufRef!
-
getScreen()
Extension methodReturns the
GdkScreen
associated withstatus_icon
.get_screen is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as notifications are managed by the platform
Declaration
Swift
@available(*, deprecated) @inlinable func getScreen() -> Gdk.ScreenRef!
-
getSize()
Extension methodGets 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
gtk_status_icon_is_embedded()
).get_size is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as the representation of a notification is left to the platform
Declaration
Swift
@available(*, deprecated) @inlinable func getSize() -> Int
-
getStock()
Extension methodGets the id of the stock icon being displayed by the
GtkStatusIcon
. The storage type of the status icon must beGTK_IMAGE_EMPTY
orGTK_IMAGE_STOCK
(seegtk_status_icon_get_storage_type()
). The returned string is owned by theGtkStatusIcon
and should not be freed or modified.get_stock is deprecated: Use gtk_status_icon_get_icon_name() instead.
Declaration
Swift
@available(*, deprecated) @inlinable func getStock() -> String!
-
getStorageType()
Extension methodGets the type of representation being used by the
GtkStatusIcon
to store image data. If theGtkStatusIcon
has no image data, the return value will beGTK_IMAGE_EMPTY
.get_storage_type is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, and #GNotification only supports #GIcon instances
Declaration
Swift
@available(*, deprecated) @inlinable func getStorageType() -> GtkImageType
-
getTitle()
Extension methodGets the title of this tray icon. See
gtk_status_icon_set_title()
.get_title is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getTitle() -> String!
-
getTooltipMarkup()
Extension methodGets the contents of the tooltip for
status_icon
.get_tooltip_markup is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getTooltipMarkup() -> String!
-
getTooltipText()
Extension methodGets the contents of the tooltip for
status_icon
.get_tooltip_text is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getTooltipText() -> String!
-
getVisible()
Extension methodReturns 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
gtk_status_icon_is_embedded()
.get_visible is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getVisible() -> Bool
-
getX11WindowID()
Extension methodThis 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
gtk_status_icon_position_menu()
.get_x11_window_id is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func getX11WindowID() -> guint32
-
setFromFile(filename:
Extension method) Makes
status_icon
display the filefilename
. Seegtk_status_icon_new_from_file()
for details.set_from_file is deprecated: Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification
Declaration
Swift
@available(*, deprecated) @inlinable func setFromFile(filename: UnsafePointer<gchar>!)
-
setFromIcon(icon:
Extension method) Makes
status_icon
display theGIcon
. Seegtk_status_icon_new_from_gicon()
for details.set_from_gicon is deprecated: Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification
Declaration
Swift
@available(*, deprecated) @inlinable func setFromIcon<IconT>(icon: IconT) where IconT : IconProtocol
-
setFrom(iconName:
Extension method) Makes
status_icon
display the icon namedicon_name
from the current icon theme. Seegtk_status_icon_new_from_icon_name()
for details.set_from_icon_name is deprecated: Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification
Declaration
Swift
@available(*, deprecated) @inlinable func setFrom(iconName: UnsafePointer<gchar>!)
-
setFrom(pixbuf:
Extension method) Makes
status_icon
displaypixbuf
. Seegtk_status_icon_new_from_pixbuf()
for details.set_from_pixbuf is deprecated: Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification
Declaration
Swift
@available(*, deprecated) @inlinable func setFrom(pixbuf: PixbufRef? = nil)
-
setFrom(pixbuf:
Extension method) Makes
status_icon
displaypixbuf
. Seegtk_status_icon_new_from_pixbuf()
for details.set_from_pixbuf is deprecated: Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification
Declaration
Swift
@available(*, deprecated) @inlinable func setFrom<PixbufT>(pixbuf: PixbufT?) where PixbufT : PixbufProtocol
-
setFromStock(stockID:
Extension method) Makes
status_icon
display the stock icon with the idstock_id
. Seegtk_status_icon_new_from_stock()
for details.set_from_stock is deprecated: Use gtk_status_icon_set_from_icon_name() instead.
Declaration
Swift
@available(*, deprecated) @inlinable func setFromStock(stockID: UnsafePointer<gchar>!)
-
set(hasTooltip:
Extension method) Sets the has-tooltip property on
status_icon
tohas_tooltip
. SeeGtkStatusIcon:has-tooltip
for more information.set_has_tooltip is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, but notifications can display an arbitrary amount of text using g_notification_set_body()
Declaration
Swift
@available(*, deprecated) @inlinable func set(hasTooltip: Bool)
-
set(name:
Extension method) Sets the name of this tray icon. This should be a string identifying this icon. It is may be used for sorting the icons in the tray and will not be shown to the user.
set_name is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as notifications are associated with a unique application identifier by #GApplication
Declaration
Swift
@available(*, deprecated) @inlinable func set(name: UnsafePointer<gchar>!)
-
set(screen:
Extension method) Sets the
GdkScreen
wherestatus_icon
is displayed; if the icon is already mapped, it will be unmapped, and then remapped on the new screen.set_screen is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as GTK typically only has one #GdkScreen and notifications are managed by the platform
Declaration
Swift
@available(*, deprecated) @inlinable func set<ScreenT>(screen: ScreenT) where ScreenT : ScreenProtocol
-
set(title:
Extension method) Sets the title of this tray icon. This should be a short, human-readable, localized string describing the tray icon. It may be used by tools like screen readers to render the tray icon.
set_title is deprecated: Use #GNotification and #GtkApplication to provide status notifications; you should use g_notification_set_title() and g_notification_set_body() to present text inside your notification
Declaration
Swift
@available(*, deprecated) @inlinable func set(title: UnsafePointer<gchar>!)
-
setTooltip(markup:
Extension method) Sets
markup
as the contents of the tooltip, which is marked up with the Pango text markup language.This function will take care of setting
GtkStatusIcon:has-tooltip
totrue
and of the default handler for theGtkStatusIcon::query-tooltip
signal.See also the
GtkStatusIcon:tooltip-markup
property andgtk_tooltip_set_markup()
.set_tooltip_markup is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func setTooltip(markup: UnsafePointer<gchar>? = nil)
-
setTooltip(text:
Extension method) Sets
text
as the contents of the tooltip.This function will take care of setting
GtkStatusIcon:has-tooltip
totrue
and of the default handler for theGtkStatusIcon::query-tooltip
signal.See also the
GtkStatusIcon:tooltip-text
property andgtk_tooltip_set_text()
.set_tooltip_text is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@available(*, deprecated) @inlinable func setTooltip(text: UnsafePointer<gchar>!)
-
set(visible:
Extension method) Shows or hides a status icon.
set_visible is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as notifications are managed by the platform
Declaration
Swift
@available(*, deprecated) @inlinable func set(visible: Bool)
-
position(menu:
Extension methodx: y: pushIn: ) Menu positioning function to use with
gtk_menu_popup()
to positionmenu
aligned to the status iconuser_data
.position_menu is deprecated: Use #GNotification and #GtkApplication to provide status notifications; notifications do not have menus, but can have buttons, and actions associated with each button
Declaration
Swift
@available(*, deprecated) @inlinable func position<MenuT>(menu: MenuT, x: UnsafeMutablePointer<gint>!, y: UnsafeMutablePointer<gint>!, pushIn: UnsafeMutablePointer<gboolean>!) where MenuT : MenuProtocol
-
gicon
Extension methodThe
GIcon
displayed in theGtkStatusIcon
. For themed icons, the image will be updated automatically if the theme changes.Declaration
Swift
@inlinable var gicon: GIO.IconRef! { get }
-
hasTooltip
Extension methodReturns the current value of the has-tooltip property. See
GtkStatusIcon:has-tooltip
for more information.get_has_tooltip is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@inlinable var hasTooltip: Bool { get nonmutating set }
-
iconName
Extension methodGets the name of the icon being displayed by the
GtkStatusIcon
. The storage type of the status icon must beGTK_IMAGE_EMPTY
orGTK_IMAGE_ICON_NAME
(seegtk_status_icon_get_storage_type()
). The returned string is owned by theGtkStatusIcon
and should not be freed or modified.get_icon_name is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@inlinable var iconName: String! { get }
-
isEmbedded
Extension methodReturns whether the status icon is embedded in a notification area.
is_embedded is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@inlinable var isEmbedded: Bool { get }
-
pixbuf
Extension methodUndocumented
Declaration
Swift
@inlinable var pixbuf: PixbufRef! { get }
-
screen
Extension methodUndocumented
Declaration
Swift
@inlinable var screen: Gdk.ScreenRef! { get nonmutating set }
-
size
Extension methodUndocumented
Declaration
Swift
@inlinable var size: Int { get }
-
stock
Extension methodstock is deprecated: Use #GtkStatusIcon:icon-name instead.
Declaration
Swift
@inlinable var stock: String! { get }
-
storageType
Extension methodGets the type of representation being used by the
GtkStatusIcon
to store image data. If theGtkStatusIcon
has no image data, the return value will beGTK_IMAGE_EMPTY
.get_storage_type is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, and #GNotification only supports #GIcon instances
Declaration
Swift
@inlinable var storageType: GtkImageType { get }
-
title
Extension methodThe title of this tray icon. This should be a short, human-readable, localized string describing the tray icon. It may be used by tools like screen readers to render the tray icon.
Declaration
Swift
@inlinable var title: String! { get nonmutating set }
-
tooltipMarkup
Extension methodGets the contents of the tooltip for
status_icon
.get_tooltip_markup is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@inlinable var tooltipMarkup: String! { get nonmutating set }
-
tooltipText
Extension methodGets the contents of the tooltip for
status_icon
.get_tooltip_text is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@inlinable var tooltipText: String! { get nonmutating set }
-
visible
Extension methodUndocumented
Declaration
Swift
@inlinable var visible: Bool { get nonmutating set }
-
x11WindowID
Extension methodThis 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
gtk_status_icon_position_menu()
.get_x11_window_id is deprecated: Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function
Declaration
Swift
@inlinable var x11WindowID: guint32 { get }
-
parentInstance
Extension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GObject { get }