libgdamm Reference Documentation
Main Page   Namespaces   Book  

Notify::Notification Class Reference

Notification offers a way to show notification for a widget or in the system tray. More...

Inheritance diagram for Notify::Notification:

Inheritance graph
[legend]

List of all members.

Public Types

typedef sigc::slot
< void, const
Glib::ustring& > 
SlotInvokeAction

Public Member Functions

Glib::PropertyProxy_ReadOnly
<Gtk::Widget> 
_attach_widget () const
 The widget to attach the notification to.
Glib::PropertyProxy
<Gtk::Widget> 
_attach_widget ()
 The widget to attach the notification to.
Glib::PropertyProxy_ReadOnly
<Glib::ustring> 
_body () const
 The message body text.
Glib::PropertyProxy
<Glib::ustring> 
_body ()
 The message body text.
Glib::PropertyProxy_ReadOnly
<Glib::ustring> 
_icon_name () const
 The icon filename or icon theme-compliant name.
Glib::PropertyProxy
<Glib::ustring> 
_icon_name ()
 The icon filename or icon theme-compliant name.
Glib::PropertyProxy_ReadOnly
< Glib::RefPtr
<Gtk::StatusIcon >> 
_status_icon () const
 The status icon to attach the notification to.
Glib::PropertyProxy
< Glib::RefPtr
<Gtk::StatusIcon >> 
_status_icon ()
 The status icon to attach the notification to.
Glib::PropertyProxy_ReadOnly
<Glib::ustring> 
_summary () const
 The summary text.
Glib::PropertyProxy
<Glib::ustring> 
_summary ()
 The summary text.
void add_action (const Glib::ustring& action, const Glib::ustring& label, const SlotInvokeAction& slot)
 Add an action to the notification.
void attach_to_status_icon (const Glib::RefPtr<Gtk::StatusIcon>& status_icon)
 Attaches the notification to a Gtk::StatusIcon.
void attach_to_widget (Gtk::Widget& attach)
 Attaches the notification to a widget.
void clear_actions ()
 Clears all actions from the notification.
void clear_hints ()
 Clears all hints from the notification.
void close ()
 Tells the notification server to hide the notification on the screen.
const
NotifyNotification* 
gobj () const
 Provides access to the underlying C GObject.
NotifyNotification* gobj ()
 Provides access to the underlying C GObject.
NotifyNotification* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 Notification (const Glib::ustring& summary, const Glib::ustring& body, const Glib::ustring& icon_name, const Glib::RefPtr<Gtk::StatusIcon>& status_icon)
 A constructor for Notification.
 Notification (const Glib::ustring& summary, const Glib::ustring& body, const Glib::ustring& icon_name, Gtk::Widget& attach_widget)
 A constructor for Notification.
 Notification (const Glib::ustring& summary, const Glib::ustring& body, const Glib::ustring& icon_name)
 A constructor for Notification.
 Notification (const Glib::ustring& summary, const Glib::ustring& body)
 A constructor for Notification.
void set_category (const Glib::ustring& category)
 Sets the category of this notification.
void set_geometry_hints (const Glib::RefPtr<Gdk::Screen>& screen, int x, int y)
 Sets the geometry hints on the notification.
void set_hint (const Glib::ustring& key, const Glib::ArrayHandle<guchar>& values)
 Set byte array hint.
void set_hint (const Glib::ustring& key, guchar value)
 Sets a hint with a byte value.
void set_hint (const Glib::ustring& key, const Glib::ustring& value)
 Sets a hint with a string value.
void set_hint (const Glib::ustring& key, double value)
 Sets a hint with a double value.
void set_hint (const Glib::ustring& key, int value)
 Sets a hint with a 32-bit integer value.
void set_icon_from_pixbuf (const Glib::RefPtr<Gdk::Pixbuf>& icon)
 Sets the icon in the notification from a Gdk::Pixbuf.
void set_timeout (int timeout)
 Sets the timeout of the notification.
void set_urgency (Urgency urgency)
 Sets the urgency level of this notification.
bool show ()
 Tells the notification server to display the notification on the screen.
Glib::SignalProxy0
<void> 
signal_closed ()
 
Prototype:
void on_my_closed()

bool update (const Glib::ustring& summary, const Glib::ustring& body, const Glib::ustring& icon)
 Updates the notification text and icon.
virtual ~Notification ()

Protected Member Functions

virtual void on_closed ()

Related Functions

(Note that these are not member functions.)

Glib::RefPtr
<Notify::Notification
wrap (NotifyNotification* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Detailed Description

Notification offers a way to show notification for a widget or in the system tray.

Member Typedef Documentation

typedef sigc::slot<void, const Glib::ustring& > Notify::Notification::SlotInvokeAction


Constructor & Destructor Documentation

virtual Notify::Notification::~Notification (  )  [virtual]

Notify::Notification::Notification ( const Glib::ustring &  summary,
const Glib::ustring &  body 
)

A constructor for Notification.

Parameters:
summary summary of the notification
body body text of the notification
Creates a new Notification with summary and body. You can set attach_widget and icon later

Notify::Notification::Notification ( const Glib::ustring &  summary,
const Glib::ustring &  body,
const Glib::ustring &  icon_name 
)

A constructor for Notification.

Parameters:
summary summary of the notification
body body text of the notification
icon_name name of the icon for the notification, can be a stock id
Creates a new Notification with summary, body and icon. You can set an attach_widget later

Notify::Notification::Notification ( const Glib::ustring &  summary,
const Glib::ustring &  body,
const Glib::ustring &  icon_name,
Gtk::Widget &  attach_widget 
) [explicit]

A constructor for Notification.

Parameters:
summary summary of the notification
body body text of the notification
icon_name name of the icon for the notification, can be a stock id
attach_widget widget the notification is attach to
Creates a new Notification

Notify::Notification::Notification ( const Glib::ustring &  summary,
const Glib::ustring &  body,
const Glib::ustring &  icon_name,
const Glib::RefPtr< Gtk::StatusIcon > &  status_icon 
) [explicit]

A constructor for Notification.

Parameters:
summary summary of the notification
body body text of the notification
icon_name name of the icon for the notification, can be a stock id
status_icon Gtk::StatusIcon the notification is attached to
Creates a new Notification


Member Function Documentation

Glib::PropertyProxy_ReadOnly<Gtk::Widget> Notify::Notification::_attach_widget (  )  const

The widget to attach the notification to.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Gtk::Widget> Notify::Notification::_attach_widget (  ) 

The widget to attach the notification to.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Notify::Notification::_body (  )  const

The message body text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Notify::Notification::_body (  ) 

The message body text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Notify::Notification::_icon_name (  )  const

The icon filename or icon theme-compliant name.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Notify::Notification::_icon_name (  ) 

The icon filename or icon theme-compliant name.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gtk::StatusIcon> > Notify::Notification::_status_icon (  )  const

The status icon to attach the notification to.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< Glib::RefPtr<Gtk::StatusIcon> > Notify::Notification::_status_icon (  ) 

The status icon to attach the notification to.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Notify::Notification::_summary (  )  const

The summary text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Notify::Notification::_summary (  ) 

The summary text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Notify::Notification::add_action ( const Glib::ustring &  action,
const Glib::ustring &  label,
const SlotInvokeAction slot 
)

Add an action to the notification.

Parameters:
action The action id
label The action label
slot A function or method to call when the action is invoked
Adds an action to a notification. When the action is invoked, the specified callback function will be called.

void Notify::Notification::attach_to_status_icon ( const Glib::RefPtr< Gtk::StatusIcon > &  status_icon  ) 

Attaches the notification to a Gtk::StatusIcon.

This will set hints on the notification requesting that the notification point to the status icon's location. If status_icon is 0, the status icon will be unset.

Since: 0.4.1

Parameters:
status_icon The Gtk::StatusIcon to attach to, or 0.

void Notify::Notification::attach_to_widget ( Gtk::Widget &  attach  ) 

Attaches the notification to a widget.

This will set hints on the notification requesting that the notification point to the widget's location. If attach is 0, the widget will be unset.

Parameters:
attach The widget to attach to, or 0.

void Notify::Notification::clear_actions (  ) 

Clears all actions from the notification.

void Notify::Notification::clear_hints (  ) 

Clears all hints from the notification.

void Notify::Notification::close (  ) 

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

Parameters:
error The returned error information.
Returns:
true if successful. On error, this will return false and set error .

const NotifyNotification* Notify::Notification::gobj (  )  const [inline]

Provides access to the underlying C GObject.

NotifyNotification* Notify::Notification::gobj (  )  [inline]

Provides access to the underlying C GObject.

NotifyNotification* Notify::Notification::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

virtual void Notify::Notification::on_closed (  )  [protected, virtual]

void Notify::Notification::set_category ( const Glib::ustring &  category  ) 

Sets the category of this notification.

This can be used by the notification server to filter or display the data in a certain way.

Parameters:
category The category.

void Notify::Notification::set_geometry_hints ( const Glib::RefPtr< Gdk::Screen > &  screen,
int  x,
int  y 
)

Sets the geometry hints on the notification.

This sets the screen the notification should appear on and the X, Y coordinates it should point to, if the particular notification supports X, Y hints.

Since: 0.4.1

Parameters:
screen The Gdk::Screen the notification should appear on.
x The X coordinate to point to.
y The Y coordinate to point to.

void Notify::Notification::set_hint ( const Glib::ustring &  key,
const Glib::ArrayHandle< guchar > &  values 
)

Set byte array hint.

Parameters:
key The hint.
values The hint's value.
Sets a hint with a byte array value.

void Notify::Notification::set_hint ( const Glib::ustring &  key,
guchar  value 
)

Sets a hint with a byte value.

Parameters:
key The hint.
value The hint's value.

void Notify::Notification::set_hint ( const Glib::ustring &  key,
const Glib::ustring &  value 
)

Sets a hint with a string value.

Parameters:
key The hint.
value The hint's value.

void Notify::Notification::set_hint ( const Glib::ustring &  key,
double  value 
)

Sets a hint with a double value.

Parameters:
key The hint.
value The hint's value.

void Notify::Notification::set_hint ( const Glib::ustring &  key,
int  value 
)

Sets a hint with a 32-bit integer value.

Parameters:
key The hint.
value The hint's value.

void Notify::Notification::set_icon_from_pixbuf ( const Glib::RefPtr< Gdk::Pixbuf > &  icon  ) 

Sets the icon in the notification from a Gdk::Pixbuf.

This will only work when libnotify is compiled against D-BUS 0.60 or higher.

Parameters:
icon The icon.

void Notify::Notification::set_timeout ( int  timeout  ) 

Sets the timeout of the notification.

To set the default time, pass Notify::EXPIRES_DEFAULT as timeout . To set the notification to never expire, pass Notify::EXPIRES_NEVER.

Parameters:
timeout The timeout in milliseconds.

void Notify::Notification::set_urgency ( Urgency  urgency  ) 

Sets the urgency level of this notification.

See: Notify::Urgency

Parameters:
urgency The urgency level.

bool Notify::Notification::show (  ) 

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

Parameters:
error The returned error information.
Returns:
true if successful. On error, this will return false and set error .

Glib::SignalProxy0< void > Notify::Notification::signal_closed (  ) 

Prototype:
void on_my_closed()

bool Notify::Notification::update ( const Glib::ustring &  summary,
const Glib::ustring &  body,
const Glib::ustring &  icon 
)

Updates the notification text and icon.

This won't send the update out and display it on the screen. For that, you will need to call show().

Parameters:
summary The new required summary text.
body The optional body text.
icon The optional icon theme icon name or filename.
Returns:
true, unless an invalid parameter was passed.


Friends And Related Function Documentation

Glib::RefPtr<Notify::Notification> wrap ( NotifyNotification *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated for libnotifymm by Doxygen 1.5.3 © 1997-2001