Class Notification
- Namespace
- Gio
- Assembly
- Gio-2.0.dll
public class Notification : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
Notification
- Implements
- Inherited Members
Constructors
Notification(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public Notification(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
Notification(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Notification(CreationData data)
Parameters
dataCreationData
Notification(NotificationHandle)
protected Notification(NotificationHandle handle)
Parameters
handleNotificationHandle
Methods
AddButton(string, string)
[Version("2.40")]
public void AddButton(string label, string detailedAction)
Parameters
AddButtonWithTarget(string, string, Variant?)
[Version("2.40")]
public void AddButtonWithTarget(string label, string action, Variant? target)
Parameters
GetGType()
public static Type GetGType()
Returns
New(string)
[Version("2.40")]
public static Notification New(string title)
Parameters
titlestring
Returns
NewFromPointer(nint, bool)
Creates a new managed Notification instance for a given pointer.
public static Notification NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new Notification and sets the properties specified by the construct arguments.
public static Notification NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SetBody(string?)
[Version("2.40")]
public void SetBody(string? body)
Parameters
bodystring
SetCategory(string?)
[Version("2.70")]
public void SetCategory(string? category)
Parameters
categorystring
SetDefaultAction(string)
[Version("2.40")]
public void SetDefaultAction(string detailedAction)
Parameters
detailedActionstring
SetDefaultActionAndTarget(string, Variant?)
[Version("2.40")]
public void SetDefaultActionAndTarget(string action, Variant? target)
Parameters
SetIcon(Icon)
[Version("2.40")]
public void SetIcon(Icon icon)
Parameters
iconIcon
SetPriority(NotificationPriority)
public void SetPriority(NotificationPriority priority)
Parameters
priorityNotificationPriority
SetTitle(string)
[Version("2.40")]
public void SetTitle(string title)
Parameters
titlestring
SetUrgent(bool)
[Version("2.40")]
public void SetUrgent(bool urgent)
Parameters
urgentbool