GfNotification

GfNotification — GfNotification Object API

Synopsis




            GfNotification;
enum        GfNotificationStyle;
void        (*GfNotificationEnumItemsCB)    (GfNotification *notification,
                                             GfItem *item);
GfNotification* gf_notification_new         (void);
void        gf_notification_set_style       (GfNotification *notification,
                                             GfNotificationStyle style);
GfNotificationStyle gf_notification_get_style
                                            (const GfNotification *notification);
void        gf_notification_set_width       (GfNotification *notification,
                                             guint width);
guint       gf_notification_get_width       (const GfNotification *notification);
void        gf_notification_set_height      (GfNotification *notification,
                                             guint height);
guint       gf_notification_get_height      (const GfNotification *notification);
void        gf_notification_set_background  (GfNotification *notification,
                                             const gchar *background);
const gchar* gf_notification_get_background (const GfNotification *notification);
void        gf_notification_add_item        (GfNotification *notification,
                                             GfItem *item);
void        gf_notification_remove_item     (GfNotification *notification,
                                             GfItem *item);
void        gf_notification_enum_items      (GfNotification *notification,
                                             GfNotificationEnumItemsCB callback);
#define     gf_notification_style_from_string(str)
#define     gf_notification_style_to_string (style, i18n)

Object Hierarchy


  GObject
   +----GfObject
         +----GfNotification

Properties


  "background"           gchararray            : Read / Write
  "height"               guint                 : Read / Write
  "style"                GfNotificationStyle   : Read / Write
  "width"                guint                 : Read / Write

Description

GfNotification's are a themes representation of a GfEvent.

Details

GfNotification

typedef struct _GfNotification GfNotification;

GfNotification is an opaque structure that should not be used directly.


enum GfNotificationStyle

typedef enum _GfNotificationStyle {
	GF_NOTIFICATION_STYLE_STATIC = 0,
	GF_NOTIFICATION_STYLE_SCALED,
	GF_NOTIFICATION_STYLE_TILED,
	GF_NOTIFICATION_STYLES
} GfNotificationStyle;

The available types for the style of a GfNotification.

GF_NOTIFICATION_STYLE_STATIC Background is staticly sized.
GF_NOTIFICATION_STYLE_SCALED Background is scaled to fit.
GF_NOTIFICATION_STYLE_TILED Background is tiled.
GF_NOTIFICATION_STYLES Total Styles.

GfNotificationEnumItemsCB ()

void        (*GfNotificationEnumItemsCB)    (GfNotification *notification,
                                             GfItem *item);

notification :
item :

gf_notification_new ()

GfNotification* gf_notification_new         (void);

Creates a new GfNotification instance.

Returns : A new GfNotification instance.

gf_notification_set_style ()

void        gf_notification_set_style       (GfNotification *notification,
                                             GfNotificationStyle style);

Sets the GfNotificationStyle for notification.

notification : A GfNotification instance.
style : The new GfNotificationStyle.

gf_notification_get_style ()

GfNotificationStyle gf_notification_get_style
                                            (const GfNotification *notification);

Gets the GfNotificationStyle from notification.

notification : The GfNotification instance.
Returns : The GfNotificationStyle from notification.

gf_notification_set_width ()

void        gf_notification_set_width       (GfNotification *notification,
                                             guint width);

Sets the width for notification.

notification : The GfNotification instance.
width : The new width.

gf_notification_get_width ()

guint       gf_notification_get_width       (const GfNotification *notification);

Gets the width from notification.

notification : The GfNotification instance.
Returns : The width of notification.

gf_notification_set_height ()

void        gf_notification_set_height      (GfNotification *notification,
                                             guint height);

Sets the height for notification.

notification : The GfNotification instance.
height : The new height.

gf_notification_get_height ()

guint       gf_notification_get_height      (const GfNotification *notification);

Gets the height from notification.

notification : The GfNotification instance.
Returns : The height from notification.

gf_notification_set_background ()

void        gf_notification_set_background  (GfNotification *notification,
                                             const gchar *background);

Sets the background for notification.

notification : The GfNotification instance.
background : The background image filename.

gf_notification_get_background ()

const gchar* gf_notification_get_background (const GfNotification *notification);

Gets the background image filename for notification.

notification : The GfNotification instance.
Returns : The background image filename for notification.

gf_notification_add_item ()

void        gf_notification_add_item        (GfNotification *notification,
                                             GfItem *item);

Adds an item to notification.

Note: notification will add a reference to item; it will not inherit your reference.

notification : The GfNotification instance.
item : The GfItem instance.

gf_notification_remove_item ()

void        gf_notification_remove_item     (GfNotification *notification,
                                             GfItem *item);

Removes item from notification.

Note: notification will remove it's reference from item. If this is the last reference item will be destroyed.

notification : The GfNotification instance.
item : The GfItem instance.

gf_notification_enum_items ()

void        gf_notification_enum_items      (GfNotification *notification,
                                             GfNotificationEnumItemsCB callback);

Enumerates all the items in notification by calling callback.

notification : The GfNotification instance.
callback : The GfNotificationEnumItemsCB callback.

gf_notification_style_from_string()

#define     gf_notification_style_from_string(str)

Gets a GfNotificationStyle from a string.

Note: str MUST be the untranslated string!

str : The string.
Returns : The GfNotificationStyle.

gf_notification_style_to_string()

#define     gf_notification_style_to_string(style, i18n)

Gets a string from a GfNotificationStyle.

style : The GfNotificationStyle.
i18n : TRUE for the translated version.
Returns : style as a string.

Properties

The "background" property

  "background"           gchararray            : Read / Write

A background image for the notificatoin.

Default value: NULL


The "height" property

  "height"               guint                 : Read / Write

The height of the notification if no background is set.

Allowed values: [16,512]

Default value: 120


The "style" property

  "style"                GfNotificationStyle   : Read / Write

The style of the notification.

Default value: Static


The "width" property

  "width"                guint                 : Read / Write

The width of the notification if no background is set.

Allowed values: [16,512]

Default value: 140