Icons and Images

A notification can optionally have an associated icon and/or image.

The icon is defined by the "app_icon" parameter. The image can be defined by the "image-path", the "image-data" hint or the deprecated "icon_data" hint.

Priorities

An implementation which only displays one image or icon must choose which one to display using the following order:

  1. "image-data"

  2. "image-path"

  3. app_icon parameter

  4. for compatibility reason, "icon_data"

An implementation which can display both the image and icon must show the icon from the "app_icon" parameter and choose which image to display using the following order:

  1. "image-data"

  2. "image-path"

  3. for compatibility reason, "icon_data"

Formats

The "image-data" and "icon_data" hints should be a DBus structure of signature (iiibiiay). The components of this structure are as follows:

  1. width (i): Width of image in pixels

  2. height (i): Height of image in pixels

  3. rowstride (i): Distance in bytes between row starts

  4. has_alpha (b): Whether the image has an alpha channel

  5. bits_per_sample (i): Must always be 8

  6. channels (i): If has_alpha is TRUE, must be 4, otherwise 3

  7. data (ay): The image data, in RGB byte order

This image format is derived from gdk-pixbuf.

The "app_icon" parameter and "image-path" hint should be either an URI (file:// is the only URI schema supported right now) or a name in a freedesktop.org-compliant icon theme (not a GTK+ stock ID).