class Libnotify::Notification

Defined in:

libnotify/notification.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(summary : Nil | String = nil, body : Nil | String = nil, icon_path : Nil | String = nil, timeout : Int32 = -1, category : Nil | String = nil, urgency : Libnotify::C::NotifyUrgency = Libnotify::C::NotifyUrgency::NotifyUrgencyNormal, append : Bool = false, transient : Bool = true, app_name : String = "default") #

[View source]
def self.new(summary : Nil | String = nil, body : Nil | String = nil, icon_path : Nil | String = nil, timeout : Int32 = -1, category : Nil | String = nil, urgency : Libnotify::C::NotifyUrgency = Libnotify::C::NotifyUrgency::NotifyUrgencyNormal, append : Bool = false, transient : Bool = true, app_name : String = "default", &) #

[View source]

Instance Method Detail

def app_name : String #

[View source]
def app_name=(app_name : String) #

[View source]
def append : Bool #

[View source]
def append=(append : Bool) #

[View source]
def body : String | Nil #

[View source]
def body=(body : String | Nil) #

[View source]
def category : String | Nil #

[View source]
def category=(category : String | Nil) #

[View source]
def icon_path : String | Nil #

[View source]
def icon_path=(icon_path : String | Nil) #

[View source]
def notify : Pointer(C::NotifyNotification) #

[View source]
def show #

Display the notification on the screen with the last modification


[View source]
def summary : String | Nil #

[View source]
def summary=(summary : String | Nil) #

[View source]
def timeout : Int32 #

[View source]
def timeout=(timeout : Int32) #

[View source]
def timeout=(sec : Float::Primitive) #

Set the timeout at sec, in seconds


[View source]
def transient : Bool #

[View source]
def transient=(transient : Bool) #

[View source]
def update(summary : Nil | String = nil, body : Nil | String = nil, icon_path : Nil | String = nil, timeout : Int32 = -1, category : Nil | String = nil, urgency : Libnotify::C::NotifyUrgency = Libnotify::C::NotifyUrgency::NotifyUrgencyNormal, append : Bool = false, transient : Bool = true, app_name : String = "default", &) #

Update all fields of the notification (in arguments or via the block).

It resets the fields to their default value / nil or use the arguments. Then, it yield a block where it is possible to modify all of them.


[View source]
def update(summary : Nil | String = nil, body : Nil | String = nil, icon_path : Nil | String = nil, timeout : Int32 = -1, category : Nil | String = nil, urgency : Libnotify::C::NotifyUrgency = Libnotify::C::NotifyUrgency::NotifyUrgencyNormal, append : Bool = false, transient : Bool = true, app_name : String = "default") #

[View source]
def urgency : Libnotify::C::NotifyUrgency #

[View source]
def urgency=(urgency : Libnotify::C::NotifyUrgency) #

[View source]
def urgency=(urgency : Symbol) #

Set the urgency, based on the symbols :critical, :normal, :low


[View source]