Class Notification
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.webkitgtk.Notification
- All Implemented Interfaces:
Proxy
Holds information about a notification that should be shown to the user.
- Since:
- 2.8
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNotification.Builder<B extends Notification.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static interfaceFunctional interface declaration of theClickedCallbackcallback.static interfaceFunctional interface declaration of theClosedCallbackcallback.static classNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new Notification.Notification(MemorySegment address) Create a Notification instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected NotificationasParent()Return this instance as if it were its parent type.static Notification.Builder<? extends Notification.Builder> builder()ANotification.Builderobject constructs aNotificationwith the specified properties.voidclicked()Tells WebKit the notification has been clicked.voidclose()Closes the notification.voidEmits the "clicked" signal.voidEmits the "closed" signal.getBody()Obtains the body for the notification.longgetId()Obtains the unique id for the notification.static MemoryLayoutThe memory layout of the native struct.@Nullable StringgetTag()Obtains the tag identifier for the notification.getTitle()Obtains the title for the notification.static @Nullable TypegetType()Get the GType of the Notification class.onClicked(Notification.ClickedCallback handler) Emitted when a notification has been clicked.onClosed(Notification.ClosedCallback handler) Emitted when a notification has been withdrawn.Methods inherited from class GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Notification
Create a Notification instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
Notification
public Notification()Create a new Notification.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
clicked
public void clicked()Tells WebKit the notification has been clicked.
This will emit the
WebKitNotification::clicked signal.- Since:
- 2.12
-
close
public void close()Closes the notification.- Since:
- 2.8
-
getBody
Obtains the body for the notification.- Returns:
- the body for the notification
- Since:
- 2.8
-
getId
public long getId()Obtains the unique id for the notification.- Returns:
- the unique id for the notification
- Since:
- 2.8
-
getTag
Obtains the tag identifier for the notification.- Returns:
- the tag for the notification
- Since:
- 2.16
-
getTitle
Obtains the title for the notification.- Returns:
- the title for the notification
- Since:
- 2.8
-
onClicked
public SignalConnection<Notification.ClickedCallback> onClicked(Notification.ClickedCallback handler) Emitted when a notification has been clicked. See webkit_notification_clicked().- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- Since:
- 2.12
- See Also:
-
emitClicked
public void emitClicked()Emits the "clicked" signal. SeeonClicked(Notification.ClickedCallback). -
onClosed
Emitted when a notification has been withdrawn.
The default handler will close the notification using libnotify, if built with support for it.
- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- Since:
- 2.8
- See Also:
-
emitClosed
public void emitClosed()Emits the "closed" signal. SeeonClosed(Notification.ClosedCallback). -
builder
ANotification.Builderobject constructs aNotificationwith the specified properties. Use the variousset...()methods to set properties, and finish construction withNotification.Builder.build().- Returns:
- the builder object
-