User Tools

Site Tools


code:system:notify

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

code:system:notify [2011/01/30 16:50] – created jmgrcode:system:notify [2011/04/20 20:29] (current) – removed jmgr
Line 1: Line 1:
-====== Notify ====== 
-This object allows sending system notifications. It only works on GNU/Linux. 
  
-===== Functions ===== 
- 
-==== Notify ==== 
-Constructor function. 
- 
-=== Syntax === 
-<code javascript> 
-var myObject = new Notify(); 
-</code> 
-<code javascript> 
-var myObject = new Notify(parameters); 
-</code> 
- 
-=== Arguments === 
-  - parameters - (object) the message parameters 
-    * title - (string) the notification's title 
-    * text - (string) the notification's text 
-    * icon - (string) the notification's icon name or path to an image file (see [[http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html]]) 
-    * timeout - (integer) the notification's timeout. It is ignored on some OSes like Ubuntu 
- 
-=== Example === 
-<code javascript> 
-var myObject = new Notify(); 
-</code> 
-<code javascript> 
-var myObject = new Notify({ 
- title: "Hello", 
- text: "Hello automation world!" 
-}); 
-</code> 
- 
-===== Methods ===== 
- 
-==== show ==== 
-Shows the notification. 
- 
-=== Syntax === 
-<code javascript> 
-myObject.show(); 
-</code> 
-<code javascript> 
-myObject.show(parameters); 
-</code> 
- 
-=== Arguments === 
-  - parameters - (object) the message parameters 
-    * title - (string) the notification's title 
-    * text - (string) the notification's text 
-    * icon - (string) the notification's icon name or path to an image file (see [[http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html]]) 
-    * timeout - (integer) the notification's timeout. It is ignored on some OSes like Ubuntu 
- 
-=== Returns === 
-  * (Notify) this Notify 
- 
-=== Exceptions === 
-  * (NotificationError) unable to show the notification 
- 
-=== Example === 
-<code javascript> 
-myObject.show(); 
-</code> 
-<code javascript> 
-myObject.show({ 
- title: "Hello", 
- text: "Hello automation world!" 
-}); 
-</code> 
- 
-=== Notes === 
-If you want to update a notification's text re-use a single Notify object and call [[#show|show]] to change the text. 
code/system/notify.1296406252.txt.gz · Last modified: 2021/02/13 11:23 (external edit)