Class Notify::Notification
In: rnotify.c
Parent: Object

libnotify ruby interface [ www.galago-project.org ]

Methods

Constants

URGENCY_LOW = INT2FIX(NOTIFY_URGENCY_LOW)
URGENCY_NORMAL = INT2FIX(NOTIFY_URGENCY_NORMAL)
URGENCY_CRITICAL = INT2FIX(NOTIFY_URGENCY_CRITICAL)
EXPIRES_DEFAULT = INT2FIX(NOTIFY_EXPIRES_DEFAULT)
EXPIRES_NEVER = INT2FIX(NOTIFY_EXPIRES_NEVER)

Public Class methods

summ = The summary text (required)

msg = The body text or nil

icon = The icon or nil

widget = The widget (or a Gtk::StatusIcon, when compiled against GTK+ >= 2.9.2 and libnotify >= 0.4.1) to attach to or nil

Creates and returns a new notification, throw an exception on error

Public Instance methods

action = The action id

label = The action label

user_data = Custom data to pass into the block (optional)

Adds an action. When the action is invoked, the specified block will be called

Examples:

myinstance.add_action( “MyAction”, “MyLabel” ) do |action|

     # something to do

end

Or

myinstance.add_action( “MyAction”, “MyLabel”, MyData ) do |action, mydata|

     # something to do

end

widget = The widget (or a Gtk::StatusIcon, when compiled against GTK+ >= 2.9.2 and libnotify >= 0.4.1) to attach to

Attaches the notification to a Gtk::Widget or Gtk::StatusIcon

category_name = The category name

Sets the category

Clears all actions from the notification. Remember to use this method before call the Notification#close method.

Clears all hints from the notification. Remember to use this method before call the Notification#close method.

Tells the notification server to hide the notification on the screen.

** WHEN COMPILED AGAINST LIBNOTIFY 0.4.5 OR HIGHER **

Returns the reason code why the notification was closed

** WHEN COMPILED AGAINST LIBNOTIFY 0.4.1 OR HIGHER **

screen = The Gdk::Screen the notification should appear on

x = The X coordinate to point to

y = The Y coordinate to point to

Sets the geometry hints on the notification

key = The hint

value = The hint’s value

Sets a hint with a 32-bit integer value

key = The hint

value = The hint’s value

Sets a hint with a byte value

key = The hint

value = The hint’s value

Sets a hint with a double value

key = The hint

value = The hint’s value

Sets a hint with a string value

icon = The icon

Sets the icon from a Gdk::Pixbuf

Tells the notification server to display the notification on the screen. if TRUE returns, show the notification otherwise returns FALSE

Sets the timeout in milliseconds.

summ = The new summary text (required)

msg = The new body text or nil

icon = The new icon or nil

This won’t send the update out and display it on the screen. For that, you will need to call the Notification#show method.

Returns TRUE if ok, FALSE otherwise

urgency_level = The urgency level

Sets the urgency level

[Validate]