libnotifymm  0.7.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
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]

Public Types

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

Public Member Functions

void add_action (const Glib::ustring& action, const Glib::ustring& label, const SlotInvokeAction& slot)
 Add an action to the notification.
 
void clear_actions ()
 
void clear_hints ()
 
bool close ()
 
int get_closed_reason () const
 
NotifyNotification* gobj ()
 Provides access to the underlying C GObject.
 
const NotifyNotification* gobj () const
 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=Glib::ustring(), const Glib::ustring& icon=Glib::ustring())
 
Glib::PropertyProxy
< Glib::ustring > 
property_app_name ()
 The application name to use for this notification.
 
Glib::PropertyProxy_ReadOnly
< Glib::ustring > 
property_app_name () const
 The application name to use for this notification.
 
Glib::PropertyProxy
< Glib::ustring > 
property_body ()
 The message body text.
 
Glib::PropertyProxy_ReadOnly
< Glib::ustring > 
property_body () const
 The message body text.
 
Glib::PropertyProxy_ReadOnly< int > property_closed_reason () const
 The reason code for why the notification was closed.
 
Glib::PropertyProxy
< Glib::ustring > 
property_icon_name ()
 The icon filename or icon theme-compliant name.
 
Glib::PropertyProxy_ReadOnly
< Glib::ustring > 
property_icon_name () const
 The icon filename or icon theme-compliant name.
 
Glib::PropertyProxy< int > property_id ()
 The notification ID.
 
Glib::PropertyProxy_ReadOnly< int > property_id () const
 The notification ID.
 
Glib::PropertyProxy
< Glib::ustring > 
property_summary ()
 The summary text.
 
Glib::PropertyProxy_ReadOnly
< Glib::ustring > 
property_summary () const
 The summary text.
 
void set_app_name (const Glib::ustring& app_name)
 
void set_category (const Glib::ustring& category)
 
void set_hint (const Glib::ustring& key, int value)
 
void set_hint (const Glib::ustring& key, guint value)
 
void set_hint (const Glib::ustring& key, double value)
 
void set_hint (const Glib::ustring& key, const Glib::ustring& value)
 
void set_hint (const Glib::ustring& key, guchar value)
 
void set_hint (const Glib::ustring& key, const Glib::ArrayHandle< guchar >& values)
 Set byte array hint.
 
void set_hint (const Glib::ustring& key, const Glib::VariantBase& value)
 
void set_icon_from_pixbuf (const Glib::RefPtr< Gdk::Pixbuf >& icon)
 
void set_image_from_pixbuf (const Glib::RefPtr< Gdk::Pixbuf >& pixbuf)
 
void set_timeout (int timeout)
 
void set_urgency (Urgency urgency)
 
bool show ()
 
Glib::SignalProxy0< void > signal_closed ()
 
bool update (const Glib::ustring& summary, const Glib::ustring& body=Glib::ustring(), const Glib::ustring& icon=Glib::ustring())
 
virtual ~Notification ()
 

Static Public Member Functions

static GType get_type () G_GNUC_CONST
 Get the GType for this class, for use with the underlying GObject type system.
 

Protected Member Functions

virtual void on_closed ()
 This is a default handler for the signal signal_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 = Glib::ustring(),
const Glib::ustring &  icon = Glib::ustring() 
)
explicit

Member Function Documentation

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

Add an action to the notification.

Parameters
actionthe action id
labelthe action label
slotA 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::clear_actions ( )
void Notify::Notification::clear_hints ( )
bool Notify::Notification::close ( )
int Notify::Notification::get_closed_reason ( ) const
static GType Notify::Notification::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

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

Provides access to the underlying C GObject.

const NotifyNotification* Notify::Notification::gobj ( ) const
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 ( )
protectedvirtual

This is a default handler for the signal signal_closed().

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

The application name to use for this notification.

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 value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< Glib::ustring > Notify::Notification::property_app_name ( ) const

The application name to use for this notification.

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

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy< Glib::ustring > Notify::Notification::property_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 value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< Glib::ustring > Notify::Notification::property_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_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< int > Notify::Notification::property_closed_reason ( ) const

The reason code for why the notification was closed.

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

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy< Glib::ustring > Notify::Notification::property_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 value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< Glib::ustring > Notify::Notification::property_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_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy< int > Notify::Notification::property_id ( )

The notification ID.

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 value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< int > Notify::Notification::property_id ( ) const

The notification ID.

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

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy< Glib::ustring > Notify::Notification::property_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 value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< Glib::ustring > Notify::Notification::property_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_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
void Notify::Notification::set_app_name ( const Glib::ustring &  app_name)
void Notify::Notification::set_category ( const Glib::ustring &  category)
void Notify::Notification::set_hint ( const Glib::ustring &  key,
int  value 
)
void Notify::Notification::set_hint ( const Glib::ustring &  key,
guint  value 
)
void Notify::Notification::set_hint ( const Glib::ustring &  key,
double  value 
)
void Notify::Notification::set_hint ( const Glib::ustring &  key,
const Glib::ustring &  value 
)
void Notify::Notification::set_hint ( const Glib::ustring &  key,
guchar  value 
)
void Notify::Notification::set_hint ( const Glib::ustring &  key,
const Glib::ArrayHandle< guchar > &  values 
)

Set byte array hint.

Sets a hint with a byte array value.

Parameters
keythe hint
valuesthe hint's value
Deprecated:
Use set_hint(const Glib::ustring& key, const Glib::VariantBase& value) instead.
void Notify::Notification::set_hint ( const Glib::ustring &  key,
const Glib::VariantBase &  value 
)
void Notify::Notification::set_icon_from_pixbuf ( const Glib::RefPtr< Gdk::Pixbuf > &  icon)
void Notify::Notification::set_image_from_pixbuf ( const Glib::RefPtr< Gdk::Pixbuf > &  pixbuf)
void Notify::Notification::set_timeout ( int  timeout)
void Notify::Notification::set_urgency ( Urgency  urgency)
bool Notify::Notification::show ( )
Glib::SignalProxy0< void > Notify::Notification::signal_closed ( )
Slot Prototype:
void on_my_closed()

Emitted when the notification is closed.

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

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
objectThe C instance.
take_copyFalse 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: