class Libnotify::Notification
- Libnotify::Notification
- Reference
- Object
Defined in:
libnotify/notification.crConstructors
- .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")
- .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", &)
Instance Method Summary
- #app_name : String
- #app_name=(app_name : String)
- #append : Bool
- #append=(append : Bool)
- #body : String | Nil
- #body=(body : String | Nil)
- #category : String | Nil
- #category=(category : String | Nil)
- #icon_path : String | Nil
- #icon_path=(icon_path : String | Nil)
- #notify : Pointer(C::NotifyNotification)
-
#show
Display the notification on the screen with the last modification
- #summary : String | Nil
- #summary=(summary : String | Nil)
- #timeout : Int32
- #timeout=(timeout : Int32)
-
#timeout=(sec : Float::Primitive)
Set the timeout at
sec
, in seconds - #transient : Bool
- #transient=(transient : Bool)
-
#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).
- #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")
- #urgency : Libnotify::C::NotifyUrgency
- #urgency=(urgency : Libnotify::C::NotifyUrgency)
-
#urgency=(urgency : Symbol)
Set the urgency, based on the symbols
:critical
,:normal
,:low
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")
#
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", &)
#
Instance Method Detail
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.
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")
#